diff options
| author | rr- <rr-@sakuya.pl> | 2017-01-07 11:07:51 +0100 |
|---|---|---|
| committer | rr- <rr-@sakuya.pl> | 2017-01-08 02:26:26 +0100 |
| commit | f00cc5f3fa3a16a1f7055c772c3008d030f41fef (patch) | |
| tree | f4d9b3b63900c087425f5952c6f2f58098b7c2f6 /client/html | |
| parent | d1bb33ecf0e82689ecbca747a8ac7b038d6cf173 (diff) | |
client/posts: search for similar posts on upload
Diffstat (limited to 'client/html')
| -rw-r--r-- | client/html/post_upload_row.tpl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/client/html/post_upload_row.tpl b/client/html/post_upload_row.tpl index a8a04db..d62ecaf 100644 --- a/client/html/post_upload_row.tpl +++ b/client/html/post_upload_row.tpl @@ -75,6 +75,29 @@ </div> <div class='messages'></div> + + <% if (ctx.uploadable.lookalikes.length) { %> + <ul class='lookalikes'> + <% for (let lookalike of ctx.uploadable.lookalikes) { %> + <li> + <a class='thumbnail-wrapper' title='@<%- lookalike.post.id %>' + href='<%= ctx.canViewPosts ? ctx.getPostUrl(lookalike.post.id) : "" %>'> + <%= ctx.makeThumbnail(lookalike.post.thumbnailUrl) %> + </a> + <div class='description'> + Similar post: <%= ctx.makePostLink(lookalike.post.id, true) %> + <br/> + <%- Math.round((1-lookalike.distance) * 100) %>% match + </div> + <div class='controls'> + <%= ctx.makeCheckbox({text: 'Copy tags', name: 'copy-tags'}) %> + <br/> + <%= ctx.makeCheckbox({text: 'Add relation', name: 'add-relation'}) %> + </div> + </li> + <% } %> + </ul> + <% } %> </div> </div> </li> |