mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-25 09:19:15 -04:00
Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
812a6f5ec2 | ||
|
|
f1b42ec699 | ||
|
|
26c17ea19c | ||
|
|
acc75f80bf | ||
|
|
a79a65363f | ||
|
|
dfeb4804e7 | ||
|
|
9d20fafd06 | ||
|
|
e9a5ef0058 | ||
|
|
d2378376e4 | ||
|
|
4b1b5d8a18 | ||
|
|
a0770e80e7 | ||
|
|
f39fe94173 | ||
|
|
976bdbbd96 | ||
|
|
cff1d8bfb9 | ||
|
|
bbdc54cb69 | ||
|
|
36f1f7b71a | ||
|
|
e1731793dd | ||
|
|
8ea3b27612 | ||
|
|
9469a69078 | ||
|
|
cc46fe3336 | ||
|
|
52b4064a2d | ||
|
|
d367b9ef21 | ||
|
|
4711e4669f | ||
|
|
3e55024f98 | ||
|
|
ccf56bf944 | ||
|
|
42e51a9cf6 | ||
|
|
667e0cc0e3 | ||
|
|
339830b3bb | ||
|
|
7770164672 | ||
|
|
f333607572 | ||
|
|
87d3764eeb | ||
|
|
faf487b719 | ||
|
|
3dbf0df19e | ||
|
|
cd272a6443 | ||
|
|
936a8778ed |
@@ -44,8 +44,6 @@ PreCommit:
|
||||
command: ['npm', 'run', 'csslint']
|
||||
HamlLint:
|
||||
enabled: true
|
||||
requires_files: true
|
||||
on_warn: fail
|
||||
command: ['bundle', 'exec', 'haml-lint', 'app/views']
|
||||
JsonSyntax:
|
||||
enabled: true
|
||||
|
||||
@@ -25,7 +25,7 @@ GEM
|
||||
addressable
|
||||
active_merchant-paypal-bogus-gateway (0.1.0)
|
||||
activemerchant
|
||||
active_utils (3.3.3)
|
||||
active_utils (3.3.4)
|
||||
activesupport (>= 3.2, < 5.2.0)
|
||||
i18n
|
||||
activejob (4.2.8)
|
||||
@@ -73,7 +73,7 @@ GEM
|
||||
bootstrap-sass (3.3.7)
|
||||
autoprefixer-rails (>= 5.2.1)
|
||||
sass (>= 3.3.4)
|
||||
bootstrap_form (2.6.0)
|
||||
bootstrap_form (2.7.0)
|
||||
builder (3.2.3)
|
||||
bullet (5.5.1)
|
||||
activesupport (>= 3.0.0)
|
||||
@@ -266,7 +266,7 @@ GEM
|
||||
js-routes (1.3.3)
|
||||
railties (>= 3.2)
|
||||
sprockets-rails
|
||||
json (2.0.4)
|
||||
json (2.1.0)
|
||||
jwt (1.5.6)
|
||||
kaminari (0.17.0)
|
||||
actionpack (>= 3.0.0)
|
||||
@@ -446,7 +446,7 @@ GEM
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
tilt (>= 1.1, < 3)
|
||||
selenium-webdriver (3.3.0)
|
||||
selenium-webdriver (3.4.0)
|
||||
childprocess (~> 0.5)
|
||||
rubyzip (~> 1.0)
|
||||
websocket (~> 1.0)
|
||||
|
||||
@@ -108,8 +108,6 @@ p.stats
|
||||
|
||||
.planting
|
||||
dl.planting-attributes
|
||||
font-size: 85%
|
||||
|
||||
dt
|
||||
text-align: left
|
||||
dd
|
||||
@@ -118,14 +116,13 @@ p.stats
|
||||
@media (min-width: $screen-md-min)
|
||||
.planting-thumbnail
|
||||
dl.planting-attributes
|
||||
font-size: 85%
|
||||
width: 100%
|
||||
|
||||
dt
|
||||
text-align: left
|
||||
width: 80px
|
||||
width: 120px
|
||||
dd
|
||||
padding-left: 80px
|
||||
padding-left: 120px
|
||||
margin-left: auto
|
||||
|
||||
.navbar .navbar-form
|
||||
@@ -336,3 +333,7 @@ $state-success-bg: lighten($green, 50%)
|
||||
|
||||
ul.plantings
|
||||
list-style-type: none
|
||||
|
||||
ul.thumbnail-buttons
|
||||
list-style-type: none
|
||||
text-align: right
|
||||
|
||||
@@ -27,9 +27,9 @@ class Planting < ActiveRecord::Base
|
||||
to: :crop,
|
||||
prefix: true
|
||||
|
||||
validates :crop, approved: true
|
||||
|
||||
validates :crop, presence: { message: "must be present and exist in our database" }
|
||||
validates :garden, presence: true
|
||||
validates :crop, presence: true
|
||||
validates :crop, approved: { message: "must be present and exist in our database" }
|
||||
|
||||
validates :quantity,
|
||||
numericality: {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
= link_to image_tag((planting.default_photo ? planting.default_photo.thumbnail_url : 'placeholder_150.png'),
|
||||
alt: planting.crop_id, class: 'img'),
|
||||
planting
|
||||
.col-xs-7.col-md-5
|
||||
.col-xs-7.col-md-6
|
||||
%dl.dl-horizontal.planting-attributes
|
||||
%dt Owner:
|
||||
%dd= link_to planting.owner.login_name, planting.owner
|
||||
@@ -15,10 +15,12 @@
|
||||
%dd= link_to planting.garden.name, planting.garden
|
||||
%dt Planted on:
|
||||
%dd= planting.planted_at
|
||||
%dt Quantity:
|
||||
%dd= display_planting_quantity(planting)
|
||||
%dt Finished on:
|
||||
%dd= display_finished(planting)
|
||||
- if planting.quantity
|
||||
%dt Quantity:
|
||||
%dd= display_planting_quantity(planting)
|
||||
- if planting.finished?
|
||||
%dt Finished on:
|
||||
%dd= display_finished(planting)
|
||||
%dt Sun/shade?:
|
||||
%dd
|
||||
- sunniness = planting.sunniness.blank? ? "not specified" : planting.sunniness
|
||||
@@ -26,32 +28,34 @@
|
||||
= " (#{sunniness})"
|
||||
%dt Planted from:
|
||||
%dd= display_planted_from(planting)
|
||||
.col-xs-1.col-md-3
|
||||
%ul{ style: "list-style-type:none; text-align:right" }
|
||||
%li= link_to 'Details', planting, class: 'btn btn-default btn-xs'
|
||||
- if can? :edit, planting
|
||||
%li= link_to 'Edit', edit_planting_path(planting), class: 'btn btn-default btn-xs'
|
||||
- if can? :create, Harvest
|
||||
%li= link_to 'Harvest', new_planting_harvest_path(planting), class: 'btn btn-default btn-xs'
|
||||
- unless planting.finished
|
||||
%li
|
||||
= 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
|
||||
%li
|
||||
= link_to 'Delete',
|
||||
planting, method: :delete,
|
||||
data: { confirm: 'Are you sure?' },
|
||||
class: 'btn btn-default btn-xs'
|
||||
|
||||
|
||||
.row
|
||||
.col-xs-12.col-md-4
|
||||
%dl
|
||||
%dt Days until maturity:
|
||||
%dd= display_days_before_maturity(planting)
|
||||
%dt Mature in:
|
||||
%dd
|
||||
= display_days_before_maturity(planting)
|
||||
days
|
||||
|
||||
.col-xs-12.col-md-8
|
||||
= render partial: 'plantings/planting_progress', locals: { planting: planting }
|
||||
.col-xs-12.col-md-8
|
||||
= render partial: 'plantings/planting_harvest', locals: { planting: planting }
|
||||
= link_to 'Details', planting, class: 'btn btn-default btn-xs'
|
||||
- if can? :edit, planting
|
||||
= link_to edit_planting_path(planting), class: 'btn btn-default btn-xs' do
|
||||
%span.glyphicon.glyphicon-pencil{ title: "Edit" }
|
||||
- if can?(:edit, planting) && can?(:create, Harvest)
|
||||
= link_to 'Harvest', new_planting_harvest_path(planting), class: 'btn btn-default btn-xs'
|
||||
- if can?(:edit, planting) && !planting.finished
|
||||
= 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 planting, method: :delete,
|
||||
data: { confirm: 'Are you sure?' },
|
||||
class: 'btn btn-default btn-xs' do
|
||||
%span.glyphicon.glyphicon-trash{ title: "Delete" }
|
||||
|
||||
.row
|
||||
.col-xs-12.col-md-12
|
||||
%p= render partial: 'plantings/planting_progress', locals: { planting: planting }
|
||||
|
||||
Reference in New Issue
Block a user