journalduhacker/app/views/filters/index.html.erb
Robert J Samson 5ada55f10d Add a 'private' attribute to tags to allow for admin / mod specific tags
Private tags would allow admins to create tags that only admins could
use, and that regular users could not filter. The best example use case
for this is an 'announements' tag for site announements that all users
should see.
2012-09-19 16:44:57 -04:00

37 lines
1,018 B
Plaintext

<div class="box wide">
<div class="legend">
Filtered Tags
</div>
<p>
To hide stories from the home page that have been tagged with certain tags,
check them below.
</p>
<%= form_tag "/filters", :method => :post do %>
<table class="data zebra" cellspacing=0 width="75%">
<tr>
<th width="7%">Hide</th>
<th width="15%">Tag</th>
<th width="78%">Description</th>
</tr>
<% Tag.order(:tag).accessible_to(@user).each do |tag| %>
<tr>
<td><input type="checkbox" name="tag_<%= tag.tag %>" value=1
<%= @filtered_tags.map{|ft| ft.tag_id }.include?(tag.id) ?
"checked" : "" %>></td>
<td><a href="/t/<%= tag.tag %>" class="tag tag_<%= tag.tag %>"><%=
tag.tag %></a></td>
<td><%= tag.description %>
<% if tag.filtered_by_default? %>
<em>(Filtered by default)</em>
<% end %></td>
</tr>
<% end %>
</table>
<p>
<%= submit_tag "Save Filters" %>
</p>
<% end %>
</div>