##// END OF EJS Templates
Render issue attributes using divs instead of a table for responsiveness (#19097)....
Jean-Philippe Lang -
r14466:cb0866f31307
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -1,516 +1,516
1 1 # encoding: utf-8
2 2 #
3 3 # Redmine - project management software
4 4 # Copyright (C) 2006-2015 Jean-Philippe Lang
5 5 #
6 6 # This program is free software; you can redistribute it and/or
7 7 # modify it under the terms of the GNU General Public License
8 8 # as published by the Free Software Foundation; either version 2
9 9 # of the License, or (at your option) any later version.
10 10 #
11 11 # This program is distributed in the hope that it will be useful,
12 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 14 # GNU General Public License for more details.
15 15 #
16 16 # You should have received a copy of the GNU General Public License
17 17 # along with this program; if not, write to the Free Software
18 18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 19
20 20 module IssuesHelper
21 21 include ApplicationHelper
22 22 include Redmine::Export::PDF::IssuesPdfHelper
23 23
24 24 def issue_list(issues, &block)
25 25 ancestors = []
26 26 issues.each do |issue|
27 27 while (ancestors.any? && !issue.is_descendant_of?(ancestors.last))
28 28 ancestors.pop
29 29 end
30 30 yield issue, ancestors.size
31 31 ancestors << issue unless issue.leaf?
32 32 end
33 33 end
34 34
35 35 def grouped_issue_list(issues, query, issue_count_by_group, &block)
36 36 previous_group, first = false, true
37 37 totals_by_group = query.totalable_columns.inject({}) do |h, column|
38 38 h[column] = query.total_by_group_for(column)
39 39 h
40 40 end
41 41 issue_list(issues) do |issue, level|
42 42 group_name = group_count = nil
43 43 if query.grouped?
44 44 group = query.group_by_column.value(issue)
45 45 if first || group != previous_group
46 46 if group.blank? && group != false
47 47 group_name = "(#{l(:label_blank_value)})"
48 48 else
49 49 group_name = format_object(group)
50 50 end
51 51 group_name ||= ""
52 52 group_count = issue_count_by_group[group]
53 53 group_totals = totals_by_group.map {|column, t| total_tag(column, t[group] || 0)}.join(" ").html_safe
54 54 end
55 55 end
56 56 yield issue, level, group_name, group_count, group_totals
57 57 previous_group, first = group, false
58 58 end
59 59 end
60 60
61 61 # Renders a HTML/CSS tooltip
62 62 #
63 63 # To use, a trigger div is needed. This is a div with the class of "tooltip"
64 64 # that contains this method wrapped in a span with the class of "tip"
65 65 #
66 66 # <div class="tooltip"><%= link_to_issue(issue) %>
67 67 # <span class="tip"><%= render_issue_tooltip(issue) %></span>
68 68 # </div>
69 69 #
70 70 def render_issue_tooltip(issue)
71 71 @cached_label_status ||= l(:field_status)
72 72 @cached_label_start_date ||= l(:field_start_date)
73 73 @cached_label_due_date ||= l(:field_due_date)
74 74 @cached_label_assigned_to ||= l(:field_assigned_to)
75 75 @cached_label_priority ||= l(:field_priority)
76 76 @cached_label_project ||= l(:field_project)
77 77
78 78 link_to_issue(issue) + "<br /><br />".html_safe +
79 79 "<strong>#{@cached_label_project}</strong>: #{link_to_project(issue.project)}<br />".html_safe +
80 80 "<strong>#{@cached_label_status}</strong>: #{h(issue.status.name)}<br />".html_safe +
81 81 "<strong>#{@cached_label_start_date}</strong>: #{format_date(issue.start_date)}<br />".html_safe +
82 82 "<strong>#{@cached_label_due_date}</strong>: #{format_date(issue.due_date)}<br />".html_safe +
83 83 "<strong>#{@cached_label_assigned_to}</strong>: #{h(issue.assigned_to)}<br />".html_safe +
84 84 "<strong>#{@cached_label_priority}</strong>: #{h(issue.priority.name)}".html_safe
85 85 end
86 86
87 87 def issue_heading(issue)
88 88 h("#{issue.tracker} ##{issue.id}")
89 89 end
90 90
91 91 def render_issue_subject_with_tree(issue)
92 92 s = ''
93 93 ancestors = issue.root? ? [] : issue.ancestors.visible.to_a
94 94 ancestors.each do |ancestor|
95 95 s << '<div>' + content_tag('p', link_to_issue(ancestor, :project => (issue.project_id != ancestor.project_id)))
96 96 end
97 97 s << '<div>'
98 98 subject = h(issue.subject)
99 99 if issue.is_private?
100 100 subject = content_tag('span', l(:field_is_private), :class => 'private') + ' ' + subject
101 101 end
102 102 s << content_tag('h3', subject)
103 103 s << '</div>' * (ancestors.size + 1)
104 104 s.html_safe
105 105 end
106 106
107 107 def render_descendants_tree(issue)
108 108 s = '<form><table class="list issues">'
109 109 issue_list(issue.descendants.visible.preload(:status, :priority, :tracker).sort_by(&:lft)) do |child, level|
110 110 css = "issue issue-#{child.id} hascontextmenu"
111 111 css << " idnt idnt-#{level}" if level > 0
112 112 s << content_tag('tr',
113 113 content_tag('td', check_box_tag("ids[]", child.id, false, :id => nil), :class => 'checkbox') +
114 114 content_tag('td', link_to_issue(child, :project => (issue.project_id != child.project_id)), :class => 'subject', :style => 'width: 50%') +
115 115 content_tag('td', h(child.status)) +
116 116 content_tag('td', link_to_user(child.assigned_to)) +
117 117 content_tag('td', progress_bar(child.done_ratio, :width => '80px')),
118 118 :class => css)
119 119 end
120 120 s << '</table></form>'
121 121 s.html_safe
122 122 end
123 123
124 124 def issue_estimated_hours_details(issue)
125 125 if issue.total_estimated_hours.present?
126 126 if issue.total_estimated_hours == issue.estimated_hours
127 127 l_hours_short(issue.estimated_hours)
128 128 else
129 129 s = issue.estimated_hours.present? ? l_hours_short(issue.estimated_hours) : ""
130 130 s << " (#{l(:label_total)}: #{l_hours_short(issue.total_estimated_hours)})"
131 131 s.html_safe
132 132 end
133 133 end
134 134 end
135 135
136 136 def issue_spent_hours_details(issue)
137 137 if issue.total_spent_hours > 0
138 138 if issue.total_spent_hours == issue.spent_hours
139 139 link_to(l_hours_short(issue.spent_hours), issue_time_entries_path(issue))
140 140 else
141 141 s = issue.spent_hours > 0 ? l_hours_short(issue.spent_hours) : ""
142 142 s << " (#{l(:label_total)}: #{link_to l_hours_short(issue.total_spent_hours), issue_time_entries_path(issue)})"
143 143 s.html_safe
144 144 end
145 145 end
146 146 end
147 147
148 148 # Returns an array of error messages for bulk edited issues
149 149 def bulk_edit_error_messages(issues)
150 150 messages = {}
151 151 issues.each do |issue|
152 152 issue.errors.full_messages.each do |message|
153 153 messages[message] ||= []
154 154 messages[message] << issue
155 155 end
156 156 end
157 157 messages.map { |message, issues|
158 158 "#{message}: " + issues.map {|i| "##{i.id}"}.join(', ')
159 159 }
160 160 end
161 161
162 162 # Returns a link for adding a new subtask to the given issue
163 163 def link_to_new_subtask(issue)
164 164 attrs = {
165 165 :tracker_id => issue.tracker,
166 166 :parent_issue_id => issue
167 167 }
168 168 link_to(l(:button_add), new_project_issue_path(issue.project, :issue => attrs))
169 169 end
170 170
171 171 class IssueFieldsRows
172 172 include ActionView::Helpers::TagHelper
173 173
174 174 def initialize
175 175 @left = []
176 176 @right = []
177 177 end
178 178
179 179 def left(*args)
180 180 args.any? ? @left << cells(*args) : @left
181 181 end
182 182
183 183 def right(*args)
184 184 args.any? ? @right << cells(*args) : @right
185 185 end
186 186
187 187 def size
188 188 @left.size > @right.size ? @left.size : @right.size
189 189 end
190 190
191 191 def to_html
192 html = ''.html_safe
193 blank = content_tag('th', '') + content_tag('td', '')
194 size.times do |i|
195 left = @left[i] || blank
196 right = @right[i] || blank
197 html << content_tag('tr', left + right)
198 end
199 html
192 content =
193 content_tag('div', @left.reduce(&:+), :class => 'splitcontentleft') +
194 content_tag('div', @right.reduce(&:+), :class => 'splitcontentleft')
195
196 content_tag('div', content, :class => 'splitcontent')
200 197 end
201 198
202 199 def cells(label, text, options={})
203 content_tag('th', label + ":", options) + content_tag('td', text, options)
200 options[:class] = [options[:class] || "", 'attribute'].join(' ')
201 content_tag 'div',
202 content_tag('div', label + ":", :class => 'label') + content_tag('div', text, :class => 'value'),
203 options
204 204 end
205 205 end
206 206
207 207 def issue_fields_rows
208 208 r = IssueFieldsRows.new
209 209 yield r
210 210 r.to_html
211 211 end
212 212
213 213 def render_custom_fields_rows(issue)
214 214 values = issue.visible_custom_field_values
215 215 return if values.empty?
216 216 half = (values.size / 2.0).ceil
217 217 issue_fields_rows do |rows|
218 218 values.each_with_index do |value, i|
219 219 css = "cf_#{value.custom_field.id}"
220 220 m = (i < half ? :left : :right)
221 221 rows.send m, custom_field_name_tag(value.custom_field), show_value(value), :class => css
222 222 end
223 223 end
224 224 end
225 225
226 226 # Returns the path for updating the issue form
227 227 # with project as the current project
228 228 def update_issue_form_path(project, issue)
229 229 options = {:format => 'js'}
230 230 if issue.new_record?
231 231 if project
232 232 new_project_issue_path(project, options)
233 233 else
234 234 new_issue_path(options)
235 235 end
236 236 else
237 237 edit_issue_path(issue, options)
238 238 end
239 239 end
240 240
241 241 # Returns the number of descendants for an array of issues
242 242 def issues_descendant_count(issues)
243 243 ids = issues.reject(&:leaf?).map {|issue| issue.descendants.ids}.flatten.uniq
244 244 ids -= issues.map(&:id)
245 245 ids.size
246 246 end
247 247
248 248 def issues_destroy_confirmation_message(issues)
249 249 issues = [issues] unless issues.is_a?(Array)
250 250 message = l(:text_issues_destroy_confirmation)
251 251
252 252 descendant_count = issues_descendant_count(issues)
253 253 if descendant_count > 0
254 254 message << "\n" + l(:text_issues_destroy_descendants_confirmation, :count => descendant_count)
255 255 end
256 256 message
257 257 end
258 258
259 259 # Returns an array of users that are proposed as watchers
260 260 # on the new issue form
261 261 def users_for_new_issue_watchers(issue)
262 262 users = issue.watcher_users
263 263 if issue.project.users.count <= 20
264 264 users = (users + issue.project.users.sort).uniq
265 265 end
266 266 users
267 267 end
268 268
269 269 def sidebar_queries
270 270 unless @sidebar_queries
271 271 @sidebar_queries = IssueQuery.visible.
272 272 order("#{Query.table_name}.name ASC").
273 273 # Project specific queries and global queries
274 274 where(@project.nil? ? ["project_id IS NULL"] : ["project_id IS NULL OR project_id = ?", @project.id]).
275 275 to_a
276 276 end
277 277 @sidebar_queries
278 278 end
279 279
280 280 def query_links(title, queries)
281 281 return '' if queries.empty?
282 282 # links to #index on issues/show
283 283 url_params = controller_name == 'issues' ? {:controller => 'issues', :action => 'index', :project_id => @project} : params
284 284
285 285 content_tag('h3', title) + "\n" +
286 286 content_tag('ul',
287 287 queries.collect {|query|
288 288 css = 'query'
289 289 css << ' selected' if query == @query
290 290 content_tag('li', link_to(query.name, url_params.merge(:query_id => query), :class => css))
291 291 }.join("\n").html_safe,
292 292 :class => 'queries'
293 293 ) + "\n"
294 294 end
295 295
296 296 def render_sidebar_queries
297 297 out = ''.html_safe
298 298 out << query_links(l(:label_my_queries), sidebar_queries.select(&:is_private?))
299 299 out << query_links(l(:label_query_plural), sidebar_queries.reject(&:is_private?))
300 300 out
301 301 end
302 302
303 303 def email_issue_attributes(issue, user)
304 304 items = []
305 305 %w(author status priority assigned_to category fixed_version).each do |attribute|
306 306 unless issue.disabled_core_fields.include?(attribute+"_id")
307 307 items << "#{l("field_#{attribute}")}: #{issue.send attribute}"
308 308 end
309 309 end
310 310 issue.visible_custom_field_values(user).each do |value|
311 311 items << "#{value.custom_field.name}: #{show_value(value, false)}"
312 312 end
313 313 items
314 314 end
315 315
316 316 def render_email_issue_attributes(issue, user, html=false)
317 317 items = email_issue_attributes(issue, user)
318 318 if html
319 319 content_tag('ul', items.map{|s| content_tag('li', s)}.join("\n").html_safe)
320 320 else
321 321 items.map{|s| "* #{s}"}.join("\n")
322 322 end
323 323 end
324 324
325 325 # Returns the textual representation of a journal details
326 326 # as an array of strings
327 327 def details_to_strings(details, no_html=false, options={})
328 328 options[:only_path] = (options[:only_path] == false ? false : true)
329 329 strings = []
330 330 values_by_field = {}
331 331 details.each do |detail|
332 332 if detail.property == 'cf'
333 333 field = detail.custom_field
334 334 if field && field.multiple?
335 335 values_by_field[field] ||= {:added => [], :deleted => []}
336 336 if detail.old_value
337 337 values_by_field[field][:deleted] << detail.old_value
338 338 end
339 339 if detail.value
340 340 values_by_field[field][:added] << detail.value
341 341 end
342 342 next
343 343 end
344 344 end
345 345 strings << show_detail(detail, no_html, options)
346 346 end
347 347 if values_by_field.present?
348 348 multiple_values_detail = Struct.new(:property, :prop_key, :custom_field, :old_value, :value)
349 349 values_by_field.each do |field, changes|
350 350 if changes[:added].any?
351 351 detail = multiple_values_detail.new('cf', field.id.to_s, field)
352 352 detail.value = changes[:added]
353 353 strings << show_detail(detail, no_html, options)
354 354 end
355 355 if changes[:deleted].any?
356 356 detail = multiple_values_detail.new('cf', field.id.to_s, field)
357 357 detail.old_value = changes[:deleted]
358 358 strings << show_detail(detail, no_html, options)
359 359 end
360 360 end
361 361 end
362 362 strings
363 363 end
364 364
365 365 # Returns the textual representation of a single journal detail
366 366 def show_detail(detail, no_html=false, options={})
367 367 multiple = false
368 368 show_diff = false
369 369
370 370 case detail.property
371 371 when 'attr'
372 372 field = detail.prop_key.to_s.gsub(/\_id$/, "")
373 373 label = l(("field_" + field).to_sym)
374 374 case detail.prop_key
375 375 when 'due_date', 'start_date'
376 376 value = format_date(detail.value.to_date) if detail.value
377 377 old_value = format_date(detail.old_value.to_date) if detail.old_value
378 378
379 379 when 'project_id', 'status_id', 'tracker_id', 'assigned_to_id',
380 380 'priority_id', 'category_id', 'fixed_version_id'
381 381 value = find_name_by_reflection(field, detail.value)
382 382 old_value = find_name_by_reflection(field, detail.old_value)
383 383
384 384 when 'estimated_hours'
385 385 value = "%0.02f" % detail.value.to_f unless detail.value.blank?
386 386 old_value = "%0.02f" % detail.old_value.to_f unless detail.old_value.blank?
387 387
388 388 when 'parent_id'
389 389 label = l(:field_parent_issue)
390 390 value = "##{detail.value}" unless detail.value.blank?
391 391 old_value = "##{detail.old_value}" unless detail.old_value.blank?
392 392
393 393 when 'is_private'
394 394 value = l(detail.value == "0" ? :general_text_No : :general_text_Yes) unless detail.value.blank?
395 395 old_value = l(detail.old_value == "0" ? :general_text_No : :general_text_Yes) unless detail.old_value.blank?
396 396
397 397 when 'description'
398 398 show_diff = true
399 399 end
400 400 when 'cf'
401 401 custom_field = detail.custom_field
402 402 if custom_field
403 403 label = custom_field.name
404 404 if custom_field.format.class.change_as_diff
405 405 show_diff = true
406 406 else
407 407 multiple = custom_field.multiple?
408 408 value = format_value(detail.value, custom_field) if detail.value
409 409 old_value = format_value(detail.old_value, custom_field) if detail.old_value
410 410 end
411 411 end
412 412 when 'attachment'
413 413 label = l(:label_attachment)
414 414 when 'relation'
415 415 if detail.value && !detail.old_value
416 416 rel_issue = Issue.visible.find_by_id(detail.value)
417 417 value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.value}" :
418 418 (no_html ? rel_issue : link_to_issue(rel_issue, :only_path => options[:only_path]))
419 419 elsif detail.old_value && !detail.value
420 420 rel_issue = Issue.visible.find_by_id(detail.old_value)
421 421 old_value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.old_value}" :
422 422 (no_html ? rel_issue : link_to_issue(rel_issue, :only_path => options[:only_path]))
423 423 end
424 424 relation_type = IssueRelation::TYPES[detail.prop_key]
425 425 label = l(relation_type[:name]) if relation_type
426 426 end
427 427 call_hook(:helper_issues_show_detail_after_setting,
428 428 {:detail => detail, :label => label, :value => value, :old_value => old_value })
429 429
430 430 label ||= detail.prop_key
431 431 value ||= detail.value
432 432 old_value ||= detail.old_value
433 433
434 434 unless no_html
435 435 label = content_tag('strong', label)
436 436 old_value = content_tag("i", h(old_value)) if detail.old_value
437 437 if detail.old_value && detail.value.blank? && detail.property != 'relation'
438 438 old_value = content_tag("del", old_value)
439 439 end
440 440 if detail.property == 'attachment' && value.present? &&
441 441 atta = detail.journal.journalized.attachments.detect {|a| a.id == detail.prop_key.to_i}
442 442 # Link to the attachment if it has not been removed
443 443 value = link_to_attachment(atta, :download => true, :only_path => options[:only_path])
444 444 if options[:only_path] != false && atta.is_text?
445 445 value += link_to(
446 446 image_tag('magnifier.png'),
447 447 :controller => 'attachments', :action => 'show',
448 448 :id => atta, :filename => atta.filename
449 449 )
450 450 end
451 451 else
452 452 value = content_tag("i", h(value)) if value
453 453 end
454 454 end
455 455
456 456 if show_diff
457 457 s = l(:text_journal_changed_no_detail, :label => label)
458 458 unless no_html
459 459 diff_link = link_to 'diff',
460 460 {:controller => 'journals', :action => 'diff', :id => detail.journal_id,
461 461 :detail_id => detail.id, :only_path => options[:only_path]},
462 462 :title => l(:label_view_diff)
463 463 s << " (#{ diff_link })"
464 464 end
465 465 s.html_safe
466 466 elsif detail.value.present?
467 467 case detail.property
468 468 when 'attr', 'cf'
469 469 if detail.old_value.present?
470 470 l(:text_journal_changed, :label => label, :old => old_value, :new => value).html_safe
471 471 elsif multiple
472 472 l(:text_journal_added, :label => label, :value => value).html_safe
473 473 else
474 474 l(:text_journal_set_to, :label => label, :value => value).html_safe
475 475 end
476 476 when 'attachment', 'relation'
477 477 l(:text_journal_added, :label => label, :value => value).html_safe
478 478 end
479 479 else
480 480 l(:text_journal_deleted, :label => label, :old => old_value).html_safe
481 481 end
482 482 end
483 483
484 484 # Find the name of an associated record stored in the field attribute
485 485 def find_name_by_reflection(field, id)
486 486 unless id.present?
487 487 return nil
488 488 end
489 489 @detail_value_name_by_reflection ||= Hash.new do |hash, key|
490 490 association = Issue.reflect_on_association(key.first.to_sym)
491 491 name = nil
492 492 if association
493 493 record = association.klass.find_by_id(key.last)
494 494 if record
495 495 name = record.name.force_encoding('UTF-8')
496 496 end
497 497 end
498 498 hash[key] = name
499 499 end
500 500 @detail_value_name_by_reflection[[field, id]]
501 501 end
502 502
503 503 # Renders issue children recursively
504 504 def render_api_issue_children(issue, api)
505 505 return if issue.leaf?
506 506 api.array :children do
507 507 issue.children.each do |child|
508 508 api.issue(:id => child.id) do
509 509 api.tracker(:id => child.tracker_id, :name => child.tracker.name) unless child.tracker.nil?
510 510 api.subject child.subject
511 511 render_api_issue_children(child, api)
512 512 end
513 513 end
514 514 end
515 515 end
516 516 end
@@ -1,162 +1,162
1 1 <%= render :partial => 'action_menu' %>
2 2
3 3 <h2><%= issue_heading(@issue) %></h2>
4 4
5 5 <div class="<%= @issue.css_classes %> details">
6 6 <% if @prev_issue_id || @next_issue_id %>
7 7 <div class="next-prev-links contextual">
8 8 <%= link_to_if @prev_issue_id,
9 9 "\xc2\xab #{l(:label_previous)}",
10 10 (@prev_issue_id ? issue_path(@prev_issue_id) : nil),
11 11 :title => "##{@prev_issue_id}",
12 12 :accesskey => accesskey(:previous) %> |
13 13 <% if @issue_position && @issue_count %>
14 14 <span class="position"><%= l(:label_item_position, :position => @issue_position, :count => @issue_count) %></span> |
15 15 <% end %>
16 16 <%= link_to_if @next_issue_id,
17 17 "#{l(:label_next)} \xc2\xbb",
18 18 (@next_issue_id ? issue_path(@next_issue_id) : nil),
19 19 :title => "##{@next_issue_id}",
20 20 :accesskey => accesskey(:next) %>
21 21 </div>
22 22 <% end %>
23 23
24 24 <%= avatar(@issue.author, :size => "50") %>
25 25
26 26 <div class="subject">
27 27 <%= render_issue_subject_with_tree(@issue) %>
28 28 </div>
29 29 <p class="author">
30 30 <%= authoring @issue.created_on, @issue.author %>.
31 31 <% if @issue.created_on != @issue.updated_on %>
32 32 <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
33 33 <% end %>
34 34 </p>
35 35
36 <table class="attributes">
36 <div class="attributes">
37 37 <%= issue_fields_rows do |rows|
38 38 rows.left l(:field_status), @issue.status.name, :class => 'status'
39 39 rows.left l(:field_priority), @issue.priority.name, :class => 'priority'
40 40
41 41 unless @issue.disabled_core_fields.include?('assigned_to_id')
42 42 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'
43 43 end
44 44 unless @issue.disabled_core_fields.include?('category_id') || (@issue.category.nil? && @issue.project.issue_categories.none?)
45 45 rows.left l(:field_category), (@issue.category ? @issue.category.name : "-"), :class => 'category'
46 46 end
47 47 unless @issue.disabled_core_fields.include?('fixed_version_id') || (@issue.fixed_version.nil? && @issue.assignable_versions.none?)
48 48 rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
49 49 end
50 50
51 51 unless @issue.disabled_core_fields.include?('start_date')
52 52 rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
53 53 end
54 54 unless @issue.disabled_core_fields.include?('due_date')
55 55 rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date'
56 56 end
57 57 unless @issue.disabled_core_fields.include?('done_ratio')
58 58 rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress'
59 59 end
60 60 unless @issue.disabled_core_fields.include?('estimated_hours')
61 61 if @issue.estimated_hours.present? || @issue.total_estimated_hours.to_f > 0
62 62 rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours'
63 63 end
64 64 end
65 65 if User.current.allowed_to_view_all_time_entries?(@project)
66 66 if @issue.total_spent_hours > 0
67 67 rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time'
68 68 end
69 69 end
70 70 end %>
71 71 <%= render_custom_fields_rows(@issue) %>
72 72 <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
73 </table>
73 </div>
74 74
75 75 <% if @issue.description? || @issue.attachments.any? -%>
76 76 <hr />
77 77 <% if @issue.description? %>
78 78 <div class="description">
79 79 <div class="contextual">
80 80 <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
81 81 </div>
82 82
83 83 <p><strong><%=l(:field_description)%></strong></p>
84 84 <div class="wiki">
85 85 <%= textilizable @issue, :description, :attachments => @issue.attachments %>
86 86 </div>
87 87 </div>
88 88 <% end %>
89 89 <%= link_to_attachments @issue, :thumbnails => true %>
90 90 <% end -%>
91 91
92 92 <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
93 93
94 94 <% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
95 95 <hr />
96 96 <div id="issue_tree">
97 97 <div class="contextual">
98 98 <%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
99 99 </div>
100 100 <p><strong><%=l(:label_subtask_plural)%></strong></p>
101 101 <%= render_descendants_tree(@issue) unless @issue.leaf? %>
102 102 </div>
103 103 <% end %>
104 104
105 105 <% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
106 106 <hr />
107 107 <div id="relations">
108 108 <%= render :partial => 'relations' %>
109 109 </div>
110 110 <% end %>
111 111
112 112 </div>
113 113
114 114 <% if @changesets.present? %>
115 115 <div id="issue-changesets">
116 116 <h3><%=l(:label_associated_revisions)%></h3>
117 117 <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
118 118 </div>
119 119 <% end %>
120 120
121 121 <% if @journals.present? %>
122 122 <div id="history">
123 123 <h3><%=l(:label_history)%></h3>
124 124 <%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
125 125 </div>
126 126 <% end %>
127 127
128 128
129 129 <div style="clear: both;"></div>
130 130 <%= render :partial => 'action_menu' %>
131 131
132 132 <div style="clear: both;"></div>
133 133 <% if @issue.editable? %>
134 134 <div id="update" style="display:none;">
135 135 <h3><%= l(:button_edit) %></h3>
136 136 <%= render :partial => 'edit' %>
137 137 </div>
138 138 <% end %>
139 139
140 140 <% other_formats_links do |f| %>
141 141 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
142 142 <%= f.link_to 'PDF' %>
143 143 <% end %>
144 144
145 145 <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
146 146
147 147 <% content_for :sidebar do %>
148 148 <%= render :partial => 'issues/sidebar' %>
149 149
150 150 <% if User.current.allowed_to?(:add_issue_watchers, @project) ||
151 151 (@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
152 152 <div id="watchers">
153 153 <%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
154 154 </div>
155 155 <% end %>
156 156 <% end %>
157 157
158 158 <% content_for :header_tags do %>
159 159 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
160 160 <% end %>
161 161
162 162 <%= context_menu issues_context_menu_path %>
@@ -1,1265 +1,1262
1 1 html {overflow-y:scroll;}
2 2 body { font-family: Verdana, sans-serif; font-size: 12px; color:#333; margin: 0; padding: 0; min-width: 900px; }
3 3
4 4 h1, h2, h3, h4 {font-family: "Trebuchet MS", Verdana, sans-serif;padding: 2px 10px 1px 0px;margin: 0 0 10px 0;}
5 5 #content h1, h2, h3, h4 {color: #555;}
6 6 h2, .wiki h1 {font-size: 20px;}
7 7 h3, .wiki h2 {font-size: 16px;}
8 8 h4, .wiki h3 {font-size: 13px;}
9 9 h4 {border-bottom: 1px dotted #bbb;}
10 10 pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;}
11 11
12 12 /***** Layout *****/
13 13 #wrapper {background: white;}
14 14
15 15 #top-menu {background: #3E5B76; color: #fff; height:1.8em; font-size: 0.8em; padding: 2px 2px 0px 6px;}
16 16 #top-menu ul {margin: 0; padding: 0;}
17 17 #top-menu li {
18 18 float:left;
19 19 list-style-type:none;
20 20 margin: 0px 0px 0px 0px;
21 21 padding: 0px 0px 0px 0px;
22 22 white-space:nowrap;
23 23 }
24 24 #top-menu a {color: #fff; margin-right: 8px; font-weight: bold;}
25 25 #top-menu #loggedas { float: right; margin-right: 0.5em; color: #fff; }
26 26
27 27 #account {float:right;}
28 28
29 29 #header {min-height:5.3em;margin:0;background-color:#628DB6;color:#f8f8f8; padding: 4px 8px 20px 6px; position:relative;}
30 30 #header a {color:#f8f8f8;}
31 31 #header h1 a.ancestor { font-size: 80%; }
32 32 #quick-search {float:right;}
33 33
34 34 #main-menu {position: absolute; bottom: 0px; left:6px; margin-right: -500px;}
35 35 #main-menu ul {margin: 0; padding: 0;}
36 36 #main-menu li {
37 37 float:left;
38 38 list-style-type:none;
39 39 margin: 0px 2px 0px 0px;
40 40 padding: 0px 0px 0px 0px;
41 41 white-space:nowrap;
42 42 }
43 43 #main-menu li a {
44 44 display: block;
45 45 color: #fff;
46 46 text-decoration: none;
47 47 font-weight: bold;
48 48 margin: 0;
49 49 padding: 4px 10px 4px 10px;
50 50 }
51 51 #main-menu li a:hover {background:#759FCF; color:#fff;}
52 52 #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;}
53 53
54 54 #admin-menu ul {margin: 0; padding: 0;}
55 55 #admin-menu li {margin: 0; padding: 0 0 6px 0; list-style-type:none;}
56 56
57 57 #admin-menu a { background-position: 0% 40%; background-repeat: no-repeat; padding-left: 20px; padding-top: 2px; padding-bottom: 3px;}
58 58 #admin-menu a.projects { background-image: url(../images/projects.png); }
59 59 #admin-menu a.users { background-image: url(../images/user.png); }
60 60 #admin-menu a.groups { background-image: url(../images/group.png); }
61 61 #admin-menu a.roles { background-image: url(../images/database_key.png); }
62 62 #admin-menu a.trackers { background-image: url(../images/ticket.png); }
63 63 #admin-menu a.issue_statuses { background-image: url(../images/ticket_edit.png); }
64 64 #admin-menu a.workflows { background-image: url(../images/ticket_go.png); }
65 65 #admin-menu a.custom_fields { background-image: url(../images/textfield.png); }
66 66 #admin-menu a.enumerations { background-image: url(../images/text_list_bullets.png); }
67 67 #admin-menu a.settings { background-image: url(../images/changeset.png); }
68 68 #admin-menu a.plugins { background-image: url(../images/plugin.png); }
69 69 #admin-menu a.info { background-image: url(../images/help.png); }
70 70 #admin-menu a.server_authentication { background-image: url(../images/server_key.png); }
71 71
72 72 #main {background-color:#EEEEEE;}
73 73
74 74 #sidebar{ float: right; width: 22%; position: relative; z-index: 9; padding: 0; margin: 0;}
75 75 * html #sidebar{ width: 22%; }
76 76 #sidebar h3{ font-size: 14px; margin-top:14px; color: #666; }
77 77 #sidebar hr{ width: 100%; margin: 0 auto; height: 1px; background: #ccc; border: 0; }
78 78 * html #sidebar hr{ width: 95%; position: relative; left: -6px; color: #ccc; }
79 79 #sidebar .contextual { margin-right: 1em; }
80 80 #sidebar ul, ul.flat {margin: 0; padding: 0;}
81 81 #sidebar ul li, ul.flat li {list-style-type:none;margin: 0px 2px 0px 0px; padding: 0px 0px 0px 0px;}
82 82
83 83 #content { width: 75%; background-color: #fff; margin: 0px; border-right: 1px solid #ddd; padding: 6px 10px 10px 10px; z-index: 10; }
84 84 * html #content{ width: 75%; padding-left: 0; margin-top: 0px; padding: 6px 10px 10px 10px;}
85 85 html>body #content { min-height: 600px; }
86 86 * html body #content { height: 600px; } /* IE */
87 87
88 88 #main.nosidebar #sidebar{ display: none; }
89 89 #main.nosidebar #content{ width: auto; border-right: 0; }
90 90
91 91 #footer {clear: both; border-top: 1px solid #bbb; font-size: 0.9em; color: #aaa; padding: 5px; text-align:center; background:#fff;}
92 92
93 93 #login-form table {margin-top:5em; padding:1em; margin-left: auto; margin-right: auto; border: 2px solid #FDBF3B; background-color:#FFEBC1; }
94 94 #login-form table td {padding: 6px;}
95 95 #login-form label {font-weight: bold;}
96 96 #login-form input#username, #login-form input#password { width: 300px; }
97 97
98 98 div.modal { border-radius:5px; background:#fff; z-index:50; padding:4px;}
99 99 div.modal h3.title {display:none;}
100 100 div.modal p.buttons {text-align:right; margin-bottom:0;}
101 101 div.modal .box p {margin: 0.3em 0;}
102 102
103 103 input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; }
104 104
105 105 .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }
106 106
107 107 /***** Links *****/
108 108 a, a:link, a:visited{ color: #169; text-decoration: none; }
109 109 a:hover, a:active{ color: #c61a1a; text-decoration: underline;}
110 110 a img{ border: 0; }
111 111
112 112 a.issue.closed, a.issue.closed:link, a.issue.closed:visited { color: #999; text-decoration: line-through; }
113 113 a.project.closed, a.project.closed:link, a.project.closed:visited { color: #999; }
114 114 a.user.locked, a.user.locked:link, a.user.locked:visited {color: #999;}
115 115
116 116 #sidebar a.selected {line-height:1.7em; padding:1px 3px 2px 2px; margin-left:-2px; background-color:#9DB9D5; color:#fff; border-radius:2px;}
117 117 #sidebar a.selected:hover {text-decoration:none;}
118 118 #admin-menu a {line-height:1.7em;}
119 119 #admin-menu a.selected {padding-left: 20px !important; background-position: 2px 40%;}
120 120
121 121 a.collapsible {padding-left: 12px; background: url(../images/arrow_expanded.png) no-repeat -3px 40%;}
122 122 a.collapsible.collapsed {background: url(../images/arrow_collapsed.png) no-repeat -5px 40%;}
123 123
124 124 a#toggle-completed-versions {color:#999;}
125 125 /***** Tables *****/
126 126 table.list { border: 1px solid #e4e4e4; border-collapse: collapse; width: 100%; margin-bottom: 4px; }
127 127 table.list th { background-color:#EEEEEE; padding: 4px; white-space:nowrap; }
128 128 table.list td {text-align:center; vertical-align:top; padding-right:10px;}
129 129 table.list td.id { width: 2%; text-align: center;}
130 130 table.list td.name, table.list td.description, table.list td.subject, table.list td.comments, table.list td.roles {text-align: left;}
131 131 table.list td.tick {width:15%}
132 132 table.list td.checkbox { width: 15px; padding: 2px 0 0 0; }
133 133 table.list td.checkbox input {padding:0px;}
134 134 table.list td.buttons { width: 15%; white-space:nowrap; text-align: right; }
135 135 table.list td.buttons a { padding-right: 0.6em; }
136 136 table.list td.buttons img {vertical-align:middle;}
137 137 table.list td.reorder {width:15%; white-space:nowrap; text-align:center; }
138 138 table.list caption { text-align: left; padding: 0.5em 0.5em 0.5em 0; }
139 139
140 140 tr.project td.name a { white-space:nowrap; }
141 141 tr.project.closed, tr.project.archived { color: #aaa; }
142 142 tr.project.closed a, tr.project.archived a { color: #aaa; }
143 143
144 144 tr.project.idnt td.name span {background: url(../images/bullet_arrow_right.png) no-repeat 0 50%; padding-left: 16px;}
145 145 tr.project.idnt-1 td.name {padding-left: 0.5em;}
146 146 tr.project.idnt-2 td.name {padding-left: 2em;}
147 147 tr.project.idnt-3 td.name {padding-left: 3.5em;}
148 148 tr.project.idnt-4 td.name {padding-left: 5em;}
149 149 tr.project.idnt-5 td.name {padding-left: 6.5em;}
150 150 tr.project.idnt-6 td.name {padding-left: 8em;}
151 151 tr.project.idnt-7 td.name {padding-left: 9.5em;}
152 152 tr.project.idnt-8 td.name {padding-left: 11em;}
153 153 tr.project.idnt-9 td.name {padding-left: 12.5em;}
154 154
155 155 tr.issue { text-align: center; white-space: nowrap; }
156 156 tr.issue td.subject, tr.issue td.category, td.assigned_to, tr.issue td.string, tr.issue td.text, tr.issue td.relations, tr.issue td.parent { white-space: normal; }
157 157 tr.issue td.relations { text-align: left; }
158 158 tr.issue td.done_ratio table.progress { margin-left:auto; margin-right: auto;}
159 159 tr.issue td.relations span {white-space: nowrap;}
160 160 table.issues td.description {color:#777; font-size:90%; padding:4px 4px 4px 24px; text-align:left; white-space:normal;}
161 161 table.issues td.description pre {white-space:normal;}
162 162
163 163 tr.issue.idnt td.subject a {background: url(../images/bullet_arrow_right.png) no-repeat 0 50%; padding-left: 16px;}
164 164 tr.issue.idnt-1 td.subject {padding-left: 0.5em;}
165 165 tr.issue.idnt-2 td.subject {padding-left: 2em;}
166 166 tr.issue.idnt-3 td.subject {padding-left: 3.5em;}
167 167 tr.issue.idnt-4 td.subject {padding-left: 5em;}
168 168 tr.issue.idnt-5 td.subject {padding-left: 6.5em;}
169 169 tr.issue.idnt-6 td.subject {padding-left: 8em;}
170 170 tr.issue.idnt-7 td.subject {padding-left: 9.5em;}
171 171 tr.issue.idnt-8 td.subject {padding-left: 11em;}
172 172 tr.issue.idnt-9 td.subject {padding-left: 12.5em;}
173 173
174 174 table.issue-report {table-layout:fixed;}
175 175
176 176 tr.entry { border: 1px solid #f8f8f8; }
177 177 tr.entry td { white-space: nowrap; }
178 178 tr.entry td.filename {width:30%; text-align:left;}
179 179 tr.entry td.filename_no_report {width:70%; text-align:left;}
180 180 tr.entry td.size { text-align: right; font-size: 90%; }
181 181 tr.entry td.revision, tr.entry td.author { text-align: center; }
182 182 tr.entry td.age { text-align: right; }
183 183 tr.entry.file td.filename a { margin-left: 16px; }
184 184 tr.entry.file td.filename_no_report a { margin-left: 16px; }
185 185
186 186 tr span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}
187 187 tr.open span.expander {background-image: url(../images/bullet_toggle_minus.png);}
188 188
189 189 tr.changeset { height: 20px }
190 190 tr.changeset ul, ol { margin-top: 0px; margin-bottom: 0px; }
191 191 tr.changeset td.revision_graph { width: 15%; background-color: #fffffb; }
192 192 tr.changeset td.author { text-align: center; width: 15%; white-space:nowrap;}
193 193 tr.changeset td.committed_on { text-align: center; width: 15%; white-space:nowrap;}
194 194
195 195 table.files tbody th {text-align:left;}
196 196 table.files tr.file td.filename { text-align: left; padding-left: 24px; }
197 197 table.files tr.file td.digest { font-size: 80%; }
198 198
199 199 table.members td.roles, table.memberships td.roles { width: 45%; }
200 200
201 201 tr.message { height: 2.6em; }
202 202 tr.message td.subject { padding-left: 20px; }
203 203 tr.message td.created_on { white-space: nowrap; }
204 204 tr.message td.last_message { font-size: 80%; white-space: nowrap; }
205 205 tr.message.locked td.subject { background: url(../images/locked.png) no-repeat 0 1px; }
206 206 tr.message.sticky td.subject { background: url(../images/bullet_go.png) no-repeat 0 1px; font-weight: bold; }
207 207
208 208 tr.version.closed, tr.version.closed a { color: #999; }
209 209 tr.version td.name { padding-left: 20px; }
210 210 tr.version.shared td.name { background: url(../images/link.png) no-repeat 0% 70%; }
211 211 tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; white-space:nowrap; }
212 212
213 213 tr.user td {width:13%;white-space: nowrap;}
214 214 td.username, td.firstname, td.lastname, td.email {text-align:left !important;}
215 215 tr.user td.email { width:18%; }
216 216 tr.user.locked, tr.user.registered { color: #aaa; }
217 217 tr.user.locked a, tr.user.registered a { color: #aaa; }
218 218
219 219 table.permissions td.role {color:#999;font-size:90%;font-weight:normal !important;text-align:center;vertical-align:bottom;}
220 220
221 221 tr.wiki-page-version td.updated_on, tr.wiki-page-version td.author {text-align:center;}
222 222
223 223 tr.time-entry { text-align: center; white-space: nowrap; }
224 224 tr.time-entry td.issue, tr.time-entry td.comments, tr.time-entry td.subject, tr.time-entry td.activity { text-align: left; white-space: normal; }
225 225 td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; }
226 226 td.hours .hours-dec { font-size: 0.9em; }
227 227
228 228 table.plugins td { vertical-align: middle; }
229 229 table.plugins td.configure { text-align: right; padding-right: 1em; }
230 230 table.plugins span.name { font-weight: bold; display: block; margin-bottom: 6px; }
231 231 table.plugins span.description { display: block; font-size: 0.9em; }
232 232 table.plugins span.url { display: block; font-size: 0.9em; }
233 233
234 234 tr.group td { padding: 0.8em 0 0.5em 0.3em; border-bottom: 1px solid #ccc; text-align:left; }
235 235 tr.group span.name {font-weight:bold;}
236 236 tr.group span.count {font-weight:bold; position:relative; top:-1px; color:#fff; font-size:10px; background:#9DB9D5; padding:0px 6px 1px 6px; border-radius:3px; margin-left:4px;}
237 237 tr.group span.totals {color: #aaa; font-size: 80%;}
238 238 tr.group span.totals .value {font-weight:bold; color:#777;}
239 239 tr.group a.toggle-all { color: #aaa; font-size: 80%; display:none; float:right; margin-right:4px;}
240 240 tr.group:hover a.toggle-all { display:inline;}
241 241 a.toggle-all:hover {text-decoration:none;}
242 242
243 243 table.list tbody tr:hover { background-color:#ffffdd; }
244 244 table.list tbody tr.group:hover { background-color:inherit; }
245 245 table td {padding:2px;}
246 246 table p {margin:0;}
247 247 .odd {background-color:#f6f7f8;}
248 248 .even {background-color: #fff;}
249 249
250 250 tr.builtin td.name {font-style:italic;}
251 251
252 252 a.sort { padding-right: 16px; background-position: 100% 50%; background-repeat: no-repeat; }
253 253 a.sort.asc { background-image: url(../images/sort_asc.png); }
254 254 a.sort.desc { background-image: url(../images/sort_desc.png); }
255 255
256 table.attributes { width: 100% }
257 table.attributes th { vertical-align: top; text-align: left; }
258 table.attributes td { vertical-align: top; }
259
260 256 table.boards a.board, h3.comments { background: url(../images/comment.png) no-repeat 0% 50%; padding-left: 20px; }
261 257 table.boards td.last-message {text-align:left;font-size:80%;}
262 258
263 259 table.messages td.last_message {text-align:left;}
264 260
265 261 #query_form_content {font-size:90%;}
266 262
267 263 .query_sort_criteria_count {
268 264 display: inline-block;
269 265 min-width: 1em;
270 266 }
271 267
272 268 table.query-columns {
273 269 border-collapse: collapse;
274 270 border: 0;
275 271 }
276 272
277 273 table.query-columns td.buttons {
278 274 vertical-align: middle;
279 275 text-align: center;
280 276 }
281 277 table.query-columns td.buttons input[type=button] {width:35px;}
282 278 .query-totals {text-align:right; margin-top:-2.3em;}
283 279 .query-totals>span {margin-left:0.6em;}
284 280 .query-totals .value {font-weight:bold;}
285 281
286 282 td.center {text-align:center;}
287 283
288 284 h3.version { background: url(../images/package.png) no-repeat 0% 50%; padding-left: 20px; }
289 285
290 286 div.issues h3 { background: url(../images/ticket.png) no-repeat 0% 50%; padding-left: 20px; }
291 287 div.members h3 { background: url(../images/group.png) no-repeat 0% 50%; padding-left: 20px; }
292 288 div.news h3 { background: url(../images/news.png) no-repeat 0% 50%; padding-left: 20px; }
293 289 div.projects h3 { background: url(../images/projects.png) no-repeat 0% 50%; padding-left: 20px; }
294 290
295 291 #watchers select {width: 95%; display: block;}
296 292 #watchers a.delete {opacity: 0.4; vertical-align: middle;}
297 293 #watchers a.delete:hover {opacity: 1;}
298 294 #watchers img.gravatar {margin: 0 4px 2px 0;}
299 295
300 296 span#watchers_inputs {overflow:auto; display:block;}
301 297 span.search_for_watchers {display:block;}
302 298 span.search_for_watchers, span.add_attachment {font-size:80%; line-height:2.5em;}
303 299 span.search_for_watchers a, span.add_attachment a {padding-left:16px; background: url(../images/bullet_add.png) no-repeat 0 50%; }
304 300
305 301
306 302 .highlight { background-color: #FCFD8D;}
307 303 .highlight.token-1 { background-color: #faa;}
308 304 .highlight.token-2 { background-color: #afa;}
309 305 .highlight.token-3 { background-color: #aaf;}
310 306
311 307 .box{
312 308 padding:6px;
313 309 margin-bottom: 10px;
314 310 background-color:#f6f6f6;
315 311 color:#505050;
316 312 line-height:1.5em;
317 313 border: 1px solid #e4e4e4;
318 314 word-wrap: break-word;
319 315 border-radius: 3px;
320 316 }
321 317
322 318 div.square {
323 319 border: 1px solid #999;
324 320 float: left;
325 321 margin: .3em .4em 0 .4em;
326 322 overflow: hidden;
327 323 width: .6em; height: .6em;
328 324 }
329 325 .contextual {float:right; white-space: nowrap; line-height:1.4em;margin-top:5px; padding-left: 10px; font-size:0.9em;}
330 326 .contextual input, .contextual select {font-size:0.9em;}
331 327 .message .contextual { margin-top: 0; }
332 328
333 329 .splitcontent {overflow:auto;}
334 330 .splitcontentleft{float:left; width:49%;}
335 331 .splitcontentright{float:right; width:49%;}
336 332 form {display: inline;}
337 333 input, select {vertical-align: middle; margin-top: 1px; margin-bottom: 1px;}
338 334 fieldset {border: 1px solid #e4e4e4; margin:0;}
339 335 legend {color: #333;}
340 336 hr { width: 100%; height: 1px; background: #ccc; border: 0;}
341 337 blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 2.4em;}
342 338 blockquote blockquote { margin-left: 0;}
343 339 abbr, span.field-description[title] { border-bottom: 1px dotted #aaa; cursor: help; }
344 340 textarea.wiki-edit {width:99%; resize:vertical;}
345 341 li p {margin-top: 0;}
346 342 div.issue {background:#ffffdd; padding:6px; margin-bottom:6px; border: 1px solid #d7d7d7; border-radius:3px;}
347 343 p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;}
348 344 p.subtitle { font-size: 0.9em; margin: -6px 0 12px 0; font-style: italic; }
349 345 p.footnote { font-size: 0.9em; margin-top: 0px; margin-bottom: 0px; }
350 346 .ltr {direction:ltr !important; unicode-bidi:bidi-override;}
351 347 .rtl {direction:rtl !important; unicode-bidi:bidi-override;}
352 348
353 349 div.issue div.subject div div { padding-left: 16px; }
354 350 div.issue div.subject p {margin: 0; margin-bottom: 0.1em; font-size: 90%; color: #999;}
355 351 div.issue div.subject>div>p { margin-top: 0.5em; }
356 352 div.issue div.subject h3 {margin: 0; margin-bottom: 0.1em;}
357 353 div.issue span.private, div.journal span.private { position:relative; bottom: 2px; text-transform: uppercase; background: #d22; color: #fff; font-weight:bold; padding: 0px 2px 0px 2px; font-size: 60%; margin-right: 2px; border-radius: 2px;}
358 354 div.issue .next-prev-links {color:#999;}
359 div.issue table.attributes th {width:22%;}
360 div.issue table.attributes td {width:28%;}
361 div.issue.issue.overdue td.due-date { color: #c22; }
355 div.issue .attributes {margin-top: 2em;}
356 div.issue .attribute {padding-left:180px; clear:left; min-height: 1.8em;}
357 div.issue .attribute .label {width: 170px; margin-left:-180px; font-weight:bold; float:left;}
358 div.issue.overdue .due-date .value { color: #c22; }
362 359
363 360 #issue_tree table.issues, #relations table.issues { border: 0; }
364 361 #issue_tree td.checkbox, #relations td.checkbox {display:none;}
365 362 #relations td.buttons {padding:0;}
366 363
367 364 fieldset.collapsible {border-width: 1px 0 0 0;}
368 365 fieldset.collapsible>legend { padding-left: 16px; background: url(../images/arrow_expanded.png) no-repeat 0% 40%; cursor:pointer; }
369 366 fieldset.collapsible.collapsed>legend { background-image: url(../images/arrow_collapsed.png); }
370 367
371 368 fieldset#date-range p { margin: 2px 0 2px 0; }
372 369 fieldset#filters table { border-collapse: collapse; }
373 370 fieldset#filters table td { padding: 0; vertical-align: middle; }
374 371 fieldset#filters tr.filter { height: 2.1em; }
375 372 fieldset#filters td.field { width:230px; }
376 373 fieldset#filters td.operator { width:180px; }
377 374 fieldset#filters td.operator select {max-width:170px;}
378 375 fieldset#filters td.values { white-space:nowrap; }
379 376 fieldset#filters td.values select {min-width:130px;}
380 377 fieldset#filters td.values input {height:1em;}
381 378
382 379 #filters-table {width:60%; float:left;}
383 380 .add-filter {width:35%; float:right; text-align: right; vertical-align: top;}
384 381
385 382 #issue_is_private_wrap {float:right; margin-right:1em;}
386 383 .toggle-multiselect {background: url(../images/bullet_toggle_plus.png) no-repeat 0% 40%; padding-left:8px; margin-left:0; cursor:pointer;}
387 384 .buttons { font-size: 0.9em; margin-bottom: 1.4em; margin-top: 1em; }
388 385
389 386 div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;}
390 387 div#issue-changesets div.changeset { padding: 4px;}
391 388 div#issue-changesets div.changeset { border-bottom: 1px solid #ddd; }
392 389 div#issue-changesets p { margin-top: 0; margin-bottom: 1em;}
393 390
394 391 .journal ul.details img {margin:0 0 -3px 4px;}
395 392 div.journal {overflow:auto;}
396 393 div.journal.private-notes {border-left:2px solid #d22; padding-left:4px; margin-left:-6px;}
397 394 div.journal ul.details {color:#959595; margin-bottom: 1.5em;}
398 395 div.journal ul.details a {color:#70A7CD;}
399 396 div.journal ul.details a:hover {color:#D14848;}
400 397
401 398 div#activity dl, #search-results { margin-left: 2em; }
402 399 div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
403 400 div#activity dt, #search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
404 401 div#activity dt.me .time { border-bottom: 1px solid #999; }
405 402 div#activity dt .time { color: #777; font-size: 80%; }
406 403 div#activity dd .description, #search-results dd .description { font-style: italic; }
407 404 div#activity span.project:after, #search-results span.project:after { content: " -"; }
408 405 div#activity dd span.description, #search-results dd span.description { display:block; color: #808080; }
409 406 div#activity dt.grouped {margin-left:5em;}
410 407 div#activity dd.grouped {margin-left:9em;}
411 408
412 409 #search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; }
413 410
414 411 div#search-results-counts {float:right;}
415 412 div#search-results-counts ul { margin-top: 0.5em; }
416 413 div#search-results-counts li { list-style-type:none; float: left; margin-left: 1em; }
417 414
418 415 dt.issue { background-image: url(../images/ticket.png); }
419 416 dt.issue-edit { background-image: url(../images/ticket_edit.png); }
420 417 dt.issue-closed { background-image: url(../images/ticket_checked.png); }
421 418 dt.issue-note { background-image: url(../images/ticket_note.png); }
422 419 dt.changeset { background-image: url(../images/changeset.png); }
423 420 dt.news { background-image: url(../images/news.png); }
424 421 dt.message { background-image: url(../images/message.png); }
425 422 dt.reply { background-image: url(../images/comments.png); }
426 423 dt.wiki-page { background-image: url(../images/wiki_edit.png); }
427 424 dt.attachment { background-image: url(../images/attachment.png); }
428 425 dt.document { background-image: url(../images/document.png); }
429 426 dt.project { background-image: url(../images/projects.png); }
430 427 dt.time-entry { background-image: url(../images/time.png); }
431 428
432 429 #search-results dt.issue.closed { background-image: url(../images/ticket_checked.png); }
433 430
434 431 div#roadmap .related-issues { margin-bottom: 1em; }
435 432 div#roadmap .related-issues td.checkbox { display: none; }
436 433 div#roadmap .wiki h1:first-child { display: none; }
437 434 div#roadmap .wiki h1 { font-size: 120%; }
438 435 div#roadmap .wiki h2 { font-size: 110%; }
439 436 body.controller-versions.action-show div#roadmap .related-issues {width:70%;}
440 437
441 438 div#version-summary { float:right; width:28%; margin-left: 16px; margin-bottom: 16px; background-color: #fff; }
442 439 div#version-summary fieldset { margin-bottom: 1em; }
443 440 div#version-summary fieldset.time-tracking table { width:100%; }
444 441 div#version-summary th, div#version-summary td.total-hours { text-align: right; }
445 442
446 443 table#time-report td.hours, table#time-report th.period, table#time-report th.total { text-align: right; padding-right: 0.5em; }
447 444 table#time-report tbody tr.subtotal { font-style: italic; color:#777;}
448 445 table#time-report tbody tr.subtotal td.hours { color:#b0b0b0; }
449 446 table#time-report tbody tr.total { font-weight: bold; background-color:#EEEEEE; border-top:1px solid #e4e4e4;}
450 447 table#time-report .hours-dec { font-size: 0.9em; }
451 448
452 449 div.wiki-page .contextual a {opacity: 0.4}
453 450 div.wiki-page .contextual a:hover {opacity: 1}
454 451
455 452 form .attributes select { width: 60%; }
456 453 input#issue_subject, input#document_title { width: 99%; }
457 454 select#issue_done_ratio { width: 95px; }
458 455
459 456 ul.projects {margin:0; padding-left:1em;}
460 457 ul.projects ul {padding-left:1.6em;}
461 458 ul.projects.root {margin:0; padding:0;}
462 459 ul.projects li {list-style-type:none;}
463 460
464 461 #projects-index ul.projects ul.projects { border-left: 3px solid #e0e0e0; padding-left:1em;}
465 462 #projects-index ul.projects li.root {margin-bottom: 1em;}
466 463 #projects-index ul.projects li.child {margin-top: 1em;}
467 464 #projects-index ul.projects div.root a.project { font-family: "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 16px; margin: 0 0 10px 0; }
468 465 .my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; }
469 466
470 467 #notified-projects>ul, #tracker_project_ids>ul, #custom_field_project_ids>ul {max-height:250px; overflow-y:auto;}
471 468
472 469 #related-issues li img {vertical-align:middle;}
473 470
474 471 ul.properties {padding:0; font-size: 0.9em; color: #777;}
475 472 ul.properties li {list-style-type:none;}
476 473 ul.properties li span {font-style:italic;}
477 474
478 475 .total-hours { font-size: 110%; font-weight: bold; }
479 476 .total-hours span.hours-int { font-size: 120%; }
480 477
481 478 .autoscroll {overflow-x: auto; padding:1px; margin-bottom: 1.2em;}
482 479 #user_login, #user_firstname, #user_lastname, #user_mail, #my_account_form select, #user_form select, #user_identity_url { width: 90%; }
483 480
484 481 #workflow_copy_form select { width: 200px; }
485 482 table.transitions td.enabled {background: #bfb;}
486 483 #workflow_form table select {font-size:90%; max-width:100px;}
487 484 table.fields_permissions td.readonly {background:#ddd;}
488 485 table.fields_permissions td.required {background:#d88;}
489 486
490 487 select.expandable {vertical-align:top;}
491 488
492 489 textarea#custom_field_possible_values {width: 95%; resize:vertical}
493 490 textarea#custom_field_default_value {width: 95%; resize:vertical}
494 491 .sort-handle {display:inline-block; vertical-align:middle;}
495 492
496 493 input#content_comments {width: 99%}
497 494
498 495 p.pagination {margin-top:8px; font-size: 90%}
499 496
500 497 #search-form fieldset p {margin:0.2em 0;}
501 498
502 499 /***** Tabular forms ******/
503 500 .tabular p{
504 501 margin: 0;
505 502 padding: 3px 0 3px 0;
506 503 padding-left: 180px; /* width of left column containing the label elements */
507 504 min-height: 1.8em;
508 505 clear:left;
509 506 }
510 507
511 508 html>body .tabular p {overflow:hidden;}
512 509
513 510 .tabular input, .tabular select {max-width:95%}
514 511 .tabular textarea {width:95%; resize:vertical;}
515 512
516 513 .tabular label{
517 514 font-weight: bold;
518 515 float: left;
519 516 text-align: right;
520 517 /* width of left column */
521 518 margin-left: -180px;
522 519 /* width of labels. Should be smaller than left column to create some right margin */
523 520 width: 175px;
524 521 }
525 522
526 523 .tabular label.floating{
527 524 font-weight: normal;
528 525 margin-left: 0px;
529 526 text-align: left;
530 527 width: 270px;
531 528 }
532 529
533 530 .tabular label.block{
534 531 font-weight: normal;
535 532 margin-left: 0px !important;
536 533 text-align: left;
537 534 float: none;
538 535 display: block;
539 536 width: auto !important;
540 537 }
541 538
542 539 .tabular label.inline{
543 540 font-weight: normal;
544 541 float:none;
545 542 margin-left: 5px !important;
546 543 width: auto;
547 544 }
548 545
549 546 label.no-css {
550 547 font-weight: inherit;
551 548 float:none;
552 549 text-align:left;
553 550 margin-left:0px;
554 551 width:auto;
555 552 }
556 553 input#time_entry_comments { width: 90%;}
557 554
558 555 #preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
559 556
560 557 .tabular.settings p{ padding-left: 300px; }
561 558 .tabular.settings label{ margin-left: -300px; width: 295px; }
562 559 .tabular.settings textarea { width: 99%; }
563 560
564 561 .settings.enabled_scm table {width:100%}
565 562 .settings.enabled_scm td.scm_name{ font-weight: bold; }
566 563
567 564 fieldset.settings label { display: block; }
568 565 fieldset#notified_events .parent { padding-left: 20px; }
569 566
570 567 span.required {color: #bb0000;}
571 568 .summary {font-style: italic;}
572 569
573 570 .check_box_group {
574 571 display:block;
575 572 width:95%;
576 573 max-height:300px;
577 574 overflow-y:auto;
578 575 padding:2px 4px 4px 2px;
579 576 background:#fff;
580 577 border:1px solid #9EB1C2;
581 578 border-radius:2px
582 579 }
583 580 .check_box_group label {
584 581 font-weight: normal;
585 582 margin-left: 0px !important;
586 583 text-align: left;
587 584 float: none;
588 585 display: block;
589 586 width: auto;
590 587 }
591 588 .check_box_group.bool_cf {border:0; background:inherit;}
592 589 .check_box_group.bool_cf label {display: inline;}
593 590
594 591 #attachments_fields input.description {margin-left:4px; width:340px;}
595 592 #attachments_fields span {display:block; white-space:nowrap;}
596 593 #attachments_fields input.filename {border:0; height:1.8em; width:250px; color:#555; background-color:inherit; background:url(../images/attachment.png) no-repeat 1px 50%; padding-left:18px;}
597 594 #attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
598 595 #attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;}
599 596 #attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
600 597 a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%; width:1px; display:inline-block; padding-left:16px;}
601 598 a.remove-upload:hover {text-decoration:none !important;}
602 599
603 600 div.fileover { background-color: lavender; }
604 601
605 602 div.attachments { margin-top: 12px; }
606 603 div.attachments p { margin:4px 0 2px 0; }
607 604 div.attachments img { vertical-align: middle; }
608 605 div.attachments span.author { font-size: 0.9em; color: #888; }
609 606
610 607 div.thumbnails {margin-top:0.6em;}
611 608 div.thumbnails div {background:#fff;border:2px solid #ddd;display:inline-block;margin-right:2px;}
612 609 div.thumbnails img {margin: 3px; vertical-align: middle;}
613 610 #history div.thumbnails {margin-left: 2em;}
614 611
615 612 p.other-formats { text-align: right; font-size:0.9em; color: #666; }
616 613 .other-formats span + span:before { content: "| "; }
617 614
618 615 a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px 3px 16px; }
619 616
620 617 em.info {font-style:normal;font-size:90%;color:#888;display:block;}
621 618 em.info.error {padding-left:20px; background:url(../images/exclamation.png) no-repeat 0 50%;}
622 619
623 620 textarea.text_cf {width:95%; resize:vertical;}
624 621 input.string_cf, input.link_cf {width:95%;}
625 622 select.bool_cf {width:auto !important;}
626 623
627 624 #tab-content-modules fieldset p {margin:3px 0 4px 0;}
628 625
629 626 #tab-content-users .splitcontentleft {width: 64%;}
630 627 #tab-content-users .splitcontentright {width: 34%;}
631 628 #tab-content-users fieldset {padding:1em; margin-bottom: 1em;}
632 629 #tab-content-users fieldset legend {font-weight: bold;}
633 630 #tab-content-users fieldset label {display: block;}
634 631 #tab-content-users #principals {max-height: 400px; overflow: auto;}
635 632
636 633 #users_for_watcher {height: 200px; overflow:auto;}
637 634 #users_for_watcher label {display: block;}
638 635
639 636 table.members td.name {padding-left: 20px;}
640 637 table.members td.group, table.members td.groupnonmember, table.members td.groupanonymous {background: url(../images/group.png) no-repeat 0% 1px;}
641 638
642 639 input#principal_search, input#user_search {width:90%}
643 640 .roles-selection label {display:inline-block; width:210px;}
644 641
645 642 input.autocomplete {
646 643 background: #fff url(../images/magnifier.png) no-repeat 2px 50%; padding-left:20px !important;
647 644 border:1px solid #9EB1C2; border-radius:2px; height:1.5em;
648 645 }
649 646 input.autocomplete.ajax-loading {
650 647 background-image: url(../images/loading.gif);
651 648 }
652 649
653 650 .role-visibility {padding-left:2em;}
654 651
655 652 .objects-selection {
656 653 height: 300px;
657 654 overflow: auto;
658 655 }
659 656
660 657 .objects-selection label {
661 658 display: block;
662 659 }
663 660
664 661 .objects-selection>div {
665 662 column-count: auto;
666 663 column-width: 200px;
667 664 -webkit-column-count: auto;
668 665 -webkit-column-width: 200px;
669 666 -webkit-column-gap : 0.5rem;
670 667 -webkit-column-rule: 1px solid #ccc;
671 668 -moz-column-count: auto;
672 669 -moz-column-width: 200px;
673 670 -moz-column-gap : 0.5rem;
674 671 -moz-column-rule: 1px solid #ccc;
675 672 }
676 673
677 674 /***** Flash & error messages ****/
678 675 #errorExplanation, div.flash, .nodata, .warning, .conflict {
679 676 padding: 4px 4px 4px 30px;
680 677 margin-bottom: 12px;
681 678 font-size: 1.1em;
682 679 border: 2px solid;
683 680 border-radius: 3px;
684 681 }
685 682
686 683 div.flash {margin-top: 8px;}
687 684
688 685 div.flash.error, #errorExplanation {
689 686 background: url(../images/exclamation.png) 8px 50% no-repeat;
690 687 background-color: #ffe3e3;
691 688 border-color: #dd0000;
692 689 color: #880000;
693 690 }
694 691
695 692 div.flash.notice {
696 693 background: url(../images/true.png) 8px 5px no-repeat;
697 694 background-color: #dfffdf;
698 695 border-color: #9fcf9f;
699 696 color: #005f00;
700 697 }
701 698
702 699 div.flash.warning, .conflict {
703 700 background: url(../images/warning.png) 8px 5px no-repeat;
704 701 background-color: #FFEBC1;
705 702 border-color: #FDBF3B;
706 703 color: #A6750C;
707 704 text-align: left;
708 705 }
709 706
710 707 .nodata, .warning {
711 708 text-align: center;
712 709 background-color: #FFEBC1;
713 710 border-color: #FDBF3B;
714 711 color: #A6750C;
715 712 }
716 713
717 714 #errorExplanation ul { font-size: 0.9em;}
718 715 #errorExplanation h2, #errorExplanation p { display: none; }
719 716
720 717 .conflict-details {font-size:80%;}
721 718
722 719 /***** Ajax indicator ******/
723 720 #ajax-indicator {
724 721 position: absolute; /* fixed not supported by IE */
725 722 background-color:#eee;
726 723 border: 1px solid #bbb;
727 724 top:35%;
728 725 left:40%;
729 726 width:20%;
730 727 font-weight:bold;
731 728 text-align:center;
732 729 padding:0.6em;
733 730 z-index:100;
734 731 opacity: 0.5;
735 732 }
736 733
737 734 html>body #ajax-indicator { position: fixed; }
738 735
739 736 #ajax-indicator span {
740 737 background-position: 0% 40%;
741 738 background-repeat: no-repeat;
742 739 background-image: url(../images/loading.gif);
743 740 padding-left: 26px;
744 741 vertical-align: bottom;
745 742 }
746 743
747 744 /***** Calendar *****/
748 745 table.cal {border-collapse: collapse; width: 100%; margin: 0px 0 6px 0;border: 1px solid #d7d7d7;}
749 746 table.cal thead th {width: 14%; background-color:#EEEEEE; padding: 4px; }
750 747 table.cal thead th.week-number {width: auto;}
751 748 table.cal tbody tr {height: 100px;}
752 749 table.cal td {border: 1px solid #d7d7d7; vertical-align: top; font-size: 0.9em;}
753 750 table.cal td.week-number { background-color:#EEEEEE; padding: 4px; border:none; font-size: 1em;}
754 751 table.cal td p.day-num {font-size: 1.1em; text-align:right;}
755 752 table.cal td.odd p.day-num {color: #bbb;}
756 753 table.cal td.today {background:#ffffdd;}
757 754 table.cal td.today p.day-num {font-weight: bold;}
758 755 table.cal .starting a, p.cal.legend .starting {background: url(../images/bullet_go.png) no-repeat -1px -2px; padding-left:16px;}
759 756 table.cal .ending a, p.cal.legend .ending {background: url(../images/bullet_end.png) no-repeat -1px -2px; padding-left:16px;}
760 757 table.cal .starting.ending a, p.cal.legend .starting.ending {background: url(../images/bullet_diamond.png) no-repeat -1px -2px; padding-left:16px;}
761 758 p.cal.legend span {display:block;}
762 759
763 760 /***** Tooltips ******/
764 761 .tooltip{position:relative;z-index:24;}
765 762 .tooltip:hover{z-index:25;color:#000;}
766 763 .tooltip span.tip{display: none; text-align:left;}
767 764
768 765 div.tooltip:hover span.tip{
769 766 display:block;
770 767 position:absolute;
771 768 top:12px; left:24px; width:270px;
772 769 border:1px solid #555;
773 770 background-color:#fff;
774 771 padding: 4px;
775 772 font-size: 0.8em;
776 773 color:#505050;
777 774 }
778 775
779 776 img.ui-datepicker-trigger {
780 777 cursor: pointer;
781 778 vertical-align: middle;
782 779 margin-left: 4px;
783 780 }
784 781
785 782 /***** Progress bar *****/
786 783 table.progress {
787 784 border-collapse: collapse;
788 785 border-spacing: 0pt;
789 786 empty-cells: show;
790 787 text-align: center;
791 788 float:left;
792 789 margin: 1px 6px 1px 0px;
793 790 }
794 791
795 792 table.progress td { height: 1em; }
796 793 table.progress td.closed { background: #BAE0BA none repeat scroll 0%; }
797 794 table.progress td.done { background: #D3EDD3 none repeat scroll 0%; }
798 795 table.progress td.todo { background: #eee none repeat scroll 0%; }
799 p.percent {font-size: 80%;}
796 p.percent {font-size: 80%; margin:0;}
800 797 p.progress-info {clear: left; font-size: 80%; margin-top:-4px; color:#777;}
801 798
802 799 #roadmap table.progress td { height: 1.2em; }
803 800 /***** Tabs *****/
804 801 #content .tabs {height: 2.6em; margin-bottom:1.2em; position:relative; overflow:hidden;}
805 802 #content .tabs ul {margin:0; position:absolute; bottom:0; padding-left:0.5em; width: 2000px; border-bottom: 1px solid #bbbbbb;}
806 803 #content .tabs ul li {
807 804 float:left;
808 805 list-style-type:none;
809 806 white-space:nowrap;
810 807 margin-right:4px;
811 808 background:#fff;
812 809 position:relative;
813 810 margin-bottom:-1px;
814 811 }
815 812 #content .tabs ul li a{
816 813 display:block;
817 814 font-size: 0.9em;
818 815 text-decoration:none;
819 816 line-height:1.3em;
820 817 padding:4px 6px 4px 6px;
821 818 border: 1px solid #ccc;
822 819 border-bottom: 1px solid #bbbbbb;
823 820 background-color: #f6f6f6;
824 821 color:#999;
825 822 font-weight:bold;
826 823 border-top-left-radius:3px;
827 824 border-top-right-radius:3px;
828 825 }
829 826
830 827 #content .tabs ul li a:hover {
831 828 background-color: #ffffdd;
832 829 text-decoration:none;
833 830 }
834 831
835 832 #content .tabs ul li a.selected {
836 833 background-color: #fff;
837 834 border: 1px solid #bbbbbb;
838 835 border-bottom: 1px solid #fff;
839 836 color:#444;
840 837 }
841 838
842 839 #content .tabs ul li a.selected:hover {background-color: #fff;}
843 840
844 841 div.tabs-buttons { position:absolute; right: 0; width: 48px; height: 24px; background: white; bottom: 0; border-bottom: 1px solid #bbbbbb; }
845 842
846 843 button.tab-left, button.tab-right {
847 844 font-size: 0.9em;
848 845 cursor: pointer;
849 846 height:24px;
850 847 border: 1px solid #ccc;
851 848 border-bottom: 1px solid #bbbbbb;
852 849 position:absolute;
853 850 padding:4px;
854 851 width: 20px;
855 852 bottom: -1px;
856 853 }
857 854
858 855 button.tab-left {
859 856 right: 20px;
860 857 background: #eeeeee url(../images/bullet_arrow_left.png) no-repeat 50% 50%;
861 858 border-top-left-radius:3px;
862 859 }
863 860
864 861 button.tab-right {
865 862 right: 0;
866 863 background: #eeeeee url(../images/bullet_arrow_right.png) no-repeat 50% 50%;
867 864 border-top-right-radius:3px;
868 865 }
869 866
870 867 /***** Diff *****/
871 868 .diff_out { background: #fcc; }
872 869 .diff_out span { background: #faa; }
873 870 .diff_in { background: #cfc; }
874 871 .diff_in span { background: #afa; }
875 872
876 873 .text-diff {
877 874 padding: 1em;
878 875 background-color:#f6f6f6;
879 876 color:#505050;
880 877 border: 1px solid #e4e4e4;
881 878 }
882 879
883 880 /***** Wiki *****/
884 881 div.wiki table {
885 882 border-collapse: collapse;
886 883 margin-bottom: 1em;
887 884 }
888 885
889 886 div.wiki table, div.wiki td, div.wiki th {
890 887 border: 1px solid #bbb;
891 888 padding: 4px;
892 889 }
893 890
894 891 div.wiki .noborder, div.wiki .noborder td, div.wiki .noborder th {border:0;}
895 892
896 893 div.wiki .external {
897 894 background-position: 0% 60%;
898 895 background-repeat: no-repeat;
899 896 padding-left: 12px;
900 897 background-image: url(../images/external.png);
901 898 }
902 899
903 900 div.wiki a {word-wrap: break-word;}
904 901 div.wiki a.new {color: #b73535;}
905 902
906 903 div.wiki ul, div.wiki ol {margin-bottom:1em;}
907 904 div.wiki li>ul, div.wiki li>ol {margin-bottom: 0;}
908 905
909 906 div.wiki pre {
910 907 margin: 1em 1em 1em 1.6em;
911 908 padding: 8px;
912 909 background-color: #fafafa;
913 910 border: 1px solid #e2e2e2;
914 911 border-radius: 3px;
915 912 width:auto;
916 913 overflow-x: auto;
917 914 overflow-y: hidden;
918 915 }
919 916
920 917 div.wiki ul.toc {
921 918 background-color: #ffffdd;
922 919 border: 1px solid #e4e4e4;
923 920 padding: 4px;
924 921 line-height: 1.2em;
925 922 margin-bottom: 12px;
926 923 margin-right: 12px;
927 924 margin-left: 0;
928 925 display: table
929 926 }
930 927 * html div.wiki ul.toc { width: 50%; } /* IE6 doesn't autosize div */
931 928
932 929 div.wiki ul.toc.right { float: right; margin-left: 12px; margin-right: 0; width: auto; }
933 930 div.wiki ul.toc.left { float: left; margin-right: 12px; margin-left: 0; width: auto; }
934 931 div.wiki ul.toc ul { margin: 0; padding: 0; }
935 932 div.wiki ul.toc li {list-style-type:none; margin: 0; font-size:12px;}
936 933 div.wiki ul.toc li li {margin-left: 1.5em; font-size:10px;}
937 934 div.wiki ul.toc a {
938 935 font-size: 0.9em;
939 936 font-weight: normal;
940 937 text-decoration: none;
941 938 color: #606060;
942 939 }
943 940 div.wiki ul.toc a:hover { color: #c61a1a; text-decoration: underline;}
944 941
945 942 a.wiki-anchor { display: none; margin-left: 6px; text-decoration: none; }
946 943 a.wiki-anchor:hover { color: #aaa !important; text-decoration: none; }
947 944 h1:hover a.wiki-anchor, h2:hover a.wiki-anchor, h3:hover a.wiki-anchor { display: inline; color: #ddd; }
948 945
949 946 div.wiki img {vertical-align:middle; max-width:100%;}
950 947
951 948 /***** My page layout *****/
952 949 .block-receiver {
953 950 border:1px dashed #c0c0c0;
954 951 margin-bottom: 20px;
955 952 padding: 15px 0 15px 0;
956 953 }
957 954
958 955 .mypage-box {
959 956 margin:0 0 20px 0;
960 957 color:#505050;
961 958 line-height:1.5em;
962 959 }
963 960
964 961 .handle {cursor: move;}
965 962
966 963 a.close-icon {
967 964 display:block;
968 965 margin-top:3px;
969 966 overflow:hidden;
970 967 width:12px;
971 968 height:12px;
972 969 background-repeat: no-repeat;
973 970 cursor:pointer;
974 971 background-image:url('../images/close.png');
975 972 }
976 973 a.close-icon:hover {background-image:url('../images/close_hl.png');}
977 974
978 975 /***** Gantt chart *****/
979 976 .gantt_hdr {
980 977 position:absolute;
981 978 top:0;
982 979 height:16px;
983 980 border-top: 1px solid #c0c0c0;
984 981 border-bottom: 1px solid #c0c0c0;
985 982 border-right: 1px solid #c0c0c0;
986 983 text-align: center;
987 984 overflow: hidden;
988 985 }
989 986
990 987 .gantt_hdr.nwday {background-color:#f1f1f1; color:#999;}
991 988
992 989 .gantt_subjects { font-size: 0.8em; }
993 990 .gantt_subjects div { line-height:16px;height:16px;overflow:hidden;white-space:nowrap;text-overflow: ellipsis; }
994 991
995 992 .task {
996 993 position: absolute;
997 994 height:8px;
998 995 font-size:0.8em;
999 996 color:#888;
1000 997 padding:0;
1001 998 margin:0;
1002 999 line-height:16px;
1003 1000 white-space:nowrap;
1004 1001 }
1005 1002
1006 1003 .task.label {width:100%;}
1007 1004 .task.label.project, .task.label.version { font-weight: bold; }
1008 1005
1009 1006 .task_late { background:#f66 url(../images/task_late.png); border: 1px solid #f66; }
1010 1007 .task_done { background:#00c600 url(../images/task_done.png); border: 1px solid #00c600; }
1011 1008 .task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; }
1012 1009
1013 1010 .task_todo.parent { background: #888; border: 1px solid #888; height: 3px;}
1014 1011 .task_late.parent, .task_done.parent { height: 3px;}
1015 1012 .task.parent.marker.starting { position: absolute; background: url(../images/task_parent_end.png) no-repeat 0 0; width: 8px; height: 16px; margin-left: -4px; left: 0px; top: -1px;}
1016 1013 .task.parent.marker.ending { position: absolute; background: url(../images/task_parent_end.png) no-repeat 0 0; width: 8px; height: 16px; margin-left: -4px; right: 0px; top: -1px;}
1017 1014
1018 1015 .version.task_late { background:#f66 url(../images/milestone_late.png); border: 1px solid #f66; height: 2px; margin-top: 3px;}
1019 1016 .version.task_done { background:#00c600 url(../images/milestone_done.png); border: 1px solid #00c600; height: 2px; margin-top: 3px;}
1020 1017 .version.task_todo { background:#fff url(../images/milestone_todo.png); border: 1px solid #fff; height: 2px; margin-top: 3px;}
1021 1018 .version.marker { background-image:url(../images/version_marker.png); background-repeat: no-repeat; border: 0; margin-left: -4px; margin-top: 1px; }
1022 1019
1023 1020 .project.task_late { background:#f66 url(../images/milestone_late.png); border: 1px solid #f66; height: 2px; margin-top: 3px;}
1024 1021 .project.task_done { background:#00c600 url(../images/milestone_done.png); border: 1px solid #00c600; height: 2px; margin-top: 3px;}
1025 1022 .project.task_todo { background:#fff url(../images/milestone_todo.png); border: 1px solid #fff; height: 2px; margin-top: 3px;}
1026 1023 .project.marker { background-image:url(../images/project_marker.png); background-repeat: no-repeat; border: 0; margin-left: -4px; margin-top: 1px; }
1027 1024
1028 1025 .version-behind-schedule a, .issue-behind-schedule a {color: #f66914;}
1029 1026 .version-overdue a, .issue-overdue a, .project-overdue a {color: #f00;}
1030 1027
1031 1028 /***** Icons *****/
1032 1029 .icon {
1033 1030 background-position: 0% 50%;
1034 1031 background-repeat: no-repeat;
1035 1032 padding-left: 20px;
1036 1033 padding-top: 2px;
1037 1034 padding-bottom: 3px;
1038 1035 }
1039 1036
1040 1037 .icon-add { background-image: url(../images/add.png); }
1041 1038 .icon-edit { background-image: url(../images/edit.png); }
1042 1039 .icon-copy { background-image: url(../images/copy.png); }
1043 1040 .icon-duplicate { background-image: url(../images/duplicate.png); }
1044 1041 .icon-del { background-image: url(../images/delete.png); }
1045 1042 .icon-move { background-image: url(../images/move.png); }
1046 1043 .icon-save { background-image: url(../images/save.png); }
1047 1044 .icon-cancel { background-image: url(../images/cancel.png); }
1048 1045 .icon-multiple { background-image: url(../images/table_multiple.png); }
1049 1046 .icon-folder { background-image: url(../images/folder.png); }
1050 1047 .open .icon-folder { background-image: url(../images/folder_open.png); }
1051 1048 .icon-package { background-image: url(../images/package.png); }
1052 1049 .icon-user { background-image: url(../images/user.png); }
1053 1050 .icon-projects { background-image: url(../images/projects.png); }
1054 1051 .icon-help { background-image: url(../images/help.png); }
1055 1052 .icon-attachment { background-image: url(../images/attachment.png); }
1056 1053 .icon-history { background-image: url(../images/history.png); }
1057 1054 .icon-time { background-image: url(../images/time.png); }
1058 1055 .icon-time-add { background-image: url(../images/time_add.png); }
1059 1056 .icon-stats { background-image: url(../images/stats.png); }
1060 1057 .icon-warning { background-image: url(../images/warning.png); }
1061 1058 .icon-fav { background-image: url(../images/fav.png); }
1062 1059 .icon-fav-off { background-image: url(../images/fav_off.png); }
1063 1060 .icon-reload { background-image: url(../images/reload.png); }
1064 1061 .icon-lock { background-image: url(../images/locked.png); }
1065 1062 .icon-unlock { background-image: url(../images/unlock.png); }
1066 1063 .icon-checked { background-image: url(../images/true.png); }
1067 1064 .icon-details { background-image: url(../images/zoom_in.png); }
1068 1065 .icon-report { background-image: url(../images/report.png); }
1069 1066 .icon-comment { background-image: url(../images/comment.png); }
1070 1067 .icon-summary { background-image: url(../images/lightning.png); }
1071 1068 .icon-server-authentication { background-image: url(../images/server_key.png); }
1072 1069 .icon-issue { background-image: url(../images/ticket.png); }
1073 1070 .icon-zoom-in { background-image: url(../images/zoom_in.png); }
1074 1071 .icon-zoom-out { background-image: url(../images/zoom_out.png); }
1075 1072 .icon-passwd { background-image: url(../images/textfield_key.png); }
1076 1073 .icon-test { background-image: url(../images/bullet_go.png); }
1077 1074 .icon-email-add { background-image: url(../images/email_add.png); }
1078 1075
1079 1076 .icon-file { background-image: url(../images/files/default.png); }
1080 1077 .icon-file.text-plain { background-image: url(../images/files/text.png); }
1081 1078 .icon-file.text-x-c { background-image: url(../images/files/c.png); }
1082 1079 .icon-file.text-x-csharp { background-image: url(../images/files/csharp.png); }
1083 1080 .icon-file.text-x-java { background-image: url(../images/files/java.png); }
1084 1081 .icon-file.text-x-javascript { background-image: url(../images/files/js.png); }
1085 1082 .icon-file.text-x-php { background-image: url(../images/files/php.png); }
1086 1083 .icon-file.text-x-ruby { background-image: url(../images/files/ruby.png); }
1087 1084 .icon-file.text-xml { background-image: url(../images/files/xml.png); }
1088 1085 .icon-file.text-css { background-image: url(../images/files/css.png); }
1089 1086 .icon-file.text-html { background-image: url(../images/files/html.png); }
1090 1087 .icon-file.image-gif { background-image: url(../images/files/image.png); }
1091 1088 .icon-file.image-jpeg { background-image: url(../images/files/image.png); }
1092 1089 .icon-file.image-png { background-image: url(../images/files/image.png); }
1093 1090 .icon-file.image-tiff { background-image: url(../images/files/image.png); }
1094 1091 .icon-file.application-pdf { background-image: url(../images/files/pdf.png); }
1095 1092 .icon-file.application-zip { background-image: url(../images/files/zip.png); }
1096 1093 .icon-file.application-x-gzip { background-image: url(../images/files/zip.png); }
1097 1094
1098 1095 img.gravatar {
1099 1096 padding: 2px;
1100 1097 border: solid 1px #d5d5d5;
1101 1098 background: #fff;
1102 1099 vertical-align: middle;
1103 1100 }
1104 1101
1105 1102 div.issue img.gravatar {
1106 1103 float: left;
1107 1104 margin: 0 6px 0 0;
1108 1105 padding: 5px;
1109 1106 }
1110 1107
1111 1108 div.issue table img.gravatar {
1112 1109 height: 14px;
1113 1110 width: 14px;
1114 1111 padding: 2px;
1115 1112 float: left;
1116 1113 margin: 0 0.5em 0 0;
1117 1114 }
1118 1115
1119 1116 h2 img.gravatar {margin: -2px 4px -4px 0;}
1120 1117 h3 img.gravatar {margin: -4px 4px -4px 0;}
1121 1118 h4 img.gravatar {margin: -6px 4px -4px 0;}
1122 1119 td.username img.gravatar {margin: 0 0.5em 0 0; vertical-align: top;}
1123 1120 #activity dt img.gravatar {float: left; margin: 0 1em 1em 0;}
1124 1121 /* Used on 12px Gravatar img tags without the icon background */
1125 1122 .icon-gravatar {float: left; margin-right: 4px;}
1126 1123
1127 1124 #activity dt, .journal {clear: left;}
1128 1125
1129 1126 .journal-link {float: right;}
1130 1127
1131 1128 h2 img { vertical-align:middle; }
1132 1129
1133 1130 .hascontextmenu { cursor: context-menu; }
1134 1131
1135 1132 .sample-data {border:1px solid #ccc; border-collapse:collapse; background-color:#fff; margin:0.5em;}
1136 1133 .sample-data td {border:1px solid #ccc; padding: 2px 4px; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;}
1137 1134 .sample-data tr:first-child td {font-weight:bold; text-align:center;}
1138 1135
1139 1136 .ui-progressbar {position: relative;}
1140 1137 #progress-label {
1141 1138 position: absolute; left: 50%; top: 4px;
1142 1139 font-weight: bold;
1143 1140 color: #555; text-shadow: 1px 1px 0 #fff;
1144 1141 }
1145 1142
1146 1143 /* Custom JQuery styles */
1147 1144 .ui-datepicker-title select {width:70px !important; margin-top:-2px !important; margin-right:4px !important;}
1148 1145
1149 1146
1150 1147 /************* CodeRay styles *************/
1151 1148 .syntaxhl div {display: inline;}
1152 1149 .syntaxhl .code pre { overflow: auto }
1153 1150
1154 1151 .syntaxhl .annotation { color:#007 }
1155 1152 .syntaxhl .attribute-name { color:#b48 }
1156 1153 .syntaxhl .attribute-value { color:#700 }
1157 1154 .syntaxhl .binary { color:#549 }
1158 1155 .syntaxhl .binary .char { color:#325 }
1159 1156 .syntaxhl .binary .delimiter { color:#325 }
1160 1157 .syntaxhl .char { color:#D20 }
1161 1158 .syntaxhl .char .content { color:#D20 }
1162 1159 .syntaxhl .char .delimiter { color:#710 }
1163 1160 .syntaxhl .class { color:#258; font-weight:bold }
1164 1161 .syntaxhl .class-variable { color:#369 }
1165 1162 .syntaxhl .color { color:#0A0 }
1166 1163 .syntaxhl .comment { color:#385 }
1167 1164 .syntaxhl .comment .char { color:#385 }
1168 1165 .syntaxhl .comment .delimiter { color:#385 }
1169 1166 .syntaxhl .constant { color:#258; font-weight:bold }
1170 1167 .syntaxhl .decorator { color:#B0B }
1171 1168 .syntaxhl .definition { color:#099; font-weight:bold }
1172 1169 .syntaxhl .delimiter { color:black }
1173 1170 .syntaxhl .directive { color:#088; font-weight:bold }
1174 1171 .syntaxhl .docstring { color:#D42; }
1175 1172 .syntaxhl .doctype { color:#34b }
1176 1173 .syntaxhl .done { text-decoration: line-through; color: gray }
1177 1174 .syntaxhl .entity { color:#800; font-weight:bold }
1178 1175 .syntaxhl .error { color:#F00; background-color:#FAA }
1179 1176 .syntaxhl .escape { color:#666 }
1180 1177 .syntaxhl .exception { color:#C00; font-weight:bold }
1181 1178 .syntaxhl .float { color:#06D }
1182 1179 .syntaxhl .function { color:#06B; font-weight:bold }
1183 1180 .syntaxhl .function .delimiter { color:#024; font-weight:bold }
1184 1181 .syntaxhl .global-variable { color:#d70 }
1185 1182 .syntaxhl .hex { color:#02b }
1186 1183 .syntaxhl .id { color:#33D; font-weight:bold }
1187 1184 .syntaxhl .include { color:#B44; font-weight:bold }
1188 1185 .syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black }
1189 1186 .syntaxhl .inline-delimiter { font-weight: bold; color: #666 }
1190 1187 .syntaxhl .instance-variable { color:#33B }
1191 1188 .syntaxhl .integer { color:#06D }
1192 1189 .syntaxhl .imaginary { color:#f00 }
1193 1190 .syntaxhl .important { color:#D00 }
1194 1191 .syntaxhl .key { color: #606 }
1195 1192 .syntaxhl .key .char { color: #60f }
1196 1193 .syntaxhl .key .delimiter { color: #404 }
1197 1194 .syntaxhl .keyword { color:#939; font-weight:bold }
1198 1195 .syntaxhl .label { color:#970; font-weight:bold }
1199 1196 .syntaxhl .local-variable { color:#950 }
1200 1197 .syntaxhl .map .content { color:#808 }
1201 1198 .syntaxhl .map .delimiter { color:#40A}
1202 1199 .syntaxhl .map { background-color:hsla(200,100%,50%,0.06); }
1203 1200 .syntaxhl .namespace { color:#707; font-weight:bold }
1204 1201 .syntaxhl .octal { color:#40E }
1205 1202 .syntaxhl .operator { }
1206 1203 .syntaxhl .predefined { color:#369; font-weight:bold }
1207 1204 .syntaxhl .predefined-constant { color:#069 }
1208 1205 .syntaxhl .predefined-type { color:#0a8; font-weight:bold }
1209 1206 .syntaxhl .preprocessor { color:#579 }
1210 1207 .syntaxhl .pseudo-class { color:#00C; font-weight:bold }
1211 1208 .syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); }
1212 1209 .syntaxhl .regexp .content { color:#808 }
1213 1210 .syntaxhl .regexp .delimiter { color:#404 }
1214 1211 .syntaxhl .regexp .modifier { color:#C2C }
1215 1212 .syntaxhl .reserved { color:#080; font-weight:bold }
1216 1213 .syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); }
1217 1214 .syntaxhl .shell .content { color:#2B2 }
1218 1215 .syntaxhl .shell .delimiter { color:#161 }
1219 1216 .syntaxhl .string .char { color: #46a }
1220 1217 .syntaxhl .string .content { color: #46a }
1221 1218 .syntaxhl .string .delimiter { color: #46a }
1222 1219 .syntaxhl .string .modifier { color: #46a }
1223 1220 .syntaxhl .symbol { color:#d33 }
1224 1221 .syntaxhl .symbol .content { color:#d33 }
1225 1222 .syntaxhl .symbol .delimiter { color:#d33 }
1226 1223 .syntaxhl .tag { color:#070; font-weight:bold }
1227 1224 .syntaxhl .type { color:#339; font-weight:bold }
1228 1225 .syntaxhl .value { color: #088 }
1229 1226 .syntaxhl .variable { color:#037 }
1230 1227
1231 1228 .syntaxhl .insert { background: hsla(120,100%,50%,0.12) }
1232 1229 .syntaxhl .delete { background: hsla(0,100%,50%,0.12) }
1233 1230 .syntaxhl .change { color: #bbf; background: #007 }
1234 1231 .syntaxhl .head { color: #f8f; background: #505 }
1235 1232 .syntaxhl .head .filename { color: white; }
1236 1233
1237 1234 .syntaxhl .delete .eyecatcher { background-color: hsla(0,100%,50%,0.2); border: 1px solid hsla(0,100%,45%,0.5); margin: -1px; border-bottom: none; border-top-left-radius: 5px; border-top-right-radius: 5px; }
1238 1235 .syntaxhl .insert .eyecatcher { background-color: hsla(120,100%,50%,0.2); border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
1239 1236
1240 1237 .syntaxhl .insert .insert { color: #0c0; background:transparent; font-weight:bold }
1241 1238 .syntaxhl .delete .delete { color: #c00; background:transparent; font-weight:bold }
1242 1239 .syntaxhl .change .change { color: #88f }
1243 1240 .syntaxhl .head .head { color: #f4f }
1244 1241
1245 1242 /***** Media print specific styles *****/
1246 1243 @media print {
1247 1244 #top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats { display:none; }
1248 1245 #main { background: #fff; }
1249 1246 #content { width: 99%; margin: 0; padding: 0; border: 0; background: #fff; overflow: visible !important;}
1250 1247 #wiki_add_attachment { display:none; }
1251 1248 .hide-when-print { display: none; }
1252 1249 .autoscroll {overflow-x: visible;}
1253 1250 table.list {margin-top:0.5em;}
1254 1251 table.list th, table.list td {border: 1px solid #aaa;}
1255 1252 }
1256 1253
1257 1254 /* Accessibility specific styles */
1258 1255 .hidden-for-sighted {
1259 1256 position:absolute;
1260 1257 left:-10000px;
1261 1258 top:auto;
1262 1259 width:1px;
1263 1260 height:1px;
1264 1261 overflow:hidden;
1265 1262 }
1 NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,322 +1,322
1 1 # Redmine - project management software
2 2 # Copyright (C) 2006-2015 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 require File.expand_path('../../test_helper', __FILE__)
19 19
20 20 class IssuesCustomFieldsVisibilityTest < ActionController::TestCase
21 21 tests IssuesController
22 22 fixtures :projects,
23 23 :users, :email_addresses,
24 24 :roles,
25 25 :members,
26 26 :member_roles,
27 27 :issue_statuses,
28 28 :trackers,
29 29 :projects_trackers,
30 30 :enabled_modules,
31 31 :enumerations,
32 32 :workflows
33 33
34 34 def setup
35 35 CustomField.delete_all
36 36 Issue.delete_all
37 37 field_attributes = {:field_format => 'string', :is_for_all => true, :is_filter => true, :trackers => Tracker.all}
38 38 @fields = []
39 39 @fields << (@field1 = IssueCustomField.create!(field_attributes.merge(:name => 'Field 1', :visible => true)))
40 40 @fields << (@field2 = IssueCustomField.create!(field_attributes.merge(:name => 'Field 2', :visible => false, :role_ids => [1, 2])))
41 41 @fields << (@field3 = IssueCustomField.create!(field_attributes.merge(:name => 'Field 3', :visible => false, :role_ids => [1, 3])))
42 42 @issue = Issue.generate!(
43 43 :author_id => 1,
44 44 :project_id => 1,
45 45 :tracker_id => 1,
46 46 :custom_field_values => {@field1.id => 'Value0', @field2.id => 'Value1', @field3.id => 'Value2'}
47 47 )
48 48
49 49 @user_with_role_on_other_project = User.generate!
50 50 User.add_to_project(@user_with_role_on_other_project, Project.find(2), Role.find(3))
51 51
52 52 @users_to_test = {
53 53 User.find(1) => [@field1, @field2, @field3],
54 54 User.find(3) => [@field1, @field2],
55 55 @user_with_role_on_other_project => [@field1], # should see field1 only on Project 1
56 56 User.generate! => [@field1],
57 57 User.anonymous => [@field1]
58 58 }
59 59
60 60 Member.where(:project_id => 1).each do |member|
61 61 member.destroy unless @users_to_test.keys.include?(member.principal)
62 62 end
63 63 end
64 64
65 65 def test_show_should_show_visible_custom_fields_only
66 66 @users_to_test.each do |user, fields|
67 67 @request.session[:user_id] = user.id
68 68 get :show, :id => @issue.id
69 69 @fields.each_with_index do |field, i|
70 70 if fields.include?(field)
71 assert_select 'td', {:text => "Value#{i}", :count => 1}, "User #{user.id} was not able to view #{field.name}"
71 assert_select '.value', {:text => "Value#{i}", :count => 1}, "User #{user.id} was not able to view #{field.name}"
72 72 else
73 assert_select 'td', {:text => "Value#{i}", :count => 0}, "User #{user.id} was able to view #{field.name}"
73 assert_select '.value', {:text => "Value#{i}", :count => 0}, "User #{user.id} was able to view #{field.name}"
74 74 end
75 75 end
76 76 end
77 77 end
78 78
79 79 def test_show_should_show_visible_custom_fields_only_in_api
80 80 @users_to_test.each do |user, fields|
81 81 with_settings :rest_api_enabled => '1' do
82 82 get :show, :id => @issue.id, :format => 'xml', :include => 'custom_fields', :key => user.api_key
83 83 end
84 84 @fields.each_with_index do |field, i|
85 85 if fields.include?(field)
86 86 assert_select "custom_field[id=?] value", field.id.to_s, {:text => "Value#{i}", :count => 1}, "User #{user.id} was not able to view #{field.name} in API"
87 87 else
88 88 assert_select "custom_field[id=?] value", field.id.to_s, {:text => "Value#{i}", :count => 0}, "User #{user.id} was not able to view #{field.name} in API"
89 89 end
90 90 end
91 91 end
92 92 end
93 93
94 94 def test_show_should_show_visible_custom_fields_only_in_history
95 95 @issue.init_journal(User.find(1))
96 96 @issue.custom_field_values = {@field1.id => 'NewValue0', @field2.id => 'NewValue1', @field3.id => 'NewValue2'}
97 97 @issue.save!
98 98
99 99 @users_to_test.each do |user, fields|
100 100 @request.session[:user_id] = user.id
101 101 get :show, :id => @issue.id
102 102 @fields.each_with_index do |field, i|
103 103 if fields.include?(field)
104 104 assert_select 'ul.details i', {:text => "Value#{i}", :count => 1}, "User #{user.id} was not able to view #{field.name} change"
105 105 else
106 106 assert_select 'ul.details i', {:text => "Value#{i}", :count => 0}, "User #{user.id} was able to view #{field.name} change"
107 107 end
108 108 end
109 109 end
110 110 end
111 111
112 112 def test_show_should_show_visible_custom_fields_only_in_history_api
113 113 @issue.init_journal(User.find(1))
114 114 @issue.custom_field_values = {@field1.id => 'NewValue0', @field2.id => 'NewValue1', @field3.id => 'NewValue2'}
115 115 @issue.save!
116 116
117 117 @users_to_test.each do |user, fields|
118 118 with_settings :rest_api_enabled => '1' do
119 119 get :show, :id => @issue.id, :format => 'xml', :include => 'journals', :key => user.api_key
120 120 end
121 121 @fields.each_with_index do |field, i|
122 122 if fields.include?(field)
123 123 assert_select 'details old_value', {:text => "Value#{i}", :count => 1}, "User #{user.id} was not able to view #{field.name} change in API"
124 124 else
125 125 assert_select 'details old_value', {:text => "Value#{i}", :count => 0}, "User #{user.id} was able to view #{field.name} change in API"
126 126 end
127 127 end
128 128 end
129 129 end
130 130
131 131 def test_edit_should_show_visible_custom_fields_only
132 132 Role.anonymous.add_permission! :edit_issues
133 133
134 134 @users_to_test.each do |user, fields|
135 135 @request.session[:user_id] = user.id
136 136 get :edit, :id => @issue.id
137 137 @fields.each_with_index do |field, i|
138 138 if fields.include?(field)
139 139 assert_select 'input[value=?]', "Value#{i}", 1, "User #{user.id} was not able to edit #{field.name}"
140 140 else
141 141 assert_select 'input[value=?]', "Value#{i}", 0, "User #{user.id} was able to edit #{field.name}"
142 142 end
143 143 end
144 144 end
145 145 end
146 146
147 147 def test_update_should_update_visible_custom_fields_only
148 148 Role.anonymous.add_permission! :edit_issues
149 149
150 150 @users_to_test.each do |user, fields|
151 151 @request.session[:user_id] = user.id
152 152 put :update, :id => @issue.id,
153 153 :issue => {:custom_field_values => {
154 154 @field1.id.to_s => "User#{user.id}Value0",
155 155 @field2.id.to_s => "User#{user.id}Value1",
156 156 @field3.id.to_s => "User#{user.id}Value2",
157 157 }}
158 158 @issue.reload
159 159 @fields.each_with_index do |field, i|
160 160 if fields.include?(field)
161 161 assert_equal "User#{user.id}Value#{i}", @issue.custom_field_value(field), "User #{user.id} was not able to update #{field.name}"
162 162 else
163 163 assert_not_equal "User#{user.id}Value#{i}", @issue.custom_field_value(field), "User #{user.id} was able to update #{field.name}"
164 164 end
165 165 end
166 166 end
167 167 end
168 168
169 169 def test_index_should_show_visible_custom_fields_only
170 170 @users_to_test.each do |user, fields|
171 171 @request.session[:user_id] = user.id
172 172 get :index, :c => (["subject"] + @fields.map{|f| "cf_#{f.id}"})
173 173 @fields.each_with_index do |field, i|
174 174 if fields.include?(field)
175 175 assert_select 'td', {:text => "Value#{i}", :count => 1}, "User #{user.id} was not able to view #{field.name}"
176 176 else
177 177 assert_select 'td', {:text => "Value#{i}", :count => 0}, "User #{user.id} was able to view #{field.name}"
178 178 end
179 179 end
180 180 end
181 181 end
182 182
183 183 def test_index_as_csv_should_show_visible_custom_fields_only
184 184 @users_to_test.each do |user, fields|
185 185 @request.session[:user_id] = user.id
186 186 get :index, :c => (["subject"] + @fields.map{|f| "cf_#{f.id}"}), :format => 'csv'
187 187 @fields.each_with_index do |field, i|
188 188 if fields.include?(field)
189 189 assert_include "Value#{i}", response.body, "User #{user.id} was not able to view #{field.name} in CSV"
190 190 else
191 191 assert_not_include "Value#{i}", response.body, "User #{user.id} was able to view #{field.name} in CSV"
192 192 end
193 193 end
194 194 end
195 195 end
196 196
197 197 def test_index_with_partial_custom_field_visibility
198 198 Issue.delete_all
199 199 p1 = Project.generate!
200 200 p2 = Project.generate!
201 201 user = User.generate!
202 202 User.add_to_project(user, p1, Role.where(:id => [1, 3]).to_a)
203 203 User.add_to_project(user, p2, Role.where(:id => 3).to_a)
204 204 Issue.generate!(:project => p1, :tracker_id => 1, :custom_field_values => {@field2.id => 'ValueA'})
205 205 Issue.generate!(:project => p2, :tracker_id => 1, :custom_field_values => {@field2.id => 'ValueB'})
206 206 Issue.generate!(:project => p1, :tracker_id => 1, :custom_field_values => {@field2.id => 'ValueC'})
207 207
208 208 @request.session[:user_id] = user.id
209 209 get :index, :c => ["subject", "cf_#{@field2.id}"]
210 210 assert_select 'td', :text => 'ValueA'
211 211 assert_select 'td', :text => 'ValueB', :count => 0
212 212 assert_select 'td', :text => 'ValueC'
213 213
214 214 get :index, :sort => "cf_#{@field2.id}"
215 215 # ValueB is not visible to user and ignored while sorting
216 216 assert_equal %w(ValueB ValueA ValueC), assigns(:issues).map{|i| i.custom_field_value(@field2)}
217 217
218 218 get :index, :set_filter => '1', "cf_#{@field2.id}" => '*'
219 219 assert_equal %w(ValueA ValueC), assigns(:issues).map{|i| i.custom_field_value(@field2)}
220 220
221 221 CustomField.update_all(:field_format => 'list')
222 222 get :index, :group => "cf_#{@field2.id}"
223 223 assert_equal %w(ValueA ValueC), assigns(:issues).map{|i| i.custom_field_value(@field2)}
224 224 end
225 225
226 226 def test_create_should_send_notifications_according_custom_fields_visibility
227 227 # anonymous user is never notified
228 228 users_to_test = @users_to_test.reject {|k,v| k.anonymous?}
229 229
230 230 ActionMailer::Base.deliveries.clear
231 231 @request.session[:user_id] = 1
232 232 with_settings :bcc_recipients => '1' do
233 233 assert_difference 'Issue.count' do
234 234 post :create,
235 235 :project_id => 1,
236 236 :issue => {
237 237 :tracker_id => 1,
238 238 :status_id => 1,
239 239 :subject => 'New issue',
240 240 :priority_id => 5,
241 241 :custom_field_values => {@field1.id.to_s => 'Value0', @field2.id.to_s => 'Value1', @field3.id.to_s => 'Value2'},
242 242 :watcher_user_ids => users_to_test.keys.map(&:id)
243 243 }
244 244 assert_response 302
245 245 end
246 246 end
247 247 assert_equal users_to_test.values.uniq.size, ActionMailer::Base.deliveries.size
248 248 # tests that each user receives 1 email with the custom fields he is allowed to see only
249 249 users_to_test.each do |user, fields|
250 250 mails = ActionMailer::Base.deliveries.select {|m| m.bcc.include? user.mail}
251 251 assert_equal 1, mails.size
252 252 mail = mails.first
253 253 @fields.each_with_index do |field, i|
254 254 if fields.include?(field)
255 255 assert_mail_body_match "Value#{i}", mail, "User #{user.id} was not able to view #{field.name} in notification"
256 256 else
257 257 assert_mail_body_no_match "Value#{i}", mail, "User #{user.id} was able to view #{field.name} in notification"
258 258 end
259 259 end
260 260 end
261 261 end
262 262
263 263 def test_update_should_send_notifications_according_custom_fields_visibility
264 264 # anonymous user is never notified
265 265 users_to_test = @users_to_test.reject {|k,v| k.anonymous?}
266 266
267 267 users_to_test.keys.each do |user|
268 268 Watcher.create!(:user => user, :watchable => @issue)
269 269 end
270 270 ActionMailer::Base.deliveries.clear
271 271 @request.session[:user_id] = 1
272 272 with_settings :bcc_recipients => '1' do
273 273 put :update,
274 274 :id => @issue.id,
275 275 :issue => {
276 276 :custom_field_values => {@field1.id.to_s => 'NewValue0', @field2.id.to_s => 'NewValue1', @field3.id.to_s => 'NewValue2'}
277 277 }
278 278 assert_response 302
279 279 end
280 280 assert_equal users_to_test.values.uniq.size, ActionMailer::Base.deliveries.size
281 281 # tests that each user receives 1 email with the custom fields he is allowed to see only
282 282 users_to_test.each do |user, fields|
283 283 mails = ActionMailer::Base.deliveries.select {|m| m.bcc.include? user.mail}
284 284 assert_equal 1, mails.size
285 285 mail = mails.first
286 286 @fields.each_with_index do |field, i|
287 287 if fields.include?(field)
288 288 assert_mail_body_match "Value#{i}", mail, "User #{user.id} was not able to view #{field.name} in notification"
289 289 else
290 290 assert_mail_body_no_match "Value#{i}", mail, "User #{user.id} was able to view #{field.name} in notification"
291 291 end
292 292 end
293 293 end
294 294 end
295 295
296 296 def test_updating_hidden_custom_fields_only_should_not_notifiy_user
297 297 # anonymous user is never notified
298 298 users_to_test = @users_to_test.reject {|k,v| k.anonymous?}
299 299
300 300 users_to_test.keys.each do |user|
301 301 Watcher.create!(:user => user, :watchable => @issue)
302 302 end
303 303 ActionMailer::Base.deliveries.clear
304 304 @request.session[:user_id] = 1
305 305 with_settings :bcc_recipients => '1' do
306 306 put :update,
307 307 :id => @issue.id,
308 308 :issue => {
309 309 :custom_field_values => {@field2.id.to_s => 'NewValue1', @field3.id.to_s => 'NewValue2'}
310 310 }
311 311 assert_response 302
312 312 end
313 313 users_to_test.each do |user, fields|
314 314 mails = ActionMailer::Base.deliveries.select {|m| m.bcc.include? user.mail}
315 315 if (fields & [@field2, @field3]).any?
316 316 assert_equal 1, mails.size, "User #{user.id} was not notified"
317 317 else
318 318 assert_equal 0, mails.size, "User #{user.id} was notified"
319 319 end
320 320 end
321 321 end
322 322 end
@@ -1,215 +1,218
1 1 # Redmine - project management software
2 2 # Copyright (C) 2006-2015 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 require File.expand_path('../../test_helper', __FILE__)
19 19
20 20 class IssuesTest < Redmine::IntegrationTest
21 21 fixtures :projects,
22 22 :users, :email_addresses,
23 23 :roles,
24 24 :members,
25 25 :member_roles,
26 26 :trackers,
27 27 :projects_trackers,
28 28 :enabled_modules,
29 29 :issue_statuses,
30 30 :issues,
31 31 :enumerations,
32 32 :custom_fields,
33 33 :custom_values,
34 34 :custom_fields_trackers,
35 35 :attachments
36 36
37 37 # create an issue
38 38 def test_add_issue
39 39 log_user('jsmith', 'jsmith')
40 40
41 41 get '/projects/ecookbook/issues/new'
42 42 assert_response :success
43 43 assert_template 'issues/new'
44 44
45 45 issue = new_record(Issue) do
46 46 post '/projects/ecookbook/issues',
47 47 :issue => { :tracker_id => "1",
48 48 :start_date => "2006-12-26",
49 49 :priority_id => "4",
50 50 :subject => "new test issue",
51 51 :category_id => "",
52 52 :description => "new issue",
53 53 :done_ratio => "0",
54 54 :due_date => "",
55 55 :assigned_to_id => "" },
56 56 :custom_fields => {'2' => 'Value for field 2'}
57 57 end
58 58 # check redirection
59 59 assert_redirected_to :controller => 'issues', :action => 'show', :id => issue
60 60 follow_redirect!
61 61 assert_equal issue, assigns(:issue)
62 62
63 63 # check issue attributes
64 64 assert_equal 'jsmith', issue.author.login
65 65 assert_equal 1, issue.project.id
66 66 assert_equal 1, issue.status.id
67 67 end
68 68
69 69 def test_create_issue_by_anonymous_without_permission_should_fail
70 70 Role.anonymous.remove_permission! :add_issues
71 71
72 72 assert_no_difference 'Issue.count' do
73 73 post '/projects/1/issues', :tracker_id => "1", :issue => {:subject => "new test issue"}
74 74 end
75 75 assert_response 302
76 76 end
77 77
78 78 def test_create_issue_by_anonymous_with_custom_permission_should_succeed
79 79 Role.anonymous.remove_permission! :add_issues
80 80 Member.create!(:project_id => 1, :principal => Group.anonymous, :role_ids => [3])
81 81
82 82 issue = new_record(Issue) do
83 83 post '/projects/1/issues', :tracker_id => "1", :issue => {:subject => "new test issue"}
84 84 assert_response 302
85 85 end
86 86 assert_equal User.anonymous, issue.author
87 87 end
88 88
89 89 # add then remove 2 attachments to an issue
90 90 def test_issue_attachments
91 91 log_user('jsmith', 'jsmith')
92 92 set_tmp_attachments_directory
93 93
94 94 attachment = new_record(Attachment) do
95 95 put '/issues/1',
96 96 :notes => 'Some notes',
97 97 :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'This is an attachment'}}
98 98 assert_redirected_to "/issues/1"
99 99 end
100 100
101 101 assert_equal Issue.find(1), attachment.container
102 102 assert_equal 'testfile.txt', attachment.filename
103 103 assert_equal 'This is an attachment', attachment.description
104 104 # verify the size of the attachment stored in db
105 105 #assert_equal file_data_1.length, attachment.filesize
106 106 # verify that the attachment was written to disk
107 107 assert File.exist?(attachment.diskfile)
108 108
109 109 # remove the attachments
110 110 Issue.find(1).attachments.each(&:destroy)
111 111 assert_equal 0, Issue.find(1).attachments.length
112 112 end
113 113
114 114 def test_other_formats_links_on_index
115 115 get '/projects/ecookbook/issues'
116 116
117 117 %w(Atom PDF CSV).each do |format|
118 118 assert_select 'a[rel=nofollow][href=?]', "/projects/ecookbook/issues.#{format.downcase}", :text => format
119 119 end
120 120 end
121 121
122 122 def test_other_formats_links_on_index_without_project_id_in_url
123 123 get '/issues', :project_id => 'ecookbook'
124 124
125 125 %w(Atom PDF CSV).each do |format|
126 126 assert_select 'a[rel=nofollow][href=?]', "/projects/ecookbook/issues.#{format.downcase}", :text => format
127 127 end
128 128 end
129 129
130 130 def test_pagination_links_on_index
131 131 with_settings :per_page_options => '2' do
132 132 get '/projects/ecookbook/issues'
133 133
134 134 assert_select 'a[href=?]', '/projects/ecookbook/issues?page=2', :text => '2'
135 135 end
136 136 end
137 137
138 138 def test_pagination_links_on_index_without_project_id_in_url
139 139 with_settings :per_page_options => '2' do
140 140 get '/issues', :project_id => 'ecookbook'
141 141
142 142 assert_select 'a[href=?]', '/projects/ecookbook/issues?page=2', :text => '2'
143 143 end
144 144 end
145 145
146 146 def test_issue_with_user_custom_field
147 147 @field = IssueCustomField.create!(:name => 'Tester', :field_format => 'user', :is_for_all => true, :trackers => Tracker.all)
148 148 Role.anonymous.add_permission! :add_issues, :edit_issues
149 149 users = Project.find(1).users.uniq.sort
150 150 tester = users.first
151 151
152 152 # Issue form
153 153 get '/projects/ecookbook/issues/new'
154 154 assert_response :success
155 155 assert_select 'select[name=?]', "issue[custom_field_values][#{@field.id}]" do
156 156 assert_select 'option', users.size + 1 # +1 for blank value
157 157 assert_select 'option[value=?]', tester.id.to_s, :text => tester.name
158 158 end
159 159
160 160 # Create issue
161 161 issue = new_record(Issue) do
162 162 post '/projects/ecookbook/issues',
163 163 :issue => {
164 164 :tracker_id => '1',
165 165 :priority_id => '4',
166 166 :subject => 'Issue with user custom field',
167 167 :custom_field_values => {@field.id.to_s => users.first.id.to_s}
168 168 }
169 169 assert_response 302
170 170 end
171 171
172 172 # Issue view
173 173 follow_redirect!
174 assert_select 'th:contains("Tester:") + td', :text => tester.name
174 assert_select ".cf_#{@field.id}" do
175 assert_select '.label', :text => 'Tester:'
176 assert_select '.value', :text => tester.name
177 end
175 178 assert_select 'select[name=?]', "issue[custom_field_values][#{@field.id}]" do
176 179 assert_select 'option', users.size + 1 # +1 for blank value
177 180 assert_select 'option[value=?][selected=selected]', tester.id.to_s, :text => tester.name
178 181 end
179 182
180 183 new_tester = users[1]
181 184 with_settings :default_language => 'en' do
182 185 # Update issue
183 186 assert_difference 'Journal.count' do
184 187 put "/issues/#{issue.id}",
185 188 :notes => 'Updating custom field',
186 189 :issue => {
187 190 :custom_field_values => {@field.id.to_s => new_tester.id.to_s}
188 191 }
189 192 assert_redirected_to "/issues/#{issue.id}"
190 193 end
191 194 # Issue view
192 195 follow_redirect!
193 196 assert_select 'ul.details li', :text => "Tester changed from #{tester} to #{new_tester}"
194 197 end
195 198 end
196 199
197 200 def test_update_using_invalid_http_verbs
198 201 subject = 'Updated by an invalid http verb'
199 202
200 203 get '/issues/update/1', {:issue => {:subject => subject}}, credentials('jsmith')
201 204 assert_response 404
202 205 assert_not_equal subject, Issue.find(1).subject
203 206
204 207 post '/issues/1', {:issue => {:subject => subject}}, credentials('jsmith')
205 208 assert_response 404
206 209 assert_not_equal subject, Issue.find(1).subject
207 210 end
208 211
209 212 def test_get_watch_should_be_invalid
210 213 assert_no_difference 'Watcher.count' do
211 214 get '/watchers/watch?object_type=issue&object_id=1', {}, credentials('jsmith')
212 215 assert_response 404
213 216 end
214 217 end
215 218 end
General Comments 0
You need to be logged in to leave comments. Login now