Some tidy-ups and some styles
This commit is contained in:
+11
-4
@@ -58,7 +58,8 @@ function message_print_contacts() {
|
||||
$fullnamelink = '<strong>'.$fullnamelink.' ('.$unread.')</strong>';
|
||||
}
|
||||
/// link to remove from contact list
|
||||
$strcontact .= message_contact_link($contact->id, 'remove', true);
|
||||
$strcontact = message_contact_link($contact->id, 'remove', true);
|
||||
$strhistory = message_contact_link($contact->id, 'history', true);
|
||||
|
||||
echo '<tr><td class="message_pix">';
|
||||
print_user_picture($contact->id, SITEID, $contact->picture, 20, false, true, 'userwindow');
|
||||
@@ -68,7 +69,7 @@ function message_print_contacts() {
|
||||
$fullnamelink, 500, 500, get_string('sendmessageto', 'message', $fullname),
|
||||
'menubar=0,location=0,status,scrollbars,resizable,width=500,height=500');
|
||||
echo '</td>';
|
||||
echo '<td class="message_link">'.$strcontact.'</td>';
|
||||
echo '<td class="message_link">'.$strcontact.' '.$strhistory.'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
@@ -94,6 +95,7 @@ function message_print_contacts() {
|
||||
}
|
||||
/// link to remove from contact list
|
||||
$strcontact = message_contact_link($contact->id, 'remove', true);
|
||||
$strhistory = message_contact_link($contact->id, 'history', true);
|
||||
|
||||
echo '<tr><td class="message_pix">';
|
||||
print_user_picture($contact->id, SITEID, $contact->picture, 20, false, true, 'userwindow');
|
||||
@@ -103,7 +105,7 @@ function message_print_contacts() {
|
||||
$fullnamelink, 500, 500, get_string('sendmessageto', 'message', $fullname),
|
||||
'menubar=0,location=0,status,scrollbars,resizable,width=500,height=500');
|
||||
echo '</td>';
|
||||
echo '<td class="message_link">'.$strcontact.'</td>';
|
||||
echo '<td class="message_link">'.$strcontact.' '.$strhistory.'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
@@ -153,6 +155,7 @@ function message_print_contacts() {
|
||||
|
||||
$strcontact = message_contact_link($messageuser->useridfrom, 'add', true);
|
||||
$strblock = message_contact_link($messageuser->useridfrom, 'block', true);
|
||||
$strhistory = message_contact_link($messageuser->useridfrom, 'history', true);
|
||||
|
||||
echo '<tr><td class="message_pix">';
|
||||
print_user_picture($messageuser->useridfrom, SITEID, $messageuser->picture, 20, false, true, 'userwindow');
|
||||
@@ -162,7 +165,7 @@ function message_print_contacts() {
|
||||
$fullnamelink, 500, 500, get_string('sendmessageto', 'message', $fullname),
|
||||
'menubar=0,location=0,status,scrollbars,resizable,width=500,height=500');
|
||||
echo '</td>';
|
||||
echo '<td class="message_link">'.$strcontact.' '.$strblock.'</td>';
|
||||
echo '<td class="message_link"> '.$strcontact.' '.$strblock.' '.$strhistory.'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
@@ -526,9 +529,13 @@ function message_contact_link($userid, $linktype='add', $return=false) {
|
||||
$str->unblockcontact = get_string('unblockcontact', 'message');
|
||||
$str->removecontact = get_string('removecontact', 'message');
|
||||
$str->addcontact = get_string('addcontact', 'message');
|
||||
$str->messagehistory = get_string('messagehistory', 'message');
|
||||
}
|
||||
|
||||
switch ($linktype) {
|
||||
case 'history':
|
||||
$output = '<a target="message_history_'.$userid.'" title="'.$str->messagehistory.'" href="'.$CFG->wwwroot.'/message/history.php?user1='.$userid.'" onclick="return openpopup(\'/message/history.php?user1='.$userid.'\', \'message_history_'.$userid.'\', \'menubar=0,location=0,status,scrollbars,resizable,width=500,height=500\', 0);"><img src="'.$CFG->pixpath.'/t/log.gif" height="11" width="11" border="0"></a>';
|
||||
break;
|
||||
case 'block':
|
||||
$output = '<a href="index.php?tab=contacts&blockcontact='.$userid.
|
||||
'&sesskey='.$USER->sesskey.'" title="'.$str->blockcontact.'">'.
|
||||
|
||||
+5
-5
@@ -2,7 +2,7 @@
|
||||
<input type="hidden" name="tab" value="search" />
|
||||
|
||||
|
||||
<table cellpadding="5" align="center">
|
||||
<table cellpadding="5" align="center" class="message_form">
|
||||
|
||||
|
||||
<tr>
|
||||
@@ -39,12 +39,12 @@
|
||||
<input type="checkbox" name="includeblocked" alt="<?php print_string('includeblockedusers', 'message') ?>" /><?php print_string('includeblockedusers', 'message') ?></td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="3"><input type="radio" name="keywordsoption" alt="<?php print_string('onlytome', 'message') ?>" value="tome" checked="checked" /><?php print_string('onlytome', 'message') ?></td></tr>
|
||||
<tr><td colspan="3"><input type="radio" name="keywordsoption" alt="<?php print_string('onlyfromme', 'message') ?>" value="fromme" /><?php print_string('onlyfromme', 'message') ?></td></tr>
|
||||
<tr><td colspan="3"><input type="radio" name="keywordsoption" alt="<?php print_string('allmine', 'message') ?>" value="allmine" /><?php print_string('allmine', 'message') ?></td></tr>
|
||||
<tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" alt="<?php print_string('onlytome', 'message') ?>" value="tome" checked="checked" /><?php print_string('onlytome', 'message') ?></td></tr>
|
||||
<tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" alt="<?php print_string('onlyfromme', 'message') ?>" value="fromme" /><?php print_string('onlyfromme', 'message') ?></td></tr>
|
||||
<tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" alt="<?php print_string('allmine', 'message') ?>" value="allmine" /><?php print_string('allmine', 'message') ?></td></tr>
|
||||
|
||||
<?php if (isadmin()) { ?>
|
||||
<tr><td colspan="3"><input type="radio" name="keywordsoption" alt="<?php print_string('allusers', 'message') ?>" value="allusers" /><?php print_string('allusers', 'message') ?></td></tr>
|
||||
<tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" alt="<?php print_string('allusers', 'message') ?>" value="allusers" /><?php print_string('allusers', 'message') ?></td></tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
|
||||
+8
-26
@@ -2,8 +2,7 @@
|
||||
<input type="hidden" name="tab" value="settings" />
|
||||
|
||||
|
||||
<table cellpadding="5" align="center">
|
||||
|
||||
<table cellpadding="5" align="center" class="message_form">
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><input type="checkbox" name="showmessagewindow" alt="<?php print_string('showmessagewindow', 'message') ?>" <?php echo $cbshowmessagewindow ?> /></td>
|
||||
@@ -15,29 +14,20 @@
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td colspan="3"><hr /></td></tr>
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<td><input type="text" name="maxmessages" size="2" value="<?php echo $txmaxmessages ?>" alt="<?php print_string('maxmessages', 'message') ?>" /></td>
|
||||
<td colspan="2"><?php print_string('maxmessages', 'message') ?></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><input type="text" name="deletemessagesdays" size="2" value="<?php echo $txdeletemessagesdays ?>" alt="<?php print_string('deletemessagesdays', 'message') ?>" /></td>
|
||||
<td colspan="2"><?php print_string('deletemessagesdays', 'message') ?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td colspan="3"><hr /></td></tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td><input type="checkbox" name="emailmessages" alt="<?php print_string('emailmessages', 'message') ?>" <?php echo $cbemailmessages ?> /></td>
|
||||
<td colspan="2"><?php print_string('emailmessages', 'message') ?></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td> </td>
|
||||
<td align="right"><?php print_string('formorethan', 'message') ?>:</td>
|
||||
<td><input type="text" name="emailtimenosee" size="2" value="<?php echo $txemailtimenosee ?>" alt="<?php print_string('timenosee', 'message') ?>" /> <?php print_string('mins') ?></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td> </td>
|
||||
<td align="right"><?php print_string('email') ?>:</td>
|
||||
<td><input type="text" name="emailaddress" size="30" value="<?php echo $txemailaddress ?>" alt="<?php print_string('email') ?>" /></td>
|
||||
<td><input type="text" name="emailaddress" size="20" value="<?php echo $txemailaddress ?>" alt="<?php print_string('email') ?>" /></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td> </td>
|
||||
@@ -45,15 +35,7 @@
|
||||
<td><?php echo $format_select ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td> </td>
|
||||
<td align="right"><?php print_string('timenosee', 'message') ?>:</td>
|
||||
<td><input type="text" name="emailtimenosee" size="2" value="<?php echo $txemailtimenosee ?>" alt="<?php print_string('timenosee', 'message') ?>" /></td>
|
||||
|
||||
|
||||
<tr><td colspan="3"><hr /></td></tr>
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<td colspan="3" align="center"><input type="submit" value="<?php print_string('savemysettings', 'message') ?>" /></td>
|
||||
</tr>
|
||||
|
||||
@@ -808,4 +808,27 @@ TABLE.formtable TD {
|
||||
font-size: x-small;
|
||||
color: #555555;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.message_contact {
|
||||
font-size: small;
|
||||
}
|
||||
.message_summary {
|
||||
font-size: small;
|
||||
}
|
||||
.message_date {
|
||||
font-size: small;
|
||||
}
|
||||
.message_small_note {
|
||||
font-size: x-small;
|
||||
}
|
||||
.message_link {
|
||||
font-size: x-small;
|
||||
}
|
||||
.message_pix {
|
||||
font-size: x-small;
|
||||
}
|
||||
.message_form {
|
||||
font-size: 0.78em;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user