Minor UI corrections in announcements and agenda

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

@ -135,8 +135,12 @@ 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);
@ -145,10 +149,8 @@ class AnnouncementManager {
$user_filename=$attachment_list['filename'];
$full_file_name = 'download.php?file='.$realname;
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>';

@ -1249,11 +1249,9 @@ if ($display_announcement_list && !$surveyid) {
}
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'];
@ -1262,14 +1260,8 @@ if ($display_announcement_list && !$surveyid) {
$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);
// the styles
if ($myrow['visibility']=='0') {
$style='invisible';
@ -1301,9 +1293,8 @@ 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 = Display::url($title.$attachment_icon, '?action=view&id='.$myrow['id']);
/* TITLE */
$title = Display::url($title.$attachment_icon, '?action=view&id='.$myrow['id']);
echo Display::tag('td', Security::remove_XSS($title), array('class' => $style));
//echo Display::tag('td', Security::remove_XSS($content).$attachment);
@ -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