diff --git a/main/css/base.css b/main/css/base.css index 58e47bb6ba..bef95d66e6 100644 --- a/main/css/base.css +++ b/main/css/base.css @@ -3513,16 +3513,6 @@ div.admin_section h4 { padding:5px; } - -#container-slider { - margin: 0 auto; - min-height: 310px; - padding: 15px 0 0 6%; - width: 560px; - z-index: 0; -} - - .userportal-order-courses-link { background-color: #F9F9F9; border-radius: 10px 10px 10px 10px; diff --git a/main/inc/lib/javascript/bxslider/bx_styles/bx_styles.css b/main/inc/lib/javascript/bxslider/bx_styles/bx_styles.css index 8abe6b625a..67ad01d190 100755 --- a/main/inc/lib/javascript/bxslider/bx_styles/bx_styles.css +++ b/main/inc/lib/javascript/bxslider/bx_styles/bx_styles.css @@ -1,107 +1,127 @@ -/* @override http://localhost/bxslider_v3_plugin/css/styles.css */ - -/* - * To change the color scheme of slider change each - * background property for each of the five styles below - */ +samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li{ + border: 0 none; + font-family: inherit; + font-size: 100%; + font-style: inherit; + font-weight: inherit; + margin: 0; + outline: 0 none; + padding: 0; + vertical-align: baseline; +} +#bx-wrapper { + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); +} -/*next button*/ +#container-slider { + margin: 15px auto; + min-height: 310px; + padding: 0 0 0 6%; + width: 560px; + z-index: 0; +} .bx-next { - position:absolute; - top:40%; - right:-50px; - z-index:999; - width: 30px; - height: 30px; - text-indent: -999999px; - background: url(gray_next.png) no-repeat 0 -30px; + background: url("gray_next.png") no-repeat scroll 0 -30px transparent; + height: 30px; + position: absolute; + right: -50px; + text-indent: -999999px; + top: 40%; + width: 30px; + z-index: 999; } - -/*previous button*/ .bx-prev { - position:absolute; - top:40%; - left:-50px; - z-index:999; - width: 30px; - height: 30px; - text-indent: -999999px; - background: url(gray_prev.png) no-repeat 0 -30px; + background: url("gray_prev.png") no-repeat scroll 0 -30px transparent; + height: 30px; + left: -50px; + position: absolute; + text-indent: -999999px; + top: 40%; + width: 30px; + z-index: 999; } - -/*pager links*/ .bx-pager a { - margin-right: 5px; - color: #fff; - padding: 3px 8px 3px 6px; - font-size: 12px; - zoom:1; - background: url(gray_pager.png) no-repeat 0 -20px; + background: url("gray_pager.png") no-repeat scroll 0 -20px transparent; + color: #FFFFFF; + font-size: 12px; + margin-right: 5px; + padding: 3px 8px 3px 6px; + text-decoration: none; } - -/*auto start button*/ .bx-auto .start { - background: url(gray_auto.png) no-repeat 0 2px; - padding-left: 13px; + background: url("gray_auto.png") no-repeat scroll 0 2px transparent; + padding-left: 13px; } - -/*auto stop button*/ .bx-auto .stop { - background: url(gray_auto.png) no-repeat 0 -14px; - padding-left: 13px; + background: url("gray_auto.png") no-repeat scroll 0 -14px transparent; + padding-left: 13px; } - -/* - * End color scheme styles - */ - - -/*next/prev button hover state*/ -.bx-next:hover, -.bx-prev:hover { - background-position: 0 0; +.bx-next:hover, .bx-prev:hover { + background-position: 0 0; } - -/*pager links hover and active states*/ -.bx-pager .pager-active, -.bx-pager a:hover { - background-position: 0 0; +.bx-pager .pager-active, .bx-pager a:hover { + background-position: 0 0; + text-decoration: none; } - -/*pager wrapper*/ .bx-pager { - text-align:center; - padding-top: 7px; - font-size:12px; - color:#666; + color: #666666; + font-size: 12px; + padding-top: 7px; + text-align: center; } - -/*captions*/ .bx-captions { - text-align:center; - font-size: 12px; - padding: 7px 0; - color: #666; + color: #666666; + font-size: 12px; + padding: 7px 0; + text-align: center; } - -/*auto controls*/ .bx-auto { - text-align: center; - padding-top: 15px; + padding-top: 15px; + text-align: center; } - .bx-auto a { - color: #666; - font-size: 12px; + color: #666666; + font-size: 12px; +} +#slider { + line-height: 120%; +} +#slider h1 { + font-size: 1.6em; + line-height: 150%; +} +#slider li p { + font-size: 1.1em; +} +#slider .strng { + font-weight: 600; +} +#slider .signatured { + color: #3183B1; + font-size: 1.3em; + line-height: 200%; + text-decoration: none; +} +#slider strong { + font-size: 1.1em; +} +#slider li a { + color: #3183B1; + font-size: 1.1em; + text-decoration: none; +} +.bx-colored { + color: #3183B1; + text-decoration: none; +} +#slider .notice { + color: #3183B1; + font-size: 1em; + text-decoration: none; +} +#slider .laucherlink { + color: #3183B1; + cursor: pointer; + font-size: 1.1em; + text-decoration: none; } - - - - - - - - - - - diff --git a/main/inc/lib/system_announcements.lib.php b/main/inc/lib/system_announcements.lib.php index a1b932e785..77346a2c7d 100644 --- a/main/inc/lib/system_announcements.lib.php +++ b/main/inc/lib/system_announcements.lib.php @@ -106,19 +106,19 @@ class SystemAnnouncementManager { $user_selected_language = api_get_interface_language(); $start = intval($start); - $tbl_announcement_group = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS); - $temp_user_groups = GroupPortalManager::get_groups_by_user(api_get_user_id(),0); - $groups =array(); - foreach ($temp_user_groups as $user_group) { - $groups = array_merge($groups, array($user_group['id'])); - $groups = array_merge($groups, GroupPortalManager::get_parent_groups($user_group['id'])); - } - //checks if tables exists to not break platform not updated - $ann_group_db_ok =false; - if( Database::num_rows(Database::query("SHOW TABLES LIKE 'announcement_rel_group'")) > 0) - $ann_group_db_ok =true; - $groups_string = '('.implode($groups,',').')'; - + $tbl_announcement_group = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS); + $temp_user_groups = GroupPortalManager::get_groups_by_user(api_get_user_id(),0); + $groups =array(); + foreach ($temp_user_groups as $user_group) { + $groups = array_merge($groups, array($user_group['id'])); + $groups = array_merge($groups, GroupPortalManager::get_parent_groups($user_group['id'])); + } + //checks if tables exists to not break platform not updated + $ann_group_db_ok =false; + if( Database::num_rows(Database::query("SHOW TABLES LIKE 'announcement_rel_group'")) > 0) + $ann_group_db_ok =true; + $groups_string = '('.implode($groups,',').')'; + $db_table = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS); $now = api_get_utc_datetime(); @@ -136,10 +136,10 @@ class SystemAnnouncementManager { $sql .= " AND visible_teacher = 1 "; break; } - if (count($groups) > 0 and $ann_group_db_ok ) { - $sql .= " OR id IN (SELECT announcement_id FROM $tbl_announcement_group " - ." WHERE group_id in $groups_string) "; - } + if (count($groups) > 0 and $ann_group_db_ok ) { + $sql .= " OR id IN (SELECT announcement_id FROM $tbl_announcement_group " + ." WHERE group_id in $groups_string) "; + } global $_configuration; $current_access_url_id = 1; @@ -154,45 +154,46 @@ class SystemAnnouncementManager { $sql .= " ORDER BY date_start DESC LIMIT ".($start+1).",20"; } $announcements = Database::query($sql); - + $content = ''; if (Database::num_rows($announcements) > 0) { $query_string = ereg_replace('announcement=[1-9]+', '', $_SERVER['QUERY_STRING']); $query_string = ereg_replace('&$', '', $query_string); $url = api_get_self(); - echo '
'; - echo '

'.get_lang('SystemAnnouncements').'

'; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
'; - SystemAnnouncementManager :: display_arrow($user_id); - echo '
'; - echo ''; + $content .= '
'; + $content .= '

'.get_lang('SystemAnnouncements').'

'; + $content .= '
'; + $content .= ''; + $content .= ''; + $content .= ''; + $content .= '
'; + $content .= SystemAnnouncementManager :: display_arrow($user_id); + $content .= '
'; + $content .= ''; while ($announcement = Database::fetch_object($announcements)) { $display_date = api_convert_and_format_date($announcement->display_date, DATE_FORMAT_LONG); - echo ''; + $content .= ''; } - echo '
'; - echo ' + $content .= '
'; + $content .= '
-
'.$announcement->title.'
'.$display_date.'
+

'.$announcement->title.'

'.$display_date.'

' .$announcement->content.'

'; - echo '
'; + $content .= ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo '
'; - SystemAnnouncementManager :: display_arrow($user_id); - echo '
'; - echo '
'; - } + $content .= ''; + $content .= ''; + $content .= ''; + $content .= ''; + $content .= '
'; + $content .= SystemAnnouncementManager :: display_arrow($user_id); + $content .= '
'; + $content .= ''; + } + return $content; } public static function display_arrow($user_id) { @@ -200,17 +201,18 @@ class SystemAnnouncementManager { $nb_announcement = SystemAnnouncementManager :: count_nb_announcement($start,$user_id); $next = ((int)$_GET['start']+19); $prev = ((int)$_GET['start']-19); - + $content = ''; if(!isset($_GET['start']) || $_GET['start'] == 0) { if($nb_announcement > 20) { - echo ''.get_lang('NextBis').' >> '; + $content .= ''.get_lang('NextBis').' >> '; } } else { echo ' << '.get_lang('Prev').''; if ($nb_announcement > 20) { - echo ''.get_lang('NextBis').' >> '; + $content .= ''.get_lang('NextBis').' >> '; } } + return $content; } public static function count_nb_announcement($start = 0, $user_id = '') { diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php index 117ba33a29..3ef8b1f651 100644 --- a/main/inc/lib/userportal.lib.php +++ b/main/inc/lib/userportal.lib.php @@ -105,13 +105,13 @@ class IndexManager { if ($show_slide) { $announcements = SystemAnnouncementManager :: display_announcements_slider($visibility, $announcement); } else { - $announcements = SystemAnnouncementManager :: get_all_announcements($visibility, $announcement); + $announcements = SystemAnnouncementManager :: display_all_announcements($visibility, $announcement); } } else { if ($show_slide) { $announcements = SystemAnnouncementManager :: display_announcements_slider(VISIBLE_GUEST, $announcement); } else { - $announcements = SystemAnnouncementManager :: get_all_announcements(VISIBLE_GUEST, $announcement); + $announcements = SystemAnnouncementManager :: display_all_announcements(VISIBLE_GUEST, $announcement); } } return $announcements; diff --git a/news_list.php b/news_list.php old mode 100755 new mode 100644 index b136727adf..11311bbb07 --- a/news_list.php +++ b/news_list.php @@ -31,12 +31,5 @@ if (api_is_platform_admin()) { } $start = isset($_GET['start']) ? (int)$_GET['start'] : $start = 0; -/* -if (isset($_user['user_id'])) { - $visibility = api_is_allowed_to_create_course() ? VISIBLE_TEACHER : VISIBLE_STUDENT; - SystemAnnouncementManager :: display_all_announcements($visibility, $announcement, $start, $_user['user_id']); -} else { - SystemAnnouncementManager :: display_all_announcements(VISIBLE_GUEST, $announcement, $start); -}*/ SystemAnnouncementManager ::display_announcements_slider($visibility); Display::display_footer(); \ No newline at end of file