Project

General

Profile

Patch #25068 » Versions_show_page_version_summary_moved_to_sidebar__and_issues_list_wrapped_in_box_class.patch

Andrey Lobanov (RedSoft), 2017-02-14 14:23

View differences:

app/views/versions/show.html.erb (date 1487078494000)
11 11
<%= render :partial => 'versions/overview', :locals => {:version => @version} %>
12 12
<%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
13 13

  
14
<div id="version-summary">
15
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
16
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
17
<table>
18
<tr>
19
    <th><%= l(:field_estimated_hours) %></th>
20
    <td class="total-hours"><%= link_to html_hours(l_hours(@version.estimated_hours)),
21
                                        project_issues_path(@version.project, :set_filter => 1, :status_id => '*', :fixed_version_id => @version.id, :c => [:tracker, :status, :subject, :estimated_hours], :t => [:estimated_hours]) %></td>
22
</tr>
23
<% if User.current.allowed_to_view_all_time_entries?(@project) %>
24
<tr>
25
    <th><%= l(:label_spent_time) %></th>
26
    <td class="total-hours"><%= link_to html_hours(l_hours(@version.spent_hours)),
27
                                        project_time_entries_path(@version.project, :set_filter => 1, :"issue.fixed_version_id" => @version.id) %></td>
28
</tr>
29
<% end %>
30
</table>
31
</fieldset>
32
<% end %>
14
<% content_for :sidebar do %>
15
    <div id="version-summ">
16
      <% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
17
          <fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
18
            <table>
19
              <tr>
20
                <th><%= l(:field_estimated_hours) %></th>
21
                <td class="total-hours"><%= link_to html_hours(l_hours(@version.estimated_hours)),
22
                                                    project_issues_path(@version.project, :set_filter => 1, :status_id => '*', :fixed_version_id => @version.id, :c => [:tracker, :status, :subject, :estimated_hours], :t => [:estimated_hours]) %></td>
23
              </tr>
24
              <% if User.current.allowed_to_view_all_time_entries?(@project) %>
25
                  <tr>
26
                    <th><%= l(:label_spent_time) %></th>
27
                    <td class="total-hours"><%= link_to html_hours(l_hours(@version.spent_hours)),
28
                                                        project_time_entries_path(@version.project, :set_filter => 1, :"issue.fixed_version_id" => @version.id) %></td>
29
                  </tr>
30
              <% end %>
31
            </table>
32
          </fieldset>
33
      <% end %>
33 34

  
34
<div id="status_by">
35
<%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.exists? %>
36
</div>
37
</div>
35
      <div id="status_by">
36
        <%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.exists? %>
37
      </div>
38
    </div>
39
<% end %>
38 40

  
41
<div class="box">
39 42
<% if @issues.present? %>
40 43
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
41 44
  <table class="list related-issues">
......
51 54
<%= context_menu %>
52 55
<% end %>
53 56
</div>
57
</div>
54 58

  
55 59
<%= call_hook :view_versions_show_bottom, :version => @version %>
56 60

  
(2-2/2)