mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
client/posts: add bulk safety editing (#122)
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
%><a class='mousetrap button append' href='<%- ctx.formatClientLink('help', 'search', 'posts') %>'>Syntax help</a><%
|
||||
%></form><%
|
||||
%><% if (ctx.canBulkEditTags) { %><%
|
||||
%><form class='horizontal bulk-edit-tags'><%
|
||||
%><form class='horizontal bulk-edit bulk-edit-tags'><%
|
||||
%><span class='append hint'>Tagging with:</span><%
|
||||
%><a href class='mousetrap button append open'>Mass tag</a><%
|
||||
%><wbr/><%
|
||||
@ -20,4 +20,10 @@
|
||||
%><a href class='mousetrap button append close'>Stop tagging</a><%
|
||||
%></form><%
|
||||
%><% } %><%
|
||||
%><% if (ctx.canBulkEditSafety) { %><%
|
||||
%><form class='horizontal bulk-edit bulk-edit-safety'><%
|
||||
%><a href class='mousetrap button append open'>Mass edit safety</a><%
|
||||
%><a href class='mousetrap button append close'>Stop editing safety</a><%
|
||||
%></form><%
|
||||
%><% } %><%
|
||||
%></div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<% if (ctx.response.results.length) { %>
|
||||
<ul>
|
||||
<% for (let post of ctx.response.results) { %>
|
||||
<li>
|
||||
<li data-post-id='<%= post.id %>'>
|
||||
<a class='thumbnail-wrapper <%= post.tags.length > 0 ? "tags" : "no-tags" %>'
|
||||
title='@<%- post.id %> (<%- post.type %>) Tags: <%- post.tags.map(tag => '#' + tag).join(' ') || 'none' %>'
|
||||
href='<%= ctx.canViewPosts ? ctx.getPostUrl(post.id, ctx.parameters) : '' %>'>
|
||||
@ -35,9 +35,17 @@
|
||||
</a>
|
||||
<span class='edit-overlay'>
|
||||
<% if (ctx.canBulkEditTags && ctx.parameters && ctx.parameters.tag) { %>
|
||||
<a href data-post-id='<%= post.id %>' class='tag-flipper'>
|
||||
<a href class='tag-flipper'>
|
||||
</a>
|
||||
<% } %>
|
||||
<% if (ctx.canBulkEditSafety && ctx.parameters && ctx.parameters.safety) { %>
|
||||
<span class='safety-flipper'>
|
||||
<% for (let safety of ['safe', 'sketchy', 'unsafe']) { %>
|
||||
<a href data-safety='<%- safety %>' class='safety-<%- safety %><%- post.safety === safety ? ' active' : '' %>'>
|
||||
</a>
|
||||
<% } %>
|
||||
</span>
|
||||
<% } %>
|
||||
</span>
|
||||
</li>
|
||||
<% } %>
|
||||
|
Reference in New Issue
Block a user