mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 21:56:55 -04:00
Moved garden photos to right/bottom
This commit is contained in:
@@ -53,21 +53,6 @@
|
||||
Why not
|
||||
= link_to 'tell us more.', edit_garden_path(@garden)
|
||||
|
||||
- if @garden.photos.size.positive?
|
||||
%h3= localize_plural(@garden.photos, Photo)
|
||||
.row
|
||||
- @garden.photos.includes(:owner).each do |photo|
|
||||
.col-xs-4.col-md-2
|
||||
= render partial: 'photos/thumbnail', locals: { photo: photo }
|
||||
|
||||
- if can?(:edit, @garden) && can?(:create, Photo)
|
||||
.row
|
||||
.col-md-12
|
||||
%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
|
||||
%h3 What's planted here?
|
||||
.row
|
||||
- if @garden.plantings.size.positive?
|
||||
@@ -114,9 +99,24 @@
|
||||
- @garden.owner.gardens.inactive.each do |othergarden|
|
||||
%li
|
||||
- if @garden == othergarden
|
||||
= @garden
|
||||
= @garden.name
|
||||
- else
|
||||
= link_to othergarden, garden_path(othergarden)
|
||||
|
||||
- if @garden.owner == current_member
|
||||
= link_to 'Add New Garden', new_garden_path, class: 'btn btn-default btn-xs'
|
||||
%p
|
||||
= link_to new_garden_path, class: 'btn btn-default btn-xs' do
|
||||
Add New 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
|
||||
- if @garden.photos.size.positive?
|
||||
%h3= localize_plural(@garden.photos, Photo)
|
||||
.row
|
||||
- @garden.photos.includes(:owner).each do |photo|
|
||||
.col-xs-6
|
||||
= render partial: 'photos/thumbnail', locals: { photo: photo }
|
||||
@@ -45,10 +45,8 @@
|
||||
- plantings.first(10).each.with_index do |planting, index|
|
||||
.col-xs-12.col-lg-6
|
||||
= render partial: "plantings/thumbnail", locals: { planting: planting, index: index }
|
||||
.row
|
||||
= link_to "View all plantings >>", plantings_path
|
||||
= link_to "View all plantings >>", plantings_path
|
||||
- else
|
||||
.row
|
||||
%p No nearby plantings found
|
||||
%p No nearby plantings found
|
||||
- else
|
||||
%p No results found
|
||||
|
||||
@@ -36,17 +36,24 @@
|
||||
|
||||
%p= render partial: 'plantings/planting_progress', locals: { planting: planting }
|
||||
|
||||
= link_to 'Details', planting_path(planting), class: 'btn btn-default btn-xs'
|
||||
= link_to 'Details', planting_path(planting),
|
||||
class: 'btn btn-default btn-xs'
|
||||
|
||||
- if can? :edit, planting
|
||||
= link_to edit_planting_path(planting), class: 'btn btn-default btn-xs' do
|
||||
= 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'
|
||||
= 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?' },
|
||||
|
||||
Reference in New Issue
Block a user