liquid_feedback_frontend

diff app/main/initiative/show_static.lua @ 149:d87097d3b6ec

small hint to show the number of alternative initiatives
author Daniel Poelzleithner <poelzi@poelzi.org>
date Fri Oct 08 03:25:59 2010 +0200 (2010-10-08)
parents bf885faf3452
children 1f7b38584c0d
line diff
     1.1 --- a/app/main/initiative/show_static.lua	Fri Oct 08 02:49:53 2010 +0200
     1.2 +++ b/app/main/initiative/show_static.lua	Fri Oct 08 03:25:59 2010 +0200
     1.3 @@ -7,8 +7,13 @@
     1.4  slot.select("actions", function()
     1.5    ui.link{
     1.6      content = function()
     1.7 +      local count = Initiative:new_selector():add_where{ "issue_id = ?", initiative.issue.id}:count()-1
     1.8        ui.image{ static = "icons/16/script.png" }
     1.9 -      slot.put(_"Show alternative initiatives")
    1.10 +      if count and count > 0 then
    1.11 +        slot.put(_("Show alternative initiatives (#{count})", {count=count}))
    1.12 +      else
    1.13 +        slot.put(_"Show alternative initiatives")
    1.14 +      end
    1.15      end,
    1.16      module = "issue",
    1.17      view = "show",

Impressum / About Us