##// END OF EJS Templates
Replace uses of image_tag() with CSS (#21256)....
Jean-Philippe Lang -
r14686:7467c145c03c
parent child
Show More
@@ -454,18 +454,18 module ApplicationHelper
454 454 end
455 455
456 456 def reorder_links(name, url, method = :post)
457 link_to(image_tag('2uparrow.png', :alt => l(:label_sort_highest)),
458 url.merge({"#{name}[move_to]" => 'highest'}),
459 :method => method, :title => l(:label_sort_highest)) +
460 link_to(image_tag('1uparrow.png', :alt => l(:label_sort_higher)),
461 url.merge({"#{name}[move_to]" => 'higher'}),
462 :method => method, :title => l(:label_sort_higher)) +
463 link_to(image_tag('1downarrow.png', :alt => l(:label_sort_lower)),
464 url.merge({"#{name}[move_to]" => 'lower'}),
465 :method => method, :title => l(:label_sort_lower)) +
466 link_to(image_tag('2downarrow.png', :alt => l(:label_sort_lowest)),
467 url.merge({"#{name}[move_to]" => 'lowest'}),
468 :method => method, :title => l(:label_sort_lowest))
457 link_to('',
458 url.merge({"#{name}[move_to]" => 'highest'}), :method => method,
459 :title => l(:label_sort_highest), :class => 'icon-only icon-move-top') +
460 link_to('',
461 url.merge({"#{name}[move_to]" => 'higher'}), :method => method,
462 :title => l(:label_sort_higher), :class => 'icon-only icon-move-up') +
463 link_to('',
464 url.merge({"#{name}[move_to]" => 'lower'}), :method => method,
465 :title => l(:label_sort_lower), :class => 'icon-only icon-move-down') +
466 link_to('',
467 url.merge({"#{name}[move_to]" => 'lowest'}), :method => method,
468 :title => l(:label_sort_lowest), :class => 'icon-only icon-move-bottom')
469 469 end
470 470
471 471 def breadcrumb(*args)
@@ -887,7 +887,8 module ApplicationHelper
887 887 @current_section += 1
888 888 if @current_section > 1
889 889 content_tag('div',
890 link_to(image_tag('edit.png'), options[:edit_section_links].merge(:section => @current_section)),
890 link_to('', options[:edit_section_links].merge(:section => @current_section),
891 :class => 'icon-only icon-edit'),
891 892 :class => 'contextual',
892 893 :title => l(:button_edit_section),
893 894 :id => "section-#{@current_section}") + heading.html_safe
@@ -1098,9 +1099,10 module ApplicationHelper
1098 1099 end
1099 1100
1100 1101 def toggle_checkboxes_link(selector)
1101 link_to_function image_tag('toggle_check.png'),
1102 link_to_function '',
1102 1103 "toggleCheckboxesBySelector('#{selector}')",
1103 :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}"
1104 :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
1105 :class => 'toggle-checkboxes'
1104 1106 end
1105 1107
1106 1108 def progress_bar(pcts, options={})
@@ -1122,7 +1124,7 module ApplicationHelper
1122 1124
1123 1125 def checked_image(checked=true)
1124 1126 if checked
1125 @checked_image_tag ||= image_tag('toggle_check.png')
1127 @checked_image_tag ||= content_tag(:span, nil, :class => 'icon-only icon-checked')
1126 1128 end
1127 1129 end
1128 1130
@@ -22,17 +22,17 module EmailAddressesHelper
22 22 # Returns a link to enable or disable notifications for the address
23 23 def toggle_email_address_notify_link(address)
24 24 if address.notify?
25 link_to image_tag('email.png'),
25 link_to '',
26 26 user_email_address_path(address.user, address, :notify => '0'),
27 :method => :put,
27 :method => :put, :remote => true,
28 28 :title => l(:label_disable_notifications),
29 :remote => true
29 :class => 'icon icon-email'
30 30 else
31 link_to image_tag('email_disabled.png'),
31 link_to '',
32 32 user_email_address_path(address.user, address, :notify => '1'),
33 :method => :put,
33 :method => :put, :remote => true,
34 34 :title => l(:label_enable_notifications),
35 :remote => true
35 :class => 'icon icon-email-disabled'
36 36 end
37 37 end
38 38 end
@@ -442,11 +442,10 module IssuesHelper
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 value += link_to(
446 image_tag('magnifier.png'),
447 :controller => 'attachments', :action => 'show',
448 :id => atta, :filename => atta.filename
449 )
445 value += link_to('',
446 { :controller => 'attachments', :action => 'show',
447 :id => atta, :filename => atta.filename },
448 :class => 'icon icon-magnifier')
450 449 end
451 450 else
452 451 value = content_tag("i", h(value)) if value
@@ -30,14 +30,18 module JournalsHelper
30 30 editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))
31 31 links = []
32 32 if !journal.notes.blank?
33 links << link_to(image_tag('comment.png'),
33 links << link_to('',
34 34 {:controller => 'journals', :action => 'new', :id => issue, :journal_id => journal},
35 35 :remote => true,
36 36 :method => 'post',
37 :title => l(:button_quote)) if options[:reply_links]
38 links << link_to_in_place_notes_editor(image_tag('edit.png'), "journal-#{journal.id}-notes",
37 :title => l(:button_quote),
38 :class => 'icon-only icon-comment'
39 ) if options[:reply_links]
40 links << link_to_in_place_notes_editor('', "journal-#{journal.id}-notes",
39 41 { :controller => 'journals', :action => 'edit', :id => journal, :format => 'js' },
40 :title => l(:button_edit)) if editable
42 :title => l(:button_edit),
43 :class => 'icon-only icon-edit'
44 ) if editable
41 45 end
42 46 content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
43 47 content << textilizable(journal, :notes)
@@ -58,8 +58,10 module WatchersHelper
58 58 :object_id => object.id,
59 59 :user_id => user}
60 60 s << ' '
61 s << link_to(image_tag('delete.png'), url,
62 :remote => true, :method => 'delete', :class => "delete")
61 s << link_to('', url,
62 :remote => true, :method => 'delete',
63 :class => "delete icon-only icon-del",
64 :title => l(:button_delete))
63 65 end
64 66 content << content_tag('li', s, :class => "user-#{user.id}")
65 67 end
@@ -6,8 +6,7
6 6 <% @checklist.each do |label, result| %>
7 7 <tr class="<%= cycle 'odd', 'even' %>">
8 8 <td class="name"><%= label.is_a?(Symbol) ? l(label) : label %></td>
9 <td class="tick"><%= image_tag((result ? 'true.png' : 'exclamation.png'),
10 :style => "vertical-align:bottom;") %></td>
9 <td class="tick"><span class="icon-only <%= (result ? 'icon-ok' : 'icon-error') %>"></span></td>
11 10 </tr>
12 11 <% end %>
13 12 </table>
@@ -36,7 +36,7 $(document).ready(function(){
36 36 $("table.plugins td.version span").addClass("unknown");
37 37 $.each(data, function(plugin_id, plugin_data){
38 38 var s = $("tr#plugin-"+plugin_id+" td.version span");
39 s.removeClass("icon-checked icon-warning unknown");
39 s.removeClass("icon-ok icon-warning unknown");
40 40 if (plugin_data.url) {
41 41 if (s.parent("a").length>0) {
42 42 s.unwrap();
@@ -45,7 +45,7 $(document).ready(function(){
45 45 s.wrap($("<a></a>").attr("href", plugin_data.url).attr("target", "_blank"));
46 46 }
47 47 if (plugin_data.c == s.text()) {
48 s.addClass("icon-checked");
48 s.addClass("icon-ok");
49 49 } else if (plugin_data.c) {
50 50 s.addClass("icon-warning");
51 51 s.attr("title", "<%= escape_javascript l(:label_latest_compatible_version) %>: "+plugin_data.c);
@@ -1,24 +1,28
1 1 <div class="attachments">
2 2 <div class="contextual">
3 <%= link_to image_tag('edit.png'),
4 container_attachments_edit_path(container),
5 :title => l(:label_edit_attachments) if options[:editable] %>
3 <%= link_to('',
4 container_attachments_edit_path(container),
5 :title => l(:label_edit_attachments),
6 :class => 'icon-only icon-edit'
7 ) if options[:editable] %>
6 8 </div>
7 9 <% for attachment in attachments %>
8 10 <p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
9 11 <% if attachment.is_text? %>
10 <%= link_to image_tag('magnifier.png'),
11 :controller => 'attachments', :action => 'show',
12 :id => attachment, :filename => attachment.filename %>
12 <%= link_to '',
13 { :controller => 'attachments', :action => 'show',
14 :id => attachment, :filename => attachment.filename },
15 :class => 'icon icon-magnifier',
16 :title => l(:button_view) %>
13 17 <% end %>
14 18 <%= " - #{attachment.description}" unless attachment.description.blank? %>
15 19 <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
16 20 <% if options[:deletable] %>
17 <%= link_to image_tag('delete.png'), attachment_path(attachment),
18 :data => {:confirm => l(:text_are_you_sure)},
19 :method => :delete,
20 :class => 'delete',
21 :title => l(:button_delete) %>
21 <%= link_to '', attachment_path(attachment),
22 :data => {:confirm => l(:text_are_you_sure)},
23 :method => :delete,
24 :class => 'delete icon-only icon-del',
25 :title => l(:button_delete) %>
22 26 <% end %>
23 27 <% if options[:author] %>
24 28 <span class="author"><%= attachment.author %>, <%= format_time(attachment.created_on) %></span>
@@ -20,22 +20,26
20 20
21 21 <% if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %>
22 22 <p><%= f.select :category_id, (@issue.project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true, :required => @issue.required_attribute?('category_id') %>
23 <%= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
23 <%= link_to('',
24 24 new_project_issue_category_path(@issue.project),
25 25 :remote => true,
26 26 :method => 'get',
27 27 :title => l(:label_issue_category_new),
28 :tabindex => 200) if User.current.allowed_to?(:manage_categories, @issue.project) %></p>
28 :tabindex => 200,
29 :class => 'icon-only icon-add'
30 ) if User.current.allowed_to?(:manage_categories, @issue.project) %></p>
29 31 <% end %>
30 32
31 33 <% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
32 34 <p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true, :required => @issue.required_attribute?('fixed_version_id') %>
33 <%= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
35 <%= link_to('',
34 36 new_project_version_path(@issue.project),
35 37 :remote => true,
36 38 :method => 'get',
37 39 :title => l(:label_version_new),
38 :tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
40 :tabindex => 200,
41 :class => 'icon-only icon-add'
42 ) if User.current.allowed_to?(:manage_versions, @issue.project) %>
39 43 </p>
40 44 <% end %>
41 45 </div>
@@ -19,12 +19,14
19 19 <td class="status"><%= other_issue.status.name %></td>
20 20 <td class="start_date"><%= format_date(other_issue.start_date) %></td>
21 21 <td class="due_date"><%= format_date(other_issue.due_date) %></td>
22 <td class="buttons"><%= link_to image_tag('link_break.png'),
22 <td class="buttons"><%= link_to('',
23 23 relation_path(relation),
24 24 :remote => true,
25 25 :method => :delete,
26 26 :data => {:confirm => l(:text_are_you_sure)},
27 :title => l(:label_relation_delete) if User.current.allowed_to?(:manage_issue_relations, @project) %></td>
27 :title => l(:label_relation_delete),
28 :class => 'icon-only icon-link-break'
29 ) if User.current.allowed_to?(:manage_issue_relations, @project) %></td>
28 30 </tr>
29 31 <% end %>
30 32 </table>
@@ -39,22 +39,26
39 39 <div class="message reply" id="<%= "message-#{message.id}" %>">
40 40 <div class="contextual">
41 41 <%= link_to(
42 image_tag('comment.png'),
42 '',
43 43 {:action => 'quote', :id => message},
44 44 :remote => true,
45 45 :method => 'get',
46 :title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
46 :title => l(:button_quote),
47 :class => 'icon icon-comment'
48 ) if !@topic.locked? && authorize_for('messages', 'reply') %>
47 49 <%= link_to(
48 image_tag('edit.png'),
50 '',
49 51 {:action => 'edit', :id => message},
50 :title => l(:button_edit)
52 :title => l(:button_edit),
53 :class => 'icon icon-edit'
51 54 ) if message.editable_by?(User.current) %>
52 55 <%= link_to(
53 image_tag('delete.png'),
56 '',
54 57 {:action => 'destroy', :id => message},
55 58 :method => :post,
56 59 :data => {:confirm => l(:text_are_you_sure)},
57 :title => l(:button_delete)
60 :title => l(:button_delete),
61 :class => 'icon icon-del'
58 62 ) if message.destroyable_by?(User.current) %>
59 63 </div>
60 64 <h4>
@@ -42,12 +42,13 entries_by_day = entries.group_by(&:spent_on)
42 42 <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
43 43 <td class="buttons">
44 44 <% if entry.editable_by?(@user) -%>
45 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry},
46 :title => l(:button_edit) %>
47 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry},
48 :data => {:confirm => l(:text_are_you_sure)},
49 :method => :delete,
50 :title => l(:button_delete) %>
45 <%= link_to '', {:controller => 'timelog', :action => 'edit', :id => entry},
46 :title => l(:button_edit),
47 :class => 'icon-only icon-edit' %>
48 <%= link_to '', {:controller => 'timelog', :action => 'destroy', :id => entry},
49 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete,
50 :title => l(:button_delete),
51 :class => 'icon-only icon-del' %>
51 52 <% end -%>
52 53 </td>
53 54 </tr>
@@ -36,8 +36,10
36 36 <% @comments.each do |comment| %>
37 37 <% next if comment.new_record? %>
38 38 <div class="contextual">
39 <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
40 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
39 <%= link_to_if_authorized '', {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
40 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete,
41 :title => l(:button_delete),
42 :class => 'icon-only icon-del' %>
41 43 </div>
42 44 <h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
43 45 <%= textilizable(comment.comments) %>
@@ -1,31 +1,52
1 1 <h2><%=l(:label_report_plural)%></h2>
2 2
3 3 <div class="splitcontentleft">
4 <h3><%=l(:field_tracker)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'tracker') %></h3>
4 <h3>
5 <%=l(:field_tracker)%>&nbsp;
6 <%= link_to '', project_issues_report_details_path(@project, :detail => 'tracker'), :class => 'icon-only icon-zoom-in' %>
7 </h3>
5 8 <%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %>
6 9 <br />
7 <h3><%=l(:field_priority)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'priority') %></h3>
10 <h3>
11 <%=l(:field_priority)%>&nbsp;
12 <%= link_to '', project_issues_report_details_path(@project, :detail => 'priority'), :class => 'icon-only icon-zoom-in' %>
13 </h3>
8 14 <%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %>
9 15 <br />
10 <h3><%=l(:field_assigned_to)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'assigned_to') %></h3>
16 <h3>
17 <%=l(:field_assigned_to)%>&nbsp;
18 <%= link_to '', project_issues_report_details_path(@project, :detail => 'assigned_to'), :class => 'icon-only icon-zoom-in' %>
19 </h3>
11 20 <%= render :partial => 'simple', :locals => { :data => @issues_by_assigned_to, :field_name => "assigned_to_id", :rows => @assignees } %>
12 21 <br />
13 <h3><%=l(:field_author)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'author') %></h3>
22 <h3>
23 <%=l(:field_author)%>&nbsp;
24 <%= link_to '', project_issues_report_details_path(@project, :detail => 'author'), :class => 'icon-only icon-zoom-in' %>
25 </h3>
14 26 <%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %>
15 27 <br />
16 28 <%= call_hook(:view_reports_issue_report_split_content_left, :project => @project) %>
17 29 </div>
18 30
19 31 <div class="splitcontentright">
20 <h3><%=l(:field_version)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'version') %></h3>
32 <h3>
33 <%=l(:field_version)%>&nbsp;
34 <%= link_to '', project_issues_report_details_path(@project, :detail => 'version'), :class => 'icon-only icon-zoom-in' %>
35 </h3>
21 36 <%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %>
22 37 <br />
23 38 <% if @project.children.any? %>
24 <h3><%=l(:field_subproject)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'subproject') %></h3>
39 <h3>
40 <%=l(:field_subproject)%>&nbsp;
41 <%= link_to '', project_issues_report_details_path(@project, :detail => 'subproject'), :class => 'icon-only icon-zoom-in' %>
42 </h3>
25 43 <%= render :partial => 'simple', :locals => { :data => @issues_by_subproject, :field_name => "project_id", :rows => @subprojects } %>
26 44 <br />
27 45 <% end %>
28 <h3><%=l(:field_category)%>&nbsp;&nbsp;<%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'category') %></h3>
46 <h3>
47 <%=l(:field_category)%>&nbsp;
48 <%= link_to '', project_issues_report_details_path(@project, :detail => 'category'), :class => 'icon-only icon-zoom-in' %>
49 </h3>
29 50 <%= render :partial => 'simple', :locals => { :data => @issues_by_category, :field_name => "category_id", :rows => @categories } %>
30 51 <br />
31 52 <%= call_hook(:view_reports_issue_report_split_content_right, :project => @project) %>
@@ -9,9 +9,11
9 9 <th><%=l(:label_permissions)%></th>
10 10 <% @roles.each do |role| %>
11 11 <th>
12 <%= link_to_function('',
13 "toggleCheckboxesBySelector('input.role-#{role.id}')",
14 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
15 :class => 'icon-only icon-checked') %>
12 16 <%= content_tag(role.builtin? ? 'em' : 'span', role.name) %>
13 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.role-#{role.id}')",
14 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
15 17 </th>
16 18 <% end %>
17 19 </tr>
@@ -33,8 +35,10
33 35 <% perms_by_module[mod].each do |permission| %>
34 36 <tr class="<%= cycle('odd', 'even') %> permission-<%= permission.name %>">
35 37 <td class="name">
36 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('.permission-#{permission.name} input')",
37 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
38 <%= link_to_function('',
39 "toggleCheckboxesBySelector('.permission-#{permission.name} input')",
40 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
41 :class => 'icon-only icon-checked') %>
38 42 <%= l_or_humanize(permission.name, :prefix => 'permission_') %>
39 43 </td>
40 44 <% @roles.each do |role| %>
@@ -23,12 +23,7
23 23 </td>
24 24 <td>
25 25 <% if enabled %>
26 <%=
27 image_tag(
28 (scm_class.scm_available ? 'true.png' : 'exclamation.png'),
29 :style => "vertical-align:bottom;"
30 )
31 %>
26 <span class="icon <%= (scm_class.scm_available ? 'icon-ok' : 'icon-error') %>"></span>
32 27 <%= scm_class.scm_command %>
33 28 <% end %>
34 29 </td>
@@ -124,7 +119,8
124 119 ) %>
125 120 </td>
126 121 <td class="buttons">
127 <%= link_to(image_tag('delete.png'), '#', :class => 'delete-commit-keywords') %>
122 <%= link_to('', '#',
123 :class => 'delete-commit-keywords icon-only icon-del') %>
128 124 </td>
129 125 </tr>
130 126 <% end %>
@@ -133,7 +129,10
133 129 <td><em class="info"><%= l(:text_comma_separated) %></em></td>
134 130 <td></td>
135 131 <td></td>
136 <td class="buttons"><%= link_to(image_tag('add.png'), '#', :class => 'add-commit-keywords') %></td>
132 <td class="buttons">
133 <%= link_to('', '#',
134 :class => 'add-commit-keywords icon-only icon-add') %>
135 </td>
137 136 </tr>
138 137 </tbody>
139 138 </table>
@@ -21,12 +21,14
21 21 <%= raw @query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, entry)}</td>"}.join %>
22 22 <td class="buttons">
23 23 <% if entry.editable_by?(User.current) -%>
24 <%= link_to image_tag('edit.png'), edit_time_entry_path(entry),
25 :title => l(:button_edit) %>
26 <%= link_to image_tag('delete.png'), time_entry_path(entry),
27 :data => {:confirm => l(:text_are_you_sure)},
28 :method => :delete,
29 :title => l(:button_delete) %>
24 <%= link_to '', edit_time_entry_path(entry),
25 :title => l(:button_edit),
26 :class => 'icon icon-edit' %>
27 <%= link_to '', time_entry_path(entry),
28 :data => {:confirm => l(:text_are_you_sure)},
29 :method => :delete,
30 :title => l(:button_delete),
31 :class => 'icon-only icon-del' %>
30 32 <% end -%>
31 33 </td>
32 34 </tr>
@@ -9,9 +9,10
9 9 <th></th>
10 10 <% @trackers.each do |tracker| %>
11 11 <th>
12 <%= link_to_function('', "toggleCheckboxesBySelector('input.tracker-#{tracker.id}')",
13 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
14 :class => 'icon-only icon-checked') %>
12 15 <%= tracker.name %>
13 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.tracker-#{tracker.id}')",
14 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
15 16 </th>
16 17 <% end %>
17 18 </tr>
@@ -26,8 +27,9
26 27 <% Tracker::CORE_FIELDS.each do |field| %>
27 28 <tr class="<%= cycle("odd", "even") %>">
28 29 <td class="name">
29 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.core-field-#{field}')",
30 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
30 <%= link_to_function('', "toggleCheckboxesBySelector('input.core-field-#{field}')",
31 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
32 :class => 'icon-only icon-checked') %>
31 33 <%= l("field_#{field}".sub(/_id$/, '')) %>
32 34 </td>
33 35 <% @trackers.each do |tracker| %>
@@ -48,8 +50,9
48 50 <% @custom_fields.each do |field| %>
49 51 <tr class="<%= cycle("odd", "even") %>">
50 52 <td class="name">
51 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
52 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
53 <%= link_to_function('', "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
54 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
55 :class => 'icon-only icon-checked') %>
53 56 <%= field.name %>
54 57 </td>
55 58 <% @trackers.each do |tracker| %>
@@ -2,8 +2,9
2 2 <thead>
3 3 <tr>
4 4 <th>
5 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input')",
6 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
5 <%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input')",
6 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
7 :class => 'icon-only icon-checked') %>
7 8 <%=l(:label_current_status)%>
8 9 </th>
9 10 <th colspan="<%= @statuses.length %>"><%=l(:label_new_statuses_allowed)%></th>
@@ -12,8 +13,9
12 13 <td></td>
13 14 <% for new_status in @statuses %>
14 15 <td style="width:<%= 75 / @statuses.size %>%;">
15 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.new-status-#{new_status.id}')",
16 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
16 <%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input.new-status-#{new_status.id}')",
17 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
18 :class => 'icon-only icon-checked') %>
17 19 <%= new_status.name %>
18 20 </td>
19 21 <% end %>
@@ -24,8 +26,9
24 26 <% next if old_status.nil? && name != 'always' %>
25 27 <tr class="<%= cycle("odd", "even") %>">
26 28 <td class="name">
27 <%= link_to_function(image_tag('toggle_check.png'), "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.try(:id) || 0}')",
28 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %>
29 <%= link_to_function('', "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.try(:id) || 0}')",
30 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
31 :class => 'icon-only icon-checked') %>
29 32
30 33 <%= old_status ? old_status.name : content_tag('em', l(:label_issue_new)) %>
31 34 </td>
@@ -16,12 +16,12
16 16 <label><%=l(:label_role)%>:
17 17 <%= options_for_workflow_select 'role_id[]', Role.sorted.select(&:consider_workflow?), @roles, :id => 'role_id', :class => 'expandable' %>
18 18 </label>
19 <a href="#" data-expands="#role_id"><%= image_tag 'bullet_toggle_plus.png' %></a>
19 <a href="#" data-expands="#role_id"><span class="toggle-multiselect"></span></a>
20 20
21 21 <label><%=l(:label_tracker)%>:
22 22 <%= options_for_workflow_select 'tracker_id[]', Tracker.sorted, @trackers, :id => 'tracker_id', :class => 'expandable' %>
23 23 </label>
24 <a href="#" data-expands="#tracker_id"><%= image_tag 'bullet_toggle_plus.png' %></a>
24 <a href="#" data-expands="#tracker_id"><span class="toggle-multiselect"></span></a>
25 25
26 26 <%= submit_tag l(:button_edit), :name => nil %>
27 27
@@ -22,7 +22,9
22 22 <% @roles.each do |role| -%>
23 23 <% count = @workflow_counts[[tracker.id, role.id]] || 0 %>
24 24 <td>
25 <%= link_to((count > 0 ? count : image_tag('false.png')), {:action => 'edit', :role_id => role, :tracker_id => tracker}, :title => l(:button_edit)) %>
25 <%= link_to((count > 0 ? count : content_tag(:span, nil, :class => 'icon-only icon-not-ok')),
26 {:action => 'edit', :role_id => role, :tracker_id => tracker},
27 :title => l(:button_edit)) %>
26 28 </td>
27 29 <% end -%>
28 30 </tr>
@@ -16,12 +16,12
16 16 <label><%=l(:label_role)%>:
17 17 <%= options_for_workflow_select 'role_id[]', Role.sorted.select(&:consider_workflow?), @roles, :id => 'role_id', :class => 'expandable' %>
18 18 </label>
19 <a href="#" data-expands="#role_id"><%= image_tag 'bullet_toggle_plus.png' %></a>
19 <a href="#" data-expands="#role_id"><span class="toggle-multiselect"></a>
20 20
21 21 <label><%=l(:label_tracker)%>:
22 22 <%= options_for_workflow_select 'tracker_id[]', Tracker.sorted, @trackers, :id => 'tracker_id', :class => 'expandable' %>
23 23 </label>
24 <a href="#" data-expands="#tracker_id"><%= image_tag 'bullet_toggle_plus.png' %></a>
24 <a href="#" data-expands="#tracker_id"><span class="toggle-multiselect"></a>
25 25
26 26 <%= submit_tag l(:button_edit), :name => nil %>
27 27
@@ -130,6 +130,9 a.collapsible {padding-left: 12px; background: url(../images/arrow_expanded.png)
130 130 a.collapsible.collapsed {background: url(../images/arrow_collapsed.png) no-repeat -5px 40%;}
131 131
132 132 a#toggle-completed-versions {color:#999;}
133
134 a.toggle-checkboxes { margin-left: 5px; padding-left: 12px; background: url(../images/toggle_check.png) no-repeat 0% 50%; }
135
133 136 /***** Tables *****/
134 137 table.list { border: 1px solid #e4e4e4; border-collapse: collapse; width: 100%; margin-bottom: 4px; }
135 138 table.list th { background-color:#EEEEEE; padding: 4px; white-space:nowrap; }
@@ -297,7 +300,7 div.news h3 { background: url(../images/news.png) no-repeat 0% 50%; padding-left
297 300 div.projects h3 { background: url(../images/projects.png) no-repeat 0% 50%; padding-left: 20px; }
298 301
299 302 #watchers select {width: 95%; display: block;}
300 #watchers a.delete {opacity: 0.4; vertical-align: middle;}
303 #watchers a.delete {opacity: 0.4; margin-left: 5px;}
301 304 #watchers a.delete:hover {opacity: 1;}
302 305 #watchers img.gravatar {margin: 0 4px 2px 0;}
303 306
@@ -391,7 +394,7 fieldset#filters td.values input {height:1em;}
391 394 .add-filter {width:35%; float:right; text-align: right; vertical-align: top;}
392 395
393 396 #issue_is_private_wrap {float:right; margin-right:1em;}
394 .toggle-multiselect {background: url(../images/bullet_toggle_plus.png) no-repeat 0% 40%; padding-left:8px; margin-left:0; cursor:pointer;}
397 .toggle-multiselect {background: url(../images/bullet_toggle_plus.png) no-repeat 0% 40%; padding-left:16px; margin-left:0; margin-right:5px; cursor:pointer;}
395 398 .buttons { font-size: 0.9em; margin-bottom: 1.4em; margin-top: 1em; }
396 399
397 400 div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;}
@@ -461,6 +464,7 div.wiki-page .contextual a {opacity: 0.4}
461 464 div.wiki-page .contextual a:hover {opacity: 1}
462 465
463 466 form .attributes select { width: 60%; }
467 form .attributes select + a.icon-only { vertical-align: middle; margin-left: 4px; }
464 468 input#issue_subject, input#document_title { width: 99%; }
465 469 select#issue_done_ratio { width: 95px; }
466 470
@@ -1089,6 +1093,11 a.close-icon:hover {background-image:url('../images/close_hl.png');}
1089 1093 padding-top: 2px;
1090 1094 padding-bottom: 3px;
1091 1095 }
1096 .icon-only {
1097 background-position: 0% 50%;
1098 background-repeat: no-repeat;
1099 padding-left: 16px;
1100 }
1092 1101
1093 1102 .icon-add { background-image: url(../images/add.png); }
1094 1103 .icon-edit { background-image: url(../images/edit.png); }
@@ -1111,12 +1120,13 a.close-icon:hover {background-image:url('../images/close_hl.png');}
1111 1120 .icon-time-add { background-image: url(../images/time_add.png); }
1112 1121 .icon-stats { background-image: url(../images/stats.png); }
1113 1122 .icon-warning { background-image: url(../images/warning.png); }
1123 .icon-error { background-image: url(../images/exclamation.png); }
1114 1124 .icon-fav { background-image: url(../images/fav.png); }
1115 1125 .icon-fav-off { background-image: url(../images/fav_off.png); }
1116 1126 .icon-reload { background-image: url(../images/reload.png); }
1117 1127 .icon-lock { background-image: url(../images/locked.png); }
1118 1128 .icon-unlock { background-image: url(../images/unlock.png); }
1119 .icon-checked { background-image: url(../images/true.png); }
1129 .icon-checked { background-image: url(../images/toggle_check.png); }
1120 1130 .icon-details { background-image: url(../images/zoom_in.png); }
1121 1131 .icon-report { background-image: url(../images/report.png); }
1122 1132 .icon-comment { background-image: url(../images/comment.png); }
@@ -1125,9 +1135,19 a.close-icon:hover {background-image:url('../images/close_hl.png');}
1125 1135 .icon-issue { background-image: url(../images/ticket.png); }
1126 1136 .icon-zoom-in { background-image: url(../images/zoom_in.png); }
1127 1137 .icon-zoom-out { background-image: url(../images/zoom_out.png); }
1138 .icon-magnifier { background-image: url(../images/magnifier.png); }
1128 1139 .icon-passwd { background-image: url(../images/textfield_key.png); }
1129 1140 .icon-test { background-image: url(../images/bullet_go.png); }
1141 .icon-email { background-image: url(../images/email.png); }
1142 .icon-email-disabled { background-image: url(../images/email_disabled.png); }
1130 1143 .icon-email-add { background-image: url(../images/email_add.png); }
1144 .icon-move-up { background-image: url(../images/1uparrow.png); }
1145 .icon-move-top { background-image: url(../images/2uparrow.png); }
1146 .icon-move-down { background-image: url(../images/1downarrow.png); }
1147 .icon-move-bottom { background-image: url(../images/2downarrow.png); }
1148 .icon-ok { background-image: url(../images/true.png); }
1149 .icon-not-ok { background-image: url(../images/false.png); }
1150 .icon-link-break { background-image: url(../images/link_break.png); }
1131 1151
1132 1152 .icon-file { background-image: url(../images/files/default.png); }
1133 1153 .icon-file.text-plain { background-image: url(../images/files/text.png); }
@@ -1424,7 +1424,7 class IssuesControllerTest < ActionController::TestCase
1424 1424 assert_select 'div#watchers ul' do
1425 1425 assert_select 'li' do
1426 1426 assert_select 'a[href="/users/2"]'
1427 assert_select 'a img[alt=Delete]'
1427 assert_select 'a[class*=delete]'
1428 1428 end
1429 1429 end
1430 1430 end
@@ -1441,7 +1441,7 class IssuesControllerTest < ActionController::TestCase
1441 1441 assert_select 'li' do
1442 1442 assert_select 'img.gravatar'
1443 1443 assert_select 'a[href="/users/2"]'
1444 assert_select 'a img[alt=Delete]'
1444 assert_select 'a[class*=delete]'
1445 1445 end
1446 1446 end
1447 1447 end
@@ -1243,14 +1243,14 RAW
1243 1243
1244 1244 # heading that contains inline code
1245 1245 assert_match Regexp.new('<div class="contextual" title="Edit this section" id="section-4">' +
1246 '<a href="/projects/1/wiki/Test/edit\?section=4"><img src="/images/edit.png(\?\d+)?" alt="Edit" /></a></div>' +
1246 '<a class="icon-only icon-edit" href="/projects/1/wiki/Test/edit\?section=4"></a></div>' +
1247 1247 '<a name="Subtitle-with-inline-code"></a>' +
1248 1248 '<h2 >Subtitle with <code>inline code</code><a href="#Subtitle-with-inline-code" class="wiki-anchor">&para;</a></h2>'),
1249 1249 result
1250 1250
1251 1251 # last heading
1252 1252 assert_match Regexp.new('<div class="contextual" title="Edit this section" id="section-5">' +
1253 '<a href="/projects/1/wiki/Test/edit\?section=5"><img src="/images/edit.png(\?\d+)?" alt="Edit" /></a></div>' +
1253 '<a class="icon-only icon-edit" href="/projects/1/wiki/Test/edit\?section=5"></a></div>' +
1254 1254 '<a name="Subtitle-after-pre-tag"></a>' +
1255 1255 '<h2 >Subtitle after pre tag<a href="#Subtitle-after-pre-tag" class="wiki-anchor">&para;</a></h2>'),
1256 1256 result
General Comments 0
You need to be logged in to leave comments. Login now