Improving UI admin settings index

skala
Julio Montoya 11 years ago
parent 3bdaf6ca23
commit 4c9c89cf0c
  1. 89
      main/template/default/admin/administrator/role_index.tpl
  2. 33
      main/template/default/admin/index.tpl
  3. 30
      main/template/default/admin/questionmanager/role_index.tpl
  4. 11
      src/ChamiloLMS/Controller/Admin/AdminController.php

@ -1,61 +1,44 @@
<script>
$(function() {
//$("#settings").tabs();
$.ajax({
url:'{{ web_admin_ajax_url }}?a=version',
success:function(version){
$(".admin-block-version").html(version);
}
});
});
</script>
<div id="settings">
<div class="row">
{% for block_item in blocks %}
<div id="tabs-{{ loop.index }}" class="span6">
<div class="well_border {{ block_item.class }}">
<h4>{{ block_item.icon }} {{ block_item.label }}</h4>
<div style="list-style-type:none">
{{ block_item.search_form }}
</div>
{% if block_item.items is not null %}
<ul>
{% for url in block_item.items %}
<li>
<a href="{{ url.url }}">
{{ url.label }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if block_item.extra is not null %}
<div>
{{ block_item.extra }}
</div>
{% endif %}
{% for block_item in blocks %}
<div id="tabs-{{ loop.index }}" class="span6">
<div class="well_border {{ block_item.class }}">
<h4>{{ block_item.icon }} {{ block_item.label }}</h4>
<div style="list-style-type:none">
{{ block_item.search_form }}
</div>
</div>
{% endfor %}
</div>
<div class="row">
<div class="span6">
<div class="well_border">
{% if block_item.items is not null %}
<ul>
{% for url in block_item.items %}
<li>
<a href="{{ url('question_score.controller:indexAction') }}">{{ 'Question score name' |trans }}</a>
</li>
<li>
<a href="{{ url('question_score_name.controller:indexAction') }}">{{ 'Question names' |trans }}</a>
</li>
<li>
<a href="{{ url('role.controller:indexAction') }}">{{ 'Roles' |trans }}</a>
<a href="{{ url.url }}">
{{ url.label }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if block_item.extra is not null %}
<div>
{{ block_item.extra }}
</div>
{% endif %}
</div>
</div>
{% endfor %}
<div class="span6">
<div class="well_border">
<ul>
<li>
<a href="{{ url('question_score.controller:indexAction') }}">{{ 'Question score name' |trans }}</a>
</li>
<li>
<a href="{{ url('question_score_name.controller:indexAction') }}">{{ 'Question names' |trans }}</a>
</li>
<li>
<a href="{{ url('role.controller:indexAction') }}">{{ 'Roles' |trans }}</a>
</li>
</ul>
</div>
</div>

@ -1,6 +1,33 @@
{% extends app.template_style ~ "/layout/layout_1_col.tpl" %}
{% block content %}
{% for role in app.admin_toolbar_roles %}
{% include app.template_style ~ "/admin/" ~ role ~ "/role_index.tpl" %}
{% endfor %}
<div id="settings">
<div class="row">
{% for role in app.admin_toolbar_roles %}
{% include app.template_style ~ "/admin/" ~ role ~ "/role_index.tpl" %}
{% endfor %}
</div>
</div>
{% if is_granted('ROLE_ADMIN')%}
<script>
$(function() {
//$("#settings").tabs();
$.ajax({
url:'{{ web_admin_ajax_url }}?a=version',
success:function(version){
$(".admin-block-version").html(version);
}
});
});
</script>
<div class="row">
<div class="span12">
<div class="well_border">
<h3>{{ 'VersionCheck' | trans }} </h3>
<div class="admin-block-version"></div>
</div>
</div>
</div>
{% endif %}
{% endblock %}

@ -1,21 +1,13 @@
<div class="row">
<div class="span12">
<h3>{{ 'Question manager role' | trans }} </h3>
</div>
</div>
<div class="row">
<div class="span6">
<div class="well_border">
<h4>{{ 'Questions' | 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="{{ _p.web }}main/exercice/tests_category.php?type=global">{{ 'ManageQuestionCategories' | get_lang }}</a></li>
</ul>
</div>
<div class="span6">
<div class="well_border">
<h4>{{ 'Questions' | 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="{{ _p.web }}main/exercice/tests_category.php?type=global">{{ 'ManageQuestionCategories' | get_lang }}</a></li>
</ul>
</div>
</div>

@ -276,19 +276,10 @@ class AdminController extends CommonController
$blocks['chamilo']['items'] = $items;
$blocks['chamilo']['extra'] = null;
$blocks['chamilo']['search_form'] = null;
// Version check
$blocks['version_check']['icon'] = \Display::return_icon('logo.png', 'Chamilo.org', array(), ICON_SIZE_SMALL, false);
$blocks['version_check']['label'] = get_lang('VersionCheck');
$blocks['version_check']['extra'] = '<div class="admin-block-version"></div>';
$blocks['version_check']['search_form'] = null;
$blocks['version_check']['items'] = null;
//$blocks['version_check']['class'] = '';
}
$admin_ajax_url = api_get_path(WEB_AJAX_PATH).'admin.ajax.php';
$admin_ajax_url = api_get_path(WEB_AJAX_PATH).'admin.ajax.php';
$template->assign('web_admin_ajax_url', $admin_ajax_url);
$template->assign('blocks', $blocks);
}
}

Loading…
Cancel
Save