##// END OF EJS Templates
Fixed: "new issue" drop-down only visible by admin users....
Jean-Philippe Lang -
r670:088563db3e00
parent child
Show More
@@ -1,186 +1,186
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 module ProjectsHelper
18 module ProjectsHelper
19 def link_to_version(version, options = {})
19 def link_to_version(version, options = {})
20 return '' unless version && version.is_a?(Version)
20 return '' unless version && version.is_a?(Version)
21 link_to version.name, {:controller => 'projects',
21 link_to version.name, {:controller => 'projects',
22 :action => 'roadmap',
22 :action => 'roadmap',
23 :id => version.project_id,
23 :id => version.project_id,
24 :completed => (version.completed? ? 1 : nil),
24 :completed => (version.completed? ? 1 : nil),
25 :anchor => version.name
25 :anchor => version.name
26 }, options
26 }, options
27 end
27 end
28
28
29 # Generates a gantt image
29 # Generates a gantt image
30 # Only defined if RMagick is avalaible
30 # Only defined if RMagick is avalaible
31 def gantt_image(events, date_from, months, zoom)
31 def gantt_image(events, date_from, months, zoom)
32 date_to = (date_from >> months)-1
32 date_to = (date_from >> months)-1
33 show_weeks = zoom > 1
33 show_weeks = zoom > 1
34 show_days = zoom > 2
34 show_days = zoom > 2
35
35
36 subject_width = 320
36 subject_width = 320
37 header_heigth = 18
37 header_heigth = 18
38 # width of one day in pixels
38 # width of one day in pixels
39 zoom = zoom*2
39 zoom = zoom*2
40 g_width = (date_to - date_from + 1)*zoom
40 g_width = (date_to - date_from + 1)*zoom
41 g_height = 20 * events.length + 20
41 g_height = 20 * events.length + 20
42 headers_heigth = (show_weeks ? 2*header_heigth : header_heigth)
42 headers_heigth = (show_weeks ? 2*header_heigth : header_heigth)
43 height = g_height + headers_heigth
43 height = g_height + headers_heigth
44
44
45 imgl = Magick::ImageList.new
45 imgl = Magick::ImageList.new
46 imgl.new_image(subject_width+g_width+1, height)
46 imgl.new_image(subject_width+g_width+1, height)
47 gc = Magick::Draw.new
47 gc = Magick::Draw.new
48
48
49 # Subjects
49 # Subjects
50 top = headers_heigth + 20
50 top = headers_heigth + 20
51 gc.fill('black')
51 gc.fill('black')
52 gc.stroke('transparent')
52 gc.stroke('transparent')
53 gc.stroke_width(1)
53 gc.stroke_width(1)
54 events.each do |i|
54 events.each do |i|
55 gc.text(4, top + 2, (i.is_a?(Issue) ? i.subject : i.name))
55 gc.text(4, top + 2, (i.is_a?(Issue) ? i.subject : i.name))
56 top = top + 20
56 top = top + 20
57 end
57 end
58
58
59 # Months headers
59 # Months headers
60 month_f = date_from
60 month_f = date_from
61 left = subject_width
61 left = subject_width
62 months.times do
62 months.times do
63 width = ((month_f >> 1) - month_f) * zoom
63 width = ((month_f >> 1) - month_f) * zoom
64 gc.fill('white')
64 gc.fill('white')
65 gc.stroke('grey')
65 gc.stroke('grey')
66 gc.stroke_width(1)
66 gc.stroke_width(1)
67 gc.rectangle(left, 0, left + width, height)
67 gc.rectangle(left, 0, left + width, height)
68 gc.fill('black')
68 gc.fill('black')
69 gc.stroke('transparent')
69 gc.stroke('transparent')
70 gc.stroke_width(1)
70 gc.stroke_width(1)
71 gc.text(left.round + 8, 14, "#{month_f.year}-#{month_f.month}")
71 gc.text(left.round + 8, 14, "#{month_f.year}-#{month_f.month}")
72 left = left + width
72 left = left + width
73 month_f = month_f >> 1
73 month_f = month_f >> 1
74 end
74 end
75
75
76 # Weeks headers
76 # Weeks headers
77 if show_weeks
77 if show_weeks
78 left = subject_width
78 left = subject_width
79 height = header_heigth
79 height = header_heigth
80 if date_from.cwday == 1
80 if date_from.cwday == 1
81 # date_from is monday
81 # date_from is monday
82 week_f = date_from
82 week_f = date_from
83 else
83 else
84 # find next monday after date_from
84 # find next monday after date_from
85 week_f = date_from + (7 - date_from.cwday + 1)
85 week_f = date_from + (7 - date_from.cwday + 1)
86 width = (7 - date_from.cwday + 1) * zoom
86 width = (7 - date_from.cwday + 1) * zoom
87 gc.fill('white')
87 gc.fill('white')
88 gc.stroke('grey')
88 gc.stroke('grey')
89 gc.stroke_width(1)
89 gc.stroke_width(1)
90 gc.rectangle(left, header_heigth, left + width, 2*header_heigth + g_height-1)
90 gc.rectangle(left, header_heigth, left + width, 2*header_heigth + g_height-1)
91 left = left + width
91 left = left + width
92 end
92 end
93 while week_f <= date_to
93 while week_f <= date_to
94 width = (week_f + 6 <= date_to) ? 7 * zoom : (date_to - week_f + 1) * zoom
94 width = (week_f + 6 <= date_to) ? 7 * zoom : (date_to - week_f + 1) * zoom
95 gc.fill('white')
95 gc.fill('white')
96 gc.stroke('grey')
96 gc.stroke('grey')
97 gc.stroke_width(1)
97 gc.stroke_width(1)
98 gc.rectangle(left.round, header_heigth, left.round + width, 2*header_heigth + g_height-1)
98 gc.rectangle(left.round, header_heigth, left.round + width, 2*header_heigth + g_height-1)
99 gc.fill('black')
99 gc.fill('black')
100 gc.stroke('transparent')
100 gc.stroke('transparent')
101 gc.stroke_width(1)
101 gc.stroke_width(1)
102 gc.text(left.round + 2, header_heigth + 14, week_f.cweek.to_s)
102 gc.text(left.round + 2, header_heigth + 14, week_f.cweek.to_s)
103 left = left + width
103 left = left + width
104 week_f = week_f+7
104 week_f = week_f+7
105 end
105 end
106 end
106 end
107
107
108 # Days details (week-end in grey)
108 # Days details (week-end in grey)
109 if show_days
109 if show_days
110 left = subject_width
110 left = subject_width
111 height = g_height + header_heigth - 1
111 height = g_height + header_heigth - 1
112 wday = date_from.cwday
112 wday = date_from.cwday
113 (date_to - date_from + 1).to_i.times do
113 (date_to - date_from + 1).to_i.times do
114 width = zoom
114 width = zoom
115 gc.fill(wday == 6 || wday == 7 ? '#eee' : 'white')
115 gc.fill(wday == 6 || wday == 7 ? '#eee' : 'white')
116 gc.stroke('grey')
116 gc.stroke('grey')
117 gc.stroke_width(1)
117 gc.stroke_width(1)
118 gc.rectangle(left, 2*header_heigth, left + width, 2*header_heigth + g_height-1)
118 gc.rectangle(left, 2*header_heigth, left + width, 2*header_heigth + g_height-1)
119 left = left + width
119 left = left + width
120 wday = wday + 1
120 wday = wday + 1
121 wday = 1 if wday > 7
121 wday = 1 if wday > 7
122 end
122 end
123 end
123 end
124
124
125 # border
125 # border
126 gc.fill('transparent')
126 gc.fill('transparent')
127 gc.stroke('grey')
127 gc.stroke('grey')
128 gc.stroke_width(1)
128 gc.stroke_width(1)
129 gc.rectangle(0, 0, subject_width+g_width, headers_heigth)
129 gc.rectangle(0, 0, subject_width+g_width, headers_heigth)
130 gc.stroke('black')
130 gc.stroke('black')
131 gc.rectangle(0, 0, subject_width+g_width, g_height+ headers_heigth-1)
131 gc.rectangle(0, 0, subject_width+g_width, g_height+ headers_heigth-1)
132
132
133 # content
133 # content
134 top = headers_heigth + 20
134 top = headers_heigth + 20
135 gc.stroke('transparent')
135 gc.stroke('transparent')
136 events.each do |i|
136 events.each do |i|
137 if i.is_a?(Issue)
137 if i.is_a?(Issue)
138 i_start_date = (i.start_date >= date_from ? i.start_date : date_from )
138 i_start_date = (i.start_date >= date_from ? i.start_date : date_from )
139 i_end_date = (i.due_date <= date_to ? i.due_date : date_to )
139 i_end_date = (i.due_date <= date_to ? i.due_date : date_to )
140 i_done_date = i.start_date + ((i.due_date - i.start_date+1)*i.done_ratio/100).floor
140 i_done_date = i.start_date + ((i.due_date - i.start_date+1)*i.done_ratio/100).floor
141 i_done_date = (i_done_date <= date_from ? date_from : i_done_date )
141 i_done_date = (i_done_date <= date_from ? date_from : i_done_date )
142 i_done_date = (i_done_date >= date_to ? date_to : i_done_date )
142 i_done_date = (i_done_date >= date_to ? date_to : i_done_date )
143 i_late_date = [i_end_date, Date.today].min if i_start_date < Date.today
143 i_late_date = [i_end_date, Date.today].min if i_start_date < Date.today
144
144
145 i_left = subject_width + ((i_start_date - date_from)*zoom).floor
145 i_left = subject_width + ((i_start_date - date_from)*zoom).floor
146 i_width = ((i_end_date - i_start_date + 1)*zoom).floor # total width of the issue
146 i_width = ((i_end_date - i_start_date + 1)*zoom).floor # total width of the issue
147 d_width = ((i_done_date - i_start_date)*zoom).floor # done width
147 d_width = ((i_done_date - i_start_date)*zoom).floor # done width
148 l_width = i_late_date ? ((i_late_date - i_start_date+1)*zoom).floor : 0 # delay width
148 l_width = i_late_date ? ((i_late_date - i_start_date+1)*zoom).floor : 0 # delay width
149
149
150 gc.fill('grey')
150 gc.fill('grey')
151 gc.rectangle(i_left, top, i_left + i_width, top - 6)
151 gc.rectangle(i_left, top, i_left + i_width, top - 6)
152 gc.fill('red')
152 gc.fill('red')
153 gc.rectangle(i_left, top, i_left + l_width, top - 6) if l_width > 0
153 gc.rectangle(i_left, top, i_left + l_width, top - 6) if l_width > 0
154 gc.fill('blue')
154 gc.fill('blue')
155 gc.rectangle(i_left, top, i_left + d_width, top - 6) if d_width > 0
155 gc.rectangle(i_left, top, i_left + d_width, top - 6) if d_width > 0
156 gc.fill('black')
156 gc.fill('black')
157 gc.text(i_left + i_width + 5,top + 1, "#{i.status.name} #{i.done_ratio}%")
157 gc.text(i_left + i_width + 5,top + 1, "#{i.status.name} #{i.done_ratio}%")
158 else
158 else
159 i_left = subject_width + ((i.start_date - date_from)*zoom).floor
159 i_left = subject_width + ((i.start_date - date_from)*zoom).floor
160 gc.fill('green')
160 gc.fill('green')
161 gc.rectangle(i_left, top, i_left + 6, top - 6)
161 gc.rectangle(i_left, top, i_left + 6, top - 6)
162 gc.fill('black')
162 gc.fill('black')
163 gc.text(i_left + 11, top + 1, i.name)
163 gc.text(i_left + 11, top + 1, i.name)
164 end
164 end
165 top = top + 20
165 top = top + 20
166 end
166 end
167
167
168 # today red line
168 # today red line
169 if Date.today >= @date_from and Date.today <= @date_to
169 if Date.today >= @date_from and Date.today <= @date_to
170 gc.stroke('red')
170 gc.stroke('red')
171 x = (Date.today-@date_from+1)*zoom + subject_width
171 x = (Date.today-@date_from+1)*zoom + subject_width
172 gc.line(x, headers_heigth, x, headers_heigth + g_height-1)
172 gc.line(x, headers_heigth, x, headers_heigth + g_height-1)
173 end
173 end
174
174
175 gc.draw(imgl)
175 gc.draw(imgl)
176 imgl
176 imgl
177 end if Object.const_defined?(:Magick)
177 end if Object.const_defined?(:Magick)
178
178
179 def new_issue_selector
179 def new_issue_selector
180 trackers = Tracker.find(:all, :order => 'position')
180 trackers = Tracker.find(:all, :order => 'position')
181 # can't use form tag inside helper
181 # can't use form tag inside helper
182 content_tag('form',
182 content_tag('form',
183 select_tag('tracker_id', '<option></option' + options_from_collection_for_select(trackers, 'id', 'name'), :onchange => "if (this.value != '') {this.form.submit()}"),
183 select_tag('tracker_id', '<option></option>' + options_from_collection_for_select(trackers, 'id', 'name'), :onchange => "if (this.value != '') {this.form.submit()}"),
184 :action => url_for(:controller => 'projects', :action => 'add_issue', :id => @project), :method => 'get')
184 :action => url_for(:controller => 'projects', :action => 'add_issue', :id => @project), :method => 'get')
185 end
185 end
186 end
186 end
@@ -1,86 +1,86
1 <% if @query.new_record? %>
1 <% if @query.new_record? %>
2 <div class="contextual">
2 <div class="contextual">
3 <%= link_to l(:label_query_plural), :controller => 'queries', :project_id => @project %>
3 <%= link_to l(:label_query_plural), :controller => 'queries', :project_id => @project %>
4 <% if authorize_for('projects', 'add_issues') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %>
4 <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %>
5 </div>
5 </div>
6 <h2><%=l(:label_issue_plural)%></h2>
6 <h2><%=l(:label_issue_plural)%></h2>
7
7
8 <% form_tag({:action => 'list_issues'}, :id => 'query_form') do %>
8 <% form_tag({:action => 'list_issues'}, :id => 'query_form') do %>
9 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
9 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
10 <% end %>
10 <% end %>
11 <div class="contextual">
11 <div class="contextual">
12 <%= link_to_remote l(:button_apply),
12 <%= link_to_remote l(:button_apply),
13 { :url => { :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 },
13 { :url => { :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 },
14 :update => "content",
14 :update => "content",
15 :with => "Form.serialize('query_form')"
15 :with => "Form.serialize('query_form')"
16 }, :class => 'icon icon-edit' %>
16 }, :class => 'icon icon-edit' %>
17
17
18 <%= link_to_remote l(:button_clear),
18 <%= link_to_remote l(:button_clear),
19 { :url => {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1},
19 { :url => {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1},
20 :update => "content",
20 :update => "content",
21 }, :class => 'icon icon-reload' %>
21 }, :class => 'icon icon-reload' %>
22
22
23 <% if current_role.allowed_to?(:save_queries) %>
23 <% if current_role.allowed_to?(:save_queries) %>
24 <%= link_to_remote l(:button_save),
24 <%= link_to_remote l(:button_save),
25 { :url => { :controller => 'queries', :action => 'new', :project_id => @project },
25 { :url => { :controller => 'queries', :action => 'new', :project_id => @project },
26 :method => 'get',
26 :method => 'get',
27 :update => "content",
27 :update => "content",
28 :with => "Form.serialize('query_form')"
28 :with => "Form.serialize('query_form')"
29 }, :class => 'icon icon-save' %>
29 }, :class => 'icon icon-save' %>
30 <% end %>
30 <% end %>
31 </div>
31 </div>
32 <br />
32 <br />
33 <% else %>
33 <% else %>
34 <div class="contextual">
34 <div class="contextual">
35 <%= link_to l(:label_query_plural), {:controller => 'queries', :project_id => @project} %> |
35 <%= link_to l(:label_query_plural), {:controller => 'queries', :project_id => @project} %> |
36 <%= link_to l(:label_issue_view_all), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1} %>
36 <%= link_to l(:label_issue_view_all), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1} %>
37 <% if authorize_for('projects', 'add_issues') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %>
37 <% if authorize_for('projects', 'add_issue') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %>
38 </div>
38 </div>
39 <h2><%= @query.name %></h2>
39 <h2><%= @query.name %></h2>
40 <% end %>
40 <% end %>
41 <%= error_messages_for 'query' %>
41 <%= error_messages_for 'query' %>
42 <% if @query.valid? %>
42 <% if @query.valid? %>
43 <% if @issues.empty? %>
43 <% if @issues.empty? %>
44 <p><i><%= l(:label_no_data) %></i></p>
44 <p><i><%= l(:label_no_data) %></i></p>
45 <% else %>
45 <% else %>
46 &nbsp;
46 &nbsp;
47 <% form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) do %>
47 <% form_tag({:controller => 'projects', :action => 'move_issues', :id => @project}, :id => 'issues_form' ) do %>
48 <table class="list">
48 <table class="list">
49 <thead><tr>
49 <thead><tr>
50 <th></th>
50 <th></th>
51 <%= sort_header_tag("#{Issue.table_name}.id", :caption => '#') %>
51 <%= sort_header_tag("#{Issue.table_name}.id", :caption => '#') %>
52 <%= sort_header_tag("#{Issue.table_name}.tracker_id", :caption => l(:field_tracker)) %>
52 <%= sort_header_tag("#{Issue.table_name}.tracker_id", :caption => l(:field_tracker)) %>
53 <%= sort_header_tag("#{IssueStatus.table_name}.name", :caption => l(:field_status)) %>
53 <%= sort_header_tag("#{IssueStatus.table_name}.name", :caption => l(:field_status)) %>
54 <%= sort_header_tag("#{Issue.table_name}.priority_id", :caption => l(:field_priority)) %>
54 <%= sort_header_tag("#{Issue.table_name}.priority_id", :caption => l(:field_priority)) %>
55 <th><%=l(:field_subject)%></th>
55 <th><%=l(:field_subject)%></th>
56 <%= sort_header_tag("#{User.table_name}.lastname", :caption => l(:field_assigned_to)) %>
56 <%= sort_header_tag("#{User.table_name}.lastname", :caption => l(:field_assigned_to)) %>
57 <%= sort_header_tag("#{Issue.table_name}.updated_on", :caption => l(:field_updated_on)) %>
57 <%= sort_header_tag("#{Issue.table_name}.updated_on", :caption => l(:field_updated_on)) %>
58 </tr></thead>
58 </tr></thead>
59 <tbody>
59 <tbody>
60 <% for issue in @issues %>
60 <% for issue in @issues %>
61 <tr class="<%= cycle("odd", "even") %>">
61 <tr class="<%= cycle("odd", "even") %>">
62 <th style="width:15px;"><%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %></th>
62 <th style="width:15px;"><%= check_box_tag "issue_ids[]", issue.id, false, :id => "issue_#{issue.id}" %></th>
63 <td align="center"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
63 <td align="center"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
64 <td align="center"><%= issue.tracker.name %></td>
64 <td align="center"><%= issue.tracker.name %></td>
65 <td><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <%= issue.status.name %></td>
65 <td><div class="square" style="background:#<%= issue.status.html_color %>;"></div> <%= issue.status.name %></td>
66 <td align="center"><%= issue.priority.name %></td>
66 <td align="center"><%= issue.priority.name %></td>
67 <td><%= "#{issue.project.name} - " unless @project && @project == issue.project %><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td>
67 <td><%= "#{issue.project.name} - " unless @project && @project == issue.project %><%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %></td>
68 <td align="center"><%= issue.assigned_to.name if issue.assigned_to %></td>
68 <td align="center"><%= issue.assigned_to.name if issue.assigned_to %></td>
69 <td align="center"><%= format_time(issue.updated_on) %></td>
69 <td align="center"><%= format_time(issue.updated_on) %></td>
70 </tr>
70 </tr>
71 <% end %>
71 <% end %>
72 </tbody>
72 </tbody>
73 </table>
73 </table>
74 <div class="contextual">
74 <div class="contextual">
75 <%= l(:label_export_to) %>
75 <%= l(:label_export_to) %>
76 <%= link_to 'CSV', {:action => 'export_issues_csv', :id => @project}, :class => 'icon icon-csv' %>,
76 <%= link_to 'CSV', {:action => 'export_issues_csv', :id => @project}, :class => 'icon icon-csv' %>,
77 <%= link_to 'PDF', {:action => 'export_issues_pdf', :id => @project}, :class => 'icon icon-pdf' %>
77 <%= link_to 'PDF', {:action => 'export_issues_pdf', :id => @project}, :class => 'icon icon-pdf' %>
78 </div>
78 </div>
79 <p><%= submit_tag l(:button_move), :class => "button-small" %>
79 <p><%= submit_tag l(:button_move), :class => "button-small" %>
80 &nbsp;
80 &nbsp;
81 <%= pagination_links_full @issue_pages %>
81 <%= pagination_links_full @issue_pages %>
82 [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]
82 [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ]
83 </p>
83 </p>
84 <% end %>
84 <% end %>
85 <% end %>
85 <% end %>
86 <% end %>
86 <% end %>
@@ -1,71 +1,71
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_feed_plural), {:action => 'feeds', :id => @project}, :class => 'icon icon-feed' %>
2 <%= link_to l(:label_feed_plural), {:action => 'feeds', :id => @project}, :class => 'icon icon-feed' %>
3 </div>
3 </div>
4
4
5 <h2><%=l(:label_overview)%></h2>
5 <h2><%=l(:label_overview)%></h2>
6
6
7 <div class="splitcontentleft">
7 <div class="splitcontentleft">
8 <%= textilizable @project.description %>
8 <%= textilizable @project.description %>
9 <ul>
9 <ul>
10 <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link @project.homepage %></li><% end %>
10 <% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= auto_link @project.homepage %></li><% end %>
11 <li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li>
11 <li><%=l(:field_created_on)%>: <%= format_date(@project.created_on) %></li>
12 <% unless @project.parent.nil? %>
12 <% unless @project.parent.nil? %>
13 <li><%=l(:field_parent)%>: <%= link_to @project.parent.name, :controller => 'projects', :action => 'show', :id => @project.parent %></li>
13 <li><%=l(:field_parent)%>: <%= link_to @project.parent.name, :controller => 'projects', :action => 'show', :id => @project.parent %></li>
14 <% end %>
14 <% end %>
15 <% for custom_value in @custom_values %>
15 <% for custom_value in @custom_values %>
16 <% if !custom_value.value.empty? %>
16 <% if !custom_value.value.empty? %>
17 <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
17 <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
18 <% end %>
18 <% end %>
19 <% end %>
19 <% end %>
20 </ul>
20 </ul>
21
21
22 <div class="box">
22 <div class="box">
23 <div class="contextual"><% if authorize_for('projects', 'add_issues') %><%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %></div>
23 <div class="contextual"><% if authorize_for('projects', 'add_issue') %><%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %></div>
24 <h3 class="icon22 icon22-tracker"><%=l(:label_issue_tracking)%></h3>
24 <h3 class="icon22 icon22-tracker"><%=l(:label_issue_tracking)%></h3>
25 <ul>
25 <ul>
26 <% for tracker in @trackers %>
26 <% for tracker in @trackers %>
27 <li><%= link_to tracker.name, :controller => 'projects', :action => 'list_issues', :id => @project,
27 <li><%= link_to tracker.name, :controller => 'projects', :action => 'list_issues', :id => @project,
28 :set_filter => 1,
28 :set_filter => 1,
29 "tracker_id" => tracker.id %>:
29 "tracker_id" => tracker.id %>:
30 <%= @open_issues_by_tracker[tracker] || 0 %> <%= lwr(:label_open_issues, @open_issues_by_tracker[tracker] || 0) %>
30 <%= @open_issues_by_tracker[tracker] || 0 %> <%= lwr(:label_open_issues, @open_issues_by_tracker[tracker] || 0) %>
31 <%= l(:label_on) %> <%= @total_issues_by_tracker[tracker] || 0 %></li>
31 <%= l(:label_on) %> <%= @total_issues_by_tracker[tracker] || 0 %></li>
32 <% end %>
32 <% end %>
33 </ul>
33 </ul>
34 <p class="textcenter"><small><%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %></small></p>
34 <p class="textcenter"><small><%= link_to l(:label_issue_view_all), :controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1 %></small></p>
35 </div>
35 </div>
36 </div>
36 </div>
37
37
38 <div class="splitcontentright">
38 <div class="splitcontentright">
39 <div class="box">
39 <div class="box">
40 <h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3>
40 <h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3>
41 <% @members_by_role.keys.sort.each do |role| %>
41 <% @members_by_role.keys.sort.each do |role| %>
42 <%= role.name %>: <%= @members_by_role[role].collect(&:user).sort.collect{|u| link_to_user u}.join(", ") %><br />
42 <%= role.name %>: <%= @members_by_role[role].collect(&:user).sort.collect{|u| link_to_user u}.join(", ") %><br />
43 <% end %>
43 <% end %>
44 </div>
44 </div>
45
45
46 <% if @subprojects.any? %>
46 <% if @subprojects.any? %>
47 <div class="box">
47 <div class="box">
48 <h3 class="icon22 icon22-projects"><%=l(:label_subproject_plural)%></h3>
48 <h3 class="icon22 icon22-projects"><%=l(:label_subproject_plural)%></h3>
49 <%= @subprojects.collect{|p| link_to(p.name, :action => 'show', :id => p)}.join(", ") %>
49 <%= @subprojects.collect{|p| link_to(p.name, :action => 'show', :id => p)}.join(", ") %>
50 </div>
50 </div>
51 <% end %>
51 <% end %>
52
52
53 <% if @news.any? && authorize_for('projects', 'list_news') %>
53 <% if @news.any? && authorize_for('projects', 'list_news') %>
54 <div class="box">
54 <div class="box">
55 <h3><%=l(:label_news_latest)%></h3>
55 <h3><%=l(:label_news_latest)%></h3>
56 <%= render :partial => 'news/news', :collection => @news %>
56 <%= render :partial => 'news/news', :collection => @news %>
57 <p class="textcenter"><small><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></small></p>
57 <p class="textcenter"><small><%= link_to l(:label_news_view_all), :controller => 'projects', :action => 'list_news', :id => @project %></small></p>
58 </div>
58 </div>
59 <% end %>
59 <% end %>
60 </div>
60 </div>
61
61
62 <% content_for :header_tags do %>
62 <% content_for :header_tags do %>
63 <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key}, {:title => l(:label_reported_issues)}) %>
63 <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key}, {:title => l(:label_reported_issues)}) %>
64 <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_reported_issues)}) %>
64 <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'issues', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_reported_issues)}) %>
65
65
66 <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key }, {:title => l(:label_changes_details)}) %>
66 <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key }, {:title => l(:label_changes_details)}) %>
67 <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_changes_details)}) %>
67 <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'history', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_changes_details)}) %>
68
68
69 <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key}, {:title => l(:label_news_latest)}) %>
69 <%= auto_discovery_link_tag(:rss, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key}, {:title => l(:label_news_latest)}) %>
70 <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_news_latest)}) %>
70 <%= auto_discovery_link_tag(:atom, {:controller => 'feeds', :action => 'news', :project_id => @project, :key => @key, :format => 'atom'}, {:title => l(:label_news_latest)}) %>
71 <% end %>
71 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now