Improved tag list appearance; added more info
This commit is contained in:
parent
75f0045caf
commit
bf58207950
5 changed files with 44 additions and 4 deletions
|
@ -25,3 +25,21 @@
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 1em auto;
|
margin: 1em auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tag-list th,
|
||||||
|
#tag-list td {
|
||||||
|
padding-right: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tag-list th {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tag-list .fa-check {
|
||||||
|
opacity: .2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tag-list .banned,
|
||||||
|
#tag-list .usages {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ App.Presenters.TagListPresenter = function(
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTags(tags, clear) {
|
function renderTags(tags, clear) {
|
||||||
var $target = $el.find('.tags');
|
var $target = $el.find('tbody');
|
||||||
|
|
||||||
if (clear) {
|
if (clear) {
|
||||||
$target.empty();
|
$target.empty();
|
||||||
|
|
|
@ -1,8 +1,21 @@
|
||||||
<tr class="tag">
|
<tr class="tag">
|
||||||
<td>
|
<td class="name">
|
||||||
<a href="#/tag/<%= tag.name %>"><%= tag.name %></a>
|
<a href="#/tag/<%= tag.name %>"><%= tag.name %></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="implications">
|
||||||
|
<%= _.pluck(tag.implications, 'name').join(' ') || '-' %>
|
||||||
|
</td>
|
||||||
|
<td class="suggestions">
|
||||||
|
<%= _.pluck(tag.suggestions, 'name').join(' ') || '-' %>
|
||||||
|
</td>
|
||||||
|
<td class="usages">
|
||||||
<%= tag.usages %>
|
<%= tag.usages %>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="banned">
|
||||||
|
<% if (tag.banned) { %>
|
||||||
|
<i class="fa fa-times"></i>
|
||||||
|
<% } else { %>
|
||||||
|
<i class="fa fa-check"></i>
|
||||||
|
<% } %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -13,6 +13,15 @@
|
||||||
|
|
||||||
<div class="pagination-target">
|
<div class="pagination-target">
|
||||||
<table class="tags">
|
<table class="tags">
|
||||||
|
<thead>
|
||||||
|
<th class="name">Tag name</th>
|
||||||
|
<th class="implications">Implications</th>
|
||||||
|
<th class="suggestions">Suggestions</th>
|
||||||
|
<th class="usages">Usages</th>
|
||||||
|
<th class="banned">Usable?</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -55,7 +55,7 @@ final class TagController extends AbstractController
|
||||||
$filter->setPageSize(50);
|
$filter->setPageSize(50);
|
||||||
|
|
||||||
$result = $this->tagService->getFiltered($filter);
|
$result = $this->tagService->getFiltered($filter);
|
||||||
$entities = $this->tagViewProxy->fromArray($result->getEntities());
|
$entities = $this->tagViewProxy->fromArray($result->getEntities(), $this->getFullFetchConfig());
|
||||||
return [
|
return [
|
||||||
'data' => $entities,
|
'data' => $entities,
|
||||||
'pageSize' => $result->getPageSize(),
|
'pageSize' => $result->getPageSize(),
|
||||||
|
|
Loading…
Reference in a new issue