forked from otwcode/otwarchive
/
show.html.erb
76 lines (67 loc) · 3.03 KB
/
show.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!--ZONE TAG: TAGSETS (but not home?)-->
<div class="tagset nominations home">
<h2 class="heading"><%= @tag_set.title %></h2>
<ul class="navigation actions" role="menu">
<li><%= link_to ts("Back To %{title}", :title => @tag_set.title), tag_set_path(@tag_set) %>
<% if @tag_set.nominated %>
<li><%= link_to ts("Edit"), edit_tag_set_nomination_path(@tag_set, @tag_set_nomination) %></li>
<% end %>
<% if (@tag_set.nominated && @tag_set_nomination.unreviewed?) || @tag_set.user_is_moderator?(current_user) %>
<li>
<%= link_to ts("Delete"), tag_set_nomination_path(@tag_set),
:confirm => ts('Are you certain you want to delete these nominations?'),
:method => :delete %>
</li>
<% end %>
</ul>
<div class="clear"><!--presentational and unexplained--></div>
<h3 class="heading"><%= ts("Your Nominations For %{title}", :title => @tag_set.title) %></h3>
<div class="wrapper">
<dl class="meta group">
<dt><%= ts("Created at: ") %></dt>
<dd class="datetime"><%= l(@tag_set_nomination.created_at.to_date) %></dd>
<dt><%= ts("Status: ") %></dt>
<dd>
<% if @tag_set_nomination.unreviewed? %>
<%= ts("Not Yet Reviewed (may be edited or deleted)") %>
<% elsif @tag_set_nomination.reviewed? %>
<%= ts("Reviewed (may not be edited or deleted)") %>
<% else %>
<%= ts("Partially Reviewed (unreviewed nominations may be edited)") %>
<% end %>
</dd>
</dl>
</div>
<h3 class="heading"><%= ts("Nominated Tags") %> <%= link_to_help "tagset-nominated-tags" %></h3>
<ol class="index group">
<% if @limit[:fandom] > 0 && (@limit[:character] > 0 || @limit[:relationship] > 0) %>
<% # group fandom, char, rel together %>
<% @tag_set_nomination.fandom_nominations.each do |fandom_nom| %>
<li class="fandom listbox group<%= cycle :odd, :even %>">
<h4 class="heading"><%= render "show_tag_status", :tag => fandom_nom %>: </h4>
<% TagSet::TAG_TYPES_RESTRICTED_TO_FANDOM.each do |tag_type| %>
<% if @limit[tag_type] > 0 %>
<h5 class="heading"><%= tag_type.classify.pluralize %></h5>
<% if fandom_nom.send("#{tag_type}_nominations").count == 0 %>
<p class="index group"><%= ts("None nominated in this fandom.") %></p>
<% else %>
<ul class="index group">
<% fandom_nom.send("#{tag_type}_nominations").each do |tag| %>
<li><%= render "show_tag_status", :tag => tag %></li>
<% end %>
</ul>
<% end %>
<% end %>
<% end %>
</li>
<% end %>
<% # show freeforms separately %>
<%= render "show_by_tag_type", :tag_type => "freeform" %>
<% else %>
<% # list char, rel, freeform individually %>
<% TagSet::TAG_TYPES_INITIALIZABLE.each do |tag_type| %>
<%= render "show_by_tag_type", :tag_type => tag_type %>
<% end %>
<% end %>
</ol>
</div>