<% # expects "work" %> <% if work.unrevealed? && !is_author_of?(work) %> <%= render "works/mystery_blurb", item: work %> <% else %>

<% if (work.unrevealed? || work.anonymous?) && is_author_of?(work) %> <% if work.unrevealed? %> <%= ts("Unrevealed:") %> <% elsif work.anonymous? %> <%= ts("Anonymous:") %> <% end %> <% end %> <%= link_to work.title, @collection ? collection_work_path(@collection, work) : work %> <%= ts('by') %> <%= byline(work, visibility: "public") %> <% #### CACHE show/hide ####, if you update the key edit lib/tasks/memcached.rake %> <% cache("#{work.cache_key}-#{Work.work_blurb_version(work.id)}-#{hide_warnings?(work) ? 'nowarn' : 'showwarn'}-#{hide_freeform?(work) ? 'nofreeform' : 'showfreeform'}-v10", skip_digest: true) do %> <% tag_groups = work.tag_groups %> <% if work.gifts.not_rejected.exists? %> <%= ts("for") %> <%= recipients_link(work) %> <% end %> <% if work.restricted %><%= image_tag("lockblue.png", :size => "15x15", :alt => "(Restricted)", :title => "Restricted", skip_pipeline: true) %><% end %> <% if work.hidden_by_admin %><%= image_tag("lockred.png", :size => "15x15", :alt => "(Hidden by Admin)", :title => "Hidden by Administrator", skip_pipeline: true) %><% end %>

<%= ts("Fandoms") %>: <% fandoms = tag_groups['Fandom'] %> <%= fandoms.collect{|tag| link_to_tag_works(tag) }.join(', ').html_safe if fandoms %>  
<%= get_symbols_for(work, tag_groups) %>

<%= set_format_for_date(work.revised_at) %>

<% if !work.posted? %>

<%= t('.draft_deletion_notice_html', deletion_date: date_in_zone(work.created_at + 29.days)) %>

<% end %>
<%= ts("Tags") %>
<% unless work.summary.blank? %>
<%= ts("Summary") %>
<%=raw strip_images(sanitize_field(work, :summary)) %>
<% end %> <% unless work.series.empty? %>
<%= ts("Series") %>
<% end %>
<% if work.language.present? %>
<%= ts("Language") %>:
<%= work.language.name %>
<% end %>
<%= ts('Words') %>:
<%= number_with_delimiter(work.word_count) %>
<%= ts('Chapters') %>:
<%= chapter_total_display_with_link(work) %>
<% end %> <% #### END CACHE show/hide %> <% #### CACHE stats #### %> <% cache("#{work.cache_key}/stats-v4", expires_in: 1.hour, skip_digest: true) do %> <% unless work.approved_collections.empty? %>
<%= ts('Collections') %>:
<%= link_to number_with_delimiter(work.approved_collections.length), work_collections_path(work) %>
<% end %> <% if work.count_visible_comments > 0 %>
<%= ts('Comments') %>:
<%= link_to number_with_delimiter(work.count_visible_comments), work.number_of_posted_chapters > 1 ? work_path(work, anchor: "comments", show_comments: true, view_full_work: "true") : work_path(work, anchor: "comments", show_comments: true) %>
<% end %> <% if work.all_kudos_count > 0 %>
<%= ts('Applause') %>:
<%= link_to number_with_delimiter(work.all_kudos_count), work.number_of_posted_chapters > 1 ? work_path(work, anchor: "kudos", view_full_work: "true") : work_path(work, anchor: "kudos") %>
<% end %> <% if (bookmark_count = work.public_bookmarks_count) > 0 %>
<%= ts('Bookmarks') %>:
<%= link_to_bookmarkable_bookmarks(work, number_with_delimiter(bookmark_count)) %>
<% end %>
<%= ts("Plays") %>:
<%= number_with_delimiter(work.hits) %>
<% end %> <% #### END CACHE stats #### %>
<% end %>