Permalink
Browse files

adding spree admin head template

  • Loading branch information...
1 parent 467723b commit 6078929ccf4f1ff04b1c6bc3e8ab2c07659e64ff @levid committed Apr 24, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 app/views/spree/admin/shared/_head.html.erb
@@ -0,0 +1,26 @@
+<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
+<%= csrf_meta_tags %>
+<title><%= "Spree #{t('administration')}: " %>
+<%= t(controller.controller_name, :default => controller.controller_name.titleize) %></title>
+
+<%= javascript_tag do %>
+ ajax_urls = <%== {
+ :product_search_json => spree.admin_products_url(:format => 'json'),
+ :product_search_basic_json => spree.admin_products_url(:format => 'json', :json_format => 'basic', :limit => 10),
+ :user_search_basic_json => spree.admin_users_url(:format => 'json', :json_format => 'basic', :limit => 10)
+ }.to_json %>;
+
+ strings = <%==
+ [:no_results, :type_to_search, :searching].
+ inject({}){|memo, item| {item => t(item) }}.to_json
+ %>
+<% end %>
+
+<%= stylesheet_link_tag 'admin/all' %>
+<%= javascript_include_tag 'admin/all' %>
+<%= javascript_tag do -%>
+ jQuery.alerts.dialogClass = 'spree';
+ <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
+<% end -%>
+
+<%= yield :head %>

0 comments on commit 6078929

Please sign in to comment.