summaryrefslogtreecommitdiff
path: root/client/html
diff options
context:
space:
mode:
authorrr- <rr-@sakuya.pl>2017-10-01 21:46:53 +0200
committerrr- <rr-@sakuya.pl>2017-10-01 21:48:00 +0200
commit1c4c5c5f91dbce7234796daddbb74923638659e7 (patch)
tree1e621ec97c8455613303df066e4d74612f6f1dd0 /client/html
parent253e28c1b5e6757057c0dd36a11fd5063e07ff79 (diff)
remove tags.json
Diffstat (limited to 'client/html')
-rw-r--r--client/html/post_edit_sidebar.tpl4
-rw-r--r--client/html/post_readonly_sidebar.tpl8
-rw-r--r--client/html/posts_page.tpl2
-rw-r--r--client/html/tag_edit.tpl10
-rw-r--r--client/html/tag_summary.tpl6
-rw-r--r--client/html/tags_page.tpl10
6 files changed, 16 insertions, 24 deletions
diff --git a/client/html/post_edit_sidebar.tpl b/client/html/post_edit_sidebar.tpl
index 0fb878b..4c05561 100644
--- a/client/html/post_edit_sidebar.tpl
+++ b/client/html/post_edit_sidebar.tpl
@@ -55,9 +55,7 @@
<% if (ctx.canEditPostTags) { %>
<section class='tags'>
- <%= ctx.makeTextInput({
- value: ctx.post.tags.join(' '),
- }) %>
+ <%= ctx.makeTextInput({}) %>
</section>
<% } %>
diff --git a/client/html/post_readonly_sidebar.tpl b/client/html/post_readonly_sidebar.tpl
index a03347e..51ba9b5 100644
--- a/client/html/post_readonly_sidebar.tpl
+++ b/client/html/post_readonly_sidebar.tpl
@@ -69,20 +69,20 @@
--><% for (let tag of ctx.post.tags) { %><!--
--><li><!--
--><% if (ctx.canViewTags) { %><!--
- --><a href='<%- ctx.formatClientLink('tag', tag) %>' class='<%= ctx.makeCssName(ctx.getTagCategory(tag), 'tag') %>'><!--
+ --><a href='<%- ctx.formatClientLink('tag', tag.names[0]) %>' class='<%= ctx.makeCssName(tag.category, 'tag') %>'><!--
--><i class='fa fa-tag'></i><!--
--><% } %><!--
--><% if (ctx.canViewTags) { %><!--
--></a><!--
--><% } %><!--
--><% if (ctx.canListPosts) { %><!--
- --><a href='<%- ctx.formatClientLink('posts', {query: tag}) %>' class='<%= ctx.makeCssName(ctx.getTagCategory(tag), 'tag') %>'><!--
+ --><a href='<%- ctx.formatClientLink('posts', {query: tag.names[0]}) %>' class='<%= ctx.makeCssName(tag.category, 'tag') %>'><!--
--><% } %><!--
- --><%- tag %>&#32;<!--
+ --><%- tag.names[0] %>&#32;<!--
--><% if (ctx.canListPosts) { %><!--
--></a><!--
--><% } %><!--
- --><span class='tag-usages' data-pseudo-content='<%- ctx.getTagUsages(tag) %>'></span><!--
+ --><span class='tag-usages' data-pseudo-content='<%- tag.postCount %>'></span><!--
--></li><!--
--><% } %><!--
--></ul>
diff --git a/client/html/posts_page.tpl b/client/html/posts_page.tpl
index 895de55..6f0665c 100644
--- a/client/html/posts_page.tpl
+++ b/client/html/posts_page.tpl
@@ -4,7 +4,7 @@
<% for (let post of ctx.response.results) { %>
<li data-post-id='<%= post.id %>'>
<a class='thumbnail-wrapper <%= post.tags.length > 0 ? "tags" : "no-tags" %>'
- title='@<%- post.id %> (<%- post.type %>)&#10;&#10;Tags: <%- post.tags.map(tag => '#' + tag).join(' ') || 'none' %>'
+ title='@<%- post.id %> (<%- post.type %>)&#10;&#10;Tags: <%- post.tags.map(tag => '#' + tag.names[0]).join(' ') || 'none' %>'
href='<%= ctx.canViewPosts ? ctx.getPostUrl(post.id, ctx.parameters) : '' %>'>
<%= ctx.makeThumbnail(post.thumbnailUrl) %>
<span class='type' data-type='<%- post.type %>'>
diff --git a/client/html/tag_edit.tpl b/client/html/tag_edit.tpl
index a58c529..4984285 100644
--- a/client/html/tag_edit.tpl
+++ b/client/html/tag_edit.tpl
@@ -22,18 +22,12 @@
</li>
<li class='implications'>
<% if (ctx.canEditImplications) { %>
- <%= ctx.makeTextInput({
- text: 'Implications',
- value: ctx.tag.implications.join(' '),
- }) %>
+ <%= ctx.makeTextInput({text: 'Implications'}) %>
<% } %>
</li>
<li class='suggestions'>
<% if (ctx.canEditSuggestions) { %>
- <%= ctx.makeTextInput({
- text: 'Suggestions',
- value: ctx.tag.suggestions.join(' '),
- }) %>
+ <%= ctx.makeTextInput({text: 'Suggestions'}) %>
<% } %>
</li>
<li class='description'>
diff --git a/client/html/tag_summary.tpl b/client/html/tag_summary.tpl
index 0513d64..ad00084 100644
--- a/client/html/tag_summary.tpl
+++ b/client/html/tag_summary.tpl
@@ -9,7 +9,7 @@
Aliases:<br/>
<ul><!--
--><% for (let name of ctx.tag.names.slice(1)) { %><!--
- --><li><%= ctx.makeTagLink(name) %></li><!--
+ --><li><%= ctx.makeTagLink(name, false, false, ctx.tag) %></li><!--
--><% } %><!--
--></ul>
</section>
@@ -18,7 +18,7 @@
Implications:<br/>
<ul><!--
--><% for (let tag of ctx.tag.implications) { %><!--
- --><li><%= ctx.makeTagLink(tag) %></li><!--
+ --><li><%= ctx.makeTagLink(tag.names[0], false, false, tag) %></li><!--
--><% } %><!--
--></ul>
</section>
@@ -27,7 +27,7 @@
Suggestions:<br/>
<ul><!--
--><% for (let tag of ctx.tag.suggestions) { %><!--
- --><li><%= ctx.makeTagLink(tag) %></li><!--
+ --><li><%= ctx.makeTagLink(tag.names[0], false, false, tag) %></li><!--
--><% } %><!--
--></ul>
</section>
diff --git a/client/html/tags_page.tpl b/client/html/tags_page.tpl
index 788d0e3..be3b143 100644
--- a/client/html/tags_page.tpl
+++ b/client/html/tags_page.tpl
@@ -44,15 +44,15 @@
<td class='names'>
<ul>
<% for (let name of tag.names) { %>
- <li><%= ctx.makeTagLink(name) %></li>
+ <li><%= ctx.makeTagLink(name, false, false, tag) %></li>
<% } %>
</ul>
</td>
<td class='implications'>
<% if (tag.implications.length) { %>
<ul>
- <% for (let name of tag.implications) { %>
- <li><%= ctx.makeTagLink(name) %></li>
+ <% for (let relation of tag.implications) { %>
+ <li><%= ctx.makeTagLink(relation.names[0], false, false, relation) %></li>
<% } %>
</ul>
<% } else { %>
@@ -62,8 +62,8 @@
<td class='suggestions'>
<% if (tag.suggestions.length) { %>
<ul>
- <% for (let name of tag.suggestions) { %>
- <li><%= ctx.makeTagLink(name) %></li>
+ <% for (let relation of tag.suggestions) { %>
+ <li><%= ctx.makeTagLink(relation.names[0], false, false, relation) %></li>
<% } %>
</ul>
<% } else { %>