From 60f6217f6745c45fee6087faf5b0e32103631bff Mon Sep 17 00:00:00 2001 From: ishikawa999 Date: Tue, 17 Aug 2021 00:03:59 +0000 Subject: [PATCH 1/2] Structure the document list --- app/views/documents/_document.html.erb | 12 +++++++----- app/views/documents/index.html.erb | 6 +++++- app/views/my/blocks/_documents.html.erb | 4 +++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/views/documents/_document.html.erb b/app/views/documents/_document.html.erb index 9a96d5d323..d10497b895 100644 --- a/app/views/documents/_document.html.erb +++ b/app/views/documents/_document.html.erb @@ -1,6 +1,8 @@ -

<%= link_to document.title, document_path(document) %>

-

<%= format_time(document.updated_on) %>

+
+

<%= link_to document.title, document_path(document) %>

+
<%= format_time(document.updated_on) %>
-
- <%= textilizable(truncate_lines(document.description), :object => document) %> -
+
+ <%= textilizable(truncate_lines(document.description), :object => document) %> +
+
\ No newline at end of file diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb index c0458f8bfd..0235288eea 100644 --- a/app/views/documents/index.html.erb +++ b/app/views/documents/index.html.erb @@ -16,12 +16,16 @@

<%=l(:label_document_plural)%>

+
<% if @grouped.empty? %>

<%= l(:label_no_data) %>

<% end %> <% @grouped.keys.sort.__send__(@sort_by == 'date' ? :reverse_each : :each) do |group| %> -

<%= group %>

+
+

<%= group %>

<%= render :partial => 'documents/document', :collection => @grouped[group] %> +
<% end %> +
<% content_for :sidebar do %>

<%= l(:label_sort_by, '') %>

diff --git a/app/views/my/blocks/_documents.html.erb b/app/views/my/blocks/_documents.html.erb index 560adca1ed..f60cb5dbb2 100644 --- a/app/views/my/blocks/_documents.html.erb +++ b/app/views/my/blocks/_documents.html.erb @@ -1,3 +1,5 @@

<%=l(:label_document_plural)%>

-<%= render :partial => 'documents/document', :collection => documents %> +
+ <%= render :partial => 'documents/document', :collection => documents %> +
\ No newline at end of file -- 2.11.0