add correct page titles
This commit is contained in:
parent
fc73c02c3a
commit
5731f32cfe
10 changed files with 32 additions and 6 deletions
|
|
@ -24,13 +24,13 @@ class ApplicationController < ActionController::Base
|
||||||
def mobile_except_ipad
|
def mobile_except_ipad
|
||||||
if is_mobile_device?
|
if is_mobile_device?
|
||||||
if request.env["HTTP_USER_AGENT"].include? "iPad"
|
if request.env["HTTP_USER_AGENT"].include? "iPad"
|
||||||
session[:mobile_view] = false
|
session[:mobile_view] = false
|
||||||
else
|
else
|
||||||
session[:mobile_view] = true
|
session[:mobile_view] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def count_requests
|
def count_requests
|
||||||
@request_count = current_user.requests_for_me.count if current_user
|
@request_count = current_user.requests_for_me.count if current_user
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,16 @@ module ApplicationHelper
|
||||||
false
|
false
|
||||||
end
|
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
|
def aspects_with_post aspects, post
|
||||||
aspects.select do |a|
|
aspects.select do |a|
|
||||||
post.aspect_ids.include?(a.id)
|
post.aspect_ids.include?(a.id)
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
- content_for :head do
|
- content_for :head do
|
||||||
= include_javascripts :aspects
|
= include_javascripts :aspects
|
||||||
|
|
||||||
|
- content_for :page_title do
|
||||||
|
= "Manage aspects"
|
||||||
|
|
||||||
#section_header
|
#section_header
|
||||||
%h2=t('.manage_aspects')
|
%h2=t('.manage_aspects')
|
||||||
.right{:style=>"top:0;"}
|
.right{:style=>"top:0;"}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
- content_for :page_title do
|
||||||
|
= @aspect.name
|
||||||
|
|
||||||
.span-24.last
|
.span-24.last
|
||||||
%h2{:style=>"position:relative;margin-bottom:0;"}
|
%h2{:style=>"position:relative;margin-bottom:0;"}
|
||||||
= @aspect
|
= @aspect
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,7 @@
|
||||||
%meta{:charset => 'utf-8'}
|
%meta{:charset => 'utf-8'}
|
||||||
|
|
||||||
%title
|
%title
|
||||||
- if current_user
|
= page_title yield(:page_title)
|
||||||
= "#{current_user.name} | DIASPORA*"
|
|
||||||
- else
|
|
||||||
DIASPORA*
|
|
||||||
|
|
||||||
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
|
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
- content_for :page_title do
|
||||||
|
= "Edit profile"
|
||||||
|
|
||||||
= form_tag person_path(@person), :method => :put, :multipart => true, :id => 'update_profile_form' do
|
= form_tag person_path(@person), :method => :put, :multipart => true, :id => 'update_profile_form' do
|
||||||
%h3
|
%h3
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
- content_for :page_title do
|
||||||
|
= "Search"
|
||||||
|
|
||||||
.span-15.prepend-5.last
|
.span-15.prepend-5.last
|
||||||
%h2
|
%h2
|
||||||
-if params[:q].blank?
|
-if params[:q].blank?
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
- content_for :page_title do
|
||||||
|
= @person.name
|
||||||
|
|
||||||
.span-24.last
|
.span-24.last
|
||||||
#author_info
|
#author_info
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
- content_for :page_title do
|
||||||
|
= "Edit services"
|
||||||
|
|
||||||
#section_header
|
#section_header
|
||||||
%h2
|
%h2
|
||||||
= t('settings')
|
= t('settings')
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
- content_for :page_title do
|
||||||
|
= "Edit account"
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#settings_nav li > a").live("click", function() {
|
$("#settings_nav li > a").live("click", function() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue