From 80f826421bdd72e67182a193e07519bdb0cd83e8 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 23 May 2016 11:41:42 +0930 Subject: [PATCH] Add page anchors to put you to the area you are most interested in --- app/views/gardens/_thumbnail.html.haml | 2 +- app/views/members/_location.html.haml | 2 +- app/views/members/_map.html.haml | 2 +- app/views/places/show.html.haml | 6 +++--- app/views/plantings/show.html.haml | 2 +- app/views/seeds/show.html.haml | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/gardens/_thumbnail.html.haml b/app/views/gardens/_thumbnail.html.haml index bd3fc7eb1..e831dc986 100644 --- a/app/views/gardens/_thumbnail.html.haml +++ b/app/views/gardens/_thumbnail.html.haml @@ -18,7 +18,7 @@ - if garden.location.blank? not specified - else - = link_to garden.location, place_path(garden.location) + = link_to garden.location, place_path(garden.location, anchor: "gardens") %dt Area : %dd= garden.area.nil? ? "not specified" : pluralize(garden.area, garden.area_unit) %dt Active? : diff --git a/app/views/members/_location.html.haml b/app/views/members/_location.html.haml index 195897d71..a8442afe2 100644 --- a/app/views/members/_location.html.haml +++ b/app/views/members/_location.html.haml @@ -2,4 +2,4 @@ - if member.location.blank? unknown location - else - = link_to member.location, place_path(:place => member.location) + = link_to member.location, place_path(:place => member.location, anchor: "members") diff --git a/app/views/members/_map.html.haml b/app/views/members/_map.html.haml index b6b6c40d2..027f83c65 100644 --- a/app/views/members/_map.html.haml +++ b/app/views/members/_map.html.haml @@ -2,4 +2,4 @@ %div#membermap %p See other members, plantings, seeds and more near - = link_to member.location, place_path(member.location) + = link_to member.location, place_path(member.location, anchor: "members") diff --git a/app/views/places/show.html.haml b/app/views/places/show.html.haml index c22094996..55a61f385 100644 --- a/app/views/places/show.html.haml +++ b/app/views/places/show.html.haml @@ -4,7 +4,7 @@ %div#placesmap{ :style => "height:300px"} -%h3= "Nearby members" +%h3#members= "Nearby members" - if !@nearby_members.empty? .row @@ -13,7 +13,7 @@ = render :partial => "members/thumbnail", :locals => { :member => member } = link_to "View all members >>", members_path - %h3= "Seeds available for trade near #{@place}" + %h3#seeds= "Seeds available for trade near #{@place}" - crop_id = [] - @nearby_members.first(10).each do |member| - member.seeds.first(5).each do |seed| @@ -27,7 +27,7 @@ - else %p No nearby seeds found - %h3= "Recent plantings near #{@place}" + %h3#plantings= "Recent plantings near #{@place}" .row - plantings = [] diff --git a/app/views/plantings/show.html.haml b/app/views/plantings/show.html.haml index 4c96bf461..1b9a2570e 100644 --- a/app/views/plantings/show.html.haml +++ b/app/views/plantings/show.html.haml @@ -61,7 +61,7 @@ %p %small View other plantings, members and more near - = link_to @planting.owner.location, place_path(@planting.owner.location) + = link_to @planting.owner.location, place_path(@planting.owner.location, anchor: "plantings") %h2 Notes :growstuff_markdown diff --git a/app/views/seeds/show.html.haml b/app/views/seeds/show.html.haml index 96be29a1c..e7885d115 100644 --- a/app/views/seeds/show.html.haml +++ b/app/views/seeds/show.html.haml @@ -60,4 +60,4 @@ %p %small View other seeds, members and more near - = link_to @seed.owner.location, place_path(@seed.owner.location) \ No newline at end of file + = link_to @seed.owner.location, place_path(@seed.owner.location, anchor: "seeds") \ No newline at end of file