Commit 8f37ad0f authored by Michael Rose's avatar Michael Rose

story display: handling crossover vs. fandom on all pages

parent 3caad50b
......@@ -78,7 +78,7 @@
selected_fandoms = if @search
@search.fandoms
else
[story_result.fandoms[0]]
[story_result.fandoms[0].id]
end
selected_crossovers = if @search
@search.crossovers
......@@ -94,15 +94,29 @@
.first
%>
<% if selected_fandoms.size > 1 && fandom %>
<i class="fa fa-book"></i>
<%= fandom.name %>
<% if story_result.crossover? %>
<i class="fa fa-random"></i>
<%= fandom.name %> x <%= crossover.name %>
<% else %>
<i class="fa fa-book"></i>
<%= story_result.fandoms[0].name %>
<% end %>
-
<% end %>
<% if (selected_crossovers.size > 0 or (@fandoms && @fandoms.include?(-1))) && crossover %>
<% elsif (selected_crossovers.size > 0 or (@fandoms && @fandoms.include?(-1))) && crossover %>
<i class="fa fa-random"></i>
<%= crossover.name %>
-
<% end %>
<% unless @fandoms %>
<% if story_result.crossover? %>
<i class="fa fa-random"></i>
<%= story_result.fandoms.map(&:name).join(' x ') %>
<% else %>
<i class="fa fa-book"></i>
<%= story_result.fandoms[0].name %>
<% end %>
-
<% end %>
<span class="pull-right text-muted"
title="Updated: <%= story_result.updated %>"
am-time-ago="item.updated"><%= timeago_tag story_result.updated, :limit => 2.years.ago %></span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment