forked from e621ng/e621ng
[TagRelations] Add edit button to alias/implication show
This mimicks the display logic of the index view. I'm not sure if that makes sense (why edit non-pending aliases?), but I'll leave it be for now.
This commit is contained in:
parent
cdb41b9a56
commit
31ac08938d
@ -28,15 +28,20 @@
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<li><strong>Commands</strong> <span class="tag-alias" data-alias-id="<%= @tag_alias.id %>">
|
||||
<% if @tag_alias.is_pending? %>
|
||||
<%= link_to "Approve", "#", class: "tag-alias-accept" %>
|
||||
<% end %>
|
||||
<% if @tag_alias.deletable_by?(CurrentUser.user) %>
|
||||
| <%= link_to "Reject", "#", class: "tag-alias-reject" %>
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<strong>Commands</strong>
|
||||
<span class="tag-alias" data-alias-id="<%= @tag_alias.id %>">
|
||||
<% if @tag_alias.is_pending? %>
|
||||
<%= link_to "Approve", "#", class: "tag-alias-accept" %>
|
||||
<% end %>
|
||||
<% if @tag_alias.deletable_by?(CurrentUser.user) %>
|
||||
| <%= link_to "Reject", "#", class: "tag-alias-reject" %>
|
||||
<% end %>
|
||||
<% if @tag_alias.editable_by?(CurrentUser.user) %>
|
||||
| <%= link_to "Edit", edit_tag_alias_path(@tag_alias) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -16,14 +16,19 @@
|
||||
<li><strong>Status</strong>: <%= @tag_implication.status %></li>
|
||||
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
<li><strong>Commands</strong> <span class="tag-implication" data-implication-id="<%= @tag_implication.id %>">
|
||||
<% if @tag_implication.is_pending? %>
|
||||
<%= link_to "Approve", "#", class: "tag-implication-accept" %>
|
||||
<% end %>
|
||||
<% if @tag_implication.deletable_by?(CurrentUser.user) %>
|
||||
| <%= link_to "Reject", "#", class: "tag-implication-reject" %>
|
||||
<% end %>
|
||||
</span>
|
||||
<li>
|
||||
<strong>Commands</strong>
|
||||
<span class="tag-implication" data-implication-id="<%= @tag_implication.id %>">
|
||||
<% if @tag_implication.is_pending? %>
|
||||
<%= link_to "Approve", "#", class: "tag-implication-accept" %>
|
||||
<% end %>
|
||||
<% if @tag_implication.deletable_by?(CurrentUser.user) %>
|
||||
| <%= link_to "Reject", "#", class: "tag-implication-reject" %>
|
||||
<% end %>
|
||||
<% if @tag_implication.is_pending? && @tag_implication.editable_by?(CurrentUser.user) %>
|
||||
| <%= link_to "Edit", edit_tag_implication_path(@tag_implication) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user