Skip to content

Commit

Permalink
Add skill list for management - refs BT#9583 #7385
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Apr 15, 2015
1 parent 01c1727 commit 5473790
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
39 changes: 39 additions & 0 deletions main/admin/skill_list.php
@@ -0,0 +1,39 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Skill list for management
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
* @package chamilo.admin
*/
use ChamiloSession as Session;

$cidReset = true;

require_once '../inc/global.inc.php';

$this_section = SECTION_PLATFORM_ADMIN;

api_protect_admin_script();

if (api_get_setting('allow_skills_tool') != 'true') {
api_not_allowed();
}

$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));

$message = Session::has('message') ? Session::read('message') : null;

/* View */
$skill = new Skill();
$skillList = $skill->get_all();

$tpl = new Template(get_lang('ManageSkills'));
$tpl->assign('message', $message);
$tpl->assign('skills', $skillList);

$content = $tpl->fetch('default/skill/list.tpl');

$tpl->assign('content', $content);
$tpl->display_one_col_template();

Session::erase('message');
36 changes: 36 additions & 0 deletions main/template/default/skill/list.tpl
@@ -0,0 +1,36 @@
<header class="page-header">
<h1>{{ "ManageSkills" | get_lang }}</h1>
</header>

<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ "Name" | get_lang }}</th>
<th>{{ "ShortCode" | get_lang }}</th>
<th>{{ "Description" | get_lang }}</th>
<th>{{ "Options" | get_lang }}</th>
</tr>
</thead>
<tfoot>
<tr>
<th>{{ "Name" | get_lang }}</th>
<th>{{ "ShortName" | get_lang }}</th>
<th>{{ "Description" | get_lang }}</th>
<th>{{ "Options" | get_lang }}</th>
</tr>
</tfoot>
<tbody>
{% for skill in skills %}
<tr>
<td>{{ skill.name }}</td>
<td>{{ skill.short_code }}</td>
<td>{{ skill.description }}</td>
<td>
<a href="{{ _p.web_main }}admin/skill_edit.php?id={{ skill.id }}" class="btn btn-default">
<i class="fa fa-edit"></i> {{ "Edit" | get_lang }}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>

0 comments on commit 5473790

Please sign in to comment.