mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-14 03:05:59 -04:00
Adds a more prominent add photo button to garden and planting show views
This commit is contained in:
@@ -12,6 +12,12 @@
|
||||
.row
|
||||
.col-md-9
|
||||
%p.btn-group= render 'gardens/actions', garden: @garden
|
||||
- if can?(:edit, @garden) && can?(:create, Photo)
|
||||
%p
|
||||
= link_to new_photo_path(type: "garden", id: @garden.id),
|
||||
class: 'btn btn-primary' do
|
||||
%span.glyphicon.glyphicon-camera{ title: "Add Photo" }
|
||||
Add Photo
|
||||
|
||||
- unless @garden.active
|
||||
.alert.alert-warning
|
||||
|
||||
@@ -67,6 +67,9 @@
|
||||
%p= render 'plantings/progress', planting: @planting, show_explanation: true
|
||||
|
||||
= render 'plantings/actions', planting: @planting
|
||||
- if !@planting.photos.empty? || (can?(:edit, @planting) && can?(:create, Photo))
|
||||
- if can?(:create, Photo) && can?(:edit, @planting)
|
||||
= link_to "Add photo", new_photo_path(type: "planting", id: @planting.id), class: 'btn btn-primary btn-xs'
|
||||
|
||||
.col-md-6
|
||||
= render partial: "crops/index_card", locals: { crop: @planting.crop }
|
||||
|
||||
Reference in New Issue
Block a user