Browse Source

Merge pull request #701 from aragonc/revibootstrap

Revibootstrap fix block certificates icons CT#7539
Yannick Warnier 9 years ago
parent
commit
110cc6515b

+ 31 - 13
app/Resources/public/css/base.css

@@ -1931,8 +1931,6 @@ div.image-social-content center.friend {
     background-color:#ECECEB;
     padding:12px;
 }
-
-
 /* GROUP TOOL */
 
 #group_description {
@@ -2476,7 +2474,34 @@ div.admin_section h4 {
     height:75px;
     z-index:1;
 }
+/* MAIN QUESTION */
 
+.main-question {
+  padding: 10px 20px;
+  box-sizing: border-box;
+  border: 1px solid #dddddd;
+  border-radius: 4px;
+  -moz-border-radius: 4px;
+  -webkit-border-radius: 4px;
+  box-shadow: 0px 1px 1px rgba(0,0,0,0.05);
+  margin-bottom: 35px;
+}
+.main-question .question_title{
+  font-size: 20px;
+  font-weight: bold;
+  margin: 15px 0px;
+  color:#666666 ;
+}
+.main-question .question_description{
+  color: #666666;
+}
+.main-question .form-actions{
+  clear: both;
+  width: 100%;
+  display: block;
+  border-top:1px solid #dddddd;
+  padding-top: 10px;
+}
 #questions {
     width:40%;
     height:50px;
@@ -2567,10 +2592,13 @@ div.admin_section h4 {
     display:block;
 }
 
-.question_options .radio, .question_options .checkbox {
+.question_options .radio{
     min-height: 18px;
     padding-left: 25px;
 }
+.question_options .checkbox{
+  margin-left: 35px;
+}
 .question_options .radio input[type="radio"], .question_options .checkbox input[type="checkbox"] {
     float: left;
     margin-left: -25px;
@@ -2585,10 +2613,6 @@ div.admin_section h4 {
     margin:2px 2px 2px 0px;
 }
 
-.question_description {
-    padding: 0px;
-}
-
 .exercise_description {
     padding:0px 0px 10px 0px;
     border-bottom: 1px solid #CCCCCC;
@@ -2599,12 +2623,6 @@ div.admin_section h4 {
     padding:10px 0px 10px 0px;
 }
 
-.question_title {
-    font-size: 1.2em;
-    font-weight: bold;
-    margin: 15px 0px;
-}
-
 .question_no_answer {
     background-color: #FFF7C0;
     /* padding: 5px 0px 5px 0px; */

+ 0 - 1
index.php

@@ -165,7 +165,6 @@ $controller->tpl->assign('navigation_course_links', $controller->return_navigati
 $controller->tpl->assign('notice_block', $controller->return_notice());
 $controller->tpl->assign('main_navigation_block', $controller->return_navigation_links());
 $controller->tpl->assign('help_block', $controller->return_help());
-$controller->tpl->assign('certificates_search_block', $controller->returnCertificatesSearchBlock());
 
 if (api_is_platform_admin() || api_is_drh()) {
     $controller->tpl->assign('skills_block', $controller->return_skills_links());

+ 1 - 1
main/exercice/exercise_submit.php

@@ -1085,7 +1085,7 @@ if (!empty($error)) {
 
         // Showing the question
 
-        echo '<div id="question_div_'.$questionId.'" class="main_question '.$remind_highlight.'" >';
+        echo '<div id="question_div_'.$questionId.'" class="main-question '.$remind_highlight.'" >';
 
         // Shows the question and its answers
         ExerciseLib::showQuestion($questionId, false, $origin, $i, true, false, $user_choice, false);

BIN
main/img/icons/22/graduation.png


BIN
main/img/icons/22/search_graduation.png


+ 43 - 51
main/inc/lib/userportal.lib.php

@@ -323,19 +323,56 @@ class IndexManager
 
     function return_skills_links() {
         $html = '';
+        $content = '';
+        $content .= '<ul class="nav nav-pills nav-stacked">';
+        /**
+         * Generate the block for show a panel with links to My Certificates and Certificates Search pages
+         * @return string The HTML code for the panel
+         */
+        $certificatesItem = null;
+
+        if (!api_is_anonymous()) {
+            $certificatesItem = Display::tag(
+                'li',
+                Display::url(Display::return_icon('graduation.png',get_lang('MyCertificates'),null,ICON_SIZE_SMALL).
+                    get_lang('MyCertificates'),
+                    api_get_path(WEB_CODE_PATH) . "gradebook/my_certificates.php"
+                )
+            );
+        }
+
+        $searchItem = null;
+
+        if (api_get_setting('allow_public_certificates') == 'true') {
+            $searchItem = Display::tag(
+                'li',
+                Display::url(Display::return_icon('search_graduation.png',get_lang('Search'),null,ICON_SIZE_SMALL).
+                    get_lang('Search'),
+                    api_get_path(WEB_CODE_PATH) . "gradebook/search.php"
+                )
+            );
+        }
+
+        if (empty($certificatesItem) && empty($searchItem)) {
+            return null;
+        }else{
+            $content.= $certificatesItem;
+            $content.= $searchItem;
+        }
+
         if (api_get_setting('allow_skills_tool') == 'true') {
-            $content = '<ul class="nav nav-pills nav-stacked">';
 
             $content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png',get_lang('MySkills'),null,ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php'));
-
             $allowSkillsManagement = api_get_setting('allow_hr_skills_management') == 'true';
-
             if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) {
-                $content .= Display::tag('li', Display::url(Display::return_icon('edit-skill.png',get_lang('MySkills'),null,ICON_SIZE_SMALL).get_lang('ManageSkills'), api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php'));
+                $content .= Display::tag('li',
+                    Display::url(Display::return_icon('edit-skill.png', get_lang('MySkills'), null,
+                            ICON_SIZE_SMALL) . get_lang('ManageSkills'),
+                        api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php'));
             }
-            $content .= '</ul>';
-            $html = self::show_right_block(get_lang("Skills"), $content, 'skill_block');
         }
+        $content .= '</ul>';
+        $html = self::show_right_block(get_lang("Skills"), $content, 'skill_block');
         return $html;
     }
 
@@ -1423,49 +1460,4 @@ class IndexManager
         return CourseManager::return_hot_courses();
     }
 
-    /**
-     * Generate the block for show a panel with links to My Certificates and Certificates Search pages
-     * @return string The HTML code for the panel
-     */
-    public function returnCertificatesSearchBlock()
-    {
-
-        $certificatesItem = null;
-
-        if (!api_is_anonymous()) {
-            $certificatesItem = Display::tag(
-                'li',
-                Display::url(
-                    get_lang('MyCertificates'),
-                    api_get_path(WEB_CODE_PATH) . "gradebook/my_certificates.php"
-                )
-            );
-        }
-
-        $searchItem = null;
-
-        if (api_get_setting('allow_public_certificates') == 'true') {
-            $searchItem = Display::tag(
-                'li',
-                Display::url(
-                    get_lang('Search'),
-                    api_get_path(WEB_CODE_PATH) . "gradebook/search.php"
-                )
-            );
-        }
-
-        if (empty($certificatesItem) && empty($searchItem)) {
-            return null;
-        }
-
-        return Display::panel(
-            Display::tag(
-                'ul',
-                implode(' ', [$certificatesItem, $searchItem]),
-                ['class' => 'nav nav-pills nav-stacked']
-            ),
-            get_lang('Certificates')
-        );
-    }
-
 }

+ 0 - 2
user_portal.php

@@ -183,8 +183,6 @@ $controller->tpl->assign('course_block', $controller->return_course_block());
 $controller->tpl->assign('navigation_course_links', $controller->return_navigation_links());
 $controller->tpl->assign('search_block', $controller->return_search_block());
 $controller->tpl->assign('classes_block', $controller->return_classes_block());
-$controller->tpl->assign('certificates_search_block', $controller->returnCertificatesSearchBlock());
-
 //if (api_is_platform_admin() || api_is_drh()) {
 $controller->tpl->assign('skills_block', $controller->return_skills_links());
 //}