diff --git a/main/announcements/announcements.php b/main/announcements/announcements.php index f0770874ae..78fcb976d7 100644 --- a/main/announcements/announcements.php +++ b/main/announcements/announcements.php @@ -1,4 +1,4 @@ -\n"; - echo "\t\n"; - echo "\t\t\n"; - } /*====================================================================== DISPLAY LEFT COLUMN ======================================================================*/ @@ -953,20 +947,29 @@ $announcement_number = Database::num_rows($result); /*---------------------------------------------------- ADD ANNOUNCEMENT / DELETE ALL ----------------------------------------------------*/ +echo '
'; if(!$surveyid) { if ((api_is_allowed_to_edit(false,true) OR (api_get_course_setting('allow_user_edit_announcement') && !api_is_anonymous())) and (empty($_GET['origin']) or $_GET['origin'] !== 'learnpath')) { - echo " ".get_lang("AddAnnouncement")."
"; + echo "".Display::return_icon('announce_add.gif',get_lang('AddAnnouncement')).get_lang('AddAnnouncement').""; } if (api_is_allowed_to_edit() && $announcement_number > 1) { - echo " ".get_lang("AnnouncementDeleteAll")."\n"; + echo "".Display::return_icon('valves_delete.gif',get_lang('AnnouncementDeleteAll')).get_lang('AnnouncementDeleteAll')."\n"; } // if announcementNumber > 1 - echo "
"; } +echo '
'; + + if (empty($_GET['origin']) OR $_GET['origin'] !== 'learnpath') + { + echo "\n\n\n"; + echo "\t\n"; + + echo "\t\t
\n"; + } /*---------------------------------------------------- ANNOUNCEMENTS LIST @@ -1315,7 +1318,7 @@ if(!empty($error_message)) if ($num_rows == 0) { - echo "
".get_lang('NoAnnouncements')."
"; + echo get_lang('NoAnnouncements');; } $iterator = 1; @@ -1323,7 +1326,7 @@ if(!empty($error_message)) $bottomAnnouncement = $announcement_number; - echo "\t\t\t\n"; + echo "\t\t\t
\n"; $displayed=array(); @@ -1352,15 +1355,11 @@ if(!empty($error_message)) // the styles if ($myrow['visibility']=='0') { - $style="data_hidden"; - $stylenotbold="datanotbold_hidden"; - $text_style="text_hidden"; + $style='invisible'; } else { - $style="data"; - $stylenotbold="datanotbold"; - $text_style="text"; + $style = ''; } echo "\t\t\t\t"; @@ -1369,7 +1368,7 @@ if(!empty($error_message)) /*=================================================================== THE ICONS ===================================================================*/ - echo "\t\t\t\t\t\n"; /*================================================================== TITLE ==================================================================*/ - echo "\t\t\t\t\t\n"; + echo "\t\t\t\t\t\n"; /*================================================================== SENT TO ===================================================================*/ - echo "\t\t\t\t\t\n"; + echo "\t\t\t\t\t\n","\t\t\t\t\n"; /*========================================================= TITLE =========================================================*/ - echo "\t\t\t\t\n", + echo "\t\t\t\t\n", "\t\t\t\t\t\n", + "\n", "\n",
\n"; + echo "\t\t\t\t\t\n"; // anchoring echo "\n"; // User or group icon @@ -1382,32 +1381,32 @@ if(!empty($error_message)) { echo "\t\t\t\t\t\t\"$alt_mail\"\n"; } - echo "\t\t\t\t\t\n"; + echo "\t\t\t\t\t".$title."".$title."" . get_lang("SentTo") . " :   "; + echo "\t\t\t\t\t" . get_lang("SentTo") . " :   "; $sent_to=sent_to("announcement", $myrow['id']); $sent_to_form=sent_to_form($sent_to); $user_info=api_get_user_info($myrow['insert_user_id']); echo '   '.get_lang('By').' :  '.$user_info['lastName'].' '.$user_info['firstName']; - echo "\t\t\t\t\t\n","\t\t\t\t
", get_lang('AnnouncementPublishedOn')," : ",ucfirst(format_locale_date($dateFormatLong,strtotime($last_post_date))), @@ -1435,7 +1434,7 @@ if(!empty($error_message)) RESOURCES ========================================================*/ - "
\n"; @@ -1445,7 +1444,6 @@ if(!empty($error_message)) display_added_resources("Ad_Valvas", $myrow["id"]); } - echo "
"; // we can edit if : we are the teacher OR the element belongs to the session we are coaching OR the option to allow users to edit is on if(api_is_allowed_to_edit() OR (api_is_course_coach() && api_is_element_in_the_session(TOOL_ANNOUNCEMENT,$myrow['id'])) OR (api_get_course_setting('allow_user_edit_announcement') && !api_is_anonymous())) @@ -1454,15 +1452,14 @@ if(!empty($error_message)) /*===================================================================== SHOW MOD/DEL/VIS FUNCTIONS =====================================================================*/ - echo ""; - echo ""; + ""; - if (api_is_allowed_to_edit(false,true)) echo ""; + ""; if ($myrow['visibility']==1) { @@ -1473,8 +1470,8 @@ if(!empty($error_message)) $image_visibility="invisible"; } - echo ""; + echo "", + "\"".get_lang('Visible')."\"/"; @@ -1483,22 +1480,20 @@ if(!empty($error_message)) if($iterator != 1) { - echo ""; + ""; } if($iterator < $bottomAnnouncement) { - echo ""; + ""; } - echo "
", + echo "", "", - "", + if (api_is_allowed_to_edit(false,true)) echo "", "", - "", - "\"".get_lang('Visible')."\"/", + echo "", "", - "", + echo "", "", - "
"; - echo "