add append date functionality for planting finished on garden show page and planting list page

This commit is contained in:
Taylor Griffin
2014-10-21 19:43:51 +11:00
parent 4a8297360c
commit e9d1d11535
4 changed files with 2 additions and 14 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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'

View File

@@ -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'