From 24287cf0320afb6397885e64ac4a1c5998ed11b6 Mon Sep 17 00:00:00 2001 From: ishikawa999 Date: Tue, 17 Aug 2021 00:25:59 +0000 Subject: [PATCH 2/2] Structure the document show page --- app/views/documents/show.html.erb | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index 799803c9e8..b8e9fb2390 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -7,23 +7,27 @@ <% end %> -

<%= @document.title %>

+

<%= @document.title %>

-

<%= @document.category.name %>
-<%= format_date @document.created_on %>

+
+
+
<%= @document.category.name %>
+
<%= format_date @document.created_on %>
-<% if @document.custom_field_values.any? %> -
    - <% render_custom_field_values(@document) do |custom_field, formatted| %> -
  • <%= custom_field.name %>: <%= formatted %>
  • + <% if @document.custom_field_values.any? %> +
      + <% render_custom_field_values(@document) do |custom_field, formatted| %> +
    • <%= custom_field.name %>: <%= formatted %>
    • + <% end %> +
    <% end %> -
-<% end %> +
-
+
<%= textilizable @document, :description, :attachments => @document.attachments %>
+

<%= l(:label_attachment_plural) %>

<%= link_to_attachments @document, :thumbnails => true %> @@ -37,5 +41,8 @@ <%= submit_tag l(:button_add) %> <% end %> <% end %> +
+ +
<% html_title @document.title -%> -- 2.11.0