client/posts: remove unavailable first and last links in pool navigator

This commit is contained in:
Eva
2023-05-20 13:37:15 +02:00
parent 0ff359d613
commit 2e0dd251b2

View File

@ -1,11 +1,11 @@
<div class='pool-navigator-container'>
<div class='pool-info-wrapper'>
<span class='first'>
<% if (ctx.canViewPosts && ctx.firstPost) { %>
<% if (ctx.canViewPosts && ctx.previousPost && ctx.firstPost) { %>
<a class='<%- ctx.linkClass %>' href='<%= ctx.getPostUrl(ctx.firstPost.id, ctx.parameters) %>'>
<% } %>
«
<% if (ctx.canViewPosts && ctx.firstPost) { %>
<% if (ctx.canViewPosts && ctx.previousPost && ctx.firstPost) { %>
</a>
<% } %>
</span>
@ -37,11 +37,11 @@
<% } %>
</span>
<span class='last'>
<% if (ctx.canViewPosts && ctx.lastPost) { %>
<% if (ctx.canViewPosts && ctx.nextPost && ctx.lastPost) { %>
<a class='<%- ctx.linkClass %>' href='<%= ctx.getPostUrl(ctx.lastPost.id, ctx.parameters) %>'>
<% } %>
»
<% if (ctx.canViewPosts && ctx.lastPost) { %>
<% if (ctx.canViewPosts && ctx.nextPost && ctx.lastPost) { %>
</a>
<% } %>
</span>