diff --git a/Gemfile b/Gemfile index 99e6c5e..c4a6756 100644 --- a/Gemfile +++ b/Gemfile @@ -40,7 +40,7 @@ gem 'wkhtmltopdf-binary' # in production environments by default. group :assets do gem 'sass-rails', '~> 3.1.5' - gem 'compass', git: 'http://github.com/chriseppstein/compass.git' + gem 'compass', :git => 'http://github.com/chriseppstein/compass.git' gem 'coffee-rails', '~> 3.1.1' gem 'uglifier', '>= 1.0.3' end diff --git a/app/assets/stylesheets/screen.css.scss b/app/assets/stylesheets/screen.css.scss index 6d5ec50..5dcb0a8 100644 --- a/app/assets/stylesheets/screen.css.scss +++ b/app/assets/stylesheets/screen.css.scss @@ -22,3 +22,25 @@ body{ .level_3 { text-indent: 50px; } + +.arrows{ + width: 50px; + form{ + display: inline-block; + margin: 0; + div{ + display: inline-block; + } + .btn{ + padding: 5px; + } + } +} + +#quotes-table{ + td{ + form{ + margin: 0; + } + } +} diff --git a/app/views/quotes/_form.html.haml b/app/views/quotes/_form.html.haml index f4a5d2f..45f9fef 100644 --- a/app/views/quotes/_form.html.haml +++ b/app/views/quotes/_form.html.haml @@ -6,4 +6,3 @@ = f.input :clone, as: :select, collection: quotes_collection, selected: @clone = f.buttons do = f.commit_button - diff --git a/app/views/quotes/show.html.haml b/app/views/quotes/show.html.haml index f1e9f04..c64e569 100644 --- a/app/views/quotes/show.html.haml +++ b/app/views/quotes/show.html.haml @@ -19,7 +19,7 @@ - @quote.descendants.each do |node| - if node.type == 'Section' %tr.section - %td.admin_only + %td.admin_only.arrows = button_to '↑'.html_safe, {controller: 'sections', action: 'update', id: node.id, move: 'up'}, method: :put, class: 'btn' = button_to '↓'.html_safe, {controller: 'sections', action: 'update', id: node.id, move: 'down'}, method: :put, class: 'btn' %td{ class: "level_#{node.level}" } @@ -32,7 +32,7 @@ %td.admin_only= button_to 'destroy', section_path(node), method: :delete, class: 'btn' - else %tr.item - %td.admin_only + %td.admin_only.arrows = button_to '↑'.html_safe, {controller: 'items', action: 'update', id: node.id, move: 'up'}, method: :put, class: 'btn' = button_to '↓'.html_safe, {controller: 'items', action: 'update', id: node.id, move: 'down'}, method: :put, class: 'btn' %td{ class: "level_#{node.level}" }= node.description