From 98d4bdb7dfb37f6836516bcc0815a2c882242457 Mon Sep 17 00:00:00 2001
From: Jean-Philippe Lang
Date: Thu, 30 Nov 2006 22:00:35 +0000
Subject: [PATCH] documents views modified
git-svn-id: http://redmine.rubyforge.org/svn/trunk@60 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
redmine/app/views/documents/_form.rhtml | 18 +++++-
redmine/app/views/documents/show.rhtml | 59 ++++++++++---------
.../app/views/projects/list_documents.rhtml | 4 +-
3 files changed, 48 insertions(+), 33 deletions(-)
diff --git a/redmine/app/views/documents/_form.rhtml b/redmine/app/views/documents/_form.rhtml
index 724bcbaa2..873c96329 100644
--- a/redmine/app/views/documents/_form.rhtml
+++ b/redmine/app/views/documents/_form.rhtml
@@ -10,6 +10,20 @@
<%= text_field 'document', 'title', :size => 60 %>
-<%= text_area 'document', 'description', :cols => 60, :rows => 5 %>
+<%= text_area 'document', 'description', :cols => 60, :rows => 15 %>
-
\ No newline at end of file
+
+
+<% unless $RDM_TEXTILE_DISABLED %>
+<%= javascript_include_tag 'jstoolbar' %>
+
+<% end %>
\ No newline at end of file
diff --git a/redmine/app/views/documents/show.rhtml b/redmine/app/views/documents/show.rhtml
index 2b8da670f..c6dbbe957 100644
--- a/redmine/app/views/documents/show.rhtml
+++ b/redmine/app/views/documents/show.rhtml
@@ -1,47 +1,48 @@
<%= @document.title %>
-<%=l(:field_description)%>: <%= @document.description %>
-<%=l(:field_category)%>: <%= @document.category.name %>
-
+<%= @document.category.name %>
+<%= format_date @document.created_on %>
+<%= textilizable @document.description %>
-<% if authorize_for('documents', 'edit') %>
- <%= start_form_tag({ :controller => 'documents', :action => 'edit', :id => @document }, :method => 'get' ) %>
- <%= submit_tag l(:button_edit) %>
- <%= end_form_tag %>
-<% end %>
+
+<%= link_to_if_authorized l(:button_edit), :controller => 'documents', :action => 'edit', :id => @document %> |
+
<% if authorize_for('documents', 'destroy') %>
<%= start_form_tag({ :controller => 'documents', :action => 'destroy', :id => @document } ) %>
<%= submit_tag l(:button_delete) %>
- <%= end_form_tag %>
+ <%= end_form_tag %>
<% end %>
+ |
+
+
-
-
-
+<%= l(:label_attachment_plural) %>
+
<% for attachment in @attachments %>
- ">
- <%= format_date(attachment.created_on) %> |
- <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> |
- <%= attachment.author.display_name %> |
- <%= human_size(attachment.filesize) %> <%= lwr(:label_download, attachment.downloads) %> |
-
- <% if authorize_for('documents', 'destroy_attachment') %>
-
- <%= start_form_tag :action => 'destroy_attachment', :id => @document, :attachment_id => attachment %>
- <%= submit_tag l(:button_delete), :class => "button-small" %>
- <%= end_form_tag %>
- |
- <% end %>
-
+ -
+ <% if authorize_for('documents', 'destroy') %>
+
+ <%= start_form_tag({ :controller => 'documents', :action => 'destroy', :id => @document } ) %>
+ <%= submit_tag l(:button_delete), :class => 'button-small' %>
+ <%= end_form_tag %>
+
+ <% end %>
+
+ <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
+ (<%= human_size attachment.filesize %>)
+ <%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %>
+ <%= lwr(:label_download, attachment.downloads) %>
+
<% end %>
-
+
+
<% if authorize_for('documents', 'add_attachment') %>
<%= start_form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true) %>
- <%=l(:label_attachment_new)%>
<%= file_field 'attachment', 'file' %>
+
+ <%= file_field 'attachment', 'file' %>
<%= submit_tag l(:button_add) %>
<%= end_form_tag %>
<% end %>
-
diff --git a/redmine/app/views/projects/list_documents.rhtml b/redmine/app/views/projects/list_documents.rhtml
index e47abceb3..9bbadc476 100644
--- a/redmine/app/views/projects/list_documents.rhtml
+++ b/redmine/app/views/projects/list_documents.rhtml
@@ -10,8 +10,8 @@
<%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %>
- <%=l(:field_description)%>: <%= d.description %>
- <%= format_time(d.created_on) %>
+ <%= truncate d.description, 250 %>
+ <%= format_time(d.created_on) %>
<% end %>
--
2.39.5