diff options
author | Go MAEDA <maeda@farend.jp> | 2022-02-08 02:40:24 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-02-08 02:40:24 +0000 |
commit | 6f6d380e7425a13a236b5887a431847c48803c6b (patch) | |
tree | 6b009872b9286789adc75e0c86e3cf89c3178112 /app | |
parent | d7dd703763283e11df762ff82a52d51c04a7efa4 (diff) | |
download | redmine-6f6d380e7425a13a236b5887a431847c48803c6b.tar.gz redmine-6f6d380e7425a13a236b5887a431847c48803c6b.zip |
Structured Document list for more flexible UI design with CSS (#17924).
Patch by Yonghwan SO and Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@21403 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/views/documents/_document.html.erb | 12 | ||||
-rw-r--r-- | app/views/documents/index.html.erb | 6 | ||||
-rw-r--r-- | 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 9a96d5d32..9e0c57d78 100644 --- a/app/views/documents/_document.html.erb +++ b/app/views/documents/_document.html.erb @@ -1,6 +1,8 @@ -<h4><%= link_to document.title, document_path(document) %></h4> -<p><em><%= format_time(document.updated_on) %></em></p> +<div class="document-item document-<%= document.id %>"> + <h4 class="title"><%= link_to document.title, document_path(document) %></h4> + <div class="updated_on"><em><%= format_time(document.updated_on) %></em></div> -<div class="wiki"> - <%= textilizable(truncate_lines(document.description), :object => document) %> -</div> + <div class="wiki description"> + <%= textilizable(truncate_lines(document.description), :object => document) %> + </div> +</div>
\ No newline at end of file diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb index c0458f8bf..aa5e5200d 100644 --- a/app/views/documents/index.html.erb +++ b/app/views/documents/index.html.erb @@ -16,12 +16,16 @@ <h2><%=l(:label_document_plural)%></h2> +<div id="document-list"> <% if @grouped.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %> <% @grouped.keys.sort.__send__(@sort_by == 'date' ? :reverse_each : :each) do |group| %> - <h3><%= group %></h3> + <div class="document-group document-group-<%= @sort_by %>"> + <h3 class="group-name"><%= group %></h3> <%= render :partial => 'documents/document', :collection => @grouped[group] %> + </div> <% end %> +</div> <% content_for :sidebar do %> <h3><%= l(:label_sort_by, '') %></h3> diff --git a/app/views/my/blocks/_documents.html.erb b/app/views/my/blocks/_documents.html.erb index 560adca1e..f60cb5dbb 100644 --- a/app/views/my/blocks/_documents.html.erb +++ b/app/views/my/blocks/_documents.html.erb @@ -1,3 +1,5 @@ <h3><%=l(:label_document_plural)%></h3> -<%= render :partial => 'documents/document', :collection => documents %> +<div id="document-list"> + <%= render :partial => 'documents/document', :collection => documents %> +</div>
\ No newline at end of file |