liquid_feedback_frontend

changeset 273:7196685f9dd7

More optical enhancements, more repositioning
author bsw
date Wed Feb 08 18:49:22 2012 +0100 (2012-02-08)
parents 65a1f7a01e7b
children aec9df5b4cd3
files app/main/_filter_view/30_navigation.lua app/main/_filter_view/31_logout_button.lua app/main/_layout/default.html app/main/area/list.lua app/main/area/show_tab.lua app/main/delegation/_show_box.lua app/main/delegation/new.lua app/main/index/index.lua app/main/initiative/_list_element.lua app/main/initiative/_show.lua app/main/initiative/show_support.lua app/main/issue/_list.lua app/main/issue/_list_initiatives.lua app/main/issue/_show_head.lua app/main/issue/show.lua app/main/issue/show_tab.lua app/main/member/_area_list.lua app/main/member/_profile.lua app/main/member/settings.lua app/main/member/show_tab.lua app/main/unit/list.lua config/default.lua model/member.lua static/style.css
line diff
     1.1 --- a/app/main/_filter_view/30_navigation.lua	Wed Feb 08 00:55:17 2012 +0100
     1.2 +++ b/app/main/_filter_view/30_navigation.lua	Wed Feb 08 18:49:22 2012 +0100
     1.3 @@ -4,7 +4,7 @@
     1.4  
     1.5    if app.session.member then
     1.6      ui.link{
     1.7 -      image  = { static = "icons/16/house.png" },
     1.8 +--      image  = { static = "icons/16/house.png" },
     1.9        text   = _"Home",
    1.10        module = 'index',
    1.11        view   = 'index'
    1.12 @@ -15,14 +15,14 @@
    1.13  
    1.14      if not config.single_unit_id then
    1.15        ui.link{
    1.16 -        image  = { static = "icons/16/package.png" },
    1.17 +--        image  = { static = "icons/16/package.png" },
    1.18          text   = _"Units",
    1.19          module = 'unit',
    1.20          view   = 'list'
    1.21        }
    1.22      else
    1.23        ui.link{
    1.24 -        image  = { static = "icons/16/package.png" },
    1.25 +--        image  = { static = "icons/16/package.png" },
    1.26          text   = _"Areas",
    1.27          module = 'area',
    1.28          view   = 'list'
    1.29 @@ -32,7 +32,7 @@
    1.30  
    1.31    if app.session.member == nil then
    1.32      ui.link{
    1.33 -      image  = { static = "icons/16/key.png" },
    1.34 +--      image  = { static = "icons/16/key.png" },
    1.35        text   = _"Login",
    1.36        module = 'index',
    1.37        view   = 'login',
    1.38 @@ -43,19 +43,19 @@
    1.39        }
    1.40      }
    1.41      ui.link{
    1.42 -      image  = { static = "icons/16/book_edit.png" },
    1.43 +--      image  = { static = "icons/16/book_edit.png" },
    1.44        text   = _"Registration",
    1.45        module = 'index',
    1.46        view   = 'register'
    1.47      }
    1.48      ui.link{
    1.49 -      image  = { static = "icons/16/key_forgot.png" },
    1.50 +--      image  = { static = "icons/16/key_forgot.png" },
    1.51        text   = _"Reset password",
    1.52        module = 'index',
    1.53        view   = 'reset_password'
    1.54      }
    1.55      ui.link{
    1.56 -      image  = { static = "icons/16/information.png" },
    1.57 +--      image  = { static = "icons/16/information.png" },
    1.58        text   = _"About / Impressum",
    1.59        module = 'index',
    1.60        view   = 'about'
    1.61 @@ -63,14 +63,14 @@
    1.62    else 
    1.63  
    1.64      ui.link{
    1.65 -      image  = { static = "icons/16/time.png" },
    1.66 +--      image  = { static = "icons/16/time.png" },
    1.67        text   = _"Timeline",
    1.68        module = "timeline",
    1.69        view   = "index"
    1.70      }
    1.71  
    1.72      ui.link{
    1.73 -      image  = { static = "icons/16/group.png" },
    1.74 +--      image  = { static = "icons/16/group.png" },
    1.75        text   = _"Members",
    1.76        module = 'member',
    1.77        view   = 'list',
    1.78 @@ -78,14 +78,20 @@
    1.79      }
    1.80  
    1.81      ui.link{
    1.82 -      image  = { static = "icons/16/book_edit.png" },
    1.83 +--      image  = { static = "icons/16/book_edit.png" },
    1.84        text   = _"Contacts",
    1.85        module = 'contact',
    1.86        view   = 'list'
    1.87      }
    1.88  
    1.89      ui.link{
    1.90 -      image  = { static = "icons/16/information.png" },
    1.91 +      text = (_"Settings"),
    1.92 +      module = "member",
    1.93 +      view = "settings"
    1.94 +    }
    1.95 +
    1.96 +    ui.link{
    1.97 +--      image  = { static = "icons/16/information.png" },
    1.98        text   = _"About",
    1.99        module = 'index',
   1.100        view   = 'about'
   1.101 @@ -97,7 +103,7 @@
   1.102  
   1.103        ui.link{
   1.104          attr   = { class = { "admin_only" } },
   1.105 -        image  = { static = "icons/16/cog.png" },
   1.106 +--        image  = { static = "icons/16/cog.png" },
   1.107          text   = _"Admin",
   1.108          module = 'admin',
   1.109          view   = 'index'
     2.1 --- a/app/main/_filter_view/31_logout_button.lua	Wed Feb 08 00:55:17 2012 +0100
     2.2 +++ b/app/main/_filter_view/31_logout_button.lua	Wed Feb 08 18:49:22 2012 +0100
     2.3 @@ -5,7 +5,7 @@
     2.4  
     2.5  slot.select('logout_button', function()
     2.6    ui.link{
     2.7 -    image  = { static = "icons/16/stop.png" },
     2.8 +--    image  = { static = "icons/16/stop.png" },
     2.9      text   = _"Logout",
    2.10      module = 'index',
    2.11      action = 'logout',
     3.1 --- a/app/main/_layout/default.html	Wed Feb 08 00:55:17 2012 +0100
     3.2 +++ b/app/main/_layout/default.html	Wed Feb 08 18:49:22 2012 +0100
     3.3 @@ -56,7 +56,6 @@
     3.4            </div>
     3.5            <!-- WEBMCP SLOT actions -->
     3.6          </div>
     3.7 -        <br style="clear: left;" />
     3.8        </div>
     3.9      </div>
    3.10      <div class="initiative_head" id="initiative_head">
     4.1 --- a/app/main/area/list.lua	Wed Feb 08 00:55:17 2012 +0100
     4.2 +++ b/app/main/area/list.lua	Wed Feb 08 18:49:22 2012 +0100
     4.3 @@ -1,6 +1,7 @@
     4.4  local unit_id = config.single_unit_id or param.get("unit_id", atom.integer)
     4.5  
     4.6  local areas_selector = Area:build_selector{ active = true, unit_id = unit_id }
     4.7 +areas_selector:add_order_by("member_weight DESC")
     4.8  
     4.9  local unit = Unit:by_id(unit_id)
    4.10  
     5.1 --- a/app/main/area/show_tab.lua	Wed Feb 08 00:55:17 2012 +0100
     5.2 +++ b/app/main/area/show_tab.lua	Wed Feb 08 18:49:22 2012 +0100
     5.3 @@ -20,7 +20,8 @@
     5.4      params = {
     5.5        issues_selector = issues_selector,
     5.6        filter = cgi.params["filter"],
     5.7 -      filter_voting = param.get("filter_voting")
     5.8 +      filter_voting = param.get("filter_voting"),
     5.9 +      for_area_list = true
    5.10      }
    5.11    }
    5.12  
     6.1 --- a/app/main/delegation/_show_box.lua	Wed Feb 08 00:55:17 2012 +0100
     6.2 +++ b/app/main/delegation/_show_box.lua	Wed Feb 08 18:49:22 2012 +0100
     6.3 @@ -71,6 +71,8 @@
     6.4  
     6.5  unit_id = param.get("unit_id", atom.integer)
     6.6  
     6.7 +local inline = param.get("inline", atom.boolean)
     6.8 +
     6.9  if param.get("initiative_id", atom.integer) then
    6.10    initiative_id = param.get("initiative_id", atom.integer)
    6.11    issue_id = Initiative:by_id(initiative_id).issue_id
    6.12 @@ -98,16 +100,28 @@
    6.13    if not delegation then
    6.14      delegation = Delegation:by_pk(app.session.member.id, nil, issue.area_id)
    6.15    end
    6.16 +  if not delegation then
    6.17 +    delegation = Delegation:by_pk(app.session.member.id, issue.area.unit_id)
    6.18 +  end
    6.19  elseif area_id then
    6.20    delegation = Delegation:by_pk(app.session.member.id, nil, area_id)
    6.21 +  if not delegation then
    6.22 +    local area = Area:by_id(area_id)
    6.23 +    delegation = Delegation:by_pk(app.session.member.id, area.unit_id)
    6.24 +  end
    6.25  end
    6.26  
    6.27  if not delegation then
    6.28    delegation = Delegation:by_pk(app.session.member.id, unit_id)
    6.29  end
    6.30  
    6.31 +local slot_name = "actions"
    6.32  
    6.33 -slot.select("actions", function()
    6.34 +if inline then
    6.35 +  slot_name = "default"
    6.36 +end
    6.37 +
    6.38 +slot.select(slot_name, function()
    6.39  
    6.40    if delegation then
    6.41      ui.container{
     7.1 --- a/app/main/delegation/new.lua	Wed Feb 08 00:55:17 2012 +0100
     7.2 +++ b/app/main/delegation/new.lua	Wed Feb 08 18:49:22 2012 +0100
     7.3 @@ -69,9 +69,10 @@
     7.4    routing = {
     7.5      default = {
     7.6        mode = "redirect",
     7.7 -      module = area and "area" or issue and "issue" or "index",
     7.8 -      view = (area or issue) and "show" or "index",
     7.9 +      module = area and "area" or issue and "issue" or "area",
    7.10 +      view = (area or issue) and "show" or "list",
    7.11        id = area and area.id or issue and issue.id or nil,
    7.12 +      params = { unit_id = unit and unit.id or nil }
    7.13      }
    7.14    },
    7.15    content = function()
     8.1 --- a/app/main/index/index.lua	Wed Feb 08 00:55:17 2012 +0100
     8.2 +++ b/app/main/index/index.lua	Wed Feb 08 18:49:22 2012 +0100
     8.3 @@ -45,50 +45,10 @@
     8.4  slot.put_into("title", encode.html(config.app_title))
     8.5  
     8.6  if app.session.member then
     8.7 -	app.html_title.title = app.session.member.name
     8.8 +  app.html_title.title = app.session.member.name
     8.9  end
    8.10  
    8.11  
    8.12 -slot.select("actions", function()
    8.13 -
    8.14 -  if app.session.member then
    8.15 -    ui.link{
    8.16 -      content = function()
    8.17 -          ui.image{ static = "icons/16/application_form.png" }
    8.18 -          slot.put(_"Edit my profile")
    8.19 -      end,
    8.20 -      module = "member",
    8.21 -      view = "edit"
    8.22 -    }
    8.23 -    ui.link{
    8.24 -      content = function()
    8.25 -          ui.image{ static = "icons/16/user_gray.png" }
    8.26 -          slot.put(_"Upload images")
    8.27 -      end,
    8.28 -      module = "member",
    8.29 -      view = "edit_images"
    8.30 -    }
    8.31 -    ui.link{
    8.32 -      content = function()
    8.33 -          ui.image{ static = "icons/16/wrench.png" }
    8.34 -          slot.put(_"Settings")
    8.35 -      end,
    8.36 -      module = "member",
    8.37 -      view = "settings"
    8.38 -    }
    8.39 -    if config.download_dir then
    8.40 -      ui.link{
    8.41 -        content = function()
    8.42 -            ui.image{ static = "icons/16/database_save.png" }
    8.43 -            slot.put(_"Download")
    8.44 -        end,
    8.45 -        module = "index",
    8.46 -        view = "download"
    8.47 -      }
    8.48 -    end 
    8.49 -  end
    8.50 -end)
    8.51 -
    8.52  util.help("index.index", _"Home")
    8.53  
    8.54  execute.view{
     9.1 --- a/app/main/initiative/_list_element.lua	Wed Feb 08 00:55:17 2012 +0100
     9.2 +++ b/app/main/initiative/_list_element.lua	Wed Feb 08 18:49:22 2012 +0100
     9.3 @@ -65,7 +65,7 @@
     9.4            records = { { a = 1} },
     9.5            columns = {
     9.6              {
     9.7 -              field_attr = { style = "width: 4em; padding: 0;"},
     9.8 +              field_attr = { style = "width: 3em; padding: 0; text-align: center;"},
     9.9                content = function()
    9.10                  if initiative.issue.accepted and initiative.issue.closed and initiative.issue.ranks_available or initiative.admitted == false then 
    9.11                    ui.field.rank{ image_attr = { id = icon_name }, attr = { class = "rank" }, value = initiative.rank }
    9.12 @@ -107,8 +107,8 @@
    9.13                    else
    9.14                      slot.put(_"Counting of votes")
    9.15                    end
    9.16 -                elseif initiative.issue.population then
    9.17 -                  local max_value = initiative.issue.population
    9.18 +                else
    9.19 +                  local max_value = initiative.issue.population or 0
    9.20                    ui.bargraph{
    9.21                      max_value = max_value,
    9.22                      width = 100,
    9.23 @@ -120,8 +120,6 @@
    9.24                        { color = "#eee", value = max_value - (initiative.supporter_count or 0) },
    9.25                      }
    9.26                    }
    9.27 -                else
    9.28 -                  slot.put("&nbsp;")
    9.29                  end
    9.30                end
    9.31              },
    10.1 --- a/app/main/initiative/_show.lua	Wed Feb 08 00:55:17 2012 +0100
    10.2 +++ b/app/main/initiative/_show.lua	Wed Feb 08 18:49:22 2012 +0100
    10.3 @@ -274,52 +274,6 @@
    10.4    }
    10.5  end
    10.6  
    10.7 -if (initiative.discussion_url and #initiative.discussion_url > 0)
    10.8 -  or (initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked) then
    10.9 -  ui.container{
   10.10 -    attr = { class = "vertical" },
   10.11 -    content = function()
   10.12 -      ui.container{
   10.13 -        attr = { class = "ui_field_label" },
   10.14 -        content = _"Discussion with initiators"
   10.15 -      }
   10.16 -      ui.tag{
   10.17 -        tag = "span",
   10.18 -        content = function()
   10.19 -          if initiative.discussion_url:find("^https?://") then
   10.20 -            if initiative.discussion_url and #initiative.discussion_url > 0 then
   10.21 -              ui.link{
   10.22 -                attr = {
   10.23 -                  class = "actions",
   10.24 -                  target = "_blank",
   10.25 -                  title = initiative.discussion_url
   10.26 -                },
   10.27 -                content = function()
   10.28 -                  slot.put(encode.html(initiative.discussion_url))
   10.29 -                end,
   10.30 -                external = initiative.discussion_url
   10.31 -              }
   10.32 -            end
   10.33 -          else
   10.34 -            slot.put(encode.html(initiative.discussion_url))
   10.35 -          end
   10.36 -          slot.put(" ")
   10.37 -          if initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then
   10.38 -            ui.link{
   10.39 -              attr   = { class = "actions" },
   10.40 -              text   = _"(change URL)",
   10.41 -              module = "initiative",
   10.42 -              view   = "edit",
   10.43 -              id     = initiative.id
   10.44 -            }
   10.45 -          end
   10.46 -        end
   10.47 -      }
   10.48 -    end
   10.49 -  }
   10.50 -end
   10.51 -
   10.52 -
   10.53  
   10.54  execute.view{
   10.55    module = "initiative",
    11.1 --- a/app/main/initiative/show_support.lua	Wed Feb 08 00:55:17 2012 +0100
    11.2 +++ b/app/main/initiative/show_support.lua	Wed Feb 08 18:49:22 2012 +0100
    11.3 @@ -9,21 +9,107 @@
    11.4    id = initiative.id,
    11.5    target = "initiative_" .. tostring(initiative.id) .. "_support",
    11.6    content = function()
    11.7 +
    11.8      ui.container{
    11.9 -      attr = {
   11.10 -        class = "slot_support vote_info",
   11.11 -      },
   11.12 +      attr = { class = "actions" },
   11.13        content = function()
   11.14 -        ui.container{
   11.15 -          attr = { class = "actions" },
   11.16 -          content = function()
   11.17 -            execute.view{
   11.18 -              module = "supporter",
   11.19 -              view = "_show_box",
   11.20 -              params = { initiative = initiative }
   11.21 +
   11.22 +        local initiative = param.get("initiative", "table")
   11.23 +        local supporter = Supporter:by_pk(initiative.id, app.session.member.id)
   11.24 +
   11.25 +        local unique_string = multirand.string(16, '0123456789abcdef')
   11.26 +
   11.27 +
   11.28 +        local partial = {
   11.29 +          routing = {
   11.30 +            default = {
   11.31 +              mode = "redirect",
   11.32 +              module = "initiative",
   11.33 +              view = "show_support",
   11.34 +              id = initiative.id
   11.35              }
   11.36 +          }
   11.37 +        }
   11.38 +
   11.39 +        local routing = {
   11.40 +          default = {
   11.41 +            mode = "redirect",
   11.42 +            module = request.get_module(),
   11.43 +            view = request.get_view(),
   11.44 +            id = param.get_id_cgi(),
   11.45 +            params = param.get_all_cgi()
   11.46 +          }
   11.47 +        }
   11.48 +
   11.49 +        if not initiative.issue.fully_frozen and not initiative.issue.closed then
   11.50 +          if supporter then
   11.51 +            if not supporter:has_critical_opinion() then
   11.52 +              ui.tag{ content = function()
   11.53 +                ui.image{
   11.54 +                  static = "icons/16/thumb_up_green.png"
   11.55 +                }
   11.56 +                slot.put(_"Your are supporter")
   11.57 +              end }
   11.58 +            else
   11.59 +              ui.tag{ content = function()
   11.60 +                ui.image{
   11.61 +                  static = "icons/16/thumb_up.png"
   11.62 +                }
   11.63 +                slot.put(_"Your are potential supporter")
   11.64 +              end }
   11.65 +            end
   11.66 +            slot.put(" &middot; ")
   11.67 +            ui.link{
   11.68 +              text    = _"Remove my support from this initiative",
   11.69 +              module  = "initiative",
   11.70 +              action  = "remove_support",
   11.71 +              id      = initiative.id,
   11.72 +              routing = routing,
   11.73 +              partial = partial
   11.74 +            }
   11.75 +          else
   11.76 +
   11.77 +            if not initiative.revoked then
   11.78 +              local params = param.get_all_cgi()
   11.79 +              params.dyn = nil
   11.80 +              ui.link{
   11.81 +                text    = _"Support this initiative",
   11.82 +                module  = "initiative",
   11.83 +                action  = "add_support",
   11.84 +                id      = initiative.id,
   11.85 +                routing = routing,
   11.86 +                partial = partial
   11.87 +              }
   11.88 +            end
   11.89            end
   11.90 -        }
   11.91 +        end
   11.92 +
   11.93 +
   11.94 +        if (initiative.discussion_url and #initiative.discussion_url > 0) then
   11.95 +          if initiative.discussion_url:find("^https?://") then
   11.96 +            if initiative.discussion_url and #initiative.discussion_url > 0 then
   11.97 +              ui.link{
   11.98 +                attr = {
   11.99 +                  target = "_blank",
  11.100 +                  title = _"Discussion with initiators"
  11.101 +                },
  11.102 +                image = { static = "icons/16/comments.png" },
  11.103 +                text = _"Discuss with initiators",
  11.104 +                external = initiative.discussion_url
  11.105 +              }
  11.106 +            end
  11.107 +          else
  11.108 +            slot.put(encode.html(initiative.discussion_url))
  11.109 +          end
  11.110 +        end
  11.111 +        if initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then
  11.112 +          ui.link{
  11.113 +            text   = _"change discussion URL",
  11.114 +            module = "initiative",
  11.115 +            view   = "edit",
  11.116 +            id     = initiative.id
  11.117 +          }
  11.118 +        end
  11.119        end
  11.120      }
  11.121      slot.put("<div style='clear: left;'></div>")
    12.1 --- a/app/main/issue/_list.lua	Wed Feb 08 00:55:17 2012 +0100
    12.2 +++ b/app/main/issue/_list.lua	Wed Feb 08 18:49:22 2012 +0100
    12.3 @@ -28,66 +28,65 @@
    12.4        local highlight_string = param.get("highlight_string", "string")
    12.5        local issues = issues or issues_selector:exec()
    12.6        -- issues:load(initiatives)
    12.7 -      ui.list{
    12.8 -        attr = { class = "issues" },
    12.9 -        records = issues,
   12.10 -        columns = {
   12.11 -          {
   12.12 -            label = _"Issue",
   12.13 -            content = function(record)
   12.14 -              if not param.get("for_area_list", atom.boolean) then
   12.15 -                ui.field.text{
   12.16 -                  value = record.area.name
   12.17 -                }
   12.18 -                slot.put("<br />")
   12.19 -              end
   12.20 -              if record.is_interested then
   12.21 -                local label = _"You are interested in this issue",
   12.22 -                ui.image{
   12.23 -                  attr = { alt = label, title = label },
   12.24 -                  static = "icons/16/eye.png"
   12.25 -                }
   12.26 -                slot.put("&nbsp;")
   12.27 -              end
   12.28 -              ui.link{
   12.29 -                text = _("Issue ##{id}", { id = tostring(record.id) }),
   12.30 -                module = "issue",
   12.31 -                view = "show",
   12.32 -                id = record.id
   12.33 +      ui.container{ attr = { class = "issues" }, content = function()
   12.34 +
   12.35 +        for i, issue in ipairs(issues) do
   12.36 +
   12.37 +          local class = "issue"
   12.38 +          if issue.is_interested then
   12.39 +            class = class .. " interested"
   12.40 +          end
   12.41 +          ui.container{ attr = { class = class }, content = function()
   12.42 +
   12.43 +            ui.container{ attr = { class = "issue_info" }, content = function()
   12.44 +            
   12.45 +              ui.tag{
   12.46 +                tag = "div",
   12.47 +                content = function()
   12.48 +                  ui.link{
   12.49 +                    attr = { class = "issue_id" },
   12.50 +                    text = _("Issue ##{id}", { id = tostring(issue.id) }),
   12.51 +                    module = "issue",
   12.52 +                    view = "show",
   12.53 +                    id = issue.id
   12.54 +                  }
   12.55 +
   12.56 +--                 if not param.get("for_area_list", atom.boolean) then
   12.57 +                    slot.put(" &middot; ")
   12.58 +                    ui.tag{ content = issue.area.unit.name }
   12.59 +                    slot.put(" &middot; ")
   12.60 +                    ui.tag{ content = issue.area.name }
   12.61 +--                  end
   12.62 +                end
   12.63                }
   12.64 -              if record.state == "new" then
   12.65 -                ui.image{
   12.66 -                  static = "icons/16/new.png"
   12.67 -                }
   12.68 -              end
   12.69 -              slot.put("<br />")
   12.70 -              slot.put("<br />")
   12.71 -              if record.old_state then
   12.72 -                ui.field.text{ value = format.time(record.sort) }
   12.73 -                ui.field.text{ value = Issue:get_state_name_for_state(record.old_state) .. " > " .. Issue:get_state_name_for_state(record.new_state) }
   12.74 +              ui.tag{
   12.75 +                tag = "div",
   12.76 +                content = function()
   12.77 +                
   12.78 +                  ui.tag{ content = issue.policy.name }
   12.79 +
   12.80 +                  slot.put(" &middot; ")
   12.81 +                  ui.tag{ content = issue.state_name }
   12.82 +
   12.83 +                  if issue.state_time_left then
   12.84 +                    slot.put(" &middot; ")
   12.85 +                    ui.tag{ content = _("#{time_left} left", { time_left = issue.state_time_left }) }
   12.86 +                  end
   12.87 +
   12.88 +                end
   12.89 +              }
   12.90 +
   12.91 +              
   12.92 +              if issue.old_state then
   12.93 +                ui.field.text{ value = format.time(issue.sort) }
   12.94 +                ui.field.text{ value = Issue:get_state_name_for_state(issue.old_state) .. " > " .. Issue:get_state_name_for_state(issue.new_state) }
   12.95                else
   12.96                end
   12.97 -            end
   12.98 -          },
   12.99 -          {
  12.100 -            label = _"State",
  12.101 -            content = function(record)
  12.102 -              if record.state == "voting" then
  12.103 -                ui.link{
  12.104 -                  content = _"Voting",
  12.105 -                  module = "vote",
  12.106 -                  view = "list",
  12.107 -                  params = { issue_id = record.id }
  12.108 -                }
  12.109 -              else
  12.110 -                ui.field.issue_state{ value = record.state }
  12.111 -              end
  12.112 -            end
  12.113 -          },
  12.114 -          {
  12.115 -            label = _"Initiatives",
  12.116 -            content = function(record)
  12.117 -              local initiatives_selector = record:get_reference_selector("initiatives")
  12.118 +            end }
  12.119 +
  12.120 +            ui.container{ attr = { class = "initiative_list" }, content = function()
  12.121 +
  12.122 +              local initiatives_selector = issue:get_reference_selector("initiatives")
  12.123                local highlight_string = param.get("highlight_string")
  12.124                if highlight_string then
  12.125                  initiatives_selector:add_field( {'"highlight"("initiative"."name", ?)', highlight_string }, "name_highlighted")
  12.126 @@ -96,7 +95,7 @@
  12.127                  module = "initiative",
  12.128                  view = "_list",
  12.129                  params = {
  12.130 -                  issue = record,
  12.131 +                  issue = issue,
  12.132                    initiatives_selector = initiatives_selector,
  12.133                    highlight_string = highlight_string,
  12.134                    per_page = app.session.member_id and tonumber(app.session.member:get_setting_value("initiatives_preview_limit") or 3) or 3,
  12.135 @@ -104,10 +103,10 @@
  12.136                    limit = app.session.member_id and tonumber(app.session.member:get_setting_value("initiatives_preview_limit") or 3) or 3
  12.137                  }
  12.138                }
  12.139 -            end
  12.140 -          },
  12.141 -        }
  12.142 -      }
  12.143 +            end }
  12.144 +          end }
  12.145 +        end
  12.146 +      end }
  12.147      end
  12.148    }
  12.149  end
    13.1 --- a/app/main/issue/_list_initiatives.lua	Wed Feb 08 00:55:17 2012 +0100
    13.2 +++ b/app/main/issue/_list_initiatives.lua	Wed Feb 08 18:49:22 2012 +0100
    13.3 @@ -1,10 +1,21 @@
    13.4  local issue = param.get("issue", "table")
    13.5  
    13.6 -execute.view{
    13.7 -  module = "initiative",
    13.8 -  view = "_list",
    13.9 -  params = { 
   13.10 -    issue = issue,
   13.11 -    initiatives_selector = issue:get_reference_selector("initiatives")
   13.12 -  }
   13.13 +ui.container{
   13.14 +  attr = { class = "issue_initiative_list" },
   13.15 +  content = function()
   13.16 +    execute.view{
   13.17 +      module = "initiative",
   13.18 +      view = "_list",
   13.19 +      params = {
   13.20 +        initiatives_selector = issue:get_reference_selector("initiatives"),
   13.21 +        issue = issue,
   13.22 +        expandable = true,
   13.23 +        for_initiative_id = param.get("for_initiative_id", atom.number),
   13.24 +        xshow_for_issue = true,
   13.25 +        no_sort = true
   13.26 +      }
   13.27 +    }
   13.28 +  end
   13.29  }
   13.30 +
   13.31 +slot.put("<br />")
    14.1 --- a/app/main/issue/_show_head.lua	Wed Feb 08 00:55:17 2012 +0100
    14.2 +++ b/app/main/issue/_show_head.lua	Wed Feb 08 18:49:22 2012 +0100
    14.3 @@ -22,7 +22,7 @@
    14.4      view = "show",
    14.5      id = issue.id
    14.6    }
    14.7 -    slot.put(" &middot; ")
    14.8 +  slot.put(" &middot; ")
    14.9    ui.link{
   14.10      content = issue.area.name,
   14.11      module = "area",
   14.12 @@ -69,16 +69,14 @@
   14.13        slot.put(" &middot; ")
   14.14        ui.tag{ content = issue.state_name }
   14.15  
   14.16 -      slot.put(" &middot; ")
   14.17 -      local time_left = issue.state_time_left
   14.18 -      if time_left then
   14.19 -        ui.tag{ content = _("#{time_left} left", { time_left = time_left }) }
   14.20 +      if issue.state_time_left then
   14.21 +        slot.put(" &middot; ")
   14.22 +        ui.tag{ content = _("#{time_left} left", { time_left = issue.state_time_left }) }
   14.23        end
   14.24  
   14.25 -      slot.put(" &middot; ")
   14.26 -      local next_state_names = issue.next_states_names
   14.27 -      if next_state_names then
   14.28 -        ui.tag{ content = _("Next state: #{state}", { state = next_state_names }) }
   14.29 +      if issue.next_states_names then
   14.30 +        slot.put(" &middot; ")
   14.31 +        ui.tag{ content = _("Next state: #{state}", { state = issue.next_states_names }) }
   14.32        end
   14.33      end
   14.34    }
    15.1 --- a/app/main/issue/show.lua	Wed Feb 08 00:55:17 2012 +0100
    15.2 +++ b/app/main/issue/show.lua	Wed Feb 08 18:49:22 2012 +0100
    15.3 @@ -36,24 +36,6 @@
    15.4    }
    15.5  end
    15.6  
    15.7 -ui.container{
    15.8 -  attr = { class = "issue_initiative_list" },
    15.9 -  content = function()
   15.10 -    execute.view{
   15.11 -      module = "initiative",
   15.12 -      view = "_list",
   15.13 -      params = {
   15.14 -        initiatives_selector = issue:get_reference_selector("initiatives"),
   15.15 -        issue = issue,
   15.16 -        expandable = true,
   15.17 -        for_initiative_id = param.get("for_initiative_id", atom.number),
   15.18 -        show_for_issue = true
   15.19 -      }
   15.20 -    }
   15.21 -  end
   15.22 -}
   15.23 -
   15.24 -slot.put("<br />")
   15.25  
   15.26  execute.view{
   15.27    module = "issue",
    16.1 --- a/app/main/issue/show_tab.lua	Wed Feb 08 00:55:17 2012 +0100
    16.2 +++ b/app/main/issue/show_tab.lua	Wed Feb 08 18:49:22 2012 +0100
    16.3 @@ -18,6 +18,19 @@
    16.4    static_params = { issue_id = issue.id },
    16.5  }
    16.6  
    16.7 +tabs[#tabs+1] =
    16.8 +  {
    16.9 +    name = "initiatives",
   16.10 +    label = _"Initiatives",
   16.11 +    icon = { static = "icons/16/script.png" },
   16.12 +    module = "issue",
   16.13 +    view = "_list_initiatives",
   16.14 +    params = {
   16.15 +      issue = issue
   16.16 +    }
   16.17 +  }
   16.18 +
   16.19 +    
   16.20  if app.session.member_id then
   16.21    tabs[#tabs+1] =
   16.22      {
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/app/main/member/_area_list.lua	Wed Feb 08 18:49:22 2012 +0100
    17.3 @@ -0,0 +1,18 @@
    17.4 +local units = app.session.member.units_with_voting_right
    17.5 +local member = param.get("member", "table")
    17.6 +for i, unit in ipairs(units) do
    17.7 +  local areas_selector = Area:new_selector()
    17.8 +    :join("membership", nil, { "membership.area_id = area.id AND membership.member_id = ?", member.id })
    17.9 +    :add_where{ "area.unit_id = ?", unit.id }
   17.10 +    :add_order_by("area.member_weight DESC")
   17.11 +  ui.link{
   17.12 +    text = unit.name,
   17.13 +    module = "area", view = "list", params = { unit_id = unit.id }
   17.14 +  }
   17.15 +  
   17.16 +  execute.view{
   17.17 +    module = "area", view = "_list",
   17.18 +    params = { areas_selector = areas_selector },
   17.19 +  }
   17.20 +end
   17.21 +
    18.1 --- a/app/main/member/_profile.lua	Wed Feb 08 00:55:17 2012 +0100
    18.2 +++ b/app/main/member/_profile.lua	Wed Feb 08 18:49:22 2012 +0100
    18.3 @@ -7,6 +7,41 @@
    18.4    end
    18.5  end
    18.6  
    18.7 +--slot.select("actions", function()
    18.8 +
    18.9 +  if app.session.member and app.session.member_id == member.id then
   18.10 +    ui.link{
   18.11 +      attr = { class = "actions" },
   18.12 +      content = function()
   18.13 +          ui.image{ static = "icons/16/application_form.png" }
   18.14 +          slot.put(_"Edit my profile")
   18.15 +      end,
   18.16 +      module = "member",
   18.17 +      view = "edit"
   18.18 +    }
   18.19 +    ui.link{
   18.20 +      attr = { class = "actions" },
   18.21 +      content = function()
   18.22 +          ui.image{ static = "icons/16/user_gray.png" }
   18.23 +          slot.put(_"Upload images")
   18.24 +      end,
   18.25 +      module = "member",
   18.26 +      view = "edit_images"
   18.27 +    }
   18.28 +    if config.download_dir then
   18.29 +      ui.link{
   18.30 +        attr = { class = "actions" },
   18.31 +        content = function()
   18.32 +            ui.image{ static = "icons/16/database_save.png" }
   18.33 +            slot.put(_"Download")
   18.34 +        end,
   18.35 +        module = "index",
   18.36 +        view = "download"
   18.37 +      }
   18.38 +    end
   18.39 +    slot.put("<br /><br />")
   18.40 +  end
   18.41 +--end)
   18.42  
   18.43  ui.form{
   18.44    attr = { class = "member vertical" },
    19.1 --- a/app/main/member/settings.lua	Wed Feb 08 00:55:17 2012 +0100
    19.2 +++ b/app/main/member/settings.lua	Wed Feb 08 18:49:22 2012 +0100
    19.3 @@ -17,12 +17,14 @@
    19.4  }
    19.5  
    19.6  local pages = {
    19.7 -  { view = "settings_display",   text = _"Display settings" },
    19.8 -  { view = "settings_email",     text = _"Change your notification email address" },
    19.9 -  { view = "settings_name",      text = _"Change your name" },
   19.10 -  { view = "settings_login",     text = _"Change your login" },
   19.11 -  { view = "settings_password",  text = _"Change your password" },
   19.12 -  { view = "developer_settings", text = _"Developer settings" },
   19.13 +  { module = "member", view = "edit", text = _"Edit profile" },
   19.14 +  { module = "member", view = "edit_images", text = _"Upload images" },
   19.15 +  { view = "settings_display",        text = _"Display settings" },
   19.16 +  { view = "settings_email",          text = _"Change your notification email address" },
   19.17 +  { view = "settings_name",           text = _"Change your name" },
   19.18 +  { view = "settings_login",          text = _"Change your login" },
   19.19 +  { view = "settings_password",       text = _"Change your password" },
   19.20 +  { view = "developer_settings",      text = _"Developer settings" },
   19.21  }
   19.22  
   19.23  ui.list{
   19.24 @@ -33,7 +35,7 @@
   19.25      {
   19.26        content = function(page)
   19.27          ui.link{
   19.28 -          module = "member",
   19.29 +          module = page.module or "member",
   19.30            view = page.view,
   19.31            text = page.text
   19.32          }
    20.1 --- a/app/main/member/show_tab.lua	Wed Feb 08 00:55:17 2012 +0100
    20.2 +++ b/app/main/member/show_tab.lua	Wed Feb 08 18:49:22 2012 +0100
    20.3 @@ -140,29 +140,31 @@
    20.4    end
    20.5  end
    20.6  
    20.7 -tabs[#tabs+1] = {
    20.8 -  name = "profile",
    20.9 -  label = _"Profile",
   20.10 -  icon = { static = "icons/16/application_form.png" },
   20.11 -  module = "member",
   20.12 -  view = "_profile",
   20.13 -  params = { member = member },
   20.14 -}
   20.15 +if not show_as_homepage then
   20.16 +  tabs[#tabs+1] = {
   20.17 +    name = "profile",
   20.18 +    label = _"Profile",
   20.19 +    icon = { static = "icons/16/application_form.png" },
   20.20 +    module = "member",
   20.21 +    view = "_profile",
   20.22 +    params = { member = member },
   20.23 +  }
   20.24 +end
   20.25  
   20.26  local areas_selector = member:get_reference_selector("areas")
   20.27  tabs[#tabs+1] = {
   20.28    name = "areas",
   20.29    label = _"Areas" .. " (" .. tostring(areas_selector:count()) .. ")",
   20.30    icon = { static = "icons/16/package.png" },
   20.31 -  module = "area",
   20.32 -  view = "_list",
   20.33 -  params = { areas_selector = areas_selector },
   20.34 +  module = "member",
   20.35 +  view = "_area_list",
   20.36 +  params = { areas_selector = areas_selector, member = member },
   20.37  }
   20.38  
   20.39  local issues_selector = member:get_reference_selector("issues")
   20.40  tabs[#tabs+1] = {
   20.41    name = "issues",
   20.42 -  label = _"Interessiert" .. " (" .. tostring(issues_selector:count()) .. ")",
   20.43 +  label = _"Issues" .. " (" .. tostring(issues_selector:count()) .. ")",
   20.44    icon = { static = "icons/16/folder.png" },
   20.45    module = "issue",
   20.46    view = "_list",
   20.47 @@ -226,4 +228,15 @@
   20.48    params = { members_selector = contacts_selector },
   20.49  }
   20.50  
   20.51 +if show_as_homepage then
   20.52 +  tabs[#tabs+1] = {
   20.53 +    name = "profile",
   20.54 +    label = _"Profile",
   20.55 +    icon = { static = "icons/16/application_form.png" },
   20.56 +    module = "member",
   20.57 +    view = "_profile",
   20.58 +    params = { member = member },
   20.59 +  }
   20.60 +end
   20.61 +
   20.62  ui.tabs(tabs)
    21.1 --- a/app/main/unit/list.lua	Wed Feb 08 00:55:17 2012 +0100
    21.2 +++ b/app/main/unit/list.lua	Wed Feb 08 18:49:22 2012 +0100
    21.3 @@ -1,6 +1,6 @@
    21.4  local units = Unit:get_flattened_tree{ active = true }
    21.5  
    21.6 -slot.put_into("title", encode.html(config.app_title))
    21.7 +slot.put_into("title", _"Unit list")
    21.8  
    21.9  if not app.session.member_id and config.motd_public then
   21.10    local help_text = config.motd_public
   21.11 @@ -18,7 +18,6 @@
   21.12    records = units,
   21.13    columns = {
   21.14      {
   21.15 -      label = "name",
   21.16        content = function(unit)
   21.17          ui.link{ text = unit.name, module = "area", view = "list", params = { unit_id = unit.id } }
   21.18        end 
    22.1 --- a/config/default.lua	Wed Feb 08 00:55:17 2012 +0100
    22.2 +++ b/config/default.lua	Wed Feb 08 18:49:22 2012 +0100
    22.3 @@ -78,7 +78,7 @@
    22.4  -- open and set default database handle
    22.5  db = assert(mondelefant.connect{
    22.6    engine='postgresql',
    22.7 -  dbname='liquid_feedback'
    22.8 +  dbname='liquid_feedback_p'
    22.9  })
   22.10  at_exit(function() 
   22.11    db:close()
    23.1 --- a/model/member.lua	Wed Feb 08 00:55:17 2012 +0100
    23.2 +++ b/model/member.lua	Wed Feb 08 18:49:22 2012 +0100
    23.3 @@ -405,6 +405,13 @@
    23.4    )
    23.5  end
    23.6  
    23.7 +function Member.object_get:units_with_voting_right()
    23.8 +  return(Unit:new_selector()
    23.9 +    :join("privilege", nil, { "privilege.unit_id = unit.id AND privilege.member_id = ? AND privilege.voting_right", self.id })
   23.10 +    :exec()
   23.11 +  )
   23.12 +end
   23.13 +
   23.14  function Member.object:ui_field_text(args)
   23.15    args = args or {}
   23.16    if app.session.member_id or config.public_access == "pseudonym" then
    24.1 --- a/static/style.css	Wed Feb 08 00:55:17 2012 +0100
    24.2 +++ b/static/style.css	Wed Feb 08 18:49:22 2012 +0100
    24.3 @@ -113,23 +113,15 @@
    24.4   */
    24.5  
    24.6  .topbar {
    24.7 -  xbackground-color: #444;
    24.8 +  background-color: #444;
    24.9    color: #fff;
   24.10 -  font-size: 75%;
   24.11 +  font-size: 90%;
   24.12    line-height: 140%;
   24.13 -  background: -webkit-gradient(
   24.14 -    linear, left bottom, left top, 
   24.15 -    color-stop(0%,#4c4c4c),
   24.16 -    color-stop(12%,#595959),
   24.17 -    color-stop(25%,#666666),
   24.18 -    color-stop(39%,#474747),
   24.19 -    color-stop(50%,#2c2c2c),
   24.20 -    color-stop(51%,#000000),
   24.21 -    color-stop(60%,#111111),
   24.22 -    color-stop(76%,#2b2b2b),
   24.23 -    color-stop(91%,#1c1c1c),
   24.24 -    color-stop(100%,#131313)
   24.25 -  );
   24.26 +  padding-left: 10px;
   24.27 +}
   24.28 +
   24.29 +.topbar .logolf {
   24.30 +  font-weight: bold;
   24.31  }
   24.32  
   24.33  .topbar a {
   24.34 @@ -207,7 +199,8 @@
   24.35    padding-bottom: 1ex;
   24.36    xbackground-color: #def;
   24.37    background: -webkit-gradient(linear, left top, left bottom, 
   24.38 -    color-stop(0%,#abd3ee), color-stop(100%,#ffffff)                           
   24.39 +    /*color-stop(0%,#abd3ee), color-stop(100%,#ffffff)*/
   24.40 +    color-stop(0%,#ddd), color-stop(100%,#fff)                           
   24.41    ); 
   24.42  }
   24.43  
   24.44 @@ -274,19 +267,20 @@
   24.45    display: inline;
   24.46  }
   24.47  
   24.48 +.actions {
   24.49 +}
   24.50 +
   24.51  .actions a {
   24.52 -  float: left;
   24.53 -  display: block;
   24.54    padding: 1px 0.5em 1px 0.0em;
   24.55    margin-right: 1em;
   24.56 -  vertical-align: middle;
   24.57    border-radius: 5px;
   24.58  }
   24.59  
   24.60  
   24.61  .slot_initiative_head  {
   24.62 -  background: -webkit-gradient(linear, left top, left bottom, 
   24.63 -    color-stop(0%,#AFEFB9), color-stop(100%,#ffffff)                           
   24.64 +  xbackground: -webkit-gradient(linear, left top, left bottom, 
   24.65 +    /*color-stop(0%,#AFEFB9), color-stop(100%,#ffffff)                           */
   24.66 +    color-stop(0%,#ddd), color-stop(100%,#fff)                           
   24.67    ); 
   24.68    padding-left: 1em;
   24.69    padding-top: 2ex;
   24.70 @@ -295,8 +289,8 @@
   24.71  .initiative_name {
   24.72    font-weight: bold;
   24.73    font-size: 125%;
   24.74 -  line-height: 110%;
   24.75 -  margin-bottom: 0.7ex;
   24.76 +  xline-height: 110%;
   24.77 +  xmargin-bottom: 0.7ex;
   24.78  }
   24.79  
   24.80  
   24.81 @@ -373,26 +367,25 @@
   24.82  .slot_support .head_potential_supporter{
   24.83    background-color: #fec;
   24.84    border: 1px solid #b96;
   24.85 -}
   24.86 -
   24.87 -.interest .head_autoreject {
   24.88 -  background-color: #fdd;
   24.89 -  border: 1px solid #b77;
   24.90 +  border-radius: 5px;
   24.91  }
   24.92  
   24.93  .slot_support .head_supporter {
   24.94    background-color: #dfc;
   24.95    border: 1px solid #8b8;
   24.96 +  border-radius: 5px;
   24.97  }
   24.98  
   24.99  .slot_support .head_initiator {
  24.100    background-color: #eee;
  24.101    border: 1px solid #999;
  24.102 +  border-radius: 5px;
  24.103  }
  24.104  
  24.105  .delegation .head_active {
  24.106    background-color: #ddf;
  24.107    border: 1px solid #88b;
  24.108 +  border-radius: 5px;
  24.109  }
  24.110  
  24.111  .delegation .change_delegation {
  24.112 @@ -912,12 +905,43 @@
  24.113   * Issues
  24.114   */
  24.115  
  24.116 -.issues tr {
  24.117 -  border: 1px solid #ccc;
  24.118 +.issues .issue {
  24.119 +  xborder: 1px solid #ccc;
  24.120 +  background: -webkit-gradient(linear, left top, left bottom,
  24.121 +    color-stop(0%,#e7e7e7), color-stop(33%, #f7f7f7), color-stop(100%,#fff));
  24.122 +  overflow: hidden;
  24.123 +  margin-bottom: 2ex;
  24.124 +  border-radius: 8px;
  24.125 +}
  24.126 +
  24.127 +.issues .issue.interested {
  24.128 +  background: -webkit-gradient(linear, left top, left bottom,
  24.129 +    color-stop(0%,#eec), color-stop(25%, #ffe), color-stop(100%,#fff));
  24.130 +}
  24.131 +
  24.132 +.issues .issue .issue_info {
  24.133 +  xfloat: left;
  24.134 +  xwidth: 25%;
  24.135 +  padding: 1ex;
  24.136 +  line-height: 140%;
  24.137 +  xoverflow: hidden;
  24.138 +}
  24.139 +
  24.140 +.issues .issue .issue_info .issue_id {
  24.141 +  font-size: 125%;
  24.142 +}
  24.143 +
  24.144 +.issues .issue .initiative_list a {
  24.145 +  font-weight: bold;
  24.146 +}
  24.147 +
  24.148 +.issue_initiative_list a {
  24.149 +  font-weight: bold;
  24.150  }
  24.151  
  24.152  .issues tr tr {
  24.153    border: none;
  24.154 +  background: none;
  24.155  }
  24.156  
  24.157  .lang_chooser {
  24.158 @@ -961,6 +985,7 @@
  24.159    overflow: hidden;
  24.160    xwhite-space: nowrap;
  24.161    position: relative;
  24.162 +  border-radius: 7px;
  24.163  }
  24.164  
  24.165  .member_thumb a{
  24.166 @@ -980,6 +1005,7 @@
  24.167    padding: 0;
  24.168    margin: 0;
  24.169    vertical-align: bottom;
  24.170 +  border-radius: 7px 0 0 7px;
  24.171  }
  24.172  
  24.173  .member_thumb div {
  24.174 @@ -1030,7 +1056,7 @@
  24.175  .draft_content,
  24.176  .suggestion_content {
  24.177    background-color: #eee;
  24.178 -  background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f7f7f7), color-stop(100%,#e5e5e5));
  24.179 +  xbackground: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f7f7f7), color-stop(100%,#e5e5e5));
  24.180    padding: 1ex;
  24.181    border-radius: 8px;
  24.182  }
  24.183 @@ -1099,6 +1125,7 @@
  24.184    border: 1px solid #b96;
  24.185    padding: 1ex;
  24.186    margin-bottom: 2ex;
  24.187 +  border-radius: 8px;
  24.188  }
  24.189  
  24.190  .suggestion_fulfilled {

Impressum / About Us