From 01e676678cfa0feefdd0c852fbb4a08fd2fbfbf1 Mon Sep 17 00:00:00 2001 From: AELOGICA Date: Wed, 8 Jul 2015 10:30:37 +0800 Subject: [PATCH] Removed the '#' column on plantings/_thumbnail partial. --- app/views/gardens/show.html.haml | 14 +++++--------- app/views/members/_gardens.html.haml | 8 +++----- app/views/places/show.html.haml | 4 +--- app/views/plantings/_thumbnail.html.haml | 7 ++----- app/views/plantings/index.html.haml | 8 +++----- 5 files changed, 14 insertions(+), 27 deletions(-) diff --git a/app/views/gardens/show.html.haml b/app/views/gardens/show.html.haml index cef4c95f8..1bfee9516 100644 --- a/app/views/gardens/show.html.haml +++ b/app/views/gardens/show.html.haml @@ -47,15 +47,13 @@ - if @garden.plantings.current.size > 0 .container .row - .col-md-1 - %b # - .col-md-3 + .col-md-4 %b Photo .col-md-6 %b Planting Details .col-md-2 - @garden.plantings.current.each.with_index do |planting_current, index_current| - = render partial: "plantings/thumbnail", locals: {:planting => planting_current, :index => index_current} + = render partial: "plantings/thumbnail", locals: {:planting => planting_current} - else %p Nothing is currently planted here. @@ -64,15 +62,13 @@ - if @garden.plantings.finished.size > 0 .container .row - .col-md-1 - %b # - .col-md-3 + .col-md-4 %b Photo .col-md-6 %b Planting Details .col-md-2 - - @garden.plantings.finished.each.with_index do |planting_finished, index_finished| - = render partial: "plantings/thumbnail", locals: {:planting => planting_finished, :index => index_finished} + - @garden.plantings.finished.each.with_index do |planting_finished| + = render partial: "plantings/thumbnail", locals: {:planting => planting_finished} .col-md-3 %h4 About this garden diff --git a/app/views/members/_gardens.html.haml b/app/views/members/_gardens.html.haml index 7f5d4de2b..4ac7b8e8c 100644 --- a/app/views/members/_gardens.html.haml +++ b/app/views/members/_gardens.html.haml @@ -37,15 +37,13 @@ - if g.featured_plantings.size > 0 .container .row - .col-md-1 - %b # - .col-md-3 + .col-md-4 %b Photo .col-md-6 %b Planting Details .col-md-2 - - g.featured_plantings.each.with_index do |planting, index| - = render partial: "plantings/thumbnail", locals: {:planting => planting, :index => index} + - g.featured_plantings.each.with_index do |planting| + = render partial: "plantings/thumbnail", locals: {:planting => planting} %p = link_to "More about this garden...", url_for(g) diff --git a/app/views/places/show.html.haml b/app/views/places/show.html.haml index 3b9eae70d..46b846a4f 100644 --- a/app/views/places/show.html.haml +++ b/app/views/places/show.html.haml @@ -36,9 +36,7 @@ - plantings << planting - if !plantings.blank? .row - .col-md-1 - %b # - .col-md-3 + .col-md-4 %b Photo .col-md-6 %b Planting Details diff --git a/app/views/plantings/_thumbnail.html.haml b/app/views/plantings/_thumbnail.html.haml index 2cebfcbd7..be8e1d879 100644 --- a/app/views/plantings/_thumbnail.html.haml +++ b/app/views/plantings/_thumbnail.html.haml @@ -1,7 +1,5 @@ .row - .col-md-1 - = "##{index+1}" - .col-md-3 + .col-md-4 = link_to image_tag((planting.default_photo ? planting.default_photo.thumbnail_url : 'placeholder_150.png'), :alt => planting.crop_id, :class => 'img'), planting .col-md-6 %dl.dl-horizontal @@ -29,8 +27,7 @@ - if can? :destroy, planting %li= link_to 'Delete', planting, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs' .row - .col-md-1 - .col-md-3 + .col-md-4 %ul{:style => "list-style-type:none"} %li %b Crop name: diff --git a/app/views/plantings/index.html.haml b/app/views/plantings/index.html.haml index aa01c9129..84f7400eb 100644 --- a/app/views/plantings/index.html.haml +++ b/app/views/plantings/index.html.haml @@ -20,15 +20,13 @@ - if @plantings.size > 0 .row - .col-md-1 - %b # - .col-md-3 + .col-md-4 %b Photo .col-md-6 %b Planting Details .col-md-2 - - @plantings.each.with_index do |planting, index| - = render partial: "plantings/thumbnail", locals: {:planting => planting, :index => index} + - @plantings.each.with_index do |planting| + = render partial: "plantings/thumbnail", locals: {:planting => planting} %div.pagination = page_entries_info @plantings, :model => "plantings"