From e9d1d11535b08d4baca9c4266d4ee3345fb668d3 Mon Sep 17 00:00:00 2001 From: Taylor Griffin Date: Tue, 21 Oct 2014 19:43:51 +1100 Subject: [PATCH] add append date functionality for planting finished on garden show page and planting list page --- Gemfile | 4 ---- Gemfile.lock | 8 -------- app/views/plantings/_thumbnail.html.haml | 2 +- app/views/plantings/index.html.haml | 2 +- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 2360041eb..65000a6d0 100644 --- a/Gemfile +++ b/Gemfile @@ -78,11 +78,7 @@ gem 'flickraw' # Use unicorn as the app server # gem 'unicorn' -# To use debugger group :development do - # Installation of the debugger gem fails on Travis CI, - # so we don't use it in the test environment - gem 'debugger' # A debugger and irb alternative. Pry doesn't play nice # with unicorn, so start a Webrick server when debugging # with Pry diff --git a/Gemfile.lock b/Gemfile.lock index fae16d6ad..6f6b7d1a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,7 +77,6 @@ GEM coffee-script-source execjs coffee-script-source (1.8.0) - columnize (0.8.9) commonjs (0.2.7) compass (0.12.7) chunky_png (~> 1.2) @@ -96,12 +95,6 @@ GEM dalli (2.7.2) database_cleaner (1.3.0) debug_inspector (0.0.2) - debugger (1.6.8) - columnize (>= 0.3.1) - debugger-linecache (~> 1.2.0) - debugger-ruby_core_source (~> 1.3.5) - debugger-linecache (1.2.0) - debugger-ruby_core_source (1.3.5) devise (3.2.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -336,7 +329,6 @@ DEPENDENCIES csv_shaper dalli database_cleaner (~> 1.3.0) - debugger devise (~> 3.2.0) factory_girl_rails (~> 4.0) figaro diff --git a/app/views/plantings/_thumbnail.html.haml b/app/views/plantings/_thumbnail.html.haml index c8588abf5..4d2b6cdee 100644 --- a/app/views/plantings/_thumbnail.html.haml +++ b/app/views/plantings/_thumbnail.html.haml @@ -42,6 +42,6 @@ - if can? :edit, planting =link_to 'Edit', edit_planting_path(planting), :class => 'btn btn-default btn-xs' - if ! planting.finished - = link_to "Mark as finished", planting_path(planting, :planting => {:finished => 1}), :method => :put, :class => 'btn btn-default btn-xs' + = link_to "Mark as finished", planting_path(planting, :planting => {:finished => 1}), :method => :put, :class => 'btn btn-default btn-xs append-date' - if can? :destroy, planting =link_to 'Delete', planting, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs' diff --git a/app/views/plantings/index.html.haml b/app/views/plantings/index.html.haml index eb1e017dc..e3edabae5 100644 --- a/app/views/plantings/index.html.haml +++ b/app/views/plantings/index.html.haml @@ -53,7 +53,7 @@ - if can? :edit, planting =link_to 'Edit', edit_planting_path(planting), :class => 'btn btn-default btn-xs' - if ! planting.finished - = link_to "Mark as finished", planting_path(planting, :planting => {:finished => 1}), :method => :put, :class => 'btn btn-default btn-xs' + = link_to "Mark as finished", planting_path(planting, :planting => {:finished => 1}), :method => :put, :class => 'btn btn-default btn-xs append-date' - if can? :destroy, planting =link_to 'Delete', planting, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs'