Minor UI corrections in announcements and agenda

skala
Julio Montoya 14 years ago
parent 1940218ea4
commit 37c5dd6520
  1. 14
      main/announcements/announcements.inc.php
  2. 29
      main/announcements/announcements.php
  3. 2
      main/calendar/myagenda.inc.php

@ -135,20 +135,22 @@ class AnnouncementManager {
echo "<table height=\"100\" width=\"100%\" cellpadding=\"5\" cellspacing=\"0\" id=\"agenda_list\">";
echo "<tr class=\"data\"><td><h2>" . $title . "</h2></td></tr>";
echo "<tr><td class=\"announcements_datum\">" . get_lang('AnnouncementPublishedOn') . " : " . api_convert_and_format_date($last_post_datetime) . "</td></tr>";
echo "<tr class=\"text\"><td>$content</td></tr>";
echo "<tr><td class=\"announcements_datum\">" . get_lang('AnnouncementPublishedOn') . " : " . api_convert_and_format_date($result['end_date'], DATE_FORMAT_LONG) . "</td></tr>";
echo "<tr><td class=\"announcements_datum\">" . get_lang('LastUpdateDate') . " : " . api_convert_and_format_date($last_post_datetime, DATE_TIME_FORMAT_LONG) . "</td></tr>";
echo "<tr><td>";
$attachment_list = AnnouncementManager::get_attachment($announcement_id);
$attachment_list = AnnouncementManager::get_attachment($announcement_id);
if (count($attachment_list)>0) {
$realname=$attachment_list['path'];
$user_filename=$attachment_list['filename'];
$full_file_name = 'download.php?file='.$realname;
echo '<br/>';
echo '<br/>';
echo '<br/>';
echo Display::return_icon('attachment.gif',get_lang('Attachment'));
echo '<a href="'.$full_file_name.'';
echo ' "> '.$user_filename.' </a>';
echo '<a href="'.$full_file_name.' "> '.$user_filename.' </a>';
echo '<span class="forum_attach_comment" >'.$attachment_list['comment'].'</span>';
}
echo '</td></tr>';

@ -1248,12 +1248,10 @@ if ($display_announcement_list && !$surveyid) {
$ths .= Display::tag('th', get_lang('Modify'));
}
echo Display::tag('tr', $ths);
$displayed = array();
while ($myrow = Database::fetch_array($result)) {
echo Display::tag('tr', $ths);
$displayed = array();
while ($myrow = Database::fetch_array($result)) {
if (!in_array($myrow['id'], $displayed)) {
$title = $myrow['title'];
$content = $myrow['content'];
@ -1261,15 +1259,9 @@ if ($display_announcement_list && !$surveyid) {
$content = make_clickable($content);
$content = text_filter($content);
/* DATE */
$last_post_datetime = $myrow['end_date'];
list($last_post_date, $last_post_time) = split(" ", $last_post_datetime);
list($year, $month, $day) = explode("-", $last_post_date);
list($hour, $min) = explode(":", $last_post_time);
$announceDate = mktime((int)$hour, (int)$min, 0, (int)$month, (int)$day, (int)$year);
/* DATE */
$last_post_datetime = $myrow['end_date'];
// the styles
if ($myrow['visibility']=='0') {
$style='invisible';
@ -1301,15 +1293,14 @@ if ($display_announcement_list && !$surveyid) {
$attachment .= '&nbsp;&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&action=delete&id_attach='.$attachment_list['id'].'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset)).'\')) return false;">'.Display::return_icon('delete.png',get_lang('Delete'),'',22).'</a><br />';
}*/
}
/* TITLE */
$title = Display::url($title.$attachment_icon, '?action=view&id='.$myrow['id']);
/* TITLE */
echo Display::tag('td', Security::remove_XSS($title), array('class' => $style));
//echo Display::tag('td', Security::remove_XSS($content).$attachment);
// User or group icon
$sent_to_icon = '';
$sent_to_icon = '';
if ($myrow['to_group_id']!== '0' and $myrow['to_group_id']!== 'NULL') {
$sent_to_icon = Display::return_icon('group.gif', get_lang('AnnounceSentToUserSelection'));
}
@ -1324,7 +1315,7 @@ if ($display_announcement_list && !$surveyid) {
echo Display::tag('td', $sent_to_icon.$sent_to_form);
echo Display::tag('td', api_get_person_name($user_info['firstName'], $user_info['lastName']));
echo Display::tag('td', api_convert_and_format_date($last_post_datetime));
echo Display::tag('td', api_convert_and_format_date($myrow['end_date'], DATE_FORMAT_LONG));
/* RESOURCES */

@ -496,7 +496,7 @@ function show_new_personal_item_form($id = "") {
echo '</div>';
// ********** The Submit button********** \\
echo '<div>';
echo '<button type="submit" class="add" name="Submit" value="'.get_lang('AddEvent').'" >'.get_lang('AddEvent').'</button>';
echo '<br /><button type="submit" class="add" name="Submit" value="'.get_lang('AddEvent').'" >'.get_lang('AddEvent').'</button>';
echo '</div>';
echo '</div>';
echo '</form>';

Loading…
Cancel
Save