liquid_feedback_frontend

diff app/main/initiative/show.lua @ 720:cdd0bcbbef8b

Improved paginators on initiative view, optical improvements
author bsw
date Wed Jun 27 19:28:39 2012 +0200 (2012-06-27)
parents cc64a4fc6ab6
children 344e5fdce8c9
line diff
     1.1 --- a/app/main/initiative/show.lua	Wed Jun 27 14:48:35 2012 +0200
     1.2 +++ b/app/main/initiative/show.lua	Wed Jun 27 19:28:39 2012 +0200
     1.3 @@ -348,8 +348,8 @@
     1.4            :add_field("coalesce(vote.grade, 0) as grade")
     1.5            :left_join("initiative", nil, "initiative.id = vote.initiative_id")
     1.6            :left_join("issue", nil, "issue.id = initiative.issue_id")
     1.7 -          
     1.8 -    ui.container{ attr = { class = "heading"}, content = _"Member voting" }
     1.9 +    
    1.10 +    ui.anchor{ name = "voter", attr = { class = "heading" }, content = _"Member voter" }
    1.11      
    1.12      execute.view{
    1.13        module = "member",
    1.14 @@ -357,7 +357,8 @@
    1.15        params = {
    1.16          initiative = initiative,
    1.17          for_votes = true,
    1.18 -        members_selector = members_selector
    1.19 +        members_selector = members_selector,
    1.20 +        paginator_name = "voter"
    1.21        }
    1.22      }
    1.23    end
    1.24 @@ -370,29 +371,27 @@
    1.25              :add_where("direct_supporter_snapshot.satisfied")
    1.26              :add_field("direct_supporter_snapshot.informed", "is_informed")
    1.27  
    1.28 -
    1.29 -
    1.30    if members_selector:count() > 0 then
    1.31      if issue.fully_frozen then
    1.32 -      ui.container{ attr = { class = "heading"}, content = _"Supporters (before begin of voting)" }
    1.33 +      ui.anchor{ name = "supporters", attr = { class = "heading" }, content = _"Supporters (before begin of voting)" }
    1.34      else
    1.35 -      ui.container{ attr = { class = "heading"}, content = _"Supporters" }
    1.36 +      ui.anchor{ name = "supporters", attr = { class = "heading" }, content = _"Supporters" }
    1.37      end      
    1.38      
    1.39      execute.view{
    1.40        module = "member",
    1.41        view = "_list",
    1.42        params = {
    1.43 -        
    1.44          initiative = initiative,
    1.45 -        members_selector = members_selector
    1.46 +        members_selector = members_selector,
    1.47 +        paginator_name = "supporters"
    1.48        }
    1.49    }
    1.50    else
    1.51      if issue.fully_frozen then
    1.52 -      ui.container{ attr = { class = "heading"}, content = _"No supporters (before begin of voting)" }
    1.53 +      ui.anchor{ name = "supporters", attr = { class = "heading" }, content = _"No supporters (before begin of voting)" }
    1.54      else
    1.55 -      ui.container{ attr = { class = "heading"}, content = _"No supporters" }
    1.56 +      ui.anchor{ name = "supporters", attr = { class = "heading" }, content = _"No supporters" }
    1.57      end
    1.58      slot.put("<br />")
    1.59    end
    1.60 @@ -405,33 +404,32 @@
    1.61              :add_where("NOT direct_supporter_snapshot.satisfied")
    1.62              :add_field("direct_supporter_snapshot.informed", "is_informed")
    1.63  
    1.64 -
    1.65    if members_selector:count() > 0 then
    1.66      if issue.fully_frozen then
    1.67 -      ui.container{ attr = { class = "heading"}, content = _"Potential supporters (before begin of voting" }
    1.68 +      ui.anchor{ name = "potential_supporters", attr = { class = "heading" }, content = _"Potential supporters (before begin of voting)" }
    1.69      else
    1.70 -      ui.container{ attr = { class = "heading"}, content = _"Potential supporters" }
    1.71 +      ui.anchor{ name = "potential_supporters", attr = { class = "heading" }, content = _"Potential supporters" }
    1.72      end
    1.73                
    1.74      execute.view{
    1.75        module = "member",
    1.76        view = "_list",
    1.77        params = {
    1.78 -        
    1.79          initiative = initiative,
    1.80 -        members_selector = members_selector
    1.81 +        members_selector = members_selector,
    1.82 +        paginator_name = "potential_supporters"
    1.83        }
    1.84      }
    1.85    else
    1.86      if issue.fully_frozen then
    1.87 -      ui.container{ attr = { class = "heading"}, content = _"No potential supporters (before begin of voting)" }
    1.88 +      ui.anchor{ name = "potential_supporters", attr = { class = "heading" }, content = _"No potential supporters (before begin of voting)" }
    1.89      else
    1.90 -      ui.container{ attr = { class = "heading"}, content = _"No potential supporters" }
    1.91 +      ui.anchor{ name = "potential_supporters", attr = { class = "heading" }, content = _"No potential supporters" }
    1.92      end
    1.93      slot.put("<br />")
    1.94    end
    1.95    
    1.96 -  ui.container{ attr = { class = "heading"}, content = _"Details" }
    1.97 +  ui.container{ attr = { class = "heading" }, content = _"Details" }
    1.98    execute.view {
    1.99      module = "initiative",
   1.100      view = "_details",
   1.101 @@ -442,22 +440,3 @@
   1.102    }
   1.103  
   1.104  end
   1.105 -
   1.106 -
   1.107 ---[[
   1.108 -execute.view{
   1.109 -  module = "initiative",
   1.110 -  view = "show_tab",
   1.111 -  params = {
   1.112 -    initiative = initiative,
   1.113 -    initiator = initiator
   1.114 -  }
   1.115 -}
   1.116 -
   1.117 -if initiative.issue.snapshot then
   1.118 -  slot.put("<br />")
   1.119 -  ui.field.timestamp{ label = _"Last snapshot:", value = initiative.issue.snapshot }
   1.120 -end
   1.121 -
   1.122 -
   1.123 ---]]

Impressum / About Us