diff --git a/app/views/spree/layouts/admin.html.erb b/app/views/spree/layouts/admin.html.erb deleted file mode 100644 index 57cf83f316..0000000000 --- a/app/views/spree/layouts/admin.html.erb +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - <%= render :partial => 'spree/admin/shared/head' %> - - - -
- - <% if flash[:error] %> -
<%= flash[:error] %>
- <% end %> - <% if notice %> -
<%= notice %>
- <% end %> - <% if flash[:success] %> -
<%= flash[:success] %>
- <% end %> - -
-
-
-
<%= Spree.t(:loading) %>...
-
-
- - <%= render :partial => 'spree/admin/shared/alert', :collection => session[:alerts] %> - - - - - - <% if content_for?(:sub_menu) %> - - <% end %> - - <% if content_for?(:page_title) || content_for?(:page_actions) %> -
-
- -
-
- <% if content_for?(:page_title) %> -
-

<%= yield :page_title %>

-
- <% end %> - <% if content_for?(:page_actions) %> -
-
    - <%= yield :page_actions %> -
-
- <% end %> -
-
- -
-
- <% end %> - -
-
-
- <% if content_for?(:table_filter) %> -
-
- <%= yield :table_filter_title %> - <%= yield :table_filter %> -
-
- <% end %> - -
- <%= yield %> -
- - <% if content_for?(:sidebar) %> - - <% end %> -
-
-
-
- -
- - - - diff --git a/app/views/spree/layouts/admin.html.haml b/app/views/spree/layouts/admin.html.haml new file mode 100644 index 0000000000..e8a9bef029 --- /dev/null +++ b/app/views/spree/layouts/admin.html.haml @@ -0,0 +1,75 @@ +%html{:lang => "en"} + %head{"data-hook" => "admin_inside_head"} + %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ + = render :partial => 'spree/admin/shared/head' + + %body.admin + #wrapper{"data-hook" => ""} + - if flash[:error] + .flash.error= flash[:error] + - if notice + .flash.notice= notice + - if flash[:success] + .flash.success= flash[:success] + + #progress + .wrapper + #spinner + .progress-message + = Spree.t(:loading) + \... + + = render :partial => 'spree/admin/shared/alert', :collection => session[:alerts] + + %header#header{"data-hook" => ""} + .container + %figure.columns.five{"data-hook" => "logo-wrapper"} + = link_to image_tag(Spree::Config[:admin_interface_logo], :id => 'logo'), spree.admin_path + %nav.columns.eleven{"data-hook" => "admin_login_navigation_bar"} + + %nav#admin-menu{"data-hook" => ""} + .container + .sixteen.columns.main-menu-wrapper + %ul.inline-menu.fullwidth-menu{"data-hook" => "admin_tabs"} + = render :partial => 'spree/admin/shared/tabs' + + - if content_for?(:sub_menu) + %nav#sub-menu{"data-hook" => ""} + .container + .sixteen.columns + = yield :sub_menu + + - if content_for?(:page_title) || content_for?(:page_actions) + #content-header{"data-hook" => ""} + .container + .sixteen.columns + .block-table + - if content_for?(:page_title) + .table-cell + %h1{:class => "page-title #{yield :page_title_classes}"}= yield :page_title + - if content_for?(:page_actions) + .page-actions.table-cell.toolbar{"data-hook" => "toolbar"} + %ul.inline-menu + = yield :page_actions + + .container + .row + #content{:class => "#{'with-sidebar ' if content_for?(:sidebar)}", "data-hook" => ""} + - if content_for?(:table_filter) + #table-filter{:class => "#{if content_for?(:sidebar) then 'twelve' else 'sixteen' end} columns", "data-hook" => ""} + %fieldset + %legend{:align => "center"}= yield :table_filter_title + = yield :table_filter + %div{:class => "#{if content_for?(:sidebar) then 'twelve' else 'sixteen' end} columns"} + = yield + - if content_for?(:sidebar) + %aside#sidebar.four.columns{"data-hook" => ""} + - if content_for?(:sidebar_title) + %h5.sidebar-title + %span= yield :sidebar_title + = yield :sidebar + + %div{"data-hook" => "admin_footer_scripts"} + + :javascript + Spree.api_key = #{raw(try_spree_current_user.try(:spree_api_key).to_s.inspect)};