# HG changeset patch # User Ingo Bormuth # Date 1325213944 -3600 # Node ID cb2380e08bb58b8ec56483e98046ad65b7b54fa3 # Parent 272193cc190ea12ecfe7b3f9752b3cfafdbaceb7 Show currently active delegation in delegation boxes diff -r 272193cc190e -r cb2380e08bb5 app/main/delegation/_show_box.lua --- a/app/main/delegation/_show_box.lua Fri Dec 30 03:15:54 2011 +0100 +++ b/app/main/delegation/_show_box.lua Fri Dec 30 03:59:04 2011 +0100 @@ -125,13 +125,20 @@ ui.image{ static = "icons/16/table_go.png" } + local member = Member:new_selector() + :reset_fields() + :add_field("name", "delegation_name") + :add_where({ "id = ?", delegation.trustee_id }) + :single_object_mode() + :exec() if delegation.issue_id then - slot.put(_"Issue delegation active") + slot.put( _("Issue delegated to '#{name}'", { name = member.delegation_name }) ) elseif delegation.area_id then - slot.put(_"Area delegation active") + slot.put( _("Area delegated to '#{name}'", { name = member.delegation_name }) ) else - slot.put(_"Unit delegation active") + slot.put( _("Unit delegated to '#{name}'", { name = member.delegation_name }) ) end + else ui.image{ static = "icons/16/table_go_crossed.png" diff -r 272193cc190e -r cb2380e08bb5 locale/translations.de.lua --- a/locale/translations.de.lua Fri Dec 30 03:15:54 2011 +0100 +++ b/locale/translations.de.lua Fri Dec 30 03:59:04 2011 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env lua +#!/usr/bin/env lua return { ["##{id}"] = "##{id}"; ["##{issue_id}.#{id} #{name}"] = "##{issue_id}.#{id} #{name}"; @@ -60,7 +60,7 @@ ["Area delegated"] = "Themenbereich delegiert"; ["Area delegated to '#{name}'"] = "Themenbereich an '#{name}' delegiert"; ["Area delegation"] = "Delegation für Themenbereich"; -["Area delegation active"] = "Delegation für Themenbereich aktiv"; +["Area delegated to '#{name}'"] = "Themenbereich an '#{name} delegiert"; ["Area list"] = "Liste der Themenbereiche"; ["Area successfully updated"] = "Themenbereich erfolgreich aktualisiert"; ["Areas"] = "Themenbereiche"; @@ -196,7 +196,7 @@ ["Generate / change API key"] = "API-Schlüssel erzeugen/ändern"; ["Generate API key"] = "API-Schlüssel erzeugen"; ["Global delegation"] = "Globale Delegation"; -["Global delegation active"] = "Globale Delegation aktiv"; +["Globally delegated to '#{name}'"] = "Global an '#{name}' delegiert"; ["Go up"] = "Nach oben"; ["Half frozen at"] = "Halb eingefroren am/um"; ["Hello "] = "Hallo "; @@ -260,7 +260,7 @@ ["Issue accepted"] = "Thema akzeptiert"; ["Issue canceled"] = "Thema abgebrochen"; ["Issue delegation"] = "Issue-Delegation"; -["Issue delegation active"] = "Delegation für Thema aktiv"; +["Issue delegated to '#{name}'"] = "Thema an '{name}' delegiert"; ["Issue events"] = "Themen-Ereignisse"; ["Issue finished"] = "Thema abgeschlossen"; ["Issue finished without voting"] = "Thema ohne Abstimmung abgeschlossen"; diff -r 272193cc190e -r cb2380e08bb5 locale/translations.en.lua --- a/locale/translations.en.lua Fri Dec 30 03:15:54 2011 +0100 +++ b/locale/translations.en.lua Fri Dec 30 03:59:04 2011 +0100 @@ -60,7 +60,6 @@ ["Area delegated"] = false; ["Area delegated to '#{name}'"] = false; ["Area delegation"] = false; -["Area delegation active"] = false; ["Area list"] = false; ["Area successfully updated"] = false; ["Areas"] = false; @@ -193,7 +192,7 @@ ["Generate / change API key"] = false; ["Generate API key"] = false; ["Global delegation"] = false; -["Global delegation active"] = false; +["Globally delegated to '#{name}'"] = false; ["Go up"] = false; ["Half frozen at"] = false; ["Hello "] = false; @@ -252,7 +251,7 @@ ["Issue accepted"] = false; ["Issue canceled"] = false; ["Issue delegation"] = false; -["Issue delegation active"] = false; +["Issue delegated to '#{name}'"] = false; ["Issue events"] = false; ["Issue finished"] = false; ["Issue finished without voting"] = false; diff -r 272193cc190e -r cb2380e08bb5 locale/translations.eo.lua --- a/locale/translations.eo.lua Fri Dec 30 03:15:54 2011 +0100 +++ b/locale/translations.eo.lua Fri Dec 30 03:59:04 2011 +0100 @@ -60,7 +60,6 @@ ["Area delegated"] = "Temarodelegacio"; -- FIXME ["Area delegated to '#{name}'"] = "Temarodelegacio '#{name}'"; -- FIXME ["Area delegation"] = "Temarodelegacio"; -["Area delegation active"] = "Temarodlegacio aplikita"; ["Area list"] = "Temarolisto"; ["Area successfully updated"] = "Temaro sukcese ĝisdatigita"; ["Areas"] = "Temaroj"; @@ -196,7 +195,7 @@ ["Generate / change API key"] = "Krei/ŝanĝi API-ŝlosilon"; ["Generate API key"] = "Krei API-ŝlosilon"; ["Global delegation"] = "Ĝenerala delegacio"; -["Global delegation active"] = "Ĝenerala delegacio estas aktiva"; +["Globalla delegated to"] = "Ĝenerala delegacio '#{name}'"; --FIXME ["Go up"] = "Movi supren"; ["Half frozen at"] = "Duone ĝelita je"; ["Hello "] = "Saluton "; @@ -260,7 +259,7 @@ ["Issue accepted"] = "Temo akceptita"; ["Issue canceled"] = "Temo nuligita"; ["Issue delegation"] = "Temodelegacio"; -["Issue delegation active"] = "Delegacio por temo aktiva"; +["Issue delegated to '#{name}'"] = "Delegacio por temo '#{name}'"; --FIXME ["Issue events"] = "Temoeventoj"; ["Issue finished"] = "Temo finita"; ["Issue finished without voting"] = "Temo finita sen voĉdono"; diff -r 272193cc190e -r cb2380e08bb5 locale/translations.fr.lua --- a/locale/translations.fr.lua Fri Dec 30 03:15:54 2011 +0100 +++ b/locale/translations.fr.lua Fri Dec 30 03:59:04 2011 +0100 @@ -60,7 +60,6 @@ ["Area delegated"] = false; ["Area delegated to '#{name}'"] = false; ["Area delegation"] = false; -["Area delegation active"] = false; ["Area list"] = false; ["Area successfully updated"] = false; ["Areas"] = false; @@ -193,7 +192,7 @@ ["Generate / change API key"] = false; ["Generate API key"] = false; ["Global delegation"] = false; -["Global delegation active"] = false; +["Globally delegated to '#{name}'"] = false; ["Go up"] = false; ["Half frozen at"] = false; ["Hello "] = false; @@ -252,7 +251,7 @@ ["Issue accepted"] = false; ["Issue canceled"] = false; ["Issue delegation"] = false; -["Issue delegation active"] = false; +["Issue delegated to '#{name}'"] = false; ["Issue events"] = false; ["Issue finished"] = false; ["Issue finished without voting"] = false;