diff --git a/app/assets/stylesheets/admin/spree_banner.css b/app/assets/stylesheets/admin/spree_banner.css
index 653f925..5ffa536 100644
--- a/app/assets/stylesheets/admin/spree_banner.css
+++ b/app/assets/stylesheets/admin/spree_banner.css
@@ -1,17 +1,3 @@
/*
*= require admin/spree_core
- *= require formtastic
-*/
-
-.formtastic input, .formtastic textarea, .formtastic select {
- font-size: 100%;
- padding: 5px;
-}
-
-.formtastic button {
- margin: 0;
- padding: 0 20px 0 0;
-}
-.formtastic button:hover {
- text-shadow: #FFFFFF -1px -1px 0px;
-}
\ No newline at end of file
+*/
\ No newline at end of file
diff --git a/app/views/spree/admin/banners/_form.html.erb b/app/views/spree/admin/banners/_form.html.erb
deleted file mode 100644
index 21a3cd8..0000000
--- a/app/views/spree/admin/banners/_form.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-<%= f.inputs do %>
- <%= f.input :category, :required => true, :label => t("banner.category") %>
- <%= f.input :url, :label => t("banner.url") %>
- <%= f.input :position, :label => t("banner.position") %>
- <%= f.input :attachment_width, :required => true, :label => t("banner.attachment_width") %>
- <%= f.input :attachment_height, :required => true, :label => t("banner.attachment_height") %>
- <%= f.input :enabled, :label => t("banner.enabled") %>
- <%= f.input :attachment, :required => true, :as => :file, :label => t("banner.image.one").capitalize, :hint => f.object.attachment.blank? ? f.template.content_tag(:span, t("banner.no_image")) : f.template.image_tag(f.object.attachment.url(:thumbnail)) %>
-<% end %>
\ No newline at end of file
diff --git a/app/views/spree/admin/banners/_form.html.haml b/app/views/spree/admin/banners/_form.html.haml
new file mode 100644
index 0000000..c642bbc
--- /dev/null
+++ b/app/views/spree/admin/banners/_form.html.haml
@@ -0,0 +1,43 @@
+- content_for :page_title do
+ = t("banner.many")
+
+.row.alpha.eight.column
+ = f.field_container :category do
+ = f.label :category, t("banner.category")
+ %span.required *
+ = f.text_field :category
+ = f.error_message_on :category
+
+ = f.field_container :url do
+ = f.label :url, t("banner.url")
+ = f.text_field :url
+ = f.error_message_on :url
+
+ = f.field_container :position do
+ = f.label :position, t("banner.position")
+ = f.text_field :position
+ = f.error_message_on :position
+
+ = f.field_container :attachment_width do
+ = f.label :attachment_width, t("banner.attachment_width")
+ %span.required *
+ = f.text_field :attachment_width
+ = f.error_message_on :attachment_width
+
+.row.omega.eight.column
+ = f.field_container :attachment_height do
+ = f.label :attachment_height, t("banner.attachment_height")
+ %span.required *
+ = f.text_field :attachment_height
+ = f.error_message_on :attachment_height
+
+ = f.field_container :enabled do
+ = f.label :enabled, t("banner.enabled")
+ = f.check_box :enabled
+ = f.error_message_on :enabled
+
+ = f.field_container :attachment do
+ = f.label :attachment, t("banner.attachment")
+ = f.file_field :attachment
+ = f.error_message_on :attachment
+ = f.object.attachment.blank? ? f.template.content_tag(:span, t("banner.no_image")) : f.template.image_tag(f.object.attachment.url(:thumbnail))
\ No newline at end of file
diff --git a/app/views/spree/admin/banners/edit.html.erb b/app/views/spree/admin/banners/edit.html.erb
deleted file mode 100644
index e511ed0..0000000
--- a/app/views/spree/admin/banners/edit.html.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-
<%= t("banner.editing_banner") %>
-<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @banner } %>
-
-<%= semantic_form_for([:admin, @banner]) do |f| %>
-<%= render :partial => "form", :locals => { :f => f } %>
-<%= render :partial => 'spree/admin/shared/edit_resource_links' %>
-<% end %>
\ No newline at end of file
diff --git a/app/views/spree/admin/banners/edit.html.haml b/app/views/spree/admin/banners/edit.html.haml
new file mode 100644
index 0000000..0a49041
--- /dev/null
+++ b/app/views/spree/admin/banners/edit.html.haml
@@ -0,0 +1,10 @@
+%fieldset
+ %legend
+ = t("banner.editing_banner")
+ = render :partial => 'spree/shared/error_messages', :locals => { :target => @banner }
+ #banner_edit_form
+ = semantic_form_for([:admin, @banner]) do |f|
+ .row
+ = render :partial => "form", :locals => { :f => f }
+ .form-buttons
+ = render :partial => 'spree/admin/shared/edit_resource_links'
\ No newline at end of file
diff --git a/app/views/spree/admin/banners/index.html.erb b/app/views/spree/admin/banners/index.html.erb
deleted file mode 100644
index 645385f..0000000
--- a/app/views/spree/admin/banners/index.html.erb
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-<%= t("banner.many") %>
-
-
-
- | <%= t("banner.category") %> |
- <%= t("banner.position") %> |
- <%= t("banner.enable") %> |
- <%= t(:action) %> |
-
-
- <% @banners.each do |banner| %>
-
- |
-
- <%= banner.category %>
- |
- <%= banner.position %> |
- <%= icon('tick') if banner.enabled %> |
-
- <%= link_to_edit banner %>
- <%= link_to_delete banner %>
- |
-
- <% end %>
-
-
\ No newline at end of file
diff --git a/app/views/spree/admin/banners/index.html.haml b/app/views/spree/admin/banners/index.html.haml
new file mode 100644
index 0000000..8fb9bf6
--- /dev/null
+++ b/app/views/spree/admin/banners/index.html.haml
@@ -0,0 +1,24 @@
+- content_for :page_title do
+ = t("banner.many")
+- content_for :page_actions do
+ %li
+ = button_link_to t("banner.new_banner"), spree.new_admin_banner_path, :icon => 'icon-plus'
+
+%table.index.sortable{"data-hook" => "", "data-sortable-link" => update_positions_admin_banners_url}
+ %thead
+ %th= t("banner.category")
+ %th= t("banner.position")
+ %th= t("banner.enable")
+ %th.actions
+ %tbody
+ - @banners.each do |banner|
+ %tr{:class => cycle('even', 'odd'), :id => "#{dom_id banner}"}
+ %td
+ %span.handle
+ = banner.category
+ %td= banner.position
+ %td= icon('tick') if banner.enabled
+ %td.actions
+ = link_to_edit banner
+ \
+ \#{link_to_delete banner}
\ No newline at end of file
diff --git a/app/views/spree/admin/banners/new.html.erb b/app/views/spree/admin/banners/new.html.erb
deleted file mode 100644
index 5b16e1f..0000000
--- a/app/views/spree/admin/banners/new.html.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= t("banner.new_banner") %>
-<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @banner } %>
-
-<%= semantic_form_for([:admin, @banner], :html => { :enctype => "multipart/form-data" }) do |f| %>
- <%= render :partial => "form", :locals => { :f => f } %>
- <%= render :partial => 'spree/admin/shared/new_resource_links' %>
-<% end %>
\ No newline at end of file
diff --git a/app/views/spree/admin/banners/new.html.haml b/app/views/spree/admin/banners/new.html.haml
new file mode 100644
index 0000000..728712e
--- /dev/null
+++ b/app/views/spree/admin/banners/new.html.haml
@@ -0,0 +1,8 @@
+%fieldset
+ %legend
+ = t("banner.new_banner")
+ = render :partial => 'spree/shared/error_messages', :locals => { :target => @banner }
+ = semantic_form_for([:admin, @banner], :html => { :enctype => "multipart/form-data" }) do |f|
+ = render :partial => "form", :locals => { :f => f }
+ .row
+ = render :partial => 'spree/admin/shared/new_resource_links'
\ No newline at end of file
diff --git a/spree_banner.gemspec b/spree_banner.gemspec
index fb14bbf..49119d4 100644
--- a/spree_banner.gemspec
+++ b/spree_banner.gemspec
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'
- s.add_dependency 'spree_core', '~> 1.2.0'
+ s.add_dependency 'spree_core', '~> 1.2'
s.add_dependency 'formtastic'
s.add_dependency 'paperclip'