client/posts: links in edit mode preserve mode

This commit is contained in:
rr- 2016-07-30 16:54:13 +02:00
parent 4b75aab816
commit c1c47de3a5
1 changed files with 10 additions and 2 deletions

View File

@ -3,7 +3,11 @@
<nav class='buttons'> <nav class='buttons'>
<article class='next-post'> <article class='next-post'>
<% if (ctx.nextPostId) { %> <% if (ctx.nextPostId) { %>
<% if (ctx.editMode) { %>
<a href='<%= ctx.getPostEditUrl(ctx.nextPostId, ctx.parameters) %>'>
<% } else { %>
<a href='<%= ctx.getPostUrl(ctx.nextPostId, ctx.parameters) %>'> <a href='<%= ctx.getPostUrl(ctx.nextPostId, ctx.parameters) %>'>
<% } %>
<% } else { %> <% } else { %>
<a class='inactive'> <a class='inactive'>
<% } %> <% } %>
@ -13,7 +17,11 @@
</article> </article>
<article class='previous-post'> <article class='previous-post'>
<% if (ctx.prevPostId) { %> <% if (ctx.prevPostId) { %>
<% if (ctx.editMode) { %>
<a href='<%= ctx.getPostEditUrl(ctx.prevPostId, ctx.parameters) %>'>
<% } else { %>
<a href='<%= ctx.getPostUrl(ctx.prevPostId, ctx.parameters) %>'> <a href='<%= ctx.getPostUrl(ctx.prevPostId, ctx.parameters) %>'>
<% } %>
<% } else { %> <% } else { %>
<a class='inactive'> <a class='inactive'>
<% } %> <% } %>