admin interface baked into browse

This commit is contained in:
Kyle Drake 2015-02-02 12:50:04 -08:00
parent 847f28c6af
commit 4da6fe9da4
2 changed files with 30 additions and 0 deletions

View file

@ -87,6 +87,21 @@
} }
} }
} }
.admin {
font-size: 80%;
form {
display: inline;
padding-right: 10px;
}
button {
background:none!important;
border:none;
padding:0!important;
cursor: pointer;
}
}
} }
.neo-SS, .z{ .neo-SS, .z{

View file

@ -94,6 +94,21 @@
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<% if signed_in? && current_site.is_admin %>
<div class="admin">
<form action="/admin/banhammer" target="_blank" method="POST" onsubmit="return confirm('Confirm ban of <%= site.username %>');">
<%== csrf_token_input_html %>
<input type="hidden" name="username" value="<%= site.username %>">
<button>Ban</button>
</form>
<form action="/admin/mark_nsfw" target="_blank" method="POST" onsubmit="return confirm('Confirm NSFW marking of <%= site.username %>');">
<%== csrf_token_input_html %>
<input type="hidden" name="username" value="<%= site.username %>">
<button>Mark NSFW</button>
</form>
</div>
<% end %>
</div> </div>
</li> </li>
<% end %> <% end %>