Revision 912:5e80956cc792 app/views/attachments
| app/views/attachments/_form.html.erb | ||
|---|---|---|
| 1 |
<span id="attachments_fields"> |
|
| 2 |
<span> |
|
| 3 |
<%= file_field_tag 'attachments[1][file]', :size => 30, :id => nil, :class => 'file', |
|
| 4 |
:onchange => "checkFileSize(this, #{Setting.attachment_max_size.to_i.kilobytes}, '#{escape_javascript(l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)))}');" -%>
|
|
| 5 |
<label class="inline"><%= l(:label_optional_description) %><%= text_field_tag 'attachments[1][description]', '', :size => 60, :id => nil, :class => 'description' %></label> |
|
| 6 |
<%= link_to_function(image_tag('delete.png'), 'removeFileField(this)', :title => (l(:button_delete))) %>
|
|
| 7 |
</span> |
|
| 8 |
</span> |
|
| 9 |
<small><%= link_to l(:label_add_another_file), '#', :onclick => 'addFileField(); return false;' %> |
|
| 10 |
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) |
|
| 11 |
</small> |
|
| app/views/attachments/_form.rhtml | ||
|---|---|---|
| 1 |
<span id="attachments_fields"> |
|
| 2 |
<%= file_field_tag 'attachments[1][file]', :size => 30, :id => nil -%><label class="inline"><span id="attachment_description_label_content"><%= l(:label_optional_description) %></span><%= text_field_tag 'attachments[1][description]', '', :size => 60, :id => nil %> |
|
| 3 |
</label> |
|
| 4 |
</span> |
|
| 5 |
<br /> |
|
| 6 |
<small><%= link_to l(:label_add_another_file), '#', :onclick => 'addFileField(); return false;' %> |
|
| 7 |
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) |
|
| 8 |
</small> |
|
| app/views/attachments/_links.html.erb | ||
|---|---|---|
| 1 |
<div class="attachments"> |
|
| 2 |
<% for attachment in attachments %> |
|
| 3 |
<p><%= link_to_attachment attachment, :class => 'icon icon-attachment' -%> |
|
| 4 |
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
|
| 5 |
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span> |
|
| 6 |
<% if options[:deletable] %> |
|
| 7 |
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
|
| 8 |
:confirm => l(:text_are_you_sure), |
|
| 9 |
:method => :delete, |
|
| 10 |
:class => 'delete', |
|
| 11 |
:title => l(:button_delete) %> |
|
| 12 |
<% end %> |
|
| 13 |
<% if options[:author] %> |
|
| 14 |
<span class="author"><%= h(attachment.author) %>, <%= format_time(attachment.created_on) %></span> |
|
| 15 |
<% end %> |
|
| 16 |
</p> |
|
| 17 |
<% end %> |
|
| 18 |
</div> |
|
| app/views/attachments/_links.rhtml | ||
|---|---|---|
| 1 |
<div class="attachments"> |
|
| 2 |
<% for attachment in attachments %> |
|
| 3 |
<p><%= link_to_attachment attachment, :class => 'icon icon-attachment' -%> |
|
| 4 |
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
|
|
| 5 |
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span> |
|
| 6 |
<% if options[:deletable] %> |
|
| 7 |
<%= link_to image_tag('delete.png'), {:controller => 'attachments', :action => 'destroy', :id => attachment},
|
|
| 8 |
:confirm => l(:text_are_you_sure), |
|
| 9 |
:method => :post, |
|
| 10 |
:class => 'delete', |
|
| 11 |
:title => l(:button_delete) %> |
|
| 12 |
<% end %> |
|
| 13 |
<% if options[:author] %> |
|
| 14 |
<span class="author"><%= attachment.author %>, <%= format_time(attachment.created_on) %></span> |
|
| 15 |
<% end %> |
|
| 16 |
</p> |
|
| 17 |
<% end %> |
|
| 18 |
</div> |
|
| app/views/attachments/diff.html.erb | ||
|---|---|---|
| 1 |
<h2><%=h @attachment.filename %></h2> |
|
| 2 |
|
|
| 3 |
<div class="attachments"> |
|
| 4 |
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
|
|
| 5 |
<span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p> |
|
| 6 |
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> |
|
| 7 |
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p> |
|
| 8 |
</div> |
|
| 9 |
<p> |
|
| 10 |
<% form_tag({}, :method => 'get') do %>
|
|
| 11 |
<label><%= l(:label_view_diff) %></label> |
|
| 12 |
<%= select_tag 'type', |
|
| 13 |
options_for_select( |
|
| 14 |
[[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), |
|
| 15 |
:onchange => "if (this.value != '') {this.form.submit()}" %>
|
|
| 16 |
<% end %> |
|
| 17 |
</p> |
|
| 18 |
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
|
|
| 19 |
|
|
| 20 |
<% html_title @attachment.filename %> |
|
| 21 |
|
|
| 22 |
<% content_for :header_tags do -%> |
|
| 23 |
<%= stylesheet_link_tag "scm" -%> |
|
| 24 |
<% end -%> |
|
| app/views/attachments/diff.rhtml | ||
|---|---|---|
| 1 |
<h2><%=h @attachment.filename %></h2> |
|
| 2 |
|
|
| 3 |
<div class="attachments"> |
|
| 4 |
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
|
|
| 5 |
<span class="author"><%= @attachment.author %>, <%= format_time(@attachment.created_on) %></span></p> |
|
| 6 |
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> |
|
| 7 |
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p> |
|
| 8 |
|
|
| 9 |
</div> |
|
| 10 |
|
|
| 11 |
<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
|
|
| 12 |
|
|
| 13 |
<% html_title @attachment.filename %> |
|
| 14 |
|
|
| 15 |
<% content_for :header_tags do -%> |
|
| 16 |
<%= stylesheet_link_tag "scm" -%> |
|
| 17 |
<% end -%> |
|
| app/views/attachments/file.html.erb | ||
|---|---|---|
| 1 |
<h2><%=h @attachment.filename %></h2> |
|
| 2 |
|
|
| 3 |
<div class="attachments"> |
|
| 4 |
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
|
|
| 5 |
<span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p> |
|
| 6 |
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> |
|
| 7 |
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p> |
|
| 8 |
|
|
| 9 |
</div> |
|
| 10 |
|
|
| 11 |
<%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %>
|
|
| 12 |
|
|
| 13 |
<% html_title @attachment.filename %> |
|
| 14 |
|
|
| 15 |
<% content_for :header_tags do -%> |
|
| 16 |
<%= stylesheet_link_tag "scm" -%> |
|
| 17 |
<% end -%> |
|
| app/views/attachments/file.rhtml | ||
|---|---|---|
| 1 |
<h2><%=h @attachment.filename %></h2> |
|
| 2 |
|
|
| 3 |
<div class="attachments"> |
|
| 4 |
<p><%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
|
|
| 5 |
<span class="author"><%= @attachment.author %>, <%= format_time(@attachment.created_on) %></span></p> |
|
| 6 |
<p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> |
|
| 7 |
<span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p> |
|
| 8 |
|
|
| 9 |
</div> |
|
| 10 |
|
|
| 11 |
<%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %>
|
|
| 12 |
|
|
| 13 |
<% html_title @attachment.filename %> |
|
| 14 |
|
|
| 15 |
<% content_for :header_tags do -%> |
|
| 16 |
<%= stylesheet_link_tag "scm" -%> |
|
| 17 |
<% end -%> |
|
| app/views/attachments/show.api.rsb | ||
|---|---|---|
| 1 |
render_api_attachment(@attachment, api) |
|
Also available in: Unified diff