liquid_feedback_frontend

diff app/main/initiative/_list_element.lua @ 274:aec9df5b4cd3

More optical enhancements and repositioning of elements
author bsw
date Sun Feb 12 12:20:19 2012 +0100 (2012-02-12)
parents 7196685f9dd7
children fecd4c13054a
line diff
     1.1 --- a/app/main/initiative/_list_element.lua	Wed Feb 08 18:49:22 2012 +0100
     1.2 +++ b/app/main/initiative/_list_element.lua	Sun Feb 12 12:20:19 2012 +0100
     1.3 @@ -1,4 +1,5 @@
     1.4  local initiative = param.get("initiative", "table")
     1.5 +local selected = param.get("selected", atom.boolean)
     1.6  local expanded = param.get("expanded", atom.boolean)
     1.7  local expandable = param.get("expandable", atom.boolean)
     1.8  
     1.9 @@ -127,10 +128,19 @@
    1.10              {
    1.11                field_attr = { style = "padding: 0;"},
    1.12                content = function()
    1.13 -                local link_class
    1.14 +                local link_class = "initiative_link"
    1.15                  if initiative.revoked then
    1.16                    link_class = "revoked"
    1.17                  end
    1.18 +                if selected then
    1.19 +                  link_class = link_class .. " selected"
    1.20 +                end
    1.21 +                if initiative.is_supporter then
    1.22 +                  link_class = link_class .. " supported"
    1.23 +                end
    1.24 +                if initiative.is_potential_supporter then
    1.25 +                  link_class = link_class .. " potentially_supported"
    1.26 +                end
    1.27                  ui.link{
    1.28                    attr = { id = link_name, class = link_class },
    1.29                    content = function()
    1.30 @@ -140,6 +150,7 @@
    1.31                      else
    1.32                        name = encode.html(initiative.shortened_name)
    1.33                      end
    1.34 +                    ui.tag{ content = "i" .. initiative.id .. ": " }
    1.35                      slot.put(name)
    1.36                    end,
    1.37                    module  = module,
    1.38 @@ -148,27 +159,6 @@
    1.39                    params  = params,
    1.40                  }
    1.41      
    1.42 -                if initiative.issue.state == "new" then
    1.43 -                  ui.image{
    1.44 -                    static = "icons/16/new.png"
    1.45 -                  }
    1.46 -                end
    1.47 -                if initiative.is_supporter then
    1.48 -                  slot.put(" ")
    1.49 -                  local label = _"You are supporting this initiative"
    1.50 -                  ui.image{
    1.51 -                    attr = { alt = label, title = label },
    1.52 -                    static = "icons/16/thumb_up_green.png"
    1.53 -                  }
    1.54 -                end
    1.55 -                if initiative.is_potential_supporter then
    1.56 -                  slot.put(" ")
    1.57 -                  local label = _"You are potential supporter of this initiative"
    1.58 -                  ui.image{
    1.59 -                    attr = { alt = label, title = label },
    1.60 -                    static = "icons/16/thumb_up.png"
    1.61 -                  }
    1.62 -                end
    1.63                  if initiative.is_initiator then
    1.64                    slot.put(" ")
    1.65                    local label = _"You are initiator of this initiative"

Impressum / About Us