liquid_feedback_frontend
changeset 272:65a1f7a01e7b
More optical enhancements and repositioning of elements
author | bsw |
---|---|
date | Wed Feb 08 00:55:17 2012 +0100 (2012-02-08) |
parents | d13b27a37ad5 |
children | 7196685f9dd7 |
files | app/main/_filter/21_auth.lua app/main/_layout/default.html app/main/index/_action/login.lua app/main/initiative/_list.lua app/main/initiative/_show.lua app/main/initiative/show_static.lua app/main/initiative/show_tab.lua app/main/issue/_details.lua app/main/issue/_show_box.lua app/main/issue/_show_head.lua app/main/member/show_tab.lua static/style.css |
line diff
1.1 --- a/app/main/_filter/21_auth.lua Tue Feb 07 22:30:48 2012 +0100 1.2 +++ b/app/main/_filter/21_auth.lua Wed Feb 08 00:55:17 2012 +0100 1.3 @@ -49,7 +49,11 @@ 1.4 end 1.5 1.6 if config.public_access and not app.session.member_id and auth_needed and request.get_module() == "index" and request.get_view() == "index" then 1.7 - request.redirect{ module = "area", view = "list" } 1.8 + if not config.single_unit_id then 1.9 + request.redirect{ module = "unit", view = "list" } 1.10 + else 1.11 + request.redirect{ module = "area", view = "list" } 1.12 + end 1.13 return 1.14 end 1.15
2.1 --- a/app/main/_layout/default.html Tue Feb 07 22:30:48 2012 +0100 2.2 +++ b/app/main/_layout/default.html Wed Feb 08 00:55:17 2012 +0100 2.3 @@ -57,15 +57,15 @@ 2.4 <!-- WEBMCP SLOT actions --> 2.5 </div> 2.6 <br style="clear: left;" /> 2.7 - <div class="sub_title" id="sub_title"> 2.8 - <!-- WEBMCP SLOT sub_title --> 2.9 - </div> 2.10 - <div class="support vote_info" id="support"> 2.11 - <!-- WEBMCP SLOT support --> 2.12 - </div> 2.13 - <div style="clear: left;"></div> 2.14 </div> 2.15 </div> 2.16 + <div class="initiative_head" id="initiative_head"> 2.17 + <!-- WEBMCP SLOT initiative_head --> 2.18 + </div> 2.19 + <div class="support vote_info" id="support"> 2.20 + <!-- WEBMCP SLOT support --> 2.21 + </div> 2.22 + <div style="clear: left;"></div> 2.23 <div class="content_navigation" id="content_navigation"> 2.24 <!-- WEBMCP SLOT content_navigation --> 2.25 </div>
3.1 --- a/app/main/index/_action/login.lua Tue Feb 07 22:30:48 2012 +0100 3.2 +++ b/app/main/index/_action/login.lua Wed Feb 08 00:55:17 2012 +0100 3.3 @@ -2,6 +2,7 @@ 3.4 3.5 if member then 3.6 member.last_login = "now" 3.7 + member.last_activity = "now" 3.8 member.active = true 3.9 member:save() 3.10 app.session.member = member
4.1 --- a/app/main/initiative/_list.lua Tue Feb 07 22:30:48 2012 +0100 4.2 +++ b/app/main/initiative/_list.lua Wed Feb 08 00:55:17 2012 +0100 4.3 @@ -213,17 +213,4 @@ 4.4 } 4.5 end 4.6 4.7 - if app.session.member_id and not (issue.fully_frozen or issue.closed) then 4.8 - slot.put(" ") 4.9 - ui.link{ 4.10 - content = function() 4.11 - ui.image{ static = "icons/16/script_add.png" } 4.12 - slot.put(" ") 4.13 - slot.put(_"Create alternative initiative") 4.14 - end, 4.15 - module = "initiative", 4.16 - view = "new", 4.17 - params = { issue_id = issue.id } 4.18 - } 4.19 - end 4.20 end
5.1 --- a/app/main/initiative/_show.lua Tue Feb 07 22:30:48 2012 +0100 5.2 +++ b/app/main/initiative/_show.lua Wed Feb 08 00:55:17 2012 +0100 5.3 @@ -1,8 +1,90 @@ 5.4 local initiative = param.get("initiative", "table") 5.5 local initiator = param.get("initiator", "table") 5.6 5.7 +local initiators_members_selector = initiative:get_reference_selector("initiating_members") 5.8 + :add_field("initiator.accepted", "accepted") 5.9 + 5.10 +if not (initiator and initiator.accepted) then 5.11 + initiators_members_selector:add_where("initiator.accepted") 5.12 +end 5.13 + 5.14 +local initiators = initiators_members_selector:exec() 5.15 + 5.16 +slot.select("initiative_head", function() 5.17 + 5.18 + ui.container{ 5.19 + attr = { class = "initiative_name" }, 5.20 + content = _("Initiative i#{id}: #{name}", { id = initiative.id, name = initiative.name }) 5.21 + } 5.22 + ui.tag{ 5.23 + attr = { class = "initiator_names" }, 5.24 + content = function() 5.25 + ui.tag{ content = _"by" } 5.26 + slot.put(" ") 5.27 + for i, initiator in ipairs(initiators) do 5.28 + if i == #initiators and i > 1 then 5.29 + slot.put(" ", _"and", " ") 5.30 + elseif i > 1 then 5.31 + slot.put(", ") 5.32 + end 5.33 + ui.link{ 5.34 + text = initiator.name, 5.35 + module = "member", view = "show", id = initiator.id 5.36 + } 5.37 + end 5.38 + end 5.39 + } 5.40 + 5.41 + if initiator and initiator.accepted and not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then 5.42 + slot.put(" · ") 5.43 + ui.link{ 5.44 + attr = { class = "action" }, 5.45 + content = function() 5.46 + slot.put(_"Invite initiator") 5.47 + end, 5.48 + module = "initiative", 5.49 + view = "add_initiator", 5.50 + params = { initiative_id = initiative.id } 5.51 + } 5.52 + if #initiators > 1 then 5.53 + slot.put(" · ") 5.54 + ui.link{ 5.55 + content = function() 5.56 + slot.put(_"Remove initiator") 5.57 + end, 5.58 + module = "initiative", 5.59 + view = "remove_initiator", 5.60 + params = { initiative_id = initiative.id } 5.61 + } 5.62 + end 5.63 + end 5.64 + if initiator and initiator.accepted == false then 5.65 + slot.put(" · ") 5.66 + ui.link{ 5.67 + text = _"Cancel refuse of invitation", 5.68 + module = "initiative", 5.69 + action = "remove_initiator", 5.70 + params = { 5.71 + initiative_id = initiative.id, 5.72 + member_id = app.session.member.id 5.73 + }, 5.74 + routing = { 5.75 + ok = { 5.76 + mode = "redirect", 5.77 + module = "initiative", 5.78 + view = "show", 5.79 + id = initiative.id 5.80 + } 5.81 + } 5.82 + } 5.83 + end 5.84 + 5.85 + 5.86 +end ) 5.87 + 5.88 util.help("initiative.show") 5.89 5.90 + 5.91 if initiative.issue.ranks_available and initiative.admitted then 5.92 local class = initiative.rank == 1 and "admitted_info" or "not_admitted_info" 5.93 ui.container{
6.1 --- a/app/main/initiative/show_static.lua Tue Feb 07 22:30:48 2012 +0100 6.2 +++ b/app/main/initiative/show_static.lua Wed Feb 08 00:55:17 2012 +0100 6.3 @@ -11,41 +11,6 @@ 6.4 initiative = initiative } 6.5 } 6.6 6.7 -slot.select("actions", function() 6.8 - ui.link{ 6.9 - content = function() 6.10 - local count = Initiative:new_selector():add_where{ "issue_id = ?", initiative.issue.id}:count()-1 6.11 - ui.image{ static = "icons/16/script.png" } 6.12 - if count and count > 0 then 6.13 - slot.put(_("Show alternative initiatives (#{count})", {count=count})) 6.14 - else 6.15 - slot.put(_"Show alternative initiatives") 6.16 - end 6.17 - end, 6.18 - module = "issue", 6.19 - view = "show", 6.20 - id = initiative.issue.id 6.21 - } 6.22 -end) 6.23 - 6.24 ---slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(initiative.id) .. '.rss" />') 6.25 - 6.26 -if app.session.member_id then 6.27 - slot.select("actions", function() 6.28 - if not initiative.issue.fully_frozen and not initiative.issue.closed then 6.29 - ui.link{ 6.30 - image = { static = "icons/16/script_add.png" }, 6.31 - attr = { class = "action" }, 6.32 - text = _"Create alternative initiative", 6.33 - module = "initiative", 6.34 - view = "new", 6.35 - params = { issue_id = initiative.issue.id } 6.36 - } 6.37 - end 6.38 - end) 6.39 -end 6.40 - 6.41 -slot.put_into("sub_title", encode.html(_("i#{id} #{name}", { id = initiative.id, name = initiative.name }) )) 6.42 6.43 execute.view{ 6.44 module = "initiative",
7.1 --- a/app/main/initiative/show_tab.lua Tue Feb 07 22:30:48 2012 +0100 7.2 +++ b/app/main/initiative/show_tab.lua Wed Feb 08 00:55:17 2012 +0100 7.3 @@ -123,27 +123,6 @@ 7.4 } 7.5 } 7.6 7.7 - local initiators_members_selector = initiative:get_reference_selector("initiating_members") 7.8 - :add_field("initiator.accepted", "accepted") 7.9 - 7.10 - if not (initiator and initiator.accepted) then 7.11 - initiators_members_selector:add_where("initiator.accepted") 7.12 - end 7.13 - 7.14 - local initiator_count = initiators_members_selector:count() 7.15 - 7.16 - tabs[#tabs+1] = { 7.17 - name = "initiators", 7.18 - label = _"Initiators" .. " (" .. tostring(initiator_count) .. ")", 7.19 - icon = { static = "icons/16/user_edit.png" }, 7.20 - module = "initiative", 7.21 - view = "_initiators", 7.22 - params = { 7.23 - initiative = initiative, 7.24 - initiator = initiator, 7.25 - initiators_members_selector = initiators_members_selector 7.26 - } 7.27 - } 7.28 end 7.29 7.30 local drafts_count = initiative:get_reference_selector("drafts"):count()
8.1 --- a/app/main/issue/_details.lua Tue Feb 07 22:30:48 2012 +0100 8.2 +++ b/app/main/issue/_details.lua Wed Feb 08 00:55:17 2012 +0100 8.3 @@ -20,8 +20,6 @@ 8.4 } 8.5 ui.field.timestamp{ label = _"Accepted at", name = "accepted" } 8.6 ui.field.text{ label = _"Discussion time", value = issue.discussion_time } 8.7 - ui.field.vote_now{ label = _"Vote now", name = "vote_now" } 8.8 - ui.field.vote_later{ label = _"Vote later", name = "vote_later" } 8.9 ui.field.timestamp{ label = _"Half frozen at", name = "half_frozen" } 8.10 ui.field.text{ label = _"Verification time", value = issue.verification_time } 8.11 ui.field.text{
10.1 --- a/app/main/issue/_show_head.lua Tue Feb 07 22:30:48 2012 +0100 10.2 +++ b/app/main/issue/_show_head.lua Wed Feb 08 00:55:17 2012 +0100 10.3 @@ -45,16 +45,27 @@ 10.4 ui.tag{ 10.5 tag = "div", 10.6 content = function() 10.7 - ui.tag{ 10.8 - content = function() 10.9 - ui.link{ 10.10 - text = issue.policy.name, 10.11 - module = "policy", 10.12 - view = "show", 10.13 - id = issue.policy.id 10.14 - } 10.15 - end 10.16 + 10.17 + local initiative_count = issue:get_reference_selector("initiatives"):count() 10.18 + local text 10.19 + if initiative_count == 1 then 10.20 + text = _("1 initiative", { count = initiative_count }) 10.21 + else 10.22 + text = _("#{count} initiatives", { count = initiative_count }) 10.23 + end 10.24 + ui.link{ 10.25 + text = text, 10.26 + module = "issue", view = "show", id = issue.id 10.27 } 10.28 + 10.29 + slot.put(" · ") 10.30 + ui.link{ 10.31 + text = issue.policy.name, 10.32 + module = "policy", 10.33 + view = "show", 10.34 + id = issue.policy.id 10.35 + } 10.36 + 10.37 slot.put(" · ") 10.38 ui.tag{ content = issue.state_name } 10.39 10.40 @@ -250,6 +261,20 @@ 10.41 end 10.42 end) 10.43 10.44 +if app.session.member_id then 10.45 + slot.select("actions", function() 10.46 + if not issue.fully_frozen and not issue.closed then 10.47 + ui.link{ 10.48 + image = { static = "icons/16/script_add.png" }, 10.49 + attr = { class = "action" }, 10.50 + text = _"Create alternative initiative", 10.51 + module = "initiative", 10.52 + view = "new", 10.53 + params = { issue_id = issue.id } 10.54 + } 10.55 + end 10.56 + end) 10.57 +end 10.58 10.59 local issue = param.get("issue", "table") 10.60
11.1 --- a/app/main/member/show_tab.lua Tue Feb 07 22:30:48 2012 +0100 11.2 +++ b/app/main/member/show_tab.lua Wed Feb 08 00:55:17 2012 +0100 11.3 @@ -162,7 +162,7 @@ 11.4 local issues_selector = member:get_reference_selector("issues") 11.5 tabs[#tabs+1] = { 11.6 name = "issues", 11.7 - label = _"Issues" .. " (" .. tostring(issues_selector:count()) .. ")", 11.8 + label = _"Interessiert" .. " (" .. tostring(issues_selector:count()) .. ")", 11.9 icon = { static = "icons/16/folder.png" }, 11.10 module = "issue", 11.11 view = "_list", 11.12 @@ -173,7 +173,7 @@ 11.13 11.14 tabs[#tabs+1] = { 11.15 name = "supported_initiatives", 11.16 - label = _"Supported initiatives" .. " (" .. tostring(supported_initiatives_selector:count()) .. ")", 11.17 + label = _"Supported" .. " (" .. tostring(supported_initiatives_selector:count()) .. ")", 11.18 icon = { static = "icons/16/thumb_up_green.png" }, 11.19 module = "member", 11.20 view = "_list_supported_initiatives", 11.21 @@ -184,7 +184,7 @@ 11.22 local initiated_initiatives_selector = member:get_reference_selector("initiated_initiatives"):add_where("initiator.accepted = true") 11.23 tabs[#tabs+1] = { 11.24 name = "initiatied_initiatives", 11.25 - label = _"Initiated initiatives" .. " (" .. tostring(initiated_initiatives_selector:count()) .. ")", 11.26 + label = _"Initiated" .. " (" .. tostring(initiated_initiatives_selector:count()) .. ")", 11.27 icon = { static = "icons/16/user_edit.png" }, 11.28 module = "member", 11.29 view = "_list_supported_initiatives",
12.1 --- a/static/style.css Tue Feb 07 22:30:48 2012 +0100 12.2 +++ b/static/style.css Wed Feb 08 00:55:17 2012 +0100 12.3 @@ -207,9 +207,7 @@ 12.4 padding-bottom: 1ex; 12.5 xbackground-color: #def; 12.6 background: -webkit-gradient(linear, left top, left bottom, 12.7 - 12.8 -color-stop(0%,#abd3ee), color-stop(100%,#ffffff) 12.9 - 12.10 + color-stop(0%,#abd3ee), color-stop(100%,#ffffff) 12.11 ); 12.12 } 12.13 12.14 @@ -258,7 +256,7 @@ 12.15 } 12.16 12.17 .title2 div { 12.18 - margin-bottom: 2ex; 12.19 + margin-bottom: 1ex; 12.20 xline-height: 130%; 12.21 } 12.22 12.23 @@ -285,6 +283,23 @@ 12.24 border-radius: 5px; 12.25 } 12.26 12.27 + 12.28 +.slot_initiative_head { 12.29 + background: -webkit-gradient(linear, left top, left bottom, 12.30 + color-stop(0%,#AFEFB9), color-stop(100%,#ffffff) 12.31 + ); 12.32 + padding-left: 1em; 12.33 + padding-top: 2ex; 12.34 +} 12.35 + 12.36 +.initiative_name { 12.37 + font-weight: bold; 12.38 + font-size: 125%; 12.39 + line-height: 110%; 12.40 + margin-bottom: 0.7ex; 12.41 +} 12.42 + 12.43 + 12.44 .content_navigation { 12.45 font-size: 75%; 12.46 background-color: #eee; 12.47 @@ -457,14 +472,6 @@ 12.48 } 12.49 12.50 12.51 -.sub_title div { 12.52 - padding-top: 1ex; 12.53 - margin-top: 1ex; 12.54 - font-weight: bold; 12.55 - font-size: 135%; 12.56 - line-height: 110%; 12.57 -} 12.58 - 12.59 /************************************************************************* 12.60 * Main content 12.61 */ 12.62 @@ -1023,9 +1030,9 @@ 12.63 .draft_content, 12.64 .suggestion_content { 12.65 background-color: #eee; 12.66 - border: 1px solid #ccc; 12.67 - padding-left: 1ex; 12.68 - padding-right: 1ex; 12.69 + background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f7f7f7), color-stop(100%,#e5e5e5)); 12.70 + padding: 1ex; 12.71 + border-radius: 8px; 12.72 } 12.73 12.74