mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-36631 usability: Core edit for new messaging icons
This commit is contained in:
parent
00a398fbc6
commit
f2bba619b3
3 changed files with 18 additions and 24 deletions
|
@ -1270,7 +1270,10 @@ function message_print_user ($user=false, $iscontact=false, $isblocked=false, $i
|
|||
echo $OUTPUT->user_picture($USER, array('size' => 20, 'courseid' => SITEID));
|
||||
} else {
|
||||
echo $OUTPUT->user_picture($user, array('size' => 20, 'courseid' => SITEID));
|
||||
echo ' ';
|
||||
|
||||
$link = new moodle_url("/message/index.php?id=$user->id");
|
||||
echo $OUTPUT->action_link($link, fullname($user), null, array('title' =>
|
||||
get_string('sendmessageto', 'message', fullname($user))));
|
||||
|
||||
$return = false;
|
||||
$script = null;
|
||||
|
@ -1279,27 +1282,12 @@ function message_print_user ($user=false, $iscontact=false, $isblocked=false, $i
|
|||
} else {
|
||||
message_contact_link($user->id, 'add', $return, $script, $includeicontext);
|
||||
}
|
||||
echo ' ';
|
||||
|
||||
if ($isblocked) {
|
||||
message_contact_link($user->id, 'unblock', $return, $script, $includeicontext);
|
||||
} else {
|
||||
message_contact_link($user->id, 'block', $return, $script, $includeicontext);
|
||||
}
|
||||
|
||||
$popupoptions = array(
|
||||
'height' => MESSAGE_DISCUSSION_HEIGHT,
|
||||
'width' => MESSAGE_DISCUSSION_WIDTH,
|
||||
'menubar' => false,
|
||||
'location' => false,
|
||||
'status' => true,
|
||||
'scrollbars' => true,
|
||||
'resizable' => true);
|
||||
|
||||
$link = new moodle_url("/message/index.php?id=$user->id");
|
||||
//$action = new popup_action('click', $link, "message_$user->id", $popupoptions);
|
||||
$action = null;
|
||||
echo $OUTPUT->action_link($link, fullname($user), $action, array('title' => get_string('sendmessageto', 'message', fullname($user))));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1351,14 +1339,14 @@ function message_contact_link($userid, $linktype='add', $return=false, $script=n
|
|||
$iconpath = 't/block';
|
||||
break;
|
||||
case 'unblock':
|
||||
$iconpath = 't/userblue';
|
||||
$iconpath = 't/unblock';
|
||||
break;
|
||||
case 'remove':
|
||||
$iconpath = 'i/cross_red_big';
|
||||
$iconpath = 't/removecontact';
|
||||
break;
|
||||
case 'add':
|
||||
default:
|
||||
$iconpath = 't/addgreen';
|
||||
$iconpath = 't/addcontact';
|
||||
}
|
||||
|
||||
$img = '<img src="'.$OUTPUT->pix_url($iconpath).'" class="iconsmall" alt="'.$safealttext.'" />';
|
||||
|
@ -1405,9 +1393,9 @@ function message_history_link($userid1, $userid2, $return=false, $keywords='', $
|
|||
}
|
||||
|
||||
if ($linktext == 'icon') { // Icon only
|
||||
$fulllink = '<img src="'.$OUTPUT->pix_url('t/log') . '" class="iconsmall" alt="'.$strmessagehistory.'" />';
|
||||
$fulllink = '<img src="'.$OUTPUT->pix_url('t/messages') . '" class="iconsmall" alt="'.$strmessagehistory.'" />';
|
||||
} else if ($linktext == 'both') { // Icon and standard name
|
||||
$fulllink = '<img src="'.$OUTPUT->pix_url('t/log') . '" class="iconsmall" alt="" />';
|
||||
$fulllink = '<img src="'.$OUTPUT->pix_url('t/messages') . '" class="iconsmall" alt="" />';
|
||||
$fulllink .= ' '.$strmessagehistory;
|
||||
} else if ($linktext) { // Custom name
|
||||
$fulllink = $linktext;
|
||||
|
@ -1831,8 +1819,7 @@ function message_print_message_history($user1,$user2,$search='',$messagelimit=0,
|
|||
echo html_writer::end_tag('td');
|
||||
|
||||
echo html_writer::start_tag('td', array('align' => 'center'));
|
||||
echo html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/left'), 'alt' => get_string('from')));
|
||||
echo html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('t/right'), 'alt' => get_string('to')));
|
||||
echo html_writer::empty_tag('img', array('src' => $OUTPUT->pix_url('i/twoway'), 'alt' => ''));
|
||||
echo html_writer::end_tag('td');
|
||||
|
||||
echo html_writer::start_tag('td', array('align' => 'center', 'id' => 'user2'));
|
||||
|
|
|
@ -60,6 +60,10 @@ table.message .searchresults td {padding:5px;}
|
|||
.messagesearchresults {margin-bottom:40px;}
|
||||
.messagesearchresults td {padding:0px 10px 0px 20px;}
|
||||
.messagesearchresults td span {white-space:nowrap;}
|
||||
.messagesearchresults td img.userpicture { padding-right: .45em; vertical-align: text-bottom; }
|
||||
.dir-rtl .messagesearchresults td img.userpicture { padding-left: .45em; padding-right: 0; }
|
||||
.messagesearchresults td span img { padding: 0 0 0 .45em; vertical-align: text-bottom; }
|
||||
.dir-rtl .messagesearchresults td span img { padding: 0 .45em 0 0; }
|
||||
|
||||
#newmessageoverlay {background-color:LightGrey;border:1px solid black;padding:20px;position:fixed;bottom:0;right:0;}
|
||||
#newmessageoverlay #usermessage {padding:10px;}
|
||||
|
|
|
@ -8,6 +8,7 @@ required changes:
|
|||
|
||||
deprecation:
|
||||
* i/roles: Use t/assignroles instead
|
||||
* t/userblue: Previously used to unblock a user, use t/unblock.
|
||||
|
||||
optional changes:
|
||||
* new optional boolean parameter $withlinks for public function login_info() in lib/outputrenderers.php (MDL-31365)
|
||||
|
@ -20,6 +21,8 @@ optional changes:
|
|||
* new icon t/cohorts (sized 12x12), to prevent the use of i/cohorts which is 16x16.
|
||||
* new icons t/sort_asc, t/sort_desc to use for ordering in table headers.
|
||||
* new class 'iconsort' for icons used for ordering in table headers.
|
||||
* new icons t/addcontact, t/removecontact and t/messages, previously t/addgreen, t/delete and t/log were used in messaging.
|
||||
* new icons t/unblock and i/twoway.
|
||||
|
||||
=== 2.3 ===
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue