Patch #21245 » 0002-Replace-uses-of-image_tag-with-CSS-part-2.patch
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/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)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'tracker') %></h3> |
|
4 |
<h3> |
|
5 |
<%=l(:field_tracker)%> |
|
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)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'priority') %></h3> |
|
10 |
<h3> |
|
11 |
<%=l(:field_priority)%> |
|
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)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'assigned_to') %></h3> |
|
16 |
<h3> |
|
17 |
<%=l(:field_assigned_to)%> |
|
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)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'author') %></h3> |
|
22 |
<h3> |
|
23 |
<%=l(:field_author)%> |
|
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)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'version') %></h3> |
|
32 |
<h3> |
|
33 |
<%=l(:field_version)%> |
|
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)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'subproject') %></h3> |
|
39 |
<h3> |
|
40 |
<%=l(:field_subproject)%> |
|
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)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'category') %></h3> |
|
46 |
<h3> |
|
47 |
<%=l(:field_category)%> |
|
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/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> |
public/stylesheets/application.css | ||
---|---|---|
294 | 294 |
div.projects h3 { background: url(../images/projects.png) no-repeat 0% 50%; padding-left: 20px; } |
295 | 295 | |
296 | 296 |
#watchers select {width: 95%; display: block;} |
297 |
#watchers a.delete {opacity: 0.4; vertical-align: middle;}
|
|
297 |
#watchers a.delete {opacity: 0.4; margin-left: 5px;}
|
|
298 | 298 |
#watchers a.delete:hover {opacity: 1;} |
299 | 299 |
#watchers img.gravatar {margin: 0 4px 2px 0;} |
300 | 300 | |
... | ... | |
455 | 455 |
div.wiki-page .contextual a:hover {opacity: 1} |
456 | 456 | |
457 | 457 |
form .attributes select { width: 60%; } |
458 |
form .attributes select + a.icon-only { vertical-align: middle; margin-left: 4px; } |
|
458 | 459 |
input#issue_subject, input#document_title { width: 99%; } |
459 | 460 |
select#issue_done_ratio { width: 95px; } |
460 | 461 | |
... | ... | |
1092 | 1093 |
.icon-move-top { background-image: url(../images/2uparrow.png); } |
1093 | 1094 |
.icon-move-down { background-image: url(../images/1downarrow.png); } |
1094 | 1095 |
.icon-move-bottom { background-image: url(../images/2downarrow.png); } |
1095 |
.icon-ok { background-image: url(../images/true.png); } |
|
1096 |
.icon-not-ok { background-image: url(../images/false.png); } |
|
1096 |
.icon-ok { background-image: url(../images/true.png); } |
|
1097 |
.icon-not-ok { background-image: url(../images/false.png); } |
|
1098 |
.icon-magnifier { background-image: url(../images/magnifier.png); } |
|
1099 |
.icon-zoom-in { background-image: url(../images/zoom_in.png); } |
|
1100 |
.icon-zoom-out { background-image: url(../images/zoom_out.png); } |
|
1101 |
.icon-link-break { background-image: url(../images/link_break.png); } |
|
1097 | 1102 | |
1098 | 1103 |
.icon-file { background-image: url(../images/files/default.png); } |
1099 | 1104 |
.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 |