show.rhtml

Rafael Diaz-Tushman, 2010-03-01 05:18

Download (4.71 KB)

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

    
3
<h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
4

    
5
<div class="<%= @issue.css_classes %> details">
6
        <%= avatar(@issue.author, :size => "50") %>
7
        <h3><%=h @issue.subject %></h3>
8
        <p class="author">
9
        <%= authoring @issue.created_on, @issue.author %>.
10
        <% if @issue.created_on != @issue.updated_on %>
11
        <%= l(:label_updated_time, time_tag(@issue.updated_on)) %>.
12
        <% end %>
13
        </p>
14

    
15
<table class="attributes">
16
<tr>
17
    <th class="status"><%=l(:field_status)%>:</th><td class="status"><%= @issue.status.name %></td>
18
    <th class="start-date"><%=l(:field_start_date)%>:</th><td class="start-date"><%= format_date(@issue.start_date) %></td>
19
</tr>
20
<tr>
21
    <th class="priority"><%=l(:field_priority)%>:</th><td class="priority"><%= @issue.priority.name %></td>
22
    <th class="due-date"><%=l(:field_due_date)%>:</th><td class="due-date"><%= format_date(@issue.due_date) %></td>
23
</tr>
24
<tr>
25
    <th class="assigned-to"><%=l(:field_assigned_to)%>:</th><td class="assigned-to"><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
26
    <th class="progress"><%=l(:field_done_ratio)%>:</th><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
27
</tr>
28
<tr>
29
    <th class="category"><%=l(:field_category)%>:</th><td class="category"><%=h @issue.category ? @issue.category.name : "-" %></td>
30
    <% if User.current.allowed_to?(:view_time_entries, @project) %>
31
    <th class="spent-time"><%=l(:label_spent_time)%>:</th>
32
    <td class="spent-time"><%= @issue.spent_hours > 0 ? (link_to l_hours(@issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}) : "-" %></td>
33
    <% end %>
34
</tr>
35
<tr>
36
    <th class="fixed-version"><%=l(:field_fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
37
    <% if @issue.estimated_hours %>
38
    <th class="estimated-hours"><%=l(:field_estimated_hours)%>:</th><td class="estimated-hours"><%= l_hours(@issue.estimated_hours) %></td>
39
    <% end %>
40
</tr>
41
<%= render_custom_fields_rows(@issue) %>
42
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
43
</table>
44
<hr />
45

    
46
<div class="contextual">
47
<%= link_to_remote_if_authorized(l(:button_quote), { :url => {:action => 'reply', :id => @issue} }, :class => 'icon icon-comment') unless @issue.description.blank? %>
48
</div>
49
                              
50
<p><strong><%=l(:field_description)%></strong></p>
51
<div class="wiki">
52
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
53
</div>
54

    
55
<%= link_to_attachments @issue %>
56

    
57
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
58

    
59
<% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
60
<hr />
61
<div id="relations">
62
<%= render :partial => 'relations' %>
63
</div>
64
<% end %>
65

    
66
<% if User.current.allowed_to?(:add_issue_watchers, @project) ||
67
        (@issue.watchers.any? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
68
<hr />
69
<div id="watchers">
70
<%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
71
</div>
72
<% end %>
73

    
74
</div>
75

    
76
<div id="issue-changesets">
77
<div class="contextual">
78
<% if authorize_for('changeset_relations', 'new') %>
79
    <%= toggle_link l(:button_add), 'new-changeset-form'%>
80
<% end %>
81
</div>
82

    
83
<h3><%=l(:label_associated_revisions)%></h3>
84

    
85
<div id="issue-changesets-list">
86
<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
87
</div>
88
</div>
89

    
90
<% if @journals.any? %>
91
<div id="history">
92
<h3><%=l(:label_history)%></h3>
93
<%= render :partial => 'history', :locals => { :journals => @journals } %>
94
</div>
95
<% end %>
96

    
97

    
98
<div style="clear: both;"></div>
99
<%= render :partial => 'action_menu', :locals => {:replace_watcher => 'watcher2' } %>
100

    
101
<div style="clear: both;"></div>
102
<% if authorize_for('issues', 'edit') %>
103
  <div id="update" style="display:none;">
104
  <h3><%= l(:button_update) %></h3>
105
  <%= render :partial => 'edit' %>
106
  </div>
107
<% end %>
108

    
109
<% other_formats_links do |f| %>
110
        <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
111
        <%= f.link_to 'PDF' %>
112
<% end %>
113

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

    
116
<% content_for :sidebar do %>
117
    <%= render :partial => 'issues/sidebar' %>
118
<% end %>
119

    
120
<% content_for :header_tags do %>
121
    <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
122
    <%= stylesheet_link_tag 'scm' %>
123
<% end %>