journalduhacker/app/views/filters/index.html.erb

37 lines
1,018 B
Plaintext
Raw Normal View History

2012-07-04 05:24:18 +02:00
<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.
2012-07-04 05:24:18 +02:00
</p>
<%= form_tag "/filters", :method => :post do %>
<table class="data zebra" cellspacing=0 width="75%">
<tr>
<th width="7%">Hide</th>
2012-07-04 05:24:18 +02:00
<th width="15%">Tag</th>
<th width="78%">Description</th>
2012-07-04 05:24:18 +02:00
</tr>
<% Tag.order(:tag).accessible_to(@user).each do |tag| %>
2012-07-04 05:24:18 +02:00
<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>
2012-07-04 05:24:18 +02:00
</tr>
<% end %>
</table>
<p>
<%= submit_tag "Save Filters" %>
</p>
<% end %>
</div>