Browse Source

Updating templates

Julio Montoya 11 years ago
parent
commit
54285628f1

+ 0 - 3
main/template/minedu/admin/administrator/role_index.tpl

@@ -54,9 +54,6 @@ $(function() {
                     <li>
                         <a href="{{ url('role.controller:indexAction') }}">{{ 'Roles' |trans }}</a>
                     </li>
-                    <li>
-                        <a href="{{ url('jury.controller:indexAction') }}">{{ 'Jury' |trans }}</a>
-                    </li>
                     <li>
                         <a href="{{ url('branch.controller:indexAction') }}">{{ 'Branches' |trans }}</a>
                     </li>

+ 1 - 1
main/template/minedu/admin/director/role_index.tpl

@@ -1,3 +1,3 @@
 <div class="well">
-    director
+    Director
 </div>

+ 1 - 1
main/template/minedu/admin/jury_member/role_index.tpl

@@ -1,3 +1,3 @@
 <div class="well">
-    jury_member
+    Jury Member
 </div>

+ 7 - 1
main/template/minedu/admin/jury_president/role_index.tpl

@@ -1,3 +1,9 @@
 <div class="well">
-    jury president
+    Jury president
+    <ul>
+        <li>
+            <a href="{{ url('jury.controller:indexAction') }}">{{ 'Jury' |trans }}</a>
+        </li>
+    </ul>
+
 </div>

+ 2 - 1
main/template/minedu/admin/jury_substitute/role_index.tpl

@@ -1,3 +1,4 @@
 <div class="well">
-    jury sub
+    Jury substitute
+
 </div>

+ 0 - 47
main/template/minedu/admin/questionmanager/edit_category.tpl

@@ -1,47 +0,0 @@
-{% extends app.template_style ~ "/layout/layout_1_col.tpl" %}
-{% block content %}
-    <script>
-    function check() {
-        $("#parent_id option:selected").each(function() {
-            var id = $(this).val();
-            var name = $(this).text();
-            if (id != "" ) {
-                $.ajax({
-                async: false,
-                url: "{{ _p.web_ajax }}exercise.ajax.php?type=global&a=exercise_category_exists",
-                data: "id="+id,
-                success: function(return_value) {
-                    if (return_value == 0 ) {
-                        alert("{{ 'CategoryDoesNotExists' | get_lang }}");
-                        //Deleting select option tag
-                        $("#parent_id").find("option").remove();
-                        $(".holder li").each(function () {
-                            if ($(this).attr("rel") == id) {
-                                $(this).remove();
-                            }
-                        });
-                    }
-                }
-            });
-          }
-        });
-    }
-
-    $(function() {
-        $("#parent_id").fcbkcomplete({
-           json_url: "{{ _p.web_ajax }}exercise.ajax.php?type=global&a=search_category_parent",
-           maxitems: 1,
-           addontab: false,
-           input_min_size: 1,
-           cache: false,
-           complete_text:"{{ 'StartToType' | get_lang }}",
-           firstselected: false,
-           onselect: check,
-           filter_selected: true,
-           newel: true
-        });
-    });
-    </script>
-
-    {{ form }}
-{% endblock %}

+ 0 - 5
main/template/minedu/admin/questionmanager/edit_question.tpl

@@ -1,5 +0,0 @@
-{% extends app.template_style ~ "/layout/layout_1_col.tpl" %}
-{% block content %}
-    <h3> {{ question.question }} </h3>
-    {{ form }}
-{% endblock %}

+ 0 - 50
main/template/minedu/admin/questionmanager/question_categories.tpl

@@ -1,50 +0,0 @@
-{% extends app.template_style ~ "/layout/layout_2_col.tpl" %}
-{% block left_column %}
-    <script>
-        function loadQuestions(id) {
-            var categoryUrl = '{{ url('admin_questions_get_categories', {id : ':s'}) }}';
-            categoryUrl = categoryUrl.replace(':s', id);
-            var questionContentUrl = '{{ url('admin_get_questions_by_category', {categoryId : ':s'}) }}';
-            questionContentUrl = questionContentUrl.replace(':s', id);
-            $('.questions').load(questionContentUrl);
-            var parent = $('.load_categories li #'+id).parent();
-            if (parent.find('span#'+id).length == 0) {
-                var span = document.createElement('span');
-                $(span).attr('id', id);
-                $(span).load(categoryUrl);
-                parent.append(span);
-            }
-            return false;
-        }
-
-        $(function() {
-            {% if app.request.get('categoryId') %}
-                var categoryId = '{{ app.request.get('categoryId') }}';
-                loadQuestions(categoryId);
-            {% endif %}
-
-            $('.load_categories li').on('click', 'a', function() {
-
-                $('.load_categories li').each(function() {
-                    $(this).removeClass('active');
-                });
-                $(this).parent().addClass('active');
-                var url = $(this).attr('href');
-                var id = url.replace(/[^\d\.]/g, '');
-                loadQuestions(id);
-                return false;
-            });
-        });
-    </script>
-    <div class="well sidebar-nav load_categories">
-        <li class="nav-header">{{ "QuestionCategories" | get_lang }}</li>
-        {{ category_tree }}
-        <li class="nav-header">{{ "GlobalQuestionCategories" | get_lang }}</li>
-        {{ global_category_tree }}
-    </div>
-{% endblock %}
-
-{% block right_column %}
-    <div class="questions">
-    </div>
-{% endblock %}

+ 0 - 20
main/template/minedu/admin/questionmanager/questionmanager.tpl

@@ -1,20 +0,0 @@
-{% extends app.template_style ~ "/layout/layout_1_col.tpl" %}
-{% block content %}
-    <div class="row">
-        <div id="tabs-1" class="span6">
-            <div class="well_border">
-                <h4>{{ 'Admin'  | get_lang }}</h4>
-                <ul>
-                    <li>
-                        <a href="{{ url('admin_questions') }}">
-                        {{ 'Questions' | get_lang }}</a>
-                    </li>
-                    <li><a href="{{ url('admin_category_new')}}">{{ 'AddACategory' | get_lang }}</a></li>
-                    <li><a href="../../main/exercice/tests_category.php?type=global">{{ 'ManageQuestionCategories' | get_lang }}</a></li>
-                </ul>
-
-            </div>
-        </div>
-
-    </div>
-{% endblock %}

+ 0 - 141
main/template/minedu/admin/questionmanager/questions.tpl

@@ -1,141 +0,0 @@
-<script>
-
-    function setSearchSelect(columnName) {
-        $("#questions").jqGrid('setColProp', columnName, {
-
-           /*searchoptions:{
-                dataInit:function(el){
-                    $("option[value='1']",el).attr("selected", "selected");
-                    setTimeout(function(){
-                        $(el).trigger('change');
-                    }, 1000);
-                }
-            }*/
-        });
-    }
-
-    var added_cols = [];
-    var original_cols = [];
-
-    function clean_cols(grid, added_cols) {
-        //Cleaning
-        for (key in added_cols) {
-            //console.log('hide: ' + key);
-            grid.hideCol(key);
-        };
-        grid.showCol('name');
-        grid.showCol('display_start_date');
-        grid.showCol('display_end_date');
-        grid.showCol('course_title');
-    }
-
-    function show_cols(grid, added_cols) {
-        grid.showCol('name').trigger('reloadGrid');
-        for (key in added_cols) {
-            //console.log('show: ' + key);
-            grid.showCol(key);
-        };
-    }
-    var second_filters = [];
-
-    $(function () {
-        {{ js }}
-
-        setSearchSelect("status");
-
-        var grid = $("#questions"),
-        prmSearch = {
-            multipleSearch : true,
-            overlay : false,
-            width: 'auto',
-            caption: '{{ 'Search' | get_lang }}',
-            formclass:'data_table',
-            onSearch : function() {
-                var postdata = grid.jqGrid('getGridParam', 'postData');
-
-                if (postdata && postdata.filters) {
-                    filters = jQuery.parseJSON(postdata.filters);
-                    clean_cols(grid, added_cols);
-                    added_cols = [];
-                    $.each(filters, function(key, value){
-                        //console.log('key: ' + key );
-
-                        if (key == 'rules') {
-                            $.each(value, function(subkey, subvalue) {
-
-                                if (subvalue.data == undefined) {
-                                }
-
-                                //if (added_cols[value.field] == undefined) {
-                                    added_cols[subvalue.field] = subvalue.field;
-                                //}
-                                //grid.showCol(value.field);
-                            });
-                        }
-                    });
-                    show_cols(grid, added_cols);
-                }
-           },
-           onReset: function() {
-                clean_cols(grid, added_cols);
-           }
-        };
-
-        original_cols = grid.jqGrid('getGridParam', 'colModel');
-
-        grid.jqGrid('navGrid','#questions_pager',
-            {edit:false,add:false,del:false},
-            {height:280,reloadAfterSubmit:false}, // edit options
-            {height:280,reloadAfterSubmit:false}, // add options
-            {reloadAfterSubmit:false},// del options
-            prmSearch
-        );
-
-        // create the searching dialog
-        grid.searchGrid(prmSearch);
-
-        // Fixes search table.
-        var searchDialogAll = $("#fbox_"+grid[0].id);
-        searchDialogAll.addClass("table");
-        var searchDialog = $("#searchmodfbox_"+grid[0].id);
-        searchDialog.addClass("ui-jqgrid ui-widget ui-widget-content ui-corner-all");
-        searchDialog.css({position:"relative", "z-index":"auto", "float":"left"})
-        var gbox = $("#gbox_"+grid[0].id);
-        gbox.before(searchDialog);
-        gbox.css({clear:"left"});
-
-        //Select first elements by default
-        $('.input-elm').each(function(){
-            $(this).find('option:first').attr('selected', 'selected');
-        });
-
-        $('.delete-rule').each(function(){
-            $(this).click(function(){
-                 $('.input-elm').each(function(){
-                    $(this).find('option:first').attr('selected', 'selected');
-                });
-            });
-        });
-    });
-</script>
-
-<div class="questions">
-    {% if category %}
-        <h3>{{  category.title }}
-
-        {% if category.cId == 0 %}
-            <a href="{{ url('admin_category_edit', {id : category.iid}) }}">
-                <img src="{{ "edit.png"|icon(22) }}">
-            </a>
-        {% endif %}
-        {% if category_children == 0 %}
-            &nbsp; <a href="{{ url('admin_category_delete', {id : category.iid}) }}">
-                <img src="{{ "delete.png"|icon(22) }}">
-            </a>
-        {% endif %}
-        </h3>
-    {% endif %}
-    <div class="clear"></div>
-
-    {{ grid }}
-</div>

+ 0 - 3
main/template/minedu/admin/questionmanager/role_index.tpl

@@ -1,3 +0,0 @@
-<div class="well">
-    question manager
-</div>

+ 0 - 7
main/template/minedu/admin/questionmanager/show_category.tpl

@@ -1,7 +0,0 @@
-{% extends app.template_style ~ "/layout/layout_1_col.tpl" %}
-{% block content %}
-
-<h3>{{ category.title }}</h3>
-<p>{{ category.description}}</p>
-
-{% endblock %}