antville/code/Tags/$Tags.skin

36 lines
954 B
Text

<% #main %>
<h1><% response.title %></h1>
<% site.skin $Site#noscript %>
<% response.pager %>
<table class='uk-table uk-table-striped uk-table-hover uk-table-condensed'>
<thead>
<tr>
<th class='uk-text-right'>
<% if <% tags.self __name__ %> is tags then
"<i class='uk-icon-newspaper-o'></i>"
else
"<i class='uk-icon-image'></i>"
%>
</th>
<th class='uk-width-5-6'><% gettext Name %></th>
<th></th>
</tr>
</thead>
<tbody x-data='{
rename: function(tag, event) {
const name = prompt("<% gettext 'Please enter a new name for this tag' suffix=: %>", tag);
if (name) location.href = event.currentTarget.href + "?name=" + name;
},
remove: function(url) {
if (!confirm("<% gettext 'Are you sure you want to remove this tag?' %>")) return;
location.href= url;
}
}'>
<% response.list %>
</tbody>
</table>
<% response.pager %>