diff --git a/app/views/works/show.html.erb b/app/views/works/show.html.erb new file mode 100644 index 0000000..febc6ed --- /dev/null +++ b/app/views/works/show.html.erb @@ -0,0 +1,76 @@ + + +<% if !@work.posted? %> +

<%= t(".unposted_deletion_notice_html", deletion_date: date_in_zone(@work.created_at + 29.days)) %>

+<% end %> +<% if @work.unrevealed? %> + <%= render "works/work_unrevealed_notice" %> +<% end %> +<% if @work.user_has_creator_invite?(current_user) %> +

+ <%= ts("You've been invited to become a co-creator of this work. To accept or reject the request, visit your %{creator_requests_page}.", + creator_requests_page: link_to(ts("Co-Creator Requests page"), user_creatorships_path(current_user))).html_safe %> +

+<% end %> + + + + +<% if policy(@work).show_admin_options? %> + <%= render "admin/admin_options", item: @work %> +<% end %> + + + +<% if !@work.unrevealed? || logged_in_as_admin? || can_access_unrevealed_work(@work, current_user) %> + + + <%= render partial: 'works/work_header' %> +<%= render "side_pairings", work: @work %><%= ts("Estimated reading time") %>: +<%= reading_time_with_title(@work.word_count || @work.revised_total_words) %>
+
+ <% if @chapters %> + <% for chapter in @chapters %> + <%= render 'chapters/chapter', chapter: chapter %> + <% end %> + <% else %> +

<%= ts("Work Text:") %>

+ <% cache("#{@chapter.cache_key}-show-content", skip_digest: true) do %> +
<%=raw sanitize_field(@chapter, :content) %>
+ <% end %> + <% end %> +
+ + + <% inspired_by = get_inspired_by(@work) %> + <% if !@work.endnotes.blank? || !@work.series.blank? || !inspired_by.empty? %> + +
+ <% unless @work.endnotes.blank? %> + <%= render :partial => 'works/work_endnotes' %> + <% end %> + <% unless @work.series.blank? %> + <%= render :partial => 'works/work_series_links' %> + <% end %> + <% unless inspired_by.empty? %> + <%= render :partial => 'works/work_approved_children', :locals => {:inspired_by => inspired_by} %> + <% end %> +
+ + <% end %> + + + + + + +<%= render 'comments/commentable', :commentable => @work %> + +<% end %> + + +<%= render "hit_count/include" %> \ No newline at end of file