Fixed how extra user help is displayed

This commit is contained in:
moodler 2005-04-21 04:57:54 +00:00
parent 64fdfa6672
commit a1157dda6a

View file

@ -76,17 +76,13 @@ function message_print_contacts() {
}
}
if($countonlinecontacts + $countofflinecontacts == 0) {
echo '<p class="message_heading">';
if ($countonlinecontacts + $countofflinecontacts == 0) {
echo '<div class="message_heading">';
print_string('contactlistempty', 'message');
echo '</p>';
echo '<p style="text-align: justify;">';
echo '</div>';
echo '<div class="message_text">';
print_string('addsomecontacts', 'message', $CFG->wwwroot.'/message/index.php?tab=search');
echo '</p>';
echo '<p style="text-align: justify;">';
print_string('addsomecontactsincoming', 'message');
echo '</p>';
echo '</div>';
}
if(!empty($onlinecontacts) || !empty($offlinecontacts) || !empty($unknownmessages)) {
@ -128,14 +124,13 @@ function message_print_contacts() {
echo '<tr><td colspan="3">&nbsp;</td></tr>';
}
if(!empty($offlinecontacts)) {
if (!empty($offlinecontacts)) {
/// print out list of offline contacts
echo '<tr><td colspan="3" class="message_heading">';
echo get_string('offlinecontacts', 'message', $countofflinecontacts);
echo '</td></tr>';
if (!empty($offlinecontacts)) {
foreach ($offlinecontacts as $contact) {
if ($contact->blocked == 1) continue;
$fullname = fullname($contact);
@ -159,7 +154,6 @@ function message_print_contacts() {
echo '<td class="message_link">'.$strcontact.'&nbsp;'.$strhistory.'</td>';
echo '</tr>';
}
}
echo '<tr><td colspan="3">&nbsp;</td></tr>';
}
@ -170,6 +164,12 @@ function message_print_contacts() {
echo get_string('incomingcontacts', 'message', count($unknownmessages));
echo '</td></tr>';
if ($countonlinecontacts + $countofflinecontacts == 0) { // Extra help
echo '<tr><td colspan="3" class="message_text">';
print_string('addsomecontactsincoming', 'message');
echo '</td></tr>';
}
foreach ($unknownmessages as $messageuser) {
$fullname = fullname($messageuser);
$fullnamelink = $fullname;
@ -199,7 +199,7 @@ function message_print_contacts() {
}
echo '<p align="center" class="message_small_note">'.get_string('pagerefreshes', 'message', $CFG->message_contacts_refresh).'</p>';
echo '<br /><p align="center" class="message_small_note">'.get_string('pagerefreshes', 'message', $CFG->message_contacts_refresh).'</p>';
}