liquid_feedback_frontend
changeset 151:1652c4cd3154
add broken delegations tab on homepage
if a user has delegations to an inactive account, a new red tab will apear on the homepage of the user listing his broken delegations
if a user has delegations to an inactive account, a new red tab will apear on the homepage of the user listing his broken delegations
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Fri Oct 08 05:24:14 2010 +0200 (2010-10-08) |
parents | eaf3db89a6e1 |
children | ccdf197b3f9b |
files | app/main/member/show_tab.lua static/style.css |
line diff
1.1 --- a/app/main/member/show_tab.lua Fri Oct 08 04:29:20 2010 +0200 1.2 +++ b/app/main/member/show_tab.lua Fri Oct 08 05:24:14 2010 +0200 1.3 @@ -43,6 +43,22 @@ 1.4 } 1.5 end 1.6 1.7 + local broken_delegations = Delegation:new_selector() 1.8 + :join("member", nil, "delegation.trustee_id = member.id") 1.9 + :add_where{"member.active = 'f' AND delegation.truster_id = ?", member.id} 1.10 + 1.11 + if broken_delegations:count() then 1.12 + tabs[#tabs+1] = { 1.13 + class = "red", 1.14 + name = "problem_delegations", 1.15 + label = _"Delegation problems" .. " (" .. tostring(broken_delegations:count()) .. ")", 1.16 + icon = { static = "icons/16/table_go.png" }, 1.17 + module = "delegation", 1.18 + view = "_list", 1.19 + params = { delegations_selector = broken_delegations, outgoing = true }, 1.20 + } 1.21 + end 1.22 + 1.23 local selector = Area:new_selector() 1.24 :reset_fields() 1.25 :add_field("area.id", nil, { "grouped" })
2.1 --- a/static/style.css Fri Oct 08 04:29:20 2010 +0200 2.2 +++ b/static/style.css Fri Oct 08 05:24:14 2010 +0200 2.3 @@ -563,6 +563,34 @@ 2.4 border-color: #b96; 2.5 } 2.6 2.7 +.ui_tabs_links a.red { 2.8 + background-color: #c33; 2.9 + color: #000; 2.10 +} 2.11 + 2.12 +.ui_tabs_links a.red:hover { 2.13 + background-color: #ebb; 2.14 +} 2.15 + 2.16 +.ui_tabs_links a.red.selected { 2.17 + background-color: #644; 2.18 + color: #fff; 2.19 + text-decoration: none; 2.20 + padding: 1ex; 2.21 +} 2.22 + 2.23 +.web20 .ui_tabs_accordeon_head.red { 2.24 + background-color: #c23; 2.25 + border-color: #b66; 2.26 + xpadding: 1ex; 2.27 + xmargin-bottom: 2ex; 2.28 +} 2.29 + 2.30 +.web20 .ui_tabs_accordeon_content.red { 2.31 + border-color: #b66; 2.32 +} 2.33 + 2.34 + 2.35 /************************************************************************* 2.36 * ui.filters 2.37 */