fixed pagination on channel page to show only as needed

This commit is contained in:
bill bittner 2017-10-30 10:56:23 -07:00
parent cec7e5ef57
commit b2268ceee9

View file

@ -1,11 +1,17 @@
<div class="row row--padded"> <div class="row row--padded">
<div class="row"> <div class="row">
<p>Below are the contents for {{this.channelName}}:{{this.longChannelId}}</p> {{#ifConditional this.totalPages '===' 0}}
<div class="grid"> <p>There is no content in {{this.channelName}}:{{this.longChannelId}} yet. Upload some!</p>
{{#each this.claims}} {{/ifConditional}}
{{> gridItem}} {{#ifConditional this.totalPages '>=' 1}}
{{/each}} <p>Below are the contents for {{this.channelName}}:{{this.longChannelId}}</p>
</div> <div class="grid">
{{#each this.claims}}
{{> gridItem}}
{{/each}}
</div>
{{/ifConditional}}
{{#ifConditional this.totalPages '>' 1}}
<div class="row"> <div class="row">
<div class="column column--3 align-content--left"> <div class="column column--3 align-content--left">
<a class="link--primary" href="/{{this.channelName}}:{{this.longChannelId}}?p=1">First [1]</a> <a class="link--primary" href="/{{this.channelName}}:{{this.longChannelId}}?p=1">First [1]</a>
@ -25,6 +31,7 @@
<a class="link--primary" href="/{{this.channelName}}:{{this.longChannelId}}?p={{this.totalPages}}">Last [{{this.totalPages}}]</a> <a class="link--primary" href="/{{this.channelName}}:{{this.longChannelId}}?p={{this.totalPages}}">Last [{{this.totalPages}}]</a>
</div> </div>
</div> </div>
{{/ifConditional}}
</div> </div>
</div> </div>