Re-enabled tags pager without alphabetical supernavigation

This commit is contained in:
Tobi Schäfer 2015-01-04 17:49:11 +01:00
parent 48bc9ede1b
commit 95032a93c6
2 changed files with 15 additions and 35 deletions

View file

@ -1,5 +1,7 @@
<% #main %>
<h1><% response.title %></h1>
<% //tags.alphabet %>
<% //tags.pager %>
<% response.pager %>
<table class='uk-table uk-table-striped uk-table-hover uk-table-condensed'>
<thead>
@ -16,10 +18,13 @@
</tr>
</thead>
<tbody>
<% tags.list %>
<% //tags.list %>
<% response.list %>
</tbody>
</table>
<% response.pager %>
<% //tags.pager %>
<% //tags.alphabet %>
<script type='text/javascript'>
$(function () {
$('.renameTag').on('click', function (event) {
@ -40,30 +45,3 @@ $(function () {
});
});
</script>
<!--
<% tags.alphabet prefix='<div>' suffix='</div>' %>
<% tags.pager prefix='<div>' suffix='</div>' %>
<% tags.list prefix="<ul>" suffix="</ul>" %>
<% tags.pager prefix='<div>' suffix='</div>' %>
<% tags.alphabet prefix='<div>' suffix='</div>' %>
-->
<% #header %>
<th><% param.title %></th>
<% #admin %>
<% tags.alphabet prefix='<div>' suffix='</div>' %>
<% tags.pager prefix='<div>' suffix='</div>' %>
<table>
<thead>
<tr>
<% tags.header %>
</tr>
</thead>
<tbody>
<% tags.list Tag#admin %>
</tbody>
</table>
<% tags.pager prefix='<div>' suffix='</div>' %>
<% tags.alphabet prefix='<div>' suffix='</div>' %>

View file

@ -45,6 +45,7 @@ Tags.prototype.getPermission = function(action) {
}
Tags.prototype.main_action = function() {
/*
var action = this.getAction();
if (req.data.group) {
this.setGroup(req.data.group)
@ -54,16 +55,16 @@ Tags.prototype.main_action = function() {
this.setPage(req.data.page);
res.redirect(this.href(action));
}
*/
var tags = this.get(Tags.ALL);
res.data.list = renderList(tags, '$Tag#listItem', 50, req.queryParams.page);
res.data.pager = renderPager(tags, this.href(req.action), 50, req.queryParams.page);
res.data.title = this.getTitle();
res.data.body = this.renderSkinAsString('$Tags#' + req.action);
res.data.body = this.renderSkinAsString('$Tags#main');
res.handlers.site.renderSkin('Site#page');
return;
}
Tags.prototype.admin_action = function() {
return this.main_action();
}
/**
*
* @param {Number} id
@ -178,7 +179,8 @@ Tags.prototype.get = function(group) {
* @returns {String}
*/
Tags.prototype.getGroup = function() {
return decodeURIComponent(session.data[this.href('group')] || Tags.ALL);
return Tags.ALL;
//return decodeURIComponent(session.data[this.href('group')] || Tags.ALL);
}
/**
@ -211,7 +213,7 @@ Tags.prototype.setPage = function(page) {
* @returns {Number}
*/
Tags.prototype.getPageSize = function() {
return 25;
return 5;
}
/**