##// END OF EJS Templates
Add id and class for easier styling of query filters (#22018)....
Jean-Philippe Lang -
r14873:a0a7e9d00179
parent child
Show More
@@ -1,372 +1,372
1 <% @gantt.view = self %>
1 <% @gantt.view = self %>
2 <div class="contextual">
2 <div class="contextual">
3 <% if !@query.new_record? && @query.editable_by?(User.current) %>
3 <% if !@query.new_record? && @query.editable_by?(User.current) %>
4 <%= link_to l(:button_edit), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
4 <%= link_to l(:button_edit), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
5 <%= delete_link query_path(@query, :gantt => 1) %>
5 <%= delete_link query_path(@query, :gantt => 1) %>
6 <% end %>
6 <% end %>
7 </div>
7 </div>
8
8
9 <h2><%= @query.new_record? ? l(:label_gantt) : @query.name %></h2>
9 <h2><%= @query.new_record? ? l(:label_gantt) : @query.name %></h2>
10
10
11 <%= form_tag({:controller => 'gantts', :action => 'show',
11 <%= form_tag({:controller => 'gantts', :action => 'show',
12 :project_id => @project, :month => params[:month],
12 :project_id => @project, :month => params[:month],
13 :year => params[:year], :months => params[:months]},
13 :year => params[:year], :months => params[:months]},
14 :method => :get, :id => 'query_form') do %>
14 :method => :get, :id => 'query_form') do %>
15 <%= hidden_field_tag 'set_filter', '1' %>
15 <%= hidden_field_tag 'set_filter', '1' %>
16 <%= hidden_field_tag 'gantt', '1' %>
16 <%= hidden_field_tag 'gantt', '1' %>
17 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
17 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
18 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
18 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
19 <div style="<%= @query.new_record? ? "" : "display: none;" %>">
19 <div style="<%= @query.new_record? ? "" : "display: none;" %>">
20 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
20 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
21 </div>
21 </div>
22 </fieldset>
22 </fieldset>
23 <fieldset class="collapsible collapsed">
23 <fieldset id="options" class="collapsible collapsed">
24 <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
24 <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
25 <div style="display: none;">
25 <div style="display: none;">
26 <table>
26 <table>
27 <tr>
27 <tr>
28 <td>
28 <td>
29 <fieldset>
29 <fieldset>
30 <legend><%= l(:label_related_issues) %></legend>
30 <legend><%= l(:label_related_issues) %></legend>
31 <label for="draw_relations">
31 <label for="draw_relations">
32 <%= check_box 'query', 'draw_relations', :id => 'draw_relations' %>
32 <%= check_box 'query', 'draw_relations', :id => 'draw_relations' %>
33 <% rels = [IssueRelation::TYPE_BLOCKS, IssueRelation::TYPE_PRECEDES] %>
33 <% rels = [IssueRelation::TYPE_BLOCKS, IssueRelation::TYPE_PRECEDES] %>
34 <% rels.each do |rel| %>
34 <% rels.each do |rel| %>
35 <% color = Redmine::Helpers::Gantt::DRAW_TYPES[rel][:color] %>
35 <% color = Redmine::Helpers::Gantt::DRAW_TYPES[rel][:color] %>
36 <%= content_tag(:span, '&nbsp;&nbsp;&nbsp;'.html_safe,
36 <%= content_tag(:span, '&nbsp;&nbsp;&nbsp;'.html_safe,
37 :style => "background-color: #{color}") %>
37 :style => "background-color: #{color}") %>
38 <%= l(IssueRelation::TYPES[rel][:name]) %>
38 <%= l(IssueRelation::TYPES[rel][:name]) %>
39 <% end %>
39 <% end %>
40 </label>
40 </label>
41 </fieldset>
41 </fieldset>
42 </td>
42 </td>
43 <td>
43 <td>
44 <fieldset>
44 <fieldset>
45 <legend><%= l(:label_gantt_progress_line) %></legend>
45 <legend><%= l(:label_gantt_progress_line) %></legend>
46 <label for="draw_progress_line">
46 <label for="draw_progress_line">
47 <%= check_box 'query', 'draw_progress_line', :id => 'draw_progress_line' %>
47 <%= check_box 'query', 'draw_progress_line', :id => 'draw_progress_line' %>
48 <%= l(:label_display) %>
48 <%= l(:label_display) %>
49 </label>
49 </label>
50 </fieldset>
50 </fieldset>
51 </td>
51 </td>
52 </tr>
52 </tr>
53 </table>
53 </table>
54 </div>
54 </div>
55 </fieldset>
55 </fieldset>
56
56
57 <p class="contextual">
57 <p class="contextual">
58 <%= gantt_zoom_link(@gantt, :in) %>
58 <%= gantt_zoom_link(@gantt, :in) %>
59 <%= gantt_zoom_link(@gantt, :out) %>
59 <%= gantt_zoom_link(@gantt, :out) %>
60 </p>
60 </p>
61
61
62 <p class="buttons">
62 <p class="buttons">
63 <%= text_field_tag 'months', @gantt.months, :size => 2 %>
63 <%= text_field_tag 'months', @gantt.months, :size => 2 %>
64 <%= l(:label_months_from) %>
64 <%= l(:label_months_from) %>
65 <%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %>
65 <%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %>
66 <%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
66 <%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
67 <%= hidden_field_tag 'zoom', @gantt.zoom %>
67 <%= hidden_field_tag 'zoom', @gantt.zoom %>
68
68
69 <%= link_to_function l(:button_apply), '$("#query_form").submit()',
69 <%= link_to_function l(:button_apply), '$("#query_form").submit()',
70 :class => 'icon icon-checked' %>
70 :class => 'icon icon-checked' %>
71 <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
71 <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
72 :class => 'icon icon-reload' %>
72 :class => 'icon icon-reload' %>
73 <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
73 <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
74 <%= link_to_function l(:button_save),
74 <%= link_to_function l(:button_save),
75 "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
75 "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
76 :class => 'icon icon-save' %>
76 :class => 'icon icon-save' %>
77 <% end %>
77 <% end %>
78 </p>
78 </p>
79 <% end %>
79 <% end %>
80
80
81 <%= error_messages_for 'query' %>
81 <%= error_messages_for 'query' %>
82 <% if @query.valid? %>
82 <% if @query.valid? %>
83 <%
83 <%
84 zoom = 1
84 zoom = 1
85 @gantt.zoom.times { zoom = zoom * 2 }
85 @gantt.zoom.times { zoom = zoom * 2 }
86
86
87 subject_width = 330
87 subject_width = 330
88 header_height = 18
88 header_height = 18
89
89
90 headers_height = header_height
90 headers_height = header_height
91 show_weeks = false
91 show_weeks = false
92 show_days = false
92 show_days = false
93 show_day_num = false
93 show_day_num = false
94
94
95 if @gantt.zoom > 1
95 if @gantt.zoom > 1
96 show_weeks = true
96 show_weeks = true
97 headers_height = 2 * header_height
97 headers_height = 2 * header_height
98 if @gantt.zoom > 2
98 if @gantt.zoom > 2
99 show_days = true
99 show_days = true
100 headers_height = 3 * header_height
100 headers_height = 3 * header_height
101 if @gantt.zoom > 3
101 if @gantt.zoom > 3
102 show_day_num = true
102 show_day_num = true
103 headers_height = 4 * header_height
103 headers_height = 4 * header_height
104 end
104 end
105 end
105 end
106 end
106 end
107
107
108 # Width of the entire chart
108 # Width of the entire chart
109 g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i
109 g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i
110 @gantt.render(:top => headers_height + 8,
110 @gantt.render(:top => headers_height + 8,
111 :zoom => zoom,
111 :zoom => zoom,
112 :g_width => g_width,
112 :g_width => g_width,
113 :subject_width => subject_width)
113 :subject_width => subject_width)
114 g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max
114 g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max
115 t_height = g_height + headers_height
115 t_height = g_height + headers_height
116 %>
116 %>
117
117
118 <% if @gantt.truncated %>
118 <% if @gantt.truncated %>
119 <p class="warning"><%= l(:notice_gantt_chart_truncated, :max => @gantt.max_rows) %></p>
119 <p class="warning"><%= l(:notice_gantt_chart_truncated, :max => @gantt.max_rows) %></p>
120 <% end %>
120 <% end %>
121
121
122 <table style="width:100%; border:0; border-collapse: collapse;">
122 <table style="width:100%; border:0; border-collapse: collapse;">
123 <tr>
123 <tr>
124 <td style="width:<%= subject_width %>px; padding:0px;">
124 <td style="width:<%= subject_width %>px; padding:0px;">
125 <%
125 <%
126 style = ""
126 style = ""
127 style += "position:relative;"
127 style += "position:relative;"
128 style += "height: #{t_height + 24}px;"
128 style += "height: #{t_height + 24}px;"
129 style += "width: #{subject_width + 1}px;"
129 style += "width: #{subject_width + 1}px;"
130 %>
130 %>
131 <%= content_tag(:div, :style => style) do %>
131 <%= content_tag(:div, :style => style) do %>
132 <%
132 <%
133 style = ""
133 style = ""
134 style += "right:-2px;"
134 style += "right:-2px;"
135 style += "width: #{subject_width}px;"
135 style += "width: #{subject_width}px;"
136 style += "height: #{headers_height}px;"
136 style += "height: #{headers_height}px;"
137 style += 'background: #eee;'
137 style += 'background: #eee;'
138 %>
138 %>
139 <%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
139 <%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
140 <%
140 <%
141 style = ""
141 style = ""
142 style += "right:-2px;"
142 style += "right:-2px;"
143 style += "width: #{subject_width}px;"
143 style += "width: #{subject_width}px;"
144 style += "height: #{t_height}px;"
144 style += "height: #{t_height}px;"
145 style += 'border-left: 1px solid #c0c0c0;'
145 style += 'border-left: 1px solid #c0c0c0;'
146 style += 'overflow: hidden;'
146 style += 'overflow: hidden;'
147 %>
147 %>
148 <%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
148 <%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
149 <%= content_tag(:div, :class => "gantt_subjects") do %>
149 <%= content_tag(:div, :class => "gantt_subjects") do %>
150 <%= @gantt.subjects.html_safe %>
150 <%= @gantt.subjects.html_safe %>
151 <% end %>
151 <% end %>
152 <% end %>
152 <% end %>
153 </td>
153 </td>
154
154
155 <td>
155 <td>
156 <div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;" id="gantt_area">
156 <div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;" id="gantt_area">
157 <%
157 <%
158 style = ""
158 style = ""
159 style += "width: #{g_width - 1}px;"
159 style += "width: #{g_width - 1}px;"
160 style += "height: #{headers_height}px;"
160 style += "height: #{headers_height}px;"
161 style += 'background: #eee;'
161 style += 'background: #eee;'
162 %>
162 %>
163 <%= content_tag(:div, '&nbsp;'.html_safe, :style => style, :class => "gantt_hdr") %>
163 <%= content_tag(:div, '&nbsp;'.html_safe, :style => style, :class => "gantt_hdr") %>
164
164
165 <% ###### Months headers ###### %>
165 <% ###### Months headers ###### %>
166 <%
166 <%
167 month_f = @gantt.date_from
167 month_f = @gantt.date_from
168 left = 0
168 left = 0
169 height = (show_weeks ? header_height : header_height + g_height)
169 height = (show_weeks ? header_height : header_height + g_height)
170 %>
170 %>
171 <% @gantt.months.times do %>
171 <% @gantt.months.times do %>
172 <%
172 <%
173 width = (((month_f >> 1) - month_f) * zoom - 1).to_i
173 width = (((month_f >> 1) - month_f) * zoom - 1).to_i
174 style = ""
174 style = ""
175 style += "left: #{left}px;"
175 style += "left: #{left}px;"
176 style += "width: #{width}px;"
176 style += "width: #{width}px;"
177 style += "height: #{height}px;"
177 style += "height: #{height}px;"
178 %>
178 %>
179 <%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
179 <%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
180 <%= link_to "#{month_f.year}-#{month_f.month}",
180 <%= link_to "#{month_f.year}-#{month_f.month}",
181 @gantt.params.merge(:year => month_f.year, :month => month_f.month),
181 @gantt.params.merge(:year => month_f.year, :month => month_f.month),
182 :title => "#{month_name(month_f.month)} #{month_f.year}" %>
182 :title => "#{month_name(month_f.month)} #{month_f.year}" %>
183 <% end %>
183 <% end %>
184 <%
184 <%
185 left = left + width + 1
185 left = left + width + 1
186 month_f = month_f >> 1
186 month_f = month_f >> 1
187 %>
187 %>
188 <% end %>
188 <% end %>
189
189
190 <% ###### Weeks headers ###### %>
190 <% ###### Weeks headers ###### %>
191 <% if show_weeks %>
191 <% if show_weeks %>
192 <%
192 <%
193 left = 0
193 left = 0
194 height = (show_days ? header_height - 1 : header_height - 1 + g_height)
194 height = (show_days ? header_height - 1 : header_height - 1 + g_height)
195 %>
195 %>
196 <% if @gantt.date_from.cwday == 1 %>
196 <% if @gantt.date_from.cwday == 1 %>
197 <%
197 <%
198 # @date_from is monday
198 # @date_from is monday
199 week_f = @gantt.date_from
199 week_f = @gantt.date_from
200 %>
200 %>
201 <% else %>
201 <% else %>
202 <%
202 <%
203 # find next monday after @date_from
203 # find next monday after @date_from
204 week_f = @gantt.date_from + (7 - @gantt.date_from.cwday + 1)
204 week_f = @gantt.date_from + (7 - @gantt.date_from.cwday + 1)
205 width = (7 - @gantt.date_from.cwday + 1) * zoom - 1
205 width = (7 - @gantt.date_from.cwday + 1) * zoom - 1
206 style = ""
206 style = ""
207 style += "left: #{left}px;"
207 style += "left: #{left}px;"
208 style += "top: 19px;"
208 style += "top: 19px;"
209 style += "width: #{width}px;"
209 style += "width: #{width}px;"
210 style += "height: #{height}px;"
210 style += "height: #{height}px;"
211 %>
211 %>
212 <%= content_tag(:div, '&nbsp;'.html_safe,
212 <%= content_tag(:div, '&nbsp;'.html_safe,
213 :style => style, :class => "gantt_hdr") %>
213 :style => style, :class => "gantt_hdr") %>
214 <% left = left + width + 1 %>
214 <% left = left + width + 1 %>
215 <% end %>
215 <% end %>
216 <% while week_f <= @gantt.date_to %>
216 <% while week_f <= @gantt.date_to %>
217 <%
217 <%
218 width = ((week_f + 6 <= @gantt.date_to) ?
218 width = ((week_f + 6 <= @gantt.date_to) ?
219 7 * zoom - 1 :
219 7 * zoom - 1 :
220 (@gantt.date_to - week_f + 1) * zoom - 1).to_i
220 (@gantt.date_to - week_f + 1) * zoom - 1).to_i
221 style = ""
221 style = ""
222 style += "left: #{left}px;"
222 style += "left: #{left}px;"
223 style += "top: 19px;"
223 style += "top: 19px;"
224 style += "width: #{width}px;"
224 style += "width: #{width}px;"
225 style += "height: #{height}px;"
225 style += "height: #{height}px;"
226 %>
226 %>
227 <%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
227 <%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
228 <%= content_tag(:small) do %>
228 <%= content_tag(:small) do %>
229 <%= week_f.cweek if width >= 16 %>
229 <%= week_f.cweek if width >= 16 %>
230 <% end %>
230 <% end %>
231 <% end %>
231 <% end %>
232 <%
232 <%
233 left = left + width + 1
233 left = left + width + 1
234 week_f = week_f + 7
234 week_f = week_f + 7
235 %>
235 %>
236 <% end %>
236 <% end %>
237 <% end %>
237 <% end %>
238
238
239 <% ###### Day numbers headers ###### %>
239 <% ###### Day numbers headers ###### %>
240 <% if show_day_num %>
240 <% if show_day_num %>
241 <%
241 <%
242 left = 0
242 left = 0
243 height = g_height + header_height*2 - 1
243 height = g_height + header_height*2 - 1
244 wday = @gantt.date_from.cwday
244 wday = @gantt.date_from.cwday
245 day_num = @gantt.date_from
245 day_num = @gantt.date_from
246 %>
246 %>
247 <% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
247 <% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
248 <%
248 <%
249 width = zoom - 1
249 width = zoom - 1
250 style = ""
250 style = ""
251 style += "left:#{left}px;"
251 style += "left:#{left}px;"
252 style += "top:37px;"
252 style += "top:37px;"
253 style += "width:#{width}px;"
253 style += "width:#{width}px;"
254 style += "height:#{height}px;"
254 style += "height:#{height}px;"
255 style += "font-size:0.7em;"
255 style += "font-size:0.7em;"
256 clss = "gantt_hdr"
256 clss = "gantt_hdr"
257 clss << " nwday" if @gantt.non_working_week_days.include?(wday)
257 clss << " nwday" if @gantt.non_working_week_days.include?(wday)
258 %>
258 %>
259 <%= content_tag(:div, :style => style, :class => clss) do %>
259 <%= content_tag(:div, :style => style, :class => clss) do %>
260 <%= day_num.day %>
260 <%= day_num.day %>
261 <% end %>
261 <% end %>
262 <%
262 <%
263 left = left + width+1
263 left = left + width+1
264 day_num = day_num + 1
264 day_num = day_num + 1
265 wday = wday + 1
265 wday = wday + 1
266 wday = 1 if wday > 7
266 wday = 1 if wday > 7
267 %>
267 %>
268 <% end %>
268 <% end %>
269 <% end %>
269 <% end %>
270
270
271 <% ###### Days headers ####### %>
271 <% ###### Days headers ####### %>
272 <% if show_days %>
272 <% if show_days %>
273 <%
273 <%
274 left = 0
274 left = 0
275 height = g_height + header_height - 1
275 height = g_height + header_height - 1
276 top = (show_day_num ? 55 : 37)
276 top = (show_day_num ? 55 : 37)
277 wday = @gantt.date_from.cwday
277 wday = @gantt.date_from.cwday
278 %>
278 %>
279 <% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
279 <% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
280 <%
280 <%
281 width = zoom - 1
281 width = zoom - 1
282 style = ""
282 style = ""
283 style += "left: #{left}px;"
283 style += "left: #{left}px;"
284 style += "top: #{top}px;"
284 style += "top: #{top}px;"
285 style += "width: #{width}px;"
285 style += "width: #{width}px;"
286 style += "height: #{height}px;"
286 style += "height: #{height}px;"
287 style += "font-size:0.7em;"
287 style += "font-size:0.7em;"
288 clss = "gantt_hdr"
288 clss = "gantt_hdr"
289 clss << " nwday" if @gantt.non_working_week_days.include?(wday)
289 clss << " nwday" if @gantt.non_working_week_days.include?(wday)
290 %>
290 %>
291 <%= content_tag(:div, :style => style, :class => clss) do %>
291 <%= content_tag(:div, :style => style, :class => clss) do %>
292 <%= day_letter(wday) %>
292 <%= day_letter(wday) %>
293 <% end %>
293 <% end %>
294 <%
294 <%
295 left = left + width + 1
295 left = left + width + 1
296 wday = wday + 1
296 wday = wday + 1
297 wday = 1 if wday > 7
297 wday = 1 if wday > 7
298 %>
298 %>
299 <% end %>
299 <% end %>
300 <% end %>
300 <% end %>
301
301
302 <%= @gantt.lines.html_safe %>
302 <%= @gantt.lines.html_safe %>
303
303
304 <% ###### Today red line (excluded from cache) ###### %>
304 <% ###### Today red line (excluded from cache) ###### %>
305 <% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
305 <% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
306 <%
306 <%
307 today_left = (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i
307 today_left = (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i
308 style = ""
308 style = ""
309 style += "position: absolute;"
309 style += "position: absolute;"
310 style += "height: #{g_height}px;"
310 style += "height: #{g_height}px;"
311 style += "top: #{headers_height + 1}px;"
311 style += "top: #{headers_height + 1}px;"
312 style += "left: #{today_left}px;"
312 style += "left: #{today_left}px;"
313 style += "width:10px;"
313 style += "width:10px;"
314 style += "border-left: 1px dashed red;"
314 style += "border-left: 1px dashed red;"
315 %>
315 %>
316 <%= content_tag(:div, '&nbsp;'.html_safe, :style => style, :id => 'today_line') %>
316 <%= content_tag(:div, '&nbsp;'.html_safe, :style => style, :id => 'today_line') %>
317 <% end %>
317 <% end %>
318 <%
318 <%
319 style = ""
319 style = ""
320 style += "position: absolute;"
320 style += "position: absolute;"
321 style += "height: #{g_height}px;"
321 style += "height: #{g_height}px;"
322 style += "top: #{headers_height + 1}px;"
322 style += "top: #{headers_height + 1}px;"
323 style += "left: 0px;"
323 style += "left: 0px;"
324 style += "width: #{g_width - 1}px;"
324 style += "width: #{g_width - 1}px;"
325 %>
325 %>
326 <%= content_tag(:div, '', :style => style, :id => "gantt_draw_area") %>
326 <%= content_tag(:div, '', :style => style, :id => "gantt_draw_area") %>
327 </div>
327 </div>
328 </td>
328 </td>
329 </tr>
329 </tr>
330 </table>
330 </table>
331
331
332 <table style="width:100%">
332 <table style="width:100%">
333 <tr>
333 <tr>
334 <td style="text-align:left;">
334 <td style="text-align:left;">
335 <%= link_to_content_update("\xc2\xab " + l(:label_previous),
335 <%= link_to_content_update("\xc2\xab " + l(:label_previous),
336 params.merge(@gantt.params_previous),
336 params.merge(@gantt.params_previous),
337 :accesskey => accesskey(:previous)) %>
337 :accesskey => accesskey(:previous)) %>
338 </td>
338 </td>
339 <td style="text-align:right;">
339 <td style="text-align:right;">
340 <%= link_to_content_update(l(:label_next) + " \xc2\xbb",
340 <%= link_to_content_update(l(:label_next) + " \xc2\xbb",
341 params.merge(@gantt.params_next),
341 params.merge(@gantt.params_next),
342 :accesskey => accesskey(:next)) %>
342 :accesskey => accesskey(:next)) %>
343 </td>
343 </td>
344 </tr>
344 </tr>
345 </table>
345 </table>
346
346
347 <% other_formats_links do |f| %>
347 <% other_formats_links do |f| %>
348 <%= f.link_to 'PDF', :url => params.merge(@gantt.params) %>
348 <%= f.link_to 'PDF', :url => params.merge(@gantt.params) %>
349 <%= f.link_to('PNG', :url => params.merge(@gantt.params)) if @gantt.respond_to?('to_image') %>
349 <%= f.link_to('PNG', :url => params.merge(@gantt.params)) if @gantt.respond_to?('to_image') %>
350 <% end %>
350 <% end %>
351 <% end # query.valid? %>
351 <% end # query.valid? %>
352
352
353 <% content_for :sidebar do %>
353 <% content_for :sidebar do %>
354 <%= render :partial => 'issues/sidebar' %>
354 <%= render :partial => 'issues/sidebar' %>
355 <% end %>
355 <% end %>
356
356
357 <% html_title(l(:label_gantt)) -%>
357 <% html_title(l(:label_gantt)) -%>
358
358
359 <% content_for :header_tags do %>
359 <% content_for :header_tags do %>
360 <%= javascript_include_tag 'raphael' %>
360 <%= javascript_include_tag 'raphael' %>
361 <%= javascript_include_tag 'gantt' %>
361 <%= javascript_include_tag 'gantt' %>
362 <% end %>
362 <% end %>
363
363
364 <%= javascript_tag do %>
364 <%= javascript_tag do %>
365 var issue_relation_type = <%= raw Redmine::Helpers::Gantt::DRAW_TYPES.to_json %>;
365 var issue_relation_type = <%= raw Redmine::Helpers::Gantt::DRAW_TYPES.to_json %>;
366 $(document).ready(drawGanttHandler);
366 $(document).ready(drawGanttHandler);
367 $(window).resize(drawGanttHandler);
367 $(window).resize(drawGanttHandler);
368 $(function() {
368 $(function() {
369 $("#draw_relations").change(drawGanttHandler);
369 $("#draw_relations").change(drawGanttHandler);
370 $("#draw_progress_line").change(drawGanttHandler);
370 $("#draw_progress_line").change(drawGanttHandler);
371 });
371 });
372 <% end %>
372 <% end %>
@@ -1,121 +1,121
1 <div class="contextual">
1 <div class="contextual">
2 <% if !@query.new_record? && @query.editable_by?(User.current) %>
2 <% if !@query.new_record? && @query.editable_by?(User.current) %>
3 <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
3 <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
4 <%= delete_link query_path(@query) %>
4 <%= delete_link query_path(@query) %>
5 <% end %>
5 <% end %>
6 </div>
6 </div>
7
7
8 <h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2>
8 <h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2>
9 <% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
9 <% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
10
10
11 <%= form_tag({ :controller => 'issues', :action => 'index', :project_id => @project },
11 <%= form_tag({ :controller => 'issues', :action => 'index', :project_id => @project },
12 :method => :get, :id => 'query_form') do %>
12 :method => :get, :id => 'query_form') do %>
13 <div id="query_form_with_buttons" class="hide-when-print">
13 <div id="query_form_with_buttons" class="hide-when-print">
14 <%= hidden_field_tag 'set_filter', '1' %>
14 <%= hidden_field_tag 'set_filter', '1' %>
15 <div id="query_form_content">
15 <div id="query_form_content">
16 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
16 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
17 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
17 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
18 <div style="<%= @query.new_record? ? "" : "display: none;" %>">
18 <div style="<%= @query.new_record? ? "" : "display: none;" %>">
19 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
19 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
20 </div>
20 </div>
21 </fieldset>
21 </fieldset>
22 <fieldset class="collapsible collapsed">
22 <fieldset id="options" class="collapsible collapsed">
23 <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
23 <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
24 <div style="display: none;">
24 <div style="display: none;">
25 <table>
25 <table>
26 <tr>
26 <tr>
27 <td><%= l(:field_column_names) %></td>
27 <td class="field"><%= l(:field_column_names) %></td>
28 <td><%= render_query_columns_selection(@query) %></td>
28 <td><%= render_query_columns_selection(@query) %></td>
29 </tr>
29 </tr>
30 <tr>
30 <tr>
31 <td><label for='group_by'><%= l(:field_group_by) %></label></td>
31 <td class="field"><label for='group_by'><%= l(:field_group_by) %></label></td>
32 <td><%= select_tag('group_by',
32 <td><%= select_tag('group_by',
33 options_for_select(
33 options_for_select(
34 [[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]},
34 [[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]},
35 @query.group_by)
35 @query.group_by)
36 ) %></td>
36 ) %></td>
37 </tr>
37 </tr>
38 <tr>
38 <tr>
39 <td><%= l(:button_show) %></td>
39 <td class="field"><%= l(:button_show) %></td>
40 <td><%= available_block_columns_tags(@query) %></td>
40 <td><%= available_block_columns_tags(@query) %></td>
41 </tr>
41 </tr>
42 <tr>
42 <tr>
43 <td><%= l(:label_total_plural) %></td>
43 <td><%= l(:label_total_plural) %></td>
44 <td><%= available_totalable_columns_tags(@query) %></td>
44 <td><%= available_totalable_columns_tags(@query) %></td>
45 </tr>
45 </tr>
46 </table>
46 </table>
47 </div>
47 </div>
48 </fieldset>
48 </fieldset>
49 </div>
49 </div>
50 <p class="buttons">
50 <p class="buttons">
51 <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
51 <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
52 <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
52 <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
53 <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
53 <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
54 <%= link_to_function l(:button_save),
54 <%= link_to_function l(:button_save),
55 "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()",
55 "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()",
56 :class => 'icon icon-save' %>
56 :class => 'icon icon-save' %>
57 <% end %>
57 <% end %>
58 </p>
58 </p>
59 </div>
59 </div>
60 <% end %>
60 <% end %>
61
61
62 <%= error_messages_for 'query' %>
62 <%= error_messages_for 'query' %>
63 <% if @query.valid? %>
63 <% if @query.valid? %>
64 <% if @issues.empty? %>
64 <% if @issues.empty? %>
65 <p class="nodata"><%= l(:label_no_data) %></p>
65 <p class="nodata"><%= l(:label_no_data) %></p>
66 <% else %>
66 <% else %>
67 <%= render_query_totals(@query) %>
67 <%= render_query_totals(@query) %>
68 <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
68 <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
69 <span class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></span>
69 <span class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></span>
70 <% end %>
70 <% end %>
71
71
72 <% other_formats_links do |f| %>
72 <% other_formats_links do |f| %>
73 <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
73 <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
74 <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '350px'); return false;" %>
74 <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '350px'); return false;" %>
75 <%= f.link_to 'PDF', :url => params %>
75 <%= f.link_to 'PDF', :url => params %>
76 <% end %>
76 <% end %>
77
77
78 <div id="csv-export-options" style="display:none;">
78 <div id="csv-export-options" style="display:none;">
79 <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
79 <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
80 <%= form_tag(_project_issues_path(@project, :format => 'csv'), :method => :get, :id => 'csv-export-form') do %>
80 <%= form_tag(_project_issues_path(@project, :format => 'csv'), :method => :get, :id => 'csv-export-form') do %>
81 <%= query_as_hidden_field_tags(@query) %>
81 <%= query_as_hidden_field_tags(@query) %>
82 <%= hidden_field_tag 'sort', params[:sort], :id => nil %>
82 <%= hidden_field_tag 'sort', params[:sort], :id => nil %>
83 <p>
83 <p>
84 <label><%= radio_button_tag 'csv[columns]', '', true %> <%= l(:description_selected_columns) %></label><br />
84 <label><%= radio_button_tag 'csv[columns]', '', true %> <%= l(:description_selected_columns) %></label><br />
85 <label><%= radio_button_tag 'csv[columns]', 'all' %> <%= l(:description_all_columns) %></label>
85 <label><%= radio_button_tag 'csv[columns]', 'all' %> <%= l(:description_all_columns) %></label>
86 </p>
86 </p>
87 <p>
87 <p>
88 <label><%= check_box_tag 'csv[description]', '1', @query.has_column?(:description) %> <%= l(:field_description) %></label>
88 <label><%= check_box_tag 'csv[description]', '1', @query.has_column?(:description) %> <%= l(:field_description) %></label>
89 </p>
89 </p>
90 <% if @issue_count > Setting.issues_export_limit.to_i %>
90 <% if @issue_count > Setting.issues_export_limit.to_i %>
91 <p class="icon icon-warning">
91 <p class="icon icon-warning">
92 <%= l(:setting_issues_export_limit) %>: <%= Setting.issues_export_limit.to_i %>
92 <%= l(:setting_issues_export_limit) %>: <%= Setting.issues_export_limit.to_i %>
93 </p>
93 </p>
94 <% end %>
94 <% end %>
95 <p class="buttons">
95 <p class="buttons">
96 <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
96 <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
97 <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
97 <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
98 </p>
98 </p>
99 <% end %>
99 <% end %>
100 </div>
100 </div>
101
101
102 <% end %>
102 <% end %>
103 <%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
103 <%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
104
104
105 <% content_for :sidebar do %>
105 <% content_for :sidebar do %>
106 <%= render :partial => 'issues/sidebar' %>
106 <%= render :partial => 'issues/sidebar' %>
107 <% end %>
107 <% end %>
108
108
109 <% content_for :header_tags do %>
109 <% content_for :header_tags do %>
110 <%= auto_discovery_link_tag(:atom,
110 <%= auto_discovery_link_tag(:atom,
111 {:query_id => @query, :format => 'atom',
111 {:query_id => @query, :format => 'atom',
112 :page => nil, :key => User.current.rss_key},
112 :page => nil, :key => User.current.rss_key},
113 :title => l(:label_issue_plural)) %>
113 :title => l(:label_issue_plural)) %>
114 <%= auto_discovery_link_tag(:atom,
114 <%= auto_discovery_link_tag(:atom,
115 {:controller => 'journals', :action => 'index',
115 {:controller => 'journals', :action => 'index',
116 :query_id => @query, :format => 'atom',
116 :query_id => @query, :format => 'atom',
117 :page => nil, :key => User.current.rss_key},
117 :page => nil, :key => User.current.rss_key},
118 :title => l(:label_changes_details)) %>
118 :title => l(:label_changes_details)) %>
119 <% end %>
119 <% end %>
120
120
121 <%= context_menu issues_context_menu_path %>
121 <%= context_menu issues_context_menu_path %>
@@ -1,92 +1,92
1 <%= error_messages_for 'query' %>
1 <%= error_messages_for 'query' %>
2
2
3 <div class="box">
3 <div class="box">
4 <div class="tabular">
4 <div class="tabular">
5 <%= hidden_field_tag 'gantt', '1' if params[:gantt] %>
5 <%= hidden_field_tag 'gantt', '1' if params[:gantt] %>
6
6
7 <p><label for="query_name"><%=l(:field_name)%></label>
7 <p><label for="query_name"><%=l(:field_name)%></label>
8 <%= text_field 'query', 'name', :size => 80 %></p>
8 <%= text_field 'query', 'name', :size => 80 %></p>
9
9
10 <% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, @query.project) %>
10 <% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, @query.project) %>
11 <p><label><%=l(:field_visible)%></label>
11 <p><label><%=l(:field_visible)%></label>
12 <label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_PRIVATE %> <%= l(:label_visibility_private) %></label>
12 <label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_PRIVATE %> <%= l(:label_visibility_private) %></label>
13 <label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_PUBLIC %> <%= l(:label_visibility_public) %></label>
13 <label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_PUBLIC %> <%= l(:label_visibility_public) %></label>
14 <label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_ROLES %> <%= l(:label_visibility_roles) %>:</label>
14 <label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_ROLES %> <%= l(:label_visibility_roles) %>:</label>
15 <% Role.givable.sorted.each do |role| %>
15 <% Role.givable.sorted.each do |role| %>
16 <label class="block role-visibility"><%= check_box_tag 'query[role_ids][]', role.id, @query.roles.include?(role), :id => nil %> <%= role.name %></label>
16 <label class="block role-visibility"><%= check_box_tag 'query[role_ids][]', role.id, @query.roles.include?(role), :id => nil %> <%= role.name %></label>
17 <% end %>
17 <% end %>
18 <%= hidden_field_tag 'query[role_ids][]', '' %>
18 <%= hidden_field_tag 'query[role_ids][]', '' %>
19 </p>
19 </p>
20 <% end %>
20 <% end %>
21
21
22 <p><label for="query_is_for_all"><%=l(:field_is_for_all)%></label>
22 <p><label for="query_is_for_all"><%=l(:field_is_for_all)%></label>
23 <%= check_box_tag 'query_is_for_all', 1, @query.project.nil?, :class => (User.current.admin? ? '' : 'disable-unless-private') %></p>
23 <%= check_box_tag 'query_is_for_all', 1, @query.project.nil?, :class => (User.current.admin? ? '' : 'disable-unless-private') %></p>
24
24
25 <% unless params[:gantt] %>
25 <% unless params[:gantt] %>
26 <fieldset><legend><%= l(:label_options) %></legend>
26 <fieldset id="options"><legend><%= l(:label_options) %></legend>
27 <p><label for="query_default_columns"><%=l(:label_default_columns)%></label>
27 <p><label for="query_default_columns"><%=l(:label_default_columns)%></label>
28 <%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns',
28 <%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns',
29 :onclick => 'if (this.checked) {$("#columns").hide();} else {$("#columns").show();}' %></p>
29 :onclick => 'if (this.checked) {$("#columns").hide();} else {$("#columns").show();}' %></p>
30
30
31 <p><label for="query_group_by"><%= l(:field_group_by) %></label>
31 <p><label for="query_group_by"><%= l(:field_group_by) %></label>
32 <%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p>
32 <%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p>
33
33
34 <p><label><%= l(:button_show) %></label>
34 <p><label><%= l(:button_show) %></label>
35 <%= available_block_columns_tags(@query) %></p>
35 <%= available_block_columns_tags(@query) %></p>
36
36
37 <p><label><%= l(:label_total_plural) %></label>
37 <p><label><%= l(:label_total_plural) %></label>
38 <%= available_totalable_columns_tags(@query) %></p>
38 <%= available_totalable_columns_tags(@query) %></p>
39 </fieldset>
39 </fieldset>
40 <% else %>
40 <% else %>
41 <fieldset><legend><%= l(:label_options) %></legend>
41 <fieldset id="options"><legend><%= l(:label_options) %></legend>
42 <p><label><%= l(:button_show) %></label>
42 <p><label><%= l(:button_show) %></label>
43 <label class="inline"><%= check_box_tag "query[draw_relations]", "1", @query.draw_relations %> <%= l(:label_related_issues) %></label>
43 <label class="inline"><%= check_box_tag "query[draw_relations]", "1", @query.draw_relations %> <%= l(:label_related_issues) %></label>
44 <label class="inline"><%= check_box_tag "query[draw_progress_line]", "1", @query.draw_progress_line %> <%= l(:label_gantt_progress_line) %></label>
44 <label class="inline"><%= check_box_tag "query[draw_progress_line]", "1", @query.draw_progress_line %> <%= l(:label_gantt_progress_line) %></label>
45 </p>
45 </p>
46 </fieldset>
46 </fieldset>
47 <% end %>
47 <% end %>
48 </div>
48 </div>
49
49
50 <fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
50 <fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
51 <%= render :partial => 'queries/filters', :locals => {:query => query}%>
51 <%= render :partial => 'queries/filters', :locals => {:query => query}%>
52 </fieldset>
52 </fieldset>
53
53
54 <% unless params[:gantt] %>
54 <% unless params[:gantt] %>
55 <fieldset><legend><%= l(:label_sort) %></legend>
55 <fieldset><legend><%= l(:label_sort) %></legend>
56 <% 3.times do |i| %>
56 <% 3.times do |i| %>
57 <%= content_tag(:span, "#{i+1}:", :class => 'query_sort_criteria_count')%>
57 <%= content_tag(:span, "#{i+1}:", :class => 'query_sort_criteria_count')%>
58 <%= label_tag "query_sort_criteria_attribute_" + i.to_s,
58 <%= label_tag "query_sort_criteria_attribute_" + i.to_s,
59 l(:description_query_sort_criteria_attribute), :class => "hidden-for-sighted" %>
59 l(:description_query_sort_criteria_attribute), :class => "hidden-for-sighted" %>
60 <%= select_tag("query[sort_criteria][#{i}][]",
60 <%= select_tag("query[sort_criteria][#{i}][]",
61 options_for_select([[]] + query.available_columns.select(&:sortable?).collect {|column| [column.caption, column.name.to_s]}, @query.sort_criteria_key(i)),
61 options_for_select([[]] + query.available_columns.select(&:sortable?).collect {|column| [column.caption, column.name.to_s]}, @query.sort_criteria_key(i)),
62 :id => "query_sort_criteria_attribute_" + i.to_s)%>
62 :id => "query_sort_criteria_attribute_" + i.to_s)%>
63 <%= label_tag "query_sort_criteria_direction_" + i.to_s,
63 <%= label_tag "query_sort_criteria_direction_" + i.to_s,
64 l(:description_query_sort_criteria_direction), :class => "hidden-for-sighted" %>
64 l(:description_query_sort_criteria_direction), :class => "hidden-for-sighted" %>
65 <%= select_tag("query[sort_criteria][#{i}][]",
65 <%= select_tag("query[sort_criteria][#{i}][]",
66 options_for_select([[], [l(:label_ascending), 'asc'], [l(:label_descending), 'desc']], @query.sort_criteria_order(i)),
66 options_for_select([[], [l(:label_ascending), 'asc'], [l(:label_descending), 'desc']], @query.sort_criteria_order(i)),
67 :id => "query_sort_criteria_direction_" + i.to_s) %>
67 :id => "query_sort_criteria_direction_" + i.to_s) %>
68 <br />
68 <br />
69 <% end %>
69 <% end %>
70 </fieldset>
70 </fieldset>
71 <% end %>
71 <% end %>
72
72
73 <% unless params[:gantt] %>
73 <% unless params[:gantt] %>
74 <%= content_tag 'fieldset', :id => 'columns', :style => (query.has_default_columns? ? 'display:none;' : nil) do %>
74 <%= content_tag 'fieldset', :id => 'columns', :style => (query.has_default_columns? ? 'display:none;' : nil) do %>
75 <legend><%= l(:field_column_names) %></legend>
75 <legend><%= l(:field_column_names) %></legend>
76 <%= render_query_columns_selection(query) %>
76 <%= render_query_columns_selection(query) %>
77 <% end %>
77 <% end %>
78 <% end %>
78 <% end %>
79
79
80 </div>
80 </div>
81
81
82 <%= javascript_tag do %>
82 <%= javascript_tag do %>
83 $(document).ready(function(){
83 $(document).ready(function(){
84 $("input[name='query[visibility]']").change(function(){
84 $("input[name='query[visibility]']").change(function(){
85 var roles_checked = $('#query_visibility_1').is(':checked');
85 var roles_checked = $('#query_visibility_1').is(':checked');
86 var private_checked = $('#query_visibility_0').is(':checked');
86 var private_checked = $('#query_visibility_0').is(':checked');
87 $("input[name='query[role_ids][]'][type=checkbox]").attr('disabled', !roles_checked);
87 $("input[name='query[role_ids][]'][type=checkbox]").attr('disabled', !roles_checked);
88 if (!private_checked) $("input.disable-unless-private").attr('checked', false);
88 if (!private_checked) $("input.disable-unless-private").attr('checked', false);
89 $("input.disable-unless-private").attr('disabled', !private_checked);
89 $("input.disable-unless-private").attr('disabled', !private_checked);
90 }).trigger('change');
90 }).trigger('change');
91 });
91 });
92 <% end %>
92 <% end %>
@@ -1,36 +1,36
1 <div id="query_form_with_buttons" class="hide-when-print">
1 <div id="query_form_with_buttons" class="hide-when-print">
2 <div id="query_form_content">
2 <div id="query_form_content">
3 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
3 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
4 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
4 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
5 <div style="<%= @query.new_record? ? "" : "display: none;" %>">
5 <div style="<%= @query.new_record? ? "" : "display: none;" %>">
6 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
6 <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
7 </div>
7 </div>
8 </fieldset>
8 </fieldset>
9 <fieldset class="collapsible collapsed">
9 <fieldset id="options" class="collapsible collapsed">
10 <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
10 <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
11 <div style="display: none;">
11 <div style="display: none;">
12 <table>
12 <table>
13 <tr>
13 <tr>
14 <td><%= l(:field_column_names) %></td>
14 <td class="field"><%= l(:field_column_names) %></td>
15 <td><%= render_query_columns_selection(@query) %></td>
15 <td><%= render_query_columns_selection(@query) %></td>
16 </tr>
16 </tr>
17 </table>
17 </table>
18 </div>
18 </div>
19 </fieldset>
19 </fieldset>
20 </div>
20 </div>
21
21
22 <p class="buttons">
22 <p class="buttons">
23 <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
23 <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
24 <%= link_to l(:button_clear), {:project_id => @project, :issue_id => @issue}, :class => 'icon icon-reload' %>
24 <%= link_to l(:button_clear), {:project_id => @project, :issue_id => @issue}, :class => 'icon icon-reload' %>
25 </p>
25 </p>
26 </div>
26 </div>
27
27
28 <div class="tabs hide-when-print">
28 <div class="tabs hide-when-print">
29 <% query_params = params.slice(:f, :op, :v, :sort) %>
29 <% query_params = params.slice(:f, :op, :v, :sort) %>
30 <ul>
30 <ul>
31 <li><%= link_to(l(:label_details), _time_entries_path(@project, @issue, query_params),
31 <li><%= link_to(l(:label_details), _time_entries_path(@project, @issue, query_params),
32 :class => (action_name == 'index' ? 'selected' : nil)) %></li>
32 :class => (action_name == 'index' ? 'selected' : nil)) %></li>
33 <li><%= link_to(l(:label_report), _report_time_entries_path(@project, @issue, query_params),
33 <li><%= link_to(l(:label_report), _report_time_entries_path(@project, @issue, query_params),
34 :class => (action_name == 'report' ? 'selected' : nil)) %></li>
34 :class => (action_name == 'report' ? 'selected' : nil)) %></li>
35 </ul>
35 </ul>
36 </div>
36 </div>
General Comments 0
You need to be logged in to leave comments. Login now