From b2d276a2e65be00b45b24220ffec61453670ebbd Mon Sep 17 00:00:00 2001 From: Skud Date: Wed, 19 Dec 2012 21:20:22 +1100 Subject: [PATCH] Fixed titles for planting pages --- app/views/plantings/_form.html.haml | 2 ++ app/views/plantings/edit.html.haml | 4 ++-- app/views/plantings/index.html.haml | 4 +++- app/views/plantings/new.html.haml | 2 +- app/views/plantings/show.html.haml | 2 ++ app/views/updates/index.html.haml | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/views/plantings/_form.html.haml b/app/views/plantings/_form.html.haml index 3d72d7f36..9beb120a0 100644 --- a/app/views/plantings/_form.html.haml +++ b/app/views/plantings/_form.html.haml @@ -1,3 +1,5 @@ += content_for :title, "Recent Growstuff member updates" + = form_for(@planting, :html => {:class => "form-horizontal"}) do |f| - if @planting.errors.any? #error_explanation diff --git a/app/views/plantings/edit.html.haml b/app/views/plantings/edit.html.haml index 369706764..80a77a32d 100644 --- a/app/views/plantings/edit.html.haml +++ b/app/views/plantings/edit.html.haml @@ -1,6 +1,6 @@ -%h1 Editing planting += content_for :title, "Editing planting" -- if user_signed_in? && current_user == @planting.garden.user +- if user_signed_in? && current_user == @planting.owner = render 'form' - elsif user_signed_in? .alert You don't have permission to edit this planting. diff --git a/app/views/plantings/index.html.haml b/app/views/plantings/index.html.haml index 588f0e884..5e325a442 100644 --- a/app/views/plantings/index.html.haml +++ b/app/views/plantings/index.html.haml @@ -1,4 +1,6 @@ -%h1 Recent plantings +=content_for :title, "What's been planted recently?" + +%p Here are the latest things planted by Growstuff members. - @recent_plantings.each do |p| .well diff --git a/app/views/plantings/new.html.haml b/app/views/plantings/new.html.haml index 1550fe656..665ecc629 100644 --- a/app/views/plantings/new.html.haml +++ b/app/views/plantings/new.html.haml @@ -1,4 +1,4 @@ -%h1 New planting +=content_for :title, "Plant something" - if user_signed_in? = render 'form' diff --git a/app/views/plantings/show.html.haml b/app/views/plantings/show.html.haml index 2cb984842..b4eb367fc 100644 --- a/app/views/plantings/show.html.haml +++ b/app/views/plantings/show.html.haml @@ -1,3 +1,5 @@ +=content_for :title, "#{@planting.crop.system_name} in #{@planting.location}" + %p#notice= notice %h2 diff --git a/app/views/updates/index.html.haml b/app/views/updates/index.html.haml index a98eaec2c..25be7af76 100644 --- a/app/views/updates/index.html.haml +++ b/app/views/updates/index.html.haml @@ -2,7 +2,7 @@ %p = "Displaying #{@updates.length} updates" - + - @updates.each do |update| = render :partial => "single", :locals => { :update => update, :subject => true }