Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.
/ auto_admin Public archive

Commit

Permalink
Getting rid of url_for's :escape option.
Browse files Browse the repository at this point in the history
  • Loading branch information
baldowl committed Mar 4, 2009
1 parent 656d1b3 commit ff4a589
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/auto_admin_django_theme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def static_text_without_theme(field, options = {})
v = @object.send(field)
if v == true || v == false
v = v ? 'Yes' : 'No'
helpers.send(:image_tag, helpers.send(:url_for, :escape => false, :action => :asset, :path => "images/auto_admin/icon-#{v.downcase}.gif" ), :alt => v, :title => v)
helpers.send(:image_tag, helpers.send(:url_for, :action => :asset, :path => %W(images auto_admin icon-#{v.downcase}.gif)), :alt => v, :title => v)
else
super
end
Expand Down Expand Up @@ -130,7 +130,7 @@ def delete_button options={}
<<-foo
<a href="#" onclick="this.getElementsByTagName('input')[0].value = 'DELETE'; this.parentNode.parentNode.style.display = 'none'; return false;">
<input type="hidden" value="" name="#{@object_name}[delete]" />
#{helpers.send(:image_tag, helpers.send(:url_for, :escape => false, :action => :asset, :path => "images/auto_admin/icon_deletelink.gif" ), :alt => ' [X]', :title => 'Delete')}
#{helpers.send(:image_tag, helpers.send(:url_for, :action => :asset, :path => %w(images auto_admin icon_deletelink.gif)), :alt => ' [X]', :title => 'Delete')}
</a>
foo
end
Expand Down
2 changes: 1 addition & 1 deletion lib/auto_admin_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def value_html_for object, field, explicit_none=false, return_klass=false
cell_content = case column && column.type
when :boolean
value = value ? 'Yes' : 'No'
image_tag url_for( :escape => false, :action => :asset, :path => "images/auto_admin/icon-#{value.downcase}.gif" ), :alt => value, :title => value
image_tag url_for(:action => :asset, :path => %W(images auto_admin icon-#{value.downcase}.gif)), :alt => value, :title => value
else
h value
end
Expand Down
4 changes: 2 additions & 2 deletions themes/django/public/stylesheets/auto_admin.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import url(stylesheets/auto_admin_global.css);
@import url(stylesheets/auto_admin_changelists.css);
@import url(auto_admin_global.css);
@import url(auto_admin_changelists.css);

#branding h1 a { color: #f4f379 !important; }
th.boolean, td.boolean { text-align: center; }
Expand Down
2 changes: 1 addition & 1 deletion themes/django/views/layouts/layout.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
<head>
<title><%=h @title ? "#{@title} | " : '' %><%=h site.name %></title>
<%= tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => url_for( :action => 'asset', :path => 'stylesheets/auto_admin.css', :escape => false ) } ) %>
<%= tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => url_for( :action => 'asset', :path => %w(stylesheets auto_admin.css)) } ) %>
<%= javascript_include_tag :defaults %>
<%= tag("meta", { "http-equiv" => "refresh", "content" => @auto_admin_refresh_time } ) if @auto_admin_refresh_time %>
</head>
Expand Down
2 changes: 1 addition & 1 deletion themes/django/views/list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<% if model.searchable? %>
<div id="toolbar"><form id="changelist-search" action="" method="get">
<label><%= image_tag url_for( :action => 'asset', :path => 'images/auto_admin/icon_searchbox.png', :escape => false ), :alt => 'Search for:', :title => 'Search' %></label>
<label><%= image_tag url_for( :action => 'asset', :path => %w(images auto_admin icon_searchbox.png)), :alt => 'Search for:', :title => 'Search' %></label>
<%= text_field_tag :search, params[:search], :id => 'searchbar', :size => 40 %>
<%= submit_tag 'Go', :name => nil %>
<%= current_list_page_as_fields :search %>
Expand Down

0 comments on commit ff4a589

Please sign in to comment.