##// END OF EJS Templates
Adds css classes to the issues in the calendar (#2651)....
Jean-Philippe Lang -
r2500:9701c335628e
parent child
Show More
@@ -1,39 +1,39
1 1 <table class="cal">
2 2 <thead>
3 3 <tr><td></td><% 7.times do |i| %><th><%= day_name( (calendar.first_wday+i)%7 ) %></th><% end %></tr>
4 4 </thead>
5 5 <tbody>
6 6 <tr>
7 7 <% day = calendar.startdt
8 8 while day <= calendar.enddt %>
9 9 <%= "<th>#{day.cweek}</th>" if day.cwday == calendar.first_wday %>
10 10 <td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
11 11 <p class="day-num"><%= day.day %></p>
12 12 <% calendar.events_on(day).each do |i| %>
13 13 <% if i.is_a? Issue %>
14 <div class="tooltip">
14 <div class="<%= css_issue_classes(i) %> tooltip">
15 15 <%= if day == i.start_date && day == i.due_date
16 16 image_tag('arrow_bw.png')
17 17 elsif day == i.start_date
18 18 image_tag('arrow_from.png')
19 19 elsif day == i.due_date
20 20 image_tag('arrow_to.png')
21 21 end %>
22 22 <%= h("#{i.project} -") unless @project && @project == i.project %>
23 23 <%= link_to_issue i %>: <%= h(truncate(i.subject, :length => 30)) %>
24 24 <span class="tip"><%= render_issue_tooltip i %></span>
25 25 </div>
26 26 <% else %>
27 27 <span class="icon icon-package">
28 28 <%= h("#{i.project} -") unless @project && @project == i.project %>
29 29 <%= link_to_version i%>
30 30 </span>
31 31 <% end %>
32 32 <% end %>
33 33 </td>
34 34 <%= '</tr><tr>' if day.cwday==calendar.last_wday and day!=calendar.enddt %>
35 35 <% day = day + 1
36 36 end %>
37 37 </tr>
38 38 </tbody>
39 39 </table>
@@ -1,125 +1,125
1 1 <div class="contextual">
2 2 <%= link_to_if_authorized(l(:button_update), {:controller => 'issues', :action => 'edit', :id => @issue }, :onclick => 'showAndScrollTo("update", "notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %>
3 3 <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time-add' %>
4 4 <%= watcher_tag(@issue, User.current) %>
5 5 <%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-copy' %>
6 6 <%= link_to_if_authorized l(:button_move), {:controller => 'issues', :action => 'move', :id => @issue }, :class => 'icon icon-move' %>
7 7 <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
8 8 </div>
9 9
10 10 <h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
11 11
12 <div class="<%= css_issue_classes(@issue) %>">
12 <div class="<%= css_issue_classes(@issue) %> details">
13 13 <%= avatar(@issue.author, :size => "64") %>
14 14 <h3><%=h @issue.subject %></h3>
15 15 <p class="author">
16 16 <%= authoring @issue.created_on, @issue.author %>.
17 17 <%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) + '.' if @issue.created_on != @issue.updated_on %>
18 18 </p>
19 19
20 20 <table width="100%">
21 21 <tr>
22 22 <td style="width:15%" class="status"><b><%=l(:field_status)%>:</b></td><td style="width:35%" class="status"><%= @issue.status.name %></td>
23 23 <td style="width:15%" class="start-date"><b><%=l(:field_start_date)%>:</b></td><td style="width:35%"><%= format_date(@issue.start_date) %></td>
24 24 </tr>
25 25 <tr>
26 26 <td class="priority"><b><%=l(:field_priority)%>:</b></td><td class="priority"><%= @issue.priority.name %></td>
27 27 <td class="due-date"><b><%=l(:field_due_date)%>:</b></td><td class="due-date"><%= format_date(@issue.due_date) %></td>
28 28 </tr>
29 29 <tr>
30 30 <td class="assigned-to"><b><%=l(:field_assigned_to)%>:</b></td><td><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
31 31 <td class="progress"><b><%=l(:field_done_ratio)%>:</b></td><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
32 32 </tr>
33 33 <tr>
34 34 <td class="category"><b><%=l(:field_category)%>:</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
35 35 <% if User.current.allowed_to?(:view_time_entries, @project) %>
36 36 <td class="spent-time"><b><%=l(:label_spent_time)%>:</b></td>
37 37 <td class="spent-hours"><%= @issue.spent_hours > 0 ? (link_to l_hours(@issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}) : "-" %></td>
38 38 <% end %>
39 39 </tr>
40 40 <tr>
41 41 <td class="fixed-version"><b><%=l(:field_fixed_version)%>:</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
42 42 <% if @issue.estimated_hours %>
43 43 <td class="estimated-hours"><b><%=l(:field_estimated_hours)%>:</b></td><td><%= l_hours(@issue.estimated_hours) %></td>
44 44 <% end %>
45 45 </tr>
46 46 <tr>
47 47 <% n = 0 -%>
48 48 <% @issue.custom_values.each do |value| -%>
49 49 <td valign="top"><b><%=h value.custom_field.name %>:</b></td><td valign="top"><%= simple_format(h(show_value(value))) %></td>
50 50 <% n = n + 1
51 51 if (n > 1)
52 52 n = 0 %>
53 53 </tr><tr>
54 54 <%end
55 55 end %>
56 56 </tr>
57 57 <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
58 58 </table>
59 59 <hr />
60 60
61 61 <div class="contextual">
62 62 <%= link_to_remote_if_authorized(l(:button_quote), { :url => {:action => 'reply', :id => @issue} }, :class => 'icon icon-comment') unless @issue.description.blank? %>
63 63 </div>
64 64
65 65 <p><strong><%=l(:field_description)%></strong></p>
66 66 <div class="wiki">
67 67 <%= textilizable @issue, :description, :attachments => @issue.attachments %>
68 68 </div>
69 69
70 70 <%= link_to_attachments @issue %>
71 71
72 72 <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
73 73 <hr />
74 74 <div id="relations">
75 75 <%= render :partial => 'relations' %>
76 76 </div>
77 77 <% end %>
78 78
79 79 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
80 80 (@issue.watchers.any? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
81 81 <hr />
82 82 <div id="watchers">
83 83 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
84 84 </div>
85 85 <% end %>
86 86
87 87 </div>
88 88
89 89 <% if @changesets.any? && User.current.allowed_to?(:view_changesets, @project) %>
90 90 <div id="issue-changesets">
91 91 <h3><%=l(:label_associated_revisions)%></h3>
92 92 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
93 93 </div>
94 94 <% end %>
95 95
96 96 <% if @journals.any? %>
97 97 <div id="history">
98 98 <h3><%=l(:label_history)%></h3>
99 99 <%= render :partial => 'history', :locals => { :journals => @journals } %>
100 100 </div>
101 101 <% end %>
102 102 <div style="clear: both;"></div>
103 103
104 104 <% if authorize_for('issues', 'edit') %>
105 105 <div id="update" style="display:none;">
106 106 <h3><%= l(:button_update) %></h3>
107 107 <%= render :partial => 'edit' %>
108 108 </div>
109 109 <% end %>
110 110
111 111 <% other_formats_links do |f| %>
112 112 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
113 113 <%= f.link_to 'PDF' %>
114 114 <% end %>
115 115
116 116 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
117 117
118 118 <% content_for :sidebar do %>
119 119 <%= render :partial => 'issues/sidebar' %>
120 120 <% end %>
121 121
122 122 <% content_for :header_tags do %>
123 123 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
124 124 <%= stylesheet_link_tag 'scm' %>
125 125 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now