To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / issues / show.html.erb @ 1350:bb6e7589720e

History | View | Annotate | Download (5.93 KB)

1
<%= render :partial => 'action_menu' %>
2

    
3
<h2><%= issue_heading(@issue) %></h2>
4

    
5
<div class="<%= @issue.css_classes %> details">
6
  <% if @prev_issue_id || @next_issue_id %>
7
    <div class="next-prev-links contextual">
8
      <%= link_to_if @prev_issue_id,
9
                     "\xc2\xab #{l(:label_previous)}",
10
                     (@prev_issue_id ? issue_path(@prev_issue_id) : nil),
11
                     :title => "##{@prev_issue_id}" %> |
12
      <% if @issue_position && @issue_count %>
13
        <span class="position"><%= l(:label_item_position, :position => @issue_position, :count => @issue_count) %></span> |
14
      <% end %>
15
      <%= link_to_if @next_issue_id,
16
                     "#{l(:label_next)} \xc2\xbb",
17
                     (@next_issue_id ? issue_path(@next_issue_id) : nil),
18
                     :title => "##{@next_issue_id}" %>
19
    </div>
20
  <% end %>
21

    
22
  <%= avatar(@issue.author, :size => "50") %>
23

    
24
<div class="subject">
25
<%= render_issue_subject_with_tree(@issue) %>
26
</div>
27
        <p class="author">
28
        <%= authoring @issue.created_on, @issue.author %>.
29
        <% if @issue.created_on != @issue.updated_on %>
30
        <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
31
        <% end %>
32
        </p>
33

    
34
<table class="attributes">
35
<%= issue_fields_rows do |rows|
36
  rows.left l(:field_status), h(@issue.status.name), :class => 'status'
37
  rows.left l(:field_priority), h(@issue.priority.name), :class => 'priority'
38

39
  unless @issue.disabled_core_fields.include?('assigned_to_id')
40
    rows.left l(:field_assigned_to), avatar(@issue.assigned_to, :size => "14").to_s.html_safe + (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
41
  end
42
  unless @issue.disabled_core_fields.include?('category_id')
43
    rows.left l(:field_category), h(@issue.category ? @issue.category.name : "-"), :class => 'category'
44
  end
45
  unless @issue.disabled_core_fields.include?('fixed_version_id')
46
    rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
47
  end
48

49
  unless @issue.disabled_core_fields.include?('start_date')
50
    rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
51
  end
52
  unless @issue.disabled_core_fields.include?('due_date')
53
    rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date'
54
  end
55
  unless @issue.disabled_core_fields.include?('done_ratio')
56
    rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress'
57
  end
58
  unless @issue.disabled_core_fields.include?('estimated_hours')
59
    unless @issue.estimated_hours.nil?
60
      rows.right l(:field_estimated_hours), l_hours(@issue.estimated_hours), :class => 'estimated-hours'
61
    end
62
  end
63
  if User.current.allowed_to?(:view_time_entries, @project)
64
    rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? (link_to l_hours(@issue.total_spent_hours), {:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue}) : "-"), :class => 'spent-time'
65
  end
66
end %>
67
<%= render_custom_fields_rows(@issue) %>
68
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
69
</table>
70

    
71
<% if @issue.description? || @issue.attachments.any? -%>
72
<hr />
73
<% if @issue.description? %>
74
<div class="description">
75
  <div class="contextual">
76
  <%= link_to l(:button_quote),
77
              {:controller => 'journals', :action => 'new', :id => @issue},
78
              :remote => true,
79
              :method => 'post',
80
              :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
81
  </div>
82

    
83
  <p><strong><%=l(:field_description)%></strong></p>
84
  <div class="wiki">
85
  <%= textilizable @issue, :description, :attachments => @issue.attachments %>
86
  </div>
87
</div>
88
<% end %>
89
<%= link_to_attachments @issue, :thumbnails => true %>
90
<% end -%>
91

    
92
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
93

    
94
<% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
95
<hr />
96
<div id="issue_tree">
97
<div class="contextual">
98
  <%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
99
</div>
100
<p><strong><%=l(:label_subtask_plural)%></strong></p>
101
<%= render_descendants_tree(@issue) unless @issue.leaf? %>
102
</div>
103
<% end %>
104

    
105
<% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
106
<hr />
107
<div id="relations">
108
<%= render :partial => 'relations' %>
109
</div>
110
<% end %>
111

    
112
</div>
113

    
114
<% if @changesets.present? %>
115
<div id="issue-changesets">
116
<h3><%=l(:label_associated_revisions)%></h3>
117
<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
118
</div>
119
<% end %>
120

    
121
<% if @journals.present? %>
122
<div id="history">
123
<h3><%=l(:label_history)%></h3>
124
<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
125
</div>
126
<% end %>
127

    
128

    
129
<div style="clear: both;"></div>
130
<%= render :partial => 'action_menu' %>
131

    
132
<div style="clear: both;"></div>
133
<% if authorize_for('issues', 'edit') %>
134
  <div id="update" style="display:none;">
135
  <h3><%= l(:button_update) %></h3>
136
  <%= render :partial => 'edit' %>
137
  </div>
138
<% end %>
139

    
140
<% other_formats_links do |f| %>
141
  <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
142
  <%= f.link_to 'PDF' %>
143
<% end %>
144

    
145
<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
146

    
147
<% content_for :sidebar do %>
148
  <%= render :partial => 'issues/sidebar' %>
149

    
150
  <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
151
    (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
152
    <div id="watchers">
153
      <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
154
    </div>
155
  <% end %>
156
<% end %>
157

    
158
<% content_for :header_tags do %>
159
    <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
160
<% end %>
161

    
162
<%= context_menu issues_context_menu_path %>