0001-Replace-uses-of-image_tag-with-CSS.patch

Rebased agains r15041 - Daniel Ritz, 2016-01-09 18:15

Download (44 KB)

View differences:

app/helpers/application_helper.rb
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 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 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 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

  
app/helpers/email_addresses_helper.rb
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
app/helpers/issues_helper.rb
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
app/helpers/journals_helper.rb
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)
app/helpers/watchers_helper.rb
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
app/views/admin/info.html.erb
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>
app/views/admin/plugins.html.erb
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 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);
app/views/attachments/_links.html.erb
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>
app/views/issues/_attributes.html.erb
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>
app/views/issues/_relations.html.erb
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>
app/views/messages/show.html.erb
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>
app/views/my/blocks/_timelog.html.erb
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>
app/views/news/show.html.erb
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) %>
app/views/reports/issue_report.html.erb
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) %>
app/views/repositories/_related_issues.html.erb
11 11
<ul>
12 12
<% @changeset.issues.visible.each do |issue| %>
13 13
  <li id="<%= "related-issue-#{issue.id}" %>"><%= link_to_issue issue %>
14
    <%= link_to(image_tag('link_break.png'),
14
    <%= link_to('',
15 15
                {:controller => 'repositories', :action => 'remove_related_issue',
16 16
                  :id => @project, :repository_id => @repository.identifier_param,
17 17
                  :rev => @changeset.identifier, :issue_id => issue},
18 18
                :remote => true,
19 19
                :method => :delete,
20 20
                :data => {:confirm => l(:text_are_you_sure)},
21
                :title => l(:label_relation_delete)) if manage_allowed %>
21
                :title => l(:label_relation_delete),
22
                :class => 'icon-only icon-link-break'
23
               ) if manage_allowed %>
22 24
  </li>
23 25
<% end %>
24 26
</ul>
app/views/roles/permissions.html.erb
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 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| %>
app/views/settings/_repositories.html.erb
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 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 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>
app/views/timelog/_list.html.erb
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>
app/views/trackers/fields.html.erb
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 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 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| %>
app/views/workflows/_form.html.erb
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 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 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>
app/views/workflows/edit.html.erb
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

  
app/views/workflows/index.html.erb
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>
app/views/workflows/permissions.html.erb
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

  
public/stylesheets/application.css
124 124
a.collapsible.collapsed {background: url(../images/arrow_collapsed.png) no-repeat -5px 40%;}
125 125

  
126 126
a#toggle-completed-versions {color:#999;}
127

  
128
a.toggle-checkboxes { margin-left: 5px; padding-left: 12px; background: url(../images/toggle_check.png) no-repeat 0% 50%; }
129

  
127 130
/***** Tables *****/
128 131
table.list { border: 1px solid #e4e4e4;  border-collapse: collapse; width: 100%; margin-bottom: 4px; }
129 132
table.list th {  background-color:#EEEEEE; padding: 4px; white-space:nowrap; }
......
291 294
div.projects h3 { background: url(../images/projects.png) no-repeat 0% 50%; padding-left: 20px; }
292 295

  
293 296
#watchers select {width: 95%; display: block;}
294
#watchers a.delete {opacity: 0.4; vertical-align: middle;}
297
#watchers a.delete {opacity: 0.4; margin-left: 5px;}
295 298
#watchers a.delete:hover {opacity: 1;}
296 299
#watchers img.gravatar {margin: 0 4px 2px 0;}
297 300

  
......
385 388
.add-filter {width:35%; float:right; text-align: right; vertical-align: top;}
386 389

  
387 390
#issue_is_private_wrap {float:right; margin-right:1em;}
388
.toggle-multiselect {background: url(../images/bullet_toggle_plus.png) no-repeat 0% 40%; padding-left:8px; margin-left:0; cursor:pointer;}
391
.toggle-multiselect {background: url(../images/bullet_toggle_plus.png) no-repeat 0% 40%; padding-left:16px; margin-left:0; margin-right:5px; cursor:pointer;}
389 392
.buttons { font-size: 0.9em; margin-bottom: 1.4em; margin-top: 1em; }
390 393

  
391 394
div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;}
......
455 458
div.wiki-page .contextual a:hover {opacity: 1}
456 459

  
457 460
form .attributes select { width: 60%; }
461
form .attributes select + a.icon-only { vertical-align: middle; margin-left: 4px; }
458 462
input#issue_subject, input#document_title { width: 99%; }
459 463
select#issue_done_ratio { width: 95px; }
460 464

  
......
1083 1087
  padding-top: 2px;
1084 1088
  padding-bottom: 3px;
1085 1089
}
1090
.icon-only {
1091
  background-position: 0% 50%;
1092
  background-repeat: no-repeat;
1093
  padding-left: 16px;
1094
}
1086 1095

  
1087 1096
.icon-add { background-image: url(../images/add.png); }
1088 1097
.icon-edit { background-image: url(../images/edit.png); }
......
1105 1114
.icon-time-add  { background-image: url(../images/time_add.png); }
1106 1115
.icon-stats  { background-image: url(../images/stats.png); }
1107 1116
.icon-warning  { background-image: url(../images/warning.png); }
1117
.icon-error { background-image: url(../images/exclamation.png); }
1108 1118
.icon-fav  { background-image: url(../images/fav.png); }
1109 1119
.icon-fav-off  { background-image: url(../images/fav_off.png); }
1110 1120
.icon-reload  { background-image: url(../images/reload.png); }
1111 1121
.icon-lock  { background-image: url(../images/locked.png); }
1112 1122
.icon-unlock  { background-image: url(../images/unlock.png); }
1113
.icon-checked  { background-image: url(../images/true.png); }
1123
.icon-checked  { background-image: url(../images/toggle_check.png); }
1114 1124
.icon-details  { background-image: url(../images/zoom_in.png); }
1115 1125
.icon-report  { background-image: url(../images/report.png); }
1116 1126
.icon-comment  { background-image: url(../images/comment.png); }
......
1119 1129
.icon-issue { background-image: url(../images/ticket.png); }
1120 1130
.icon-zoom-in { background-image: url(../images/zoom_in.png); }
1121 1131
.icon-zoom-out { background-image: url(../images/zoom_out.png); }
1132
.icon-magnifier { background-image: url(../images/magnifier.png); }
1122 1133
.icon-passwd { background-image: url(../images/textfield_key.png); }
1123 1134
.icon-test { background-image: url(../images/bullet_go.png); }
1135
.icon-email { background-image: url(../images/email.png); }
1136
.icon-email-disabled { background-image: url(../images/email_disabled.png); }
1124 1137
.icon-email-add { background-image: url(../images/email_add.png); }
1138
.icon-move-up { background-image: url(../images/1uparrow.png); }
1139
.icon-move-top { background-image: url(../images/2uparrow.png); }
1140
.icon-move-down { background-image: url(../images/1downarrow.png); }
1141
.icon-move-bottom { background-image: url(../images/2downarrow.png); }
1142
.icon-ok { background-image: url(../images/true.png); }
1143
.icon-not-ok { background-image: url(../images/false.png); }
1144
.icon-link-break { background-image: url(../images/link_break.png); }
1125 1145

  
1126 1146
.icon-file { background-image: url(../images/files/default.png); }
1127 1147
.icon-file.text-plain { background-image: url(../images/files/text.png); }
test/functional/issues_controller_test.rb
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 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
test/unit/helpers/application_helper_test.rb
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
1257
-