Added row divs for members/_gardens, gardens/show, planting/index page.

This commit is contained in:
AELOGICA
2015-07-10 15:27:34 +08:00
parent 3ea9f2b5f2
commit 9eaaa8856f
3 changed files with 24 additions and 19 deletions

View File

@@ -44,17 +44,19 @@
= link_to "Add photo", new_photo_path(:type => "garden", :id => @garden.id), :class => 'btn btn-primary'
%h3 What's planted here?
- if @garden.plantings.current.size > 0
- @garden.plantings.current.each.with_index do |planting_current, index_current|
= render partial: "plantings/thumbnail", locals: {:planting => planting_current}
.row
- if @garden.plantings.current.size > 0
- @garden.plantings.current.each.with_index do |planting_current, index_current|
= render partial: "plantings/thumbnail", locals: {:planting => planting_current}
- else
%p
Nothing is currently planted here.
%h3 Previously planted in this garden
- if @garden.plantings.finished.size > 0
- @garden.plantings.finished.each.with_index do |planting_finished|
= render partial: "plantings/thumbnail", locals: {:planting => planting_finished}
.row
- if @garden.plantings.finished.size > 0
- @garden.plantings.finished.each.with_index do |planting_finished|
= render partial: "plantings/thumbnail", locals: {:planting => planting_finished}
.col-md-3
%h4 About this garden

View File

@@ -34,9 +34,11 @@
= link_to "Add photo", new_photo_path(:type => "garden", :id => g.id), :class => 'btn btn-primary'
%h3 What's planted here?
- if g.featured_plantings.size > 0
- g.featured_plantings.each.with_index do |planting|
= render partial: "plantings/thumbnail", locals: {:planting => planting}
.row
- if g.featured_plantings.size > 0
- g.featured_plantings.each.with_index do |planting|
.col-xs-12.col-lg-6
= render partial: "plantings/thumbnail", locals: {:planting => planting}
%p
= link_to "More about this garden...", url_for(g)

View File

@@ -14,18 +14,19 @@
- else
= render :partial => 'shared/signin_signup', :locals => { :to => "track what you've planted" }
%div.pagination
= page_entries_info @plantings, :model => "plantings"
= will_paginate @plantings
%div.pagination
= page_entries_info @plantings, :model => "plantings"
= will_paginate @plantings
- if @plantings.size > 0
- @plantings.each.with_index do |planting|
.col-xs-12.col-lg-6
= render partial: "plantings/thumbnail", locals: {:planting => planting}
.row
- if @plantings.size > 0
- @plantings.each.with_index do |planting|
.col-xs-12.col-lg-6
= render partial: "plantings/thumbnail", locals: {:planting => planting}
%div.pagination
= page_entries_info @plantings, :model => "plantings"
= will_paginate @plantings
%div.pagination
= page_entries_info @plantings, :model => "plantings"
= will_paginate @plantings
%ul.list-inline
%li The data on this page is available in the following formats: