liquid_feedback_frontend

changeset 103:7d0f4721d2f3

setting <title> tag. fallback: take class="title"-contents
author jorges
date Mon Sep 20 01:18:03 2010 +0200 (2010-09-20)
parents d4b4adb9a4df
children a9ea02807b94
files app/main/_layout/default.html app/main/area/show.lua app/main/index/index.lua app/main/initiative/show.lua app/main/issue/show.lua app/main/member/show.lua app/main/suggestion/show.lua env/ui/tabs.lua locale/translations.de.lua
line diff
     1.1 --- a/app/main/_layout/default.html	Sun Sep 19 16:00:38 2010 +0200
     1.2 +++ b/app/main/_layout/default.html	Mon Sep 20 01:18:03 2010 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  <html>
     1.5    <head>
     1.6      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     1.7 -    <title><!-- WEBMCP SLOTNODIV app_name --></title>
     1.8 +    <title> <!-- WEBMCP SLOTNODIV html_title --></title>
     1.9      <link rel="stylesheet" type="text/css" media="screen" href="__BASEURL__/static/trace.css" />
    1.10      <link rel="stylesheet" type="text/css" media="screen" href="__BASEURL__/static/gregor.js/gregor.css" />
    1.11      <link rel="stylesheet" type="text/css" media="screen" href="<!-- WEBMCP SLOTNODIV stylesheet_url -->" />
    1.12 @@ -84,4 +84,4 @@
    1.13    </body>
    1.14    <script>
    1.15    </script>
    1.16 -</html>
    1.17 \ No newline at end of file
    1.18 +</html>
     2.1 --- a/app/main/area/show.lua	Sun Sep 19 16:00:38 2010 +0200
     2.2 +++ b/app/main/area/show.lua	Mon Sep 20 01:18:03 2010 +0200
     2.3 @@ -1,5 +1,8 @@
     2.4  local area = Area:new_selector():add_where{ "id = ?", param.get_id() }:single_object_mode():exec()
     2.5  
     2.6 +app.html_title.title = area.name
     2.7 +app.html_title.subtitle = _("Area")
     2.8 +
     2.9  if config.feature_rss_enabled then
    2.10    util.html_rss_head{ title = _"Initiatives in this area (last created first)", module = "initiative", view = "list_rss", params = { area_id = area.id } }
    2.11    util.html_rss_head{ title = _"Initiatives in this area (last updated first)", module = "initiative", view = "list_rss", params = { area_id = area.id } }
     3.1 --- a/app/main/index/index.lua	Sun Sep 19 16:00:38 2010 +0200
     3.2 +++ b/app/main/index/index.lua	Mon Sep 20 01:18:03 2010 +0200
     3.3 @@ -44,6 +44,11 @@
     3.4  
     3.5  slot.put_into("title", encode.html(config.app_title))
     3.6  
     3.7 +if app.session.member then
     3.8 +	app.html_title.title = app.session.member.name
     3.9 +end
    3.10 +
    3.11 +
    3.12  slot.select("actions", function()
    3.13  
    3.14    if app.session.member then
     4.1 --- a/app/main/initiative/show.lua	Sun Sep 19 16:00:38 2010 +0200
     4.2 +++ b/app/main/initiative/show.lua	Mon Sep 20 01:18:03 2010 +0200
     4.3 @@ -4,6 +4,10 @@
     4.4    initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec()
     4.5  end
     4.6  
     4.7 +app.html_title.title = initiative.name
     4.8 +app.html_title.subtitle = _("Initiative ##{id}", { id = initiative.id })
     4.9 +
    4.10 +
    4.11  if request.get_json_request_slots() then
    4.12    execute.view{
    4.13      module = "initiative",
    4.14 @@ -33,4 +37,4 @@
    4.15        initiative = initiative
    4.16      }
    4.17    }
    4.18 -end
    4.19 \ No newline at end of file
    4.20 +end
     5.1 --- a/app/main/issue/show.lua	Sun Sep 19 16:00:38 2010 +0200
     5.2 +++ b/app/main/issue/show.lua	Mon Sep 20 01:18:03 2010 +0200
     5.3 @@ -1,5 +1,7 @@
     5.4  local issue = Issue:by_id(param.get_id())
     5.5  
     5.6 +app.html_title.title = _("Issue ##{id}", { id = issue.id })
     5.7 +
     5.8  execute.view{
     5.9    module = "issue",
    5.10    view = "_show_head",
     6.1 --- a/app/main/member/show.lua	Sun Sep 19 16:00:38 2010 +0200
     6.2 +++ b/app/main/member/show.lua	Mon Sep 20 01:18:03 2010 +0200
     6.3 @@ -1,5 +1,8 @@
     6.4  local member = Member:by_id(param.get_id())
     6.5  
     6.6 +app.html_title.title = member.name
     6.7 +app.html_title.subtitle = _("Member")
     6.8 +
     6.9  slot.select("title", function()
    6.10    execute.view{
    6.11      module = "member_image",
     7.1 --- a/app/main/suggestion/show.lua	Sun Sep 19 16:00:38 2010 +0200
     7.2 +++ b/app/main/suggestion/show.lua	Mon Sep 20 01:18:03 2010 +0200
     7.3 @@ -1,5 +1,8 @@
     7.4  local suggestion = Suggestion:by_id(param.get_id())
     7.5  
     7.6 +app.html_title.title = suggestion.name
     7.7 +app.html_title.subtitle = _("Suggestion ##{id}", { id = suggestion.id })
     7.8 +
     7.9  slot.put_into("title", encode.html(_"Suggestion for initiative: '#{name}'":gsub("#{name}", suggestion.initiative.name) ))
    7.10  
    7.11  slot.select("actions", function()
    7.12 @@ -21,4 +24,4 @@
    7.13    params = {
    7.14      suggestion = suggestion
    7.15    }
    7.16 -}
    7.17 \ No newline at end of file
    7.18 +}
     8.1 --- a/env/ui/tabs.lua	Sun Sep 19 16:00:38 2010 +0200
     8.2 +++ b/env/ui/tabs.lua	Mon Sep 20 01:18:03 2010 +0200
     8.3 @@ -26,6 +26,10 @@
     8.4          end
     8.5        end
     8.6  	 
     8.7 +      if active and not first then
     8.8 +	    app.html_title.prefix = tab.label
     8.9 +      end
    8.10 +
    8.11        local link_tabs = {}
    8.12        if config.user_tab_mode == "accordeon" 
    8.13          or config.user_tab_mode == "accordeon_first_expanded"
    8.14 @@ -209,6 +213,9 @@
    8.15            end
    8.16          }
    8.17          for i, tab in ipairs(tabs) do
    8.18 +          if tab.name == current_tab and i > 1 then
    8.19 +						app.html_title.prefix = tab.label
    8.20 +	        end
    8.21            if tab.name == current_tab or not current_tab and i == 1 then
    8.22              ui.container{
    8.23                attr = { class = "ui_tabs_content" },
     9.1 --- a/locale/translations.de.lua	Sun Sep 19 16:00:38 2010 +0200
     9.2 +++ b/locale/translations.de.lua	Mon Sep 20 01:18:03 2010 +0200
     9.3 @@ -195,6 +195,7 @@
     9.4  ["Initiative successfully created"] = "Initiative erfolgreich erzeugt";
     9.5  ["Initiative successfully updated"] = "Initiative erfolgreich aktualisiert";
     9.6  ["Initiative: '#{name}'"] = "Initiative: '#{name}'";
     9.7 +["Initiative ##{id}"] = "Initiative ##{id}";
     9.8  ["Initiatives"] = "Initiativen";
     9.9  ["Initiatives in this area (last created first)"] = "Initiativen in diesem Themenbereich (zuletzt angelegte zuerst)";
    9.10  ["Initiatives in this area (last updated first)"] = "Initiativen in diesem Themenbereich (zuletzt aktualisierte zuerst)";
    9.11 @@ -440,6 +441,7 @@
    9.12  ["Suggest no initiative"] = "Keine Initiative empfehlen";
    9.13  ["Suggested initiative"] = "Empfohlene Initiative";
    9.14  ["Suggestion"] = "Anregung";
    9.15 +["Suggestion ##{id}"] = "Anregung ##{id}";
    9.16  ["Suggestion currently implemented"] = "Anregung zur Zeit umgesetzt";
    9.17  ["Suggestion currently not implemented"] = "Anregung zur Zeit nicht umgesetzt";
    9.18  ["Suggestion for initiative: '#{name}'"] = "Anregung für Initiative '#{name}'";

Impressum / About Us