# HG changeset patch # User Daniel Poelzleithner # Date 1286501159 -7200 # Node ID d87097d3b6ec1eb9b8d08e4dc0b930bb59d2bd69 # Parent 034f96181e59e710ae92624606e9b2cbe76fd228 small hint to show the number of alternative initiatives diff -r 034f96181e59 -r d87097d3b6ec app/main/initiative/show_static.lua --- a/app/main/initiative/show_static.lua Fri Oct 08 02:49:53 2010 +0200 +++ b/app/main/initiative/show_static.lua Fri Oct 08 03:25:59 2010 +0200 @@ -7,8 +7,13 @@ slot.select("actions", function() ui.link{ content = function() + local count = Initiative:new_selector():add_where{ "issue_id = ?", initiative.issue.id}:count()-1 ui.image{ static = "icons/16/script.png" } - slot.put(_"Show alternative initiatives") + if count and count > 0 then + slot.put(_("Show alternative initiatives (#{count})", {count=count})) + else + slot.put(_"Show alternative initiatives") + end end, module = "issue", view = "show", diff -r 034f96181e59 -r d87097d3b6ec locale/translations.de.lua --- a/locale/translations.de.lua Fri Oct 08 02:49:53 2010 +0200 +++ b/locale/translations.de.lua Fri Oct 08 03:25:59 2010 +0200 @@ -412,6 +412,7 @@ ["Show"] = "Zeige"; ["Show active members"] = "Zeige aktive Mitglieder"; ["Show alternative initiatives"] = "Zeige alternative Initiativen"; +["Show alternative initiatives (#{count})"] = "Zeige alternative Initiativen (#{count})"; ["Show areas in use"] = "Zeige verwendete Themenbereiche"; ["Show areas not in use"] = "Zeige nicht verwendente Themenbereiche"; ["Show diff"] = "Änderungen anzeigen"; diff -r 034f96181e59 -r d87097d3b6ec locale/translations.en.lua --- a/locale/translations.en.lua Fri Oct 08 02:49:53 2010 +0200 +++ b/locale/translations.en.lua Fri Oct 08 03:25:59 2010 +0200 @@ -411,6 +411,7 @@ ["Show"] = false; ["Show active members"] = false; ["Show alternative initiatives"] = false; +["Show alternative initiatives (#{count})"] = false; ["Show areas in use"] = false; ["Show areas not in use"] = false; ["Show diff"] = false;