add correct page titles

This commit is contained in:
danielvincent 2010-12-09 19:55:47 -08:00
parent fc73c02c3a
commit 5731f32cfe
10 changed files with 32 additions and 6 deletions

View file

@ -9,6 +9,16 @@ module ApplicationHelper
false
end
def page_title text=nil
title = ""
if text.blank?
title = "#{current_user.name} | " if current_user
else
title = "#{text} | "
end
title += "DIASPORA*"
end
def aspects_with_post aspects, post
aspects.select do |a|
post.aspect_ids.include?(a.id)

View file

@ -5,6 +5,9 @@
- content_for :head do
= include_javascripts :aspects
- content_for :page_title do
= "Manage aspects"
#section_header
%h2=t('.manage_aspects')
.right{:style=>"top:0;"}

View file

@ -2,6 +2,9 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= @aspect.name
.span-24.last
%h2{:style=>"position:relative;margin-bottom:0;"}
= @aspect

View file

@ -8,10 +8,7 @@
%meta{:charset => 'utf-8'}
%title
- if current_user
= "#{current_user.name} | DIASPORA*"
- else
DIASPORA*
= page_title yield(:page_title)
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}

View file

@ -2,6 +2,8 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= "Edit profile"
= form_tag person_path(@person), :method => :put, :multipart => true, :id => 'update_profile_form' do
%h3

View file

@ -2,6 +2,9 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= "Search"
.span-15.prepend-5.last
%h2
-if params[:q].blank?

View file

@ -2,6 +2,8 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= @person.name
.span-24.last
#author_info

View file

@ -2,6 +2,9 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= "Edit services"
#section_header
%h2
= t('settings')

View file

@ -2,6 +2,9 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
- content_for :page_title do
= "Edit account"
:javascript
$(document).ready(function(){
$("#settings_nav li > a").live("click", function() {