liquid_feedback_frontend

changeset 105:07953b0ef62c

fixing html title (totally forgot to add new filter before!)
author jorges
date Mon Sep 20 12:57:44 2010 +0200 (2010-09-20)
parents a9ea02807b94
children 9f3f74e82a65
files app/main/_filter_view/36_html_title.lua app/main/index/login.lua
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/_filter_view/36_html_title.lua	Mon Sep 20 12:57:44 2010 +0200
     1.3 @@ -0,0 +1,76 @@
     1.4 +
     1.5 +app.html_title = {}
     1.6 +
     1.7 +  execute.inner()
     1.8 +
     1.9 +-- add ":" to prefix
    1.10 +if app.html_title.prefix then
    1.11 +	app.html_title.prefix = app.html_title.prefix .. ": " 
    1.12 +	app.html_title.prefix = encode.html( app.html_title.prefix )
    1.13 +end
    1.14 +
    1.15 +-- add "-" to title 
    1.16 +if app.html_title.title then
    1.17 +	app.html_title.title = app.html_title.title .. " - " 
    1.18 +	app.html_title.title = encode.html( app.html_title.title )
    1.19 +-- or pull from <h1>title<h1> 
    1.20 +-- but only if it does not contain config.app_title
    1.21 +-- (otherwise config.app_title would appear twice in title)
    1.22 +elseif slot.get_content( "title" ) ~= encode.html( config.app_title ) then
    1.23 +	app.html_title.title = slot.get_content( "title" ) .. " - "
    1.24 +end
    1.25 +
    1.26 +-- add "-" to subtitle
    1.27 +if app.html_title.subtitle then
    1.28 +	app.html_title.subtitle = app.html_title.subtitle .. " - " 
    1.29 +	app.html_title.subtitle = encode.html( app.html_title.subtitle )
    1.30 +end
    1.31 +
    1.32 +
    1.33 +--slot.put_into("html_title", encode.html( config.app_title ) )
    1.34 +slot.put_into("html_title", 
    1.35 +	( app.html_title.prefix or "" )
    1.36 +	..
    1.37 +	( app.html_title.title  or "" )
    1.38 +	..
    1.39 +	( app.html_title.subtitle or "" )
    1.40 +	..
    1.41 +	config.app_title
    1.42 +)
    1.43 +
    1.44 +
    1.45 +--[[
    1.46 +
    1.47 +[prefix: ]main - [subtitle - ]appname
    1.48 +
    1.49 +
    1.50 +Aktueller Entwurf:
    1.51 +	Pro BGE - Initiative #33 - Liquidfeedback PP Dtl.
    1.52 +Anregungen zu: Pro BGE - Initiative #33 - Liquidfeedback PP Dtl.
    1.53 +Entwurfshistorie zu: Pro BGE - Initiative #33 - Liquidfeedback PP Dtl.
    1.54 +Details zu: Pro BGE - Initiative #33 - Liquidfeedback PP Dtl.
    1.55 +
    1.56 +Thema #34 - Liquidfeedback Dtl.
    1.57 +
    1.58 +
    1.59 +Themenbereiche - Liquidfeedback Dtl
    1.60 +
    1.61 +Wirtschaft & Soziales - Themenbereich - Liquidfeedback Piratenpartei Deutschland
    1.62 +Wirtschaft & Soziales - Liquidfeedback Piratenpartei Deutschland
    1.63 +
    1.64 +Standard proceeding - Regelwerk - Piratenpartei Deutschland
    1.65 +
    1.66 +Registrierung - Piratenpartei Deutschland
    1.67 +
    1.68 +
    1.69 +Mitgliederliste - Piratenpartei Deutschland
    1.70 +
    1.71 +Administrator - Mitglied - Piratenpartei Deutschland
    1.72 +
    1.73 +
    1.74 +
    1.75 +--]]
    1.76 +
    1.77 +--slot.put_into("html_title", slot.get_content("title") .. config.app.html_title)
    1.78 +--print (slot.get_content("title"))
    1.79 +--exit()
     2.1 --- a/app/main/index/login.lua	Mon Sep 20 01:43:19 2010 +0200
     2.2 +++ b/app/main/index/login.lua	Mon Sep 20 12:57:44 2010 +0200
     2.3 @@ -11,6 +11,7 @@
     2.4  }
     2.5  
     2.6  slot.put_into("title", encode.html(config.app_title))
     2.7 +app.html_title.title = _"Login"
     2.8  
     2.9  slot.select("title", function()
    2.10    ui.container{

Impressum / About Us