Przeglądaj źródła

Merge branch 'bootstrap' of https://github.com/aragonc/chamilo-lms into aragonc-bootstrap

Yannick Warnier 9 lat temu
rodzic
commit
41c8d86749

+ 18 - 11
app/Resources/public/css/base.css

@@ -4425,13 +4425,6 @@ i.size-32.icon-new-work{
 .jqgrid_whitespace {
     white-space: normal !important;
 }
-.chosen-container {
-    min-width: 100%;
-}
-
-.chzn-container-single .chzn-search {
-    z-index: 1010;
-}
 
 /* display the cookie usage warning validation */
 .cookieUsageValidation {
@@ -5891,7 +5884,7 @@ div#chat-remote-video video {
 .ui-jqgrid .ui-pg-table td{
   font-size: 12px;
 }
-.ui-state-hover,.ui-widget-content .ui-state-hover,
+/* .ui-state-hover,.ui-widget-content .ui-state-hover,
 .ui-widget-header .ui-state-hover,
 .ui-state-focus,
 .ui-widget-content .ui-state-focus,
@@ -5918,7 +5911,7 @@ div#chat-remote-video video {
   background: #fff;
   font-weight:normal;
   color:#212121
-}
+}*/
 .ui-priority-secondary,
 .ui-widget-content .ui-priority-secondary,
 .ui-widget-header .ui-priority-secondary{
@@ -5947,7 +5940,7 @@ div#chat-remote-video video {
 .ui-dialog .ui-dialog-buttonpane{
   border-top: 1px solid #DDD;
 }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+/*.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
   background-color:#f5f5f5;
   background-image:-moz-linear-gradient(top,#fff,#e6e6e6);
   background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));
@@ -5976,7 +5969,7 @@ div#chat-remote-video video {
   background-color: #E6E6E6;
   font-weight:normal;
   color:#333333;
-}
+}*/
 #dialog-form .dialog-form-content{
   font-size: 12px;
 }
@@ -6050,6 +6043,20 @@ div#chat-remote-video video {
   font-size: 10px;
   color: #666666;
 }
+.items-course .items-course-info .user-register{
+  font-size: 11px;
+  background-color: #FCF8E3;
+  border: 1px solid #FAEBCC;
+  text-align: center;
+  display: inline-block;
+  width: 100%;
+  margin-left: 5px;
+  margin-bottom: 3px;
+  padding-top: 3px;
+  padding-bottom: 5px;
+  border-radius: 5px;
+  
+}
 .hot-course-head{
   padding-top: 10px;
   padding-bottom: 10px;

+ 1 - 1
main/inc/lib/course.lib.php

@@ -4559,7 +4559,7 @@ class CourseManager
             if ($access_link && in_array('register', $access_link)) {
                 $my_course['extra_info']['register_button'] = Display::url(get_lang('Subscribe'),
                     api_get_path(WEB_COURSE_PATH) . $course_info['path'] . '/index.php?action=subscribe&sec_token=' . $stok,
-                    array('class' => 'btn btn-primary'));
+                    array('class' => 'btn btn-success btn-block btn-sm'));
             }
 
             if ($access_link && in_array('enter',

+ 4 - 4
main/inc/lib/javascript/chosen/chosen.css

@@ -65,7 +65,7 @@ This file is generated by `grunt build`, do not edit it by hand.
   display: block;
   overflow: hidden;
   padding: 0 0 0 8px;
-  height: 25px;
+  height: 35px;
   border: 1px solid #aaa;
   border-radius: 5px;
   background-color: #fff;
@@ -79,7 +79,7 @@ This file is generated by `grunt build`, do not edit it by hand.
   color: #444;
   text-decoration: none;
   white-space: nowrap;
-  line-height: 24px;
+  line-height: 30px;
 }
 .chosen-container-single .chosen-default {
   color: #999;
@@ -122,7 +122,7 @@ This file is generated by `grunt build`, do not edit it by hand.
   display: block;
   width: 100%;
   height: 100%;
-  background: url('chosen-sprite.png') no-repeat 0px 2px;
+  background: url('chosen-sprite.png') no-repeat 0px 7px;
 }
 .chosen-container-single .chosen-search {
   position: relative;
@@ -342,7 +342,7 @@ This file is generated by `grunt build`, do not edit it by hand.
   background: transparent;
 }
 .chosen-container-active.chosen-with-drop .chosen-single div b {
-  background-position: -18px 2px;
+  background-position: -18px 7px;
 }
 .chosen-container-active .chosen-choices {
   border: 1px solid #5897fb;

+ 5 - 3
main/inc/lib/javascript/tag/jquery.fcbkcomplete.js

@@ -78,6 +78,7 @@ jQuery(
 	               
 	               complete = $(document.createElement("div"));
 	               complete.addClass("facebook-auto");
+                       
 	               complete.append('<div class="default">'+ options.complete_text +"</div>");
 	               
 				   if (browser_msie)
@@ -92,8 +93,8 @@ jQuery(
 	               
 	               complete.prepend(feed);
 	               holder.after(complete);
-				   feed.css("width",complete.width());
-		        }
+				   feed.css("width","300px");
+		       }
 	        	
 		        function preSet()
 		        {										
@@ -201,13 +202,14 @@ jQuery(
 	                var input = $(document.createElement("input"));
 	                
 	                li.attr({"class": "bit-input","id": elemid + "_annoninput"});        
-	                input.attr({"type": "text","class": "maininput","size": "1"});
+	                input.attr({"type": "text","class": "maininput","size": "1", "id":"text_fcbk"});
 	                holder.append(li.append(input));
 	                
 	                input.focus(
 	                    function()
 	                    {
 	                        complete.fadeIn("fast");
+                                
 	                    }
 	                );
 	                

Plik diff jest za duży
+ 56 - 56
main/lang/spanish/trad4all.inc.php


+ 73 - 180
main/template/default/auth/courses_categories.php

@@ -106,42 +106,71 @@ $code = isset($code) ? $code : null;
 </script>
 
 <div class="row">
-    <div class="col-md-6">
-        <h2><?php echo get_lang('Search'); ?></h2>
-        <?php if ($showCourses) { ?>
-          <?php if (!isset($_GET['hidden_links']) || intval($_GET['hidden_links']) != 1) { ?>
-            <form class="form-search" method="post" action="<?php echo getCourseCategoryUrl(1, $pageLength, 'ALL', 0, 'subscribe'); ?>">
+    <div class="col-md-4">
+        <h5><?php echo get_lang('Search'); ?></h5>
+        <?php 
+        if ($showCourses) {
+            if (!isset($_GET['hidden_links']) || intval($_GET['hidden_links']) != 1) { ?>
+            <form class="form-horizontal" method="post" action="<?php echo getCourseCategoryUrl(1, $pageLength, 'ALL', 0, 'subscribe'); ?>">
                 <input type="hidden" name="sec_token" value="<?php echo $stok; ?>">
                 <input type="hidden" name="search_course" value="1" />
-                    <div class="control-group">
-                        <div class="controls">
-                            <div class="input-append">
-                                <input type="text" name="search_term" value="<?php echo (empty($_POST['search_term']) ? '' : api_htmlentities(Security::remove_XSS($_POST['search_term']))); ?>" />
-                                <div class="btn-group">
-                                    <button class="btn btn-default btn-sm" type="submit">
-                                        <i class="fa fa-search"></i> <?php echo get_lang('Search'); ?>
-                                    </button>
-                                        <?php
-                                            $hidden_links = 0;
-                                        } else {
-                                            $hidden_links = 1;
-                                        }
-
-                                        /* Categories will only show down to 4 levels, if you want more,
-                                         * you will have to patch the following code. We don't recommend
-                                         * it, as this can considerably slow down your system
-                                         */
-                                        if (!empty($browse_course_categories)) {
-                                            echo '<a class="btn btn-default btn-sm" href="'.api_get_self().'?action=display_random_courses">'.get_lang('RandomPick').'</a>';
-                                        ?>
-                                </div>
-                            </div>
-                        </div>
-                    </div>       
+                <div class="input-group">
+                    <input class="form-control" type="text" name="search_term" value="<?php echo (empty($_POST['search_term']) ? '' : api_htmlentities(Security::remove_XSS($_POST['search_term']))); ?>" />
+                    <div class="input-group-btn">
+                        <button class="btn btn-default" type="submit">
+                            <i class="fa fa-search"></i> <?php echo get_lang('Search'); ?>
+                        </button>
+                    </div>
+                </div>
             </form>
+            <?php } ?>
     </div>
-    <div class="col-md-6"></div>
+    <div class="col-md-4">
+        <h5><?php echo get_lang('CourseCategories'); ?></h5>
+        <?php      
+                   
+            $webAction = api_get_path(WEB_CODE_PATH).'auth/courses.php';
+            $action = 'display_courses';
+            $pageLength = 10;
+            $pageCurrent = 1;
+                   
+                $form = '<form action="'.$webAction.'" method="GET" class="form-horizontal">';
+                $form .= '<input type="hidden" name="action" value="' . $action . '">';
+                $form .= '<input type="hidden" name="pageCurrent" value="' . $pageCurrent . '">';
+                $form .= '<input type="hidden" name="pageLength" value="' . $pageLength . '">';
+                $form .= '<div class="form-group">';
+                $form .= '<div class="col-sm-12">';
+                $form .= '<select name="category_code" onchange="submit();" class="chzn-select form-control">';
+                $codeType = $_GET[category_code];    
+                foreach ($browse_course_categories[0] as $category) {
+                    $categoryCode = $category[code];
+                    $countCourse = $category[count_courses];
+                        
+                    $form .= '<option '. ($categoryCode == $codeType? 'selected="selected" ':'') .' value="' . $category[code] . '">' . $category[name] . ' ( '. $countCourse .' ) </option>';
+                    if(!empty($browse_course_categories[$categoryCode])){
+                        foreach($browse_course_categories[$categoryCode] as $subCategory){
+                            $subCategoryCode = $subCategory[code];
+                            $form .= '<option '. ($subCategoryCode == $codeType ? 'selected="selected" ':'') .' value="' . $subCategory[code] . '"> ---' . $subCategory[name] . ' ( '. $subCategory[count_courses] .' ) </option>';
+                        }
+                    }
+                }
+                $form .= '</select>';
+                $form .= '</div>';
+                $from .= '</form>';
+                echo $form;
+        ?>
+    </div>
+    </div>
+<?php
+        
+        if ($showSessions) { ?>
+            <div class="col-md-4">
+                <h5><?php echo get_lang('Sessions'); ?></h5>
+                <a class="btn btn-default btn-block" href="<?php echo getCourseCategoryUrl(1, $pageLength, null, 0, 'display_sessions'); ?>"><?php echo get_lang('SessionList'); ?></a>
+            </div>
+        <?php } ?>
 </div>
+ <?php  } ?>
 <div class="row"> 
  <?php if ($showCourses && $action != 'display_sessions') { 
             
@@ -163,7 +192,7 @@ $code = isset($code) ? $code : null;
 
             $ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote';
             $user_id = api_get_user_id();
-
+            
             if (!empty($browse_courses_in_category)) {
                 foreach ($browse_courses_in_category as $course) {
                     $course_hidden = ($course['visibility'] == COURSE_VISIBILITY_HIDDEN);
@@ -179,6 +208,7 @@ $code = isset($code) ? $code : null;
                     $course_open = ($course['visibility'] == COURSE_VISIBILITY_OPEN_PLATFORM);
                     $course_private = ($course['visibility'] == COURSE_VISIBILITY_REGISTERED);
                     $course_closed = ($course['visibility'] == COURSE_VISIBILITY_CLOSED);
+                  
                     $course_subscribe_allowed = ($course['subscribe'] == 1);
                     $course_unsubscribe_allowed = ($course['unsubscribe'] == 1);
                     $count_connections = $course['count_connections'];
@@ -199,33 +229,33 @@ $code = isset($code) ? $code : null;
                     $html .= '<div class="btn-toolbar">';
                     // if user registered as student
                     if ($user_registerd_in_course_as_student) {
-                        if (!$course_closed) {
-                            //$html .= return_goto_button($course);
-                            $html .= return_description_button($course, $icon_title);
+                        if (!$course_closed) {                        
                             if ($course_unsubscribe_allowed) {
                                 $html .= return_unregister_button($course, $stok, $search_term, $code);
                             }
                             $html .= return_already_registered_label('student');
                         }
+                        $html .= return_description_button($course, $icon_title);
                     } elseif ($user_registerd_in_course_as_teacher) {
                         // if user registered as teacher
                         //$html .= return_goto_button($course);
-                        $html .= return_description_button($course, $icon_title);
+                        
                         if ($course_unsubscribe_allowed) {
                             $html .= return_unregister_button($course, $stok, $search_term, $code);
                         }
                         $html .= return_already_registered_label('teacher');
+                        $html .= return_description_button($course, $icon_title);
                     } else {
                         // if user not registered in the course
                         if (!$course_closed) {
                             if (!$course_private) {
-                                $html .= return_goto_button($course);
+                                //$html .= return_goto_button($course);
                                 if ($course_subscribe_allowed) {
                                     $html .= return_register_button($course, $stok, $code, $search_term);
                                 }
                             }
-                            $html .= return_description_button($course, $icon_title);
                         }
+                        $html .= return_description_button($course, $icon_title);
                     }
                     
                     $html .= '</div>';
@@ -244,146 +274,10 @@ $code = isset($code) ? $code : null;
             } 
         }
     echo $cataloguePagination;
-?>   
-</div>
 
-
-<div class="row">
-    <div class="col-md-3">
-        <div class="panel panel-default">
-            <div class="panel-heading">
-                <?php
-                echo get_lang('CourseCategories').'</div>';
-
-                $action = 'display_courses';
-                // level 1
-                foreach ($browse_course_categories[0] as $category) {
-                    $category_name = $category['name'];
-                    $category_code = $category['code'];
-                    $count_courses_lv1 = $category['count_courses'];
-
-                    if ($code == $category_code) {
-                        $category_link = '<strong>'.$category_name.' ('.$count_courses_lv1.')</strong>';
-                    } else {
-                        if (!empty($count_courses_lv1)) {
-                            $category_link = '<a href="' .
-                                getCourseCategoryUrl(
-                                    1,
-                                    $pageLength,
-                                    $category_code,
-                                    $hidden_links,
-                                    $action
-                                ) .'">'.$category_name.' ('.$count_courses_lv1.') </a>';
-                        } else {
-                            $category_link = ''.$category_name.' ('.$count_courses_lv1.')';
-                        }
-                    }
-                    echo '<div class="panel-body">';
-                    echo '<ul class="nav nav-pills nav-stacked">';
-                    echo '<li>'.$category_link.'</li>';
-                    echo '</ul></div>';
-                    // level 2
-                    if (!empty($browse_course_categories[$category_code])) {
-                        foreach ($browse_course_categories[$category_code] as $subcategory1) {
-                            $subcategory1_name = $subcategory1['name'];
-                            $subcategory1_code = $subcategory1['code'];
-                            $count_courses_lv2 = $subcategory1['count_courses'];
-                            if ($code == $subcategory1_code) {
-                                $subcategory1_link = '<strong>'.$subcategory1_name.' ('.$count_courses_lv2.')</strong>';
-                            } else {
-                                $subcategory1_link = '<a href="' .
-                                    getCourseCategoryUrl(
-                                        1,
-                                        $pageLength,
-                                        $subcategory1_code,
-                                        $hidden_links,
-                                        $action
-                                    ) . '">'.$subcategory1_name.' ('.$count_courses_lv2.') </a> ';
-                            }
-                            echo '<li style="margin-left:20px;">'.$subcategory1_link.'</li>';
-
-                            // level 3
-                            if (!empty($browse_course_categories[$subcategory1_code])) {
-                                foreach ($browse_course_categories[$subcategory1_code] as $subcategory2) {
-                                    $subcategory2_name = $subcategory2['name'];
-                                    $subcategory2_code = $subcategory2['code'];
-                                    $count_courses_lv3 = $subcategory2['count_courses'];
-                                    if ($code == $subcategory2_code) {
-                                        $subcategory2_link = '<strong>'.$subcategory2_name.' ('.$count_courses_lv3.')</strong>';
-                                    } else {
-                                        $subcategory2_link = '<a href="' .
-                                            getCourseCategoryUrl(
-                                                1,
-                                                $pageLength,
-                                                $subcategory2_code,
-                                                $hidden_links,
-                                                $action
-                                            ) . '">'.$subcategory2_name.'</a> ('.$count_courses_lv3.')';
-                                    }
-                                    echo '<li style="margin-left:40px;">'.$subcategory2_link.'</li>';
-
-                                    // level 4
-                                    if (!empty($browse_course_categories[$subcategory2_code])) {
-                                        foreach ($browse_course_categories[$subcategory2_code] as $subcategory3) {
-                                            $subcategory3_name = $subcategory3['name'];
-                                            $subcategory3_code = $subcategory3['code'];
-                                            $count_courses_lv4 = $subcategory3['count_courses'];
-                                            if ($code == $subcategory3_code) {
-                                                $subcategory3_link = '<strong>'.$subcategory3_name.' ('.$count_courses_lv4.')</strong>';
-                                            } else {
-                                                $subcategory3_link = '<a href="' .
-                                                    getCourseCategoryUrl(
-                                                        1,
-                                                        $pageLength,
-                                                        $subcategory3_code,
-                                                        $hidden_links,
-                                                        $action
-                                                    ) . '">'.$subcategory3_name.' ('.$count_courses_lv4.') </a>';
-                                            }
-                                            echo '<li style="margin-left:60px;">'.$subcategory3_link.'</li>';
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                } ?>
-            </ul>
-        </div>
-        <?php
-        }
-        }
-        if ($showSessions) { ?>
-            <div class="panel panel-default">
-                <div class="panel-heading"><?php echo get_lang('Sessions'); ?></div>
-                <div class="panel-body">
-                <?php if ($action == 'display_sessions' && $_SERVER['REQUEST_METHOD'] != 'POST') { ?>
-                    <strong><?php echo get_lang('Sessions'); ?></strong>
-                <?php } else { ?>
-                    <a href="<?php echo getCourseCategoryUrl(1, $pageLength, null, 0, 'display_sessions'); ?>"><?php echo get_lang('SessionList'); ?></a>
-                <?php } ?>
-
-                <p><?php echo get_lang('SearchActiveSessions') ?></p>
-                <form class="form-search" method="post" action="<?php echo getCourseCategoryUrl(1, $pageLength, null, 0, 'display_sessions'); ?>">
-                    <div class="input-append">
-                        <?php echo Display::input('date', 'date', $date, array(
-                            'class' => 'span2',
-                            'id' => 'date',
-                            'readonly' => ''
-                        )); ?>
-
-                        <button class="btn btn-default" type="submit">
-                            <?php echo get_lang('Search'); ?>
-                        </button>
-                    </div>
-                </form>
-                </div>
-            </div>
-        <?php } ?>
-    </div>
-
-    
+?>   
 </div>
+   
 <?php
 
 /**
@@ -423,14 +317,13 @@ function return_thumbnail($course, $icon_title)
  * @param $course
  */
 function return_title($course)
-{
-    $html = '';
+{   $html = '';
     $linkCourse = api_get_course_url($course['code']);
     $title = cut($course['title'], 70);
     $ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote';
     $teachers = CourseManager::get_teacher_list_from_course_code_to_string($course['code']);
     $rating = Display::return_rating_system('star_'.$course['real_id'], $ajax_url.'&amp;course_id='.$course['real_id'], $course['point_info']);    
-    $html .= ' <h4 class="title"><a href="' . $linkCourse . '">' . cut($title, 60) . '</a></h4>';
+    $html .=  '<h4 class="title"><a href="' . $linkCourse . '">' . cut($title, 60) . '</a></h4>';
     $html .= '<div class="teachers">'.$teachers.'</div>';
     $html .= '<div class="ranking">'. $rating . '</div>';
     return $html;
@@ -483,7 +376,7 @@ function return_already_registered_label($in_status)
  */
 function return_register_button($course, $stok, $code, $search_term)
 {
-    $html = ' <a class="btn btn-primary" href="'.api_get_self().'?action=subscribe_course&amp;sec_token='.$stok.'&amp;subscribe_course='.$course['code'].'&amp;search_term='.$search_term.'&amp;category_code='.$code.'">'.get_lang('Subscribe').'</a>';
+    $html = ' <a class="btn btn-success btn-block btn-sm" href="'.api_get_self().'?action=subscribe_course&amp;sec_token='.$stok.'&amp;subscribe_course='.$course['code'].'&amp;search_term='.$search_term.'&amp;category_code='.$code.'">'.get_lang('Subscribe').'</a>';
     return $html;
     
 }

+ 2 - 1
main/template/default/layout/footer.tpl

@@ -139,7 +139,8 @@
             disable_search_threshold: 10,
             no_results_text: '{{ 'SearchNoResultsFound' | get_lang }}',
             placeholder_text_multiple: '{{ 'SelectSomeOptions' | get_lang }}',
-            placeholder_text_single: '{{ 'SelectAnOption' | get_lang }}'
+            placeholder_text_single: '{{ 'SelectAnOption' | get_lang }}',
+            width: "100%"
         });
 
         // Adv multi-select search input.

+ 6 - 3
main/template/default/skill/skill_wheel.tpl

@@ -35,7 +35,9 @@ function check_skills_sidebar() {
                                 $(this).remove();
                             }
                         });
-
+                        
+                        
+                       
                         if ($('#skill_to_select_id_'+skill_id).length == 0) {
                             skill_info = get_skill_info(skill_id);
                             li = fill_skill_search_li(skill_id, skill_info.name);
@@ -213,8 +215,9 @@ function toogle_save_profile_form() {
 
 $(document).ready(function() {
     /* Skill search */
-
-        //Tool tip (in exercises)
+    
+    //Tool tip (in exercises)
+    
     var tip_options = {
         placement : 'right'
     }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików