From 254cfdb0a866da9411b88671cad4629e4fbbe066 Mon Sep 17 00:00:00 2001 From: mrjabba Date: Fri, 11 Oct 2013 16:47:29 -0500 Subject: [PATCH] Create header title content helper so we dont have to go through changing markup everywhere again for this section --- app/helpers/application_helper.rb | 4 ++++ app/views/devise/registrations/edit.html.erb | 2 +- app/views/devise/registrations/new.html.erb | 2 +- app/views/devise/sessions/new.html.erb | 2 +- app/views/leagues/edit.html.erb | 2 +- app/views/leagues/index.html.erb | 2 +- app/views/leagues/new.html.erb | 2 +- app/views/leaguezones/edit.html.erb | 2 +- app/views/leaguezones/index.html.erb | 2 +- app/views/leaguezones/new.html.erb | 2 +- app/views/organizations/edit.html.erb | 2 +- app/views/organizations/index.html.erb | 2 +- app/views/organizations/new.html.erb | 2 +- app/views/people/edit.html.erb | 2 +- app/views/people/index.html.erb | 2 +- app/views/people/new.html.erb | 2 +- app/views/playinglocations/new.html.erb | 2 +- app/views/teams/edit.html.erb | 2 +- app/views/teams/index.html.erb | 2 +- app/views/teams/new.html.erb | 2 +- app/views/teamstats/edit.html.erb | 2 +- app/views/technicalstaffs/new.html.erb | 2 +- app/views/users/edit.html.erb | 2 +- app/views/users/index.html.erb | 2 +- app/views/users/show.html.erb | 2 +- app/views/venues/edit.html.erb | 2 +- app/views/venues/index.html.erb | 2 +- app/views/venues/new.html.erb | 2 +- app/views/venues/show.html.erb | 2 +- spec/requests/people_spec.rb | 2 +- 30 files changed, 33 insertions(+), 29 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8c60729..317c4f6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -23,6 +23,10 @@ def title end end + def header_title(content) + content_tag(:header, content_tag(:h1, content)) + end + def zone_cell_at_position(zones, position) zone = Leaguezone.find_zone_by_position(zones, position) zone.nil? ? content_tag(:td, position) : content_tag(:td, position, {:class => zone.style, :title => zone.name}) diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 3cd36b5..d313992 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,4 +1,4 @@ -

Edit Profile

+<%=header_title("Edit Profile")%> <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:method => :put, :class => "well form-horizontal"}) do |f| %> <%= devise_error_messages! %> diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 4820a31..b152935 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1,4 +1,4 @@ -

Sign up

+<%=header_title("Sign up")%> <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:class => "well form-horizontal"}) do |f| %> <%= devise_error_messages! %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index d9ea8f5..45939d2 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,4 +1,4 @@ -

Sign in

+<%=header_title("Sign in")%> <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => "well form-horizontal"}) do |f| %>
diff --git a/app/views/leagues/edit.html.erb b/app/views/leagues/edit.html.erb index 09292c5..03203ab 100644 --- a/app/views/leagues/edit.html.erb +++ b/app/views/leagues/edit.html.erb @@ -1,4 +1,4 @@ -

Edit League

+<%=header_title("Edit League")%> <%= render :partial => "form", :locals => {:model => [@league], :league => @league, :save_label => "Update"} %>