summaryrefslogtreecommitdiffstats
path: root/app/views/attachments
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-09 18:40:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-09 18:40:59 +0000
commit80a7486f95a39ad3fc0946fad17fe51cff01cec6 (patch)
tree43e4ce8c5d338458359b5a8cf389972c93ac56f3 /app/views/attachments
parentaa0beecad0fa7cd8c62816b4dc7918f03b214b91 (diff)
downloadredmine-80a7486f95a39ad3fc0946fad17fe51cff01cec6.tar.gz
redmine-80a7486f95a39ad3fc0946fad17fe51cff01cec6.zip
File viewer for attached text files.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1520 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/attachments')
-rw-r--r--app/views/attachments/file.rhtml15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/views/attachments/file.rhtml b/app/views/attachments/file.rhtml
new file mode 100644
index 000000000..7988d0aed
--- /dev/null
+++ b/app/views/attachments/file.rhtml
@@ -0,0 +1,15 @@
+<h2><%=h @attachment.filename %></h2>
+
+<div class="attachments">
+<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
+ <span class="author"><%= @attachment.author %>, <%= format_time(@attachment.created_on) %></span></p>
+<p><%= link_to l(:button_download), {:controller => 'attachments', :action => 'download', :id => @attachment } -%>
+ <span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p>
+
+</div>
+&nbsp;
+<%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %>
+
+<% content_for :header_tags do -%>
+ <%= stylesheet_link_tag "scm" -%>
+<% end -%>