Commit 10615213 authored by Maria Sorica's avatar Maria Sorica Committed by Robert Lyon
Browse files

Bug 1722861: Display institution tags in a table

On the admin page of institution tags (/admin/users/institutiontags.php),
display tags in a table.

behatnotneeded

Change-Id: I9a5a7c6fd6d4c5fad3ba127d6df87d684d19d7b2
parent bb933534
......@@ -223,6 +223,7 @@ $string['allowinstitutiontagsdescription'] = 'Administrators can define a set of
$string['cantlistinstitutiontags'] = 'You are not allowed to list institution tags.';
$string['createtag'] = 'Create tag';
$string['deleteinstitutiontag'] = 'Delete institution tag';
$string['deleteinstitutiontagspecific'] = 'Delete institution tag "%s"';
$string['editinstitutiontag'] = 'Edit institution tag';
$string['error:duplicatetag'] = 'Institutional tag already exists.';
$string['error:emptytag'] = 'Institutional tag cannot be empty.';
......@@ -235,7 +236,9 @@ $string['institutiontags'] = 'Institution tags';
$string['institutiontagsdescription'] = 'The institution tags are predefined by the institution and available for use by all institution members. You can create as many tags as you like.';
$string['institutiontagsaved'] = 'Institution tag saved.';
$string['notags'] = 'No tags for this institution.';
$string['timesused'] = 'Times used:';
$string['tag'] = 'Tag';
$string['timesused'] = 'Times used';
$string['usedtagscantbedeleted'] = 'Used tags can\'t be deleted';
// License metadata
$string['license'] = 'License';
......
......@@ -2,37 +2,37 @@
{if !$canedit}<p>{str tag=cantlistinstitutiontags}</p>{/if}
{if $tags && !$new}
<p class="lead view-description">{str tag=institutiontagsdescription}</p>
<div class="panel panel-default">
<div id="institutiontags" class="list-group">
<div id="institutiontags" class="list-group">
{foreach $tags tag}
<div class="list-group-item r0 ">
<div class="row">
<div class="col-md-9">
<h3 class="title list-group-item-heading" title="{$tag->tag}">
{$tag->tag}
</h3>
</div>
<div class="col-md-3">
<div class="inner-link btn-action-list">
<div class="btn-top-right btn-group btn-group-top">
{if $tag->count <= 0}
<a href="{$WWWROOT}admin/users/institutiontags.php?delete={$tag->id}&institution={$institution}" title="{str tag=deleteinstitutiontag}" class="btn btn-default btn-xs">
<span class="icon icon-trash icon-lg text-danger" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag=deleteinstitutiontag}</span>
</a>
{else}
{str tag=timesused} {$tag->count}
{/if}
</div>
</div>
</div>
<div class="panel panel-default view-container">
<div class="table-responsive">
<table class="fullwidth table table-striped">
<thead>
<tr>
<th>{str tag="tag"}</th>
<th>{str tag="timesused"}</th>
<th><span class="accessible-hidden sr-only">{str tag=edit}</span></th>
</tr>
</thead>
<tbody>
{foreach from=$tags item=tag}
<tr>
<td>{$tag->tag}</td>
<td>{$tag->count}</td>
<td class="center">
<div class="pull-right">
{if $tag->count <= 0}
<a href="{$WWWROOT}admin/users/institutiontags.php?delete={$tag->id}&institution={$institution}" title="{str tag=deleteinstitutiontag}" class="btn btn-default btn-xs">
<span class="icon icon-trash icon-lg text-danger" role="presentation" aria-hidden="true"></span>
<span class="sr-only">{str tag=deleteinstitutiontagspecific arg1=$tag->tag}</span>
</a>
{else}
{str tag=usedtagscantbedeleted}
{/if}
</div>
</div>
{/foreach}
</div>
</div>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{$pagination|safe}
{if $pagination_js}
......@@ -40,6 +40,7 @@
{$pagination_js|safe}
</script>
{/if}
</div>
{else}
{if $new}
{$form|safe}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment