aboutsummaryrefslogtreecommitdiff
path: root/client/html
diff options
context:
space:
mode:
authorrr-2016-08-17 13:01:17 +0200
committerrr-2016-08-20 13:01:17 +0200
commit9014baab92007fcdd624be9e81e45ba92dce97ae (patch)
treec6b1881c5662dde840f6e3a2695c8c610c8900e2 /client/html
parent80af79779d01fe949af84fdb43f6b82085cd4a9c (diff)
client/snapshots: add snapshots browser
Diffstat (limited to 'client/html')
-rw-r--r--client/html/home_featured_post.tpl2
-rw-r--r--client/html/home_footer.tpl4
-rw-r--r--client/html/snapshots_page.tpl31
3 files changed, 36 insertions, 1 deletions
diff --git a/client/html/home_featured_post.tpl b/client/html/home_featured_post.tpl
index 90851d7..33b9c3c 100644
--- a/client/html/home_featured_post.tpl
+++ b/client/html/home_featured_post.tpl
@@ -1,7 +1,7 @@
<div class='post-container'></div>
<% if (ctx.featuredPost) { %>
<aside>
- Featured post: <%= ctx.makePostLink(ctx.featuredPost.id) %>,
+ Featured post: <%= ctx.makePostLink(ctx.featuredPost.id, true) %>,
posted
<%= ctx.makeRelativeTime(ctx.featuredPost.creationTime) %>
by
diff --git a/client/html/home_footer.tpl b/client/html/home_footer.tpl
index 47d25e8..80baccb 100644
--- a/client/html/home_footer.tpl
+++ b/client/html/home_footer.tpl
@@ -4,3 +4,7 @@
<span class=sep>&bull;</span>
Build <a class='version' href='https://github.com/rr-/szurubooru/commits/master'><%- ctx.version %></a>
from <%= ctx.makeRelativeTime(ctx.buildDate) %>
+<% if (ctx.canListSnapshots) { %>
+ <span class=sep>&bull;</span>
+ <a href='/history'>History</a>
+<% } %>
diff --git a/client/html/snapshots_page.tpl b/client/html/snapshots_page.tpl
new file mode 100644
index 0000000..c84e19f
--- /dev/null
+++ b/client/html/snapshots_page.tpl
@@ -0,0 +1,31 @@
+<div class='snapshot-list'>
+ <% if (ctx.results.length) { %>
+ <ul>
+ <% for (let item of ctx.results) { %>
+ <li>
+ <div class='header operation-<%= item.operation %>'>
+ <span class='time'>
+ <%= ctx.makeRelativeTime(item.time) %>
+ </span>
+
+ <%= ctx.makeUserLink(item.user) %>
+
+ <%= item.operation %>
+
+ <%= ctx.makeResourceLink(item.type, item.id) %>
+ </div>
+
+ <div class='details'><!--
+ --><% if (item.operation === 'created') { %><!--
+ --><%= ctx.makeItemCreation(item.type, item.data) %><!--
+ --><% } else if (item.operation === 'modified') { %><!--
+ --><%= ctx.makeItemModification(item.type, item.data) %><!--
+ --><% } else if (item.operation === 'merged') { %><!--
+ -->Merged to <%= ctx.makeResourceLink(item.data[0], item.data[1]) %><!--
+ --><% } %><!--
+ --></div>
+ </li>
+ <% } %>
+ </ul>
+ <% } %>
+</div>

© 2015 - 2026 Jakob L. Kreuze