Commits

Daniel Poelzleithner committed d87097d

small hint to show the number of alternative initiatives

Comments (0)

Files changed (3)

app/main/initiative/show_static.lua

 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",

locale/translations.de.lua

 ["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";

locale/translations.en.lua

 ["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;