##// END OF EJS Templates
Reduce view code duplication by using a nested layout for file rendering (#22058)....
Jean-Philippe Lang -
r14940:00e37d5ca735
parent child
Show More
@@ -0,0 +1,15
1 <h2><%=h @attachment.filename %></h2>
2
3 <div class="attachments">
4 <p><%= "#{@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 <%= yield %>
10
11 <% html_title @attachment.filename %>
12
13 <% content_for :header_tags do -%>
14 <%= stylesheet_link_tag "scm" -%>
15 <% end -%>
@@ -1,11 +1,4
1 <h2><%=h @attachment.filename %></h2>
1 <%= render :layout => 'layouts/file' do %>
2
3 <div class="attachments">
4 <p><%= "#{@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 <%= form_tag({}, :method => 'get') do %>
2 <%= form_tag({}, :method => 'get') do %>
10 <p>
3 <p>
11 <%= l(:label_view_diff) %>:
4 <%= l(:label_view_diff) %>:
@@ -14,9 +7,4
14 </p>
7 </p>
15 <% end %>
8 <% end %>
16 <%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => nil} %>
9 <%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => nil} %>
17
10 <% end %>
18 <% html_title @attachment.filename %>
19
20 <% content_for :header_tags do -%>
21 <%= stylesheet_link_tag "scm" -%>
22 <% end -%>
@@ -1,17 +1,4
1 <h2><%=h @attachment.filename %></h2>
1 <%= render :layout => 'layouts/file' do %>
2
3 <div class="attachments">
4 <p><%= "#{@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 &nbsp;
2 &nbsp;
11 <%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %>
3 <%= render :partial => 'common/file', :locals => {:content => @content, :filename => @attachment.filename} %>
12
4 <% end %>
13 <% html_title @attachment.filename %>
14
15 <% content_for :header_tags do -%>
16 <%= stylesheet_link_tag "scm" -%>
17 <% end -%>
General Comments 0
You need to be logged in to leave comments. Login now