liquid_feedback_frontend

changeset 271:d13b27a37ad5

Optical enhancements, some repositioning of ui elements
author bsw
date Tue Feb 07 22:30:48 2012 +0100 (2012-02-07)
parents 08a5e1226da2
children 65a1f7a01e7b
files app/main/_layout/default.html app/main/area/show.lua app/main/initiative/_current_draft.lua app/main/initiative/show_static.lua app/main/initiative/show_support.lua app/main/issue/_show_box.lua app/main/issue/_show_head.lua app/main/member/_profile.lua app/main/member/show.lua config/default.lua config/development.lua static/style.css
line diff
     1.1 --- a/app/main/_layout/default.html	Tue Feb 07 20:03:31 2012 +0100
     1.2 +++ b/app/main/_layout/default.html	Tue Feb 07 22:30:48 2012 +0100
     1.3 @@ -47,6 +47,9 @@
     1.4          <div class="title" id="title">
     1.5            <!-- WEBMCP SLOT title -->
     1.6          </div>
     1.7 +        <div class="title2" id="title2">
     1.8 +          <!-- WEBMCP SLOT title2 -->
     1.9 +        </div>
    1.10          <div class="actions" id="actions">
    1.11            <div class="interest vote_info" id="interest">
    1.12              <!-- WEBMCP SLOT interest -->
     2.1 --- a/app/main/area/show.lua	Tue Feb 07 20:03:31 2012 +0100
     2.2 +++ b/app/main/area/show.lua	Tue Feb 07 22:30:48 2012 +0100
     2.3 @@ -14,17 +14,18 @@
     2.4  
     2.5  
     2.6  slot.select("title", function()
     2.7 +  ui.tag{ content =  area.name }
     2.8 +
     2.9    if not config.single_unit_id then
    2.10 +    slot.put(" &middot; ")
    2.11      ui.link{
    2.12        content = area.unit.name,
    2.13        module = "area",
    2.14        view = "list",
    2.15        params = { unit_id = area.unit_id }
    2.16      }
    2.17 -    slot.put(" &middot; ")
    2.18    end
    2.19  
    2.20 -  ui.tag{ content =  area.name }
    2.21  
    2.22  end)
    2.23  
    2.24 @@ -37,6 +38,17 @@
    2.25  
    2.26  
    2.27  if app.session.member_id then
    2.28 +  execute.view{
    2.29 +    module = "membership",
    2.30 +    view = "_show_box",
    2.31 +    params = { area = area }
    2.32 +  }
    2.33 +
    2.34 +  execute.view{
    2.35 +    module = "delegation",
    2.36 +    view = "_show_box",
    2.37 +    params = { area_id = area.id }
    2.38 +  }
    2.39  
    2.40    slot.select("actions", function()
    2.41      ui.link{
    2.42 @@ -50,17 +62,6 @@
    2.43      }
    2.44    end)
    2.45  
    2.46 -  execute.view{
    2.47 -    module = "membership",
    2.48 -    view = "_show_box",
    2.49 -    params = { area = area }
    2.50 -  }
    2.51 -
    2.52 -  execute.view{
    2.53 -    module = "delegation",
    2.54 -    view = "_show_box",
    2.55 -    params = { area_id = area.id }
    2.56 -  }
    2.57  
    2.58  end
    2.59  
     3.1 --- a/app/main/initiative/_current_draft.lua	Tue Feb 07 20:03:31 2012 +0100
     3.2 +++ b/app/main/initiative/_current_draft.lua	Tue Feb 07 22:30:48 2012 +0100
     3.3 @@ -13,4 +13,18 @@
     3.4      params = { initiative_id = initiative.id }
     3.5    }
     3.6  end
     3.7 +
     3.8 +if initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then
     3.9 +  ui.link{
    3.10 +    attr = { class = "action", style = "float: right;" },
    3.11 +    content = function()
    3.12 +      ui.image{ static = "icons/16/script_delete.png" }
    3.13 +      slot.put(_"Revoke initiative")
    3.14 +    end,
    3.15 +    module = "initiative",
    3.16 +    view = "revoke",
    3.17 +    id = initiative.id
    3.18 +  }
    3.19 +end
    3.20 +
    3.21  execute.view{ module = "draft", view = "_show", params = { draft = initiative.current_draft } }
     4.1 --- a/app/main/initiative/show_static.lua	Tue Feb 07 20:03:31 2012 +0100
     4.2 +++ b/app/main/initiative/show_static.lua	Tue Feb 07 22:30:48 2012 +0100
     4.3 @@ -4,6 +4,13 @@
     4.4    initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec()
     4.5  end
     4.6  
     4.7 +execute.view{
     4.8 +  module = "issue",
     4.9 +  view = "_show_head",
    4.10 +  params = { issue = initiative.issue,
    4.11 +             initiative = initiative }
    4.12 +}
    4.13 +
    4.14  slot.select("actions", function()
    4.15    ui.link{
    4.16      content = function()
    4.17 @@ -21,13 +28,6 @@
    4.18    }
    4.19  end)
    4.20  
    4.21 -execute.view{
    4.22 -  module = "issue",
    4.23 -  view = "_show_head",
    4.24 -  params = { issue = initiative.issue,
    4.25 -             initiative = initiative }
    4.26 -}
    4.27 -
    4.28  --slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(initiative.id) .. '.rss" />')
    4.29  
    4.30  if app.session.member_id then
     5.1 --- a/app/main/initiative/show_support.lua	Tue Feb 07 20:03:31 2012 +0100
     5.2 +++ b/app/main/initiative/show_support.lua	Tue Feb 07 22:30:48 2012 +0100
     5.3 @@ -22,18 +22,6 @@
     5.4                view = "_show_box",
     5.5                params = { initiative = initiative }
     5.6              }
     5.7 -            if initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then
     5.8 -              ui.link{
     5.9 -                attr = { class = "action", style = "float: left;" },
    5.10 -                content = function()
    5.11 -                  ui.image{ static = "icons/16/script_delete.png" }
    5.12 -                  slot.put(_"Revoke initiative")
    5.13 -                end,
    5.14 -                module = "initiative",
    5.15 -                view = "revoke",
    5.16 -                id = initiative.id
    5.17 -              }
    5.18 -            end
    5.19            end
    5.20          }
    5.21        end
     6.1 --- a/app/main/issue/_show_box.lua	Tue Feb 07 20:03:31 2012 +0100
     6.2 +++ b/app/main/issue/_show_box.lua	Tue Feb 07 22:30:48 2012 +0100
     6.3 @@ -1,44 +0,0 @@
     6.4 -local issue = param.get("issue", "table")
     6.5 -
     6.6 -slot.select("issue_info", function()
     6.7 -  ui.tag{
     6.8 -    tag = "div",
     6.9 -    content = function()
    6.10 -      ui.tag{
    6.11 -        tag = "label",
    6.12 -        attr = { class = "ui_field_label" },
    6.13 -        content = _"Policy",
    6.14 -      }
    6.15 -      ui.tag{
    6.16 -        content = function()
    6.17 -          ui.link{
    6.18 -            text = issue.policy.name,
    6.19 -            module = "policy",
    6.20 -            view = "show",
    6.21 -            id = issue.policy.id
    6.22 -          }
    6.23 -        end
    6.24 -      }
    6.25 -
    6.26 -    end
    6.27 -  }
    6.28 -
    6.29 -  ui.field.text{ 
    6.30 -    label = _"State",
    6.31 -    value = issue.state_name 
    6.32 -  }
    6.33 -  local time_left = issue.state_time_left
    6.34 -  if time_left then
    6.35 -    ui.field.text{ 
    6.36 -      label = _"Time left",
    6.37 -      value = time_left
    6.38 -    }
    6.39 -  end
    6.40 -  local next_state_names = issue.next_states_names
    6.41 -  if next_state_names then
    6.42 -    ui.field.text{ 
    6.43 -      label = _"Next state",
    6.44 -      value = next_state_names
    6.45 -    }
    6.46 -  end
    6.47 -end)
     7.1 --- a/app/main/issue/_show_head.lua	Tue Feb 07 20:03:31 2012 +0100
     7.2 +++ b/app/main/issue/_show_head.lua	Tue Feb 07 22:30:48 2012 +0100
     7.3 @@ -16,36 +16,67 @@
     7.4  end)
     7.5  
     7.6  slot.select("title", function()
     7.7 -  if not config.single_unit_id then
     7.8 -    ui.link{
     7.9 -      content = issue.area.unit.name,
    7.10 -      module = "area",
    7.11 -      view = "list",
    7.12 -      params = { unit_id = issue.area.unit_id }
    7.13 -    }
    7.14 +  ui.link{
    7.15 +    content = _("Issue ##{id}", { id = issue.id }),
    7.16 +    module = "issue",
    7.17 +    view = "show",
    7.18 +    id = issue.id
    7.19 +  }
    7.20      slot.put(" &middot; ")
    7.21 -  end
    7.22    ui.link{
    7.23      content = issue.area.name,
    7.24      module = "area",
    7.25      view = "show",
    7.26      id = issue.area.id
    7.27    }
    7.28 -  slot.put(" &middot; ")
    7.29 -  ui.link{
    7.30 -    content = _("Issue ##{id}", { id = issue.id }),
    7.31 -    module = "issue",
    7.32 -    view = "show",
    7.33 -    id = issue.id
    7.34 -  }
    7.35 -  slot.put(" &middot; ")
    7.36 -  ui.tag{
    7.37 -    tag = "span",
    7.38 -    content = issue.state_name,
    7.39 -  }
    7.40 +  if not config.single_unit_id then
    7.41 +    slot.put(" &middot; ")
    7.42 +    ui.link{
    7.43 +      content = issue.area.unit.name,
    7.44 +      module = "area",
    7.45 +      view = "list",
    7.46 +      params = { unit_id = issue.area.unit_id }
    7.47 +    }
    7.48 +  end
    7.49  end)
    7.50  
    7.51  
    7.52 +slot.select("title2", function()
    7.53 +  ui.tag{
    7.54 +    tag = "div",
    7.55 +    content = function()
    7.56 +      ui.tag{
    7.57 +        content = function()
    7.58 +          ui.link{
    7.59 +            text = issue.policy.name,
    7.60 +            module = "policy",
    7.61 +            view = "show",
    7.62 +            id = issue.policy.id
    7.63 +          }
    7.64 +        end
    7.65 +      }
    7.66 +      slot.put(" &middot; ")
    7.67 +      ui.tag{ content = issue.state_name }
    7.68 +
    7.69 +      slot.put(" &middot; ")
    7.70 +      local time_left = issue.state_time_left
    7.71 +      if time_left then
    7.72 +        ui.tag{ content = _("#{time_left} left", { time_left = time_left }) }
    7.73 +      end
    7.74 +
    7.75 +      slot.put(" &middot; ")
    7.76 +      local next_state_names = issue.next_states_names
    7.77 +      if next_state_names then
    7.78 +        ui.tag{ content = _("Next state: #{state}", { state = next_state_names }) }
    7.79 +      end
    7.80 +    end
    7.81 +  }
    7.82 +
    7.83 +  
    7.84 +end)
    7.85 +
    7.86 +
    7.87 +    --[[
    7.88  slot.select("content_navigation", function()
    7.89  
    7.90    if app.session.member_id then
    7.91 @@ -117,7 +148,6 @@
    7.92        end
    7.93      end
    7.94  
    7.95 -    --[[
    7.96      records = issues_selector:exec()
    7.97  
    7.98      for i,cissue in ipairs(records) do
    7.99 @@ -162,11 +192,11 @@
   7.100        mk_link(-1, _("Previous initiative"), "resultset_previous.png", "initiative")
   7.101        mk_link(1, _("Next initiative"), "resultset_next.png", "initiative")
   7.102      end
   7.103 -    --]]
   7.104    end
   7.105  end
   7.106  
   7.107  )
   7.108 +    --]]
   7.109  
   7.110  slot.select("actions", function()
   7.111  
   7.112 @@ -221,11 +251,9 @@
   7.113  end)
   7.114  
   7.115  
   7.116 -execute.view{
   7.117 -  module = "issue",
   7.118 -  view = "_show_box",
   7.119 -  params = { issue = issue }
   7.120 -}
   7.121 +local issue = param.get("issue", "table")
   7.122 +
   7.123 +
   7.124  
   7.125  --  ui.twitter("http://example.com/t" .. tostring(issue.id))
   7.126  
     8.1 --- a/app/main/member/_profile.lua	Tue Feb 07 20:03:31 2012 +0100
     8.2 +++ b/app/main/member/_profile.lua	Tue Feb 07 22:30:48 2012 +0100
     8.3 @@ -36,12 +36,6 @@
     8.4        end
     8.5      }
     8.6  
     8.7 -    if member.admin then
     8.8 -      ui.field.boolean{ label = _"Admin?",       name = "admin" }
     8.9 -    end
    8.10 -    if member.locked then
    8.11 -      ui.field.boolean{ label = _"Locked?",      name = "locked" }
    8.12 -    end
    8.13      if member.ident_number then
    8.14        ui.field.text{    label = _"Ident number", name = "ident_number" }
    8.15      end
    8.16 @@ -111,6 +105,12 @@
    8.17        }
    8.18      end
    8.19      
    8.20 +    if member.admin then
    8.21 +      ui.field.boolean{ label = _"Admin?",       name = "admin" }
    8.22 +    end
    8.23 +    if member.locked then
    8.24 +      ui.field.boolean{ label = _"Locked?",      name = "locked" }
    8.25 +    end
    8.26      ui.field.text{ label = _"Last activity (updated daily)", value = format.date(member.last_activity) or _"not yet" }
    8.27      
    8.28    end
     9.1 --- a/app/main/member/show.lua	Tue Feb 07 20:03:31 2012 +0100
     9.2 +++ b/app/main/member/show.lua	Tue Feb 07 22:30:48 2012 +0100
     9.3 @@ -74,7 +74,7 @@
     9.4    ui.link{
     9.5      content = function()
     9.6        ui.image{ static = "icons/16/clock_edit.png" }
     9.7 -      slot.put(encode.html(_"Show name history"))
     9.8 +      slot.put(encode.html(_"Show member history"))
     9.9      end,
    9.10      module  = "member",
    9.11      view    = "history",
    10.1 --- a/config/default.lua	Tue Feb 07 20:03:31 2012 +0100
    10.2 +++ b/config/default.lua	Tue Feb 07 22:30:48 2012 +0100
    10.3 @@ -52,7 +52,7 @@
    10.4  
    10.5  config.feature_rss_enabled = false -- feature is broken
    10.6  
    10.7 -config.feature_units_enabled = true
    10.8 +config.single_unit_id = false
    10.9  
   10.10  -- OpenID authentication is not fully implemented yet, DO NOT USE BEFORE THIS NOTICE HAS BEEN REMOVED!
   10.11  config.auth_openid_enabled = false
    11.1 --- a/config/development.lua	Tue Feb 07 20:03:31 2012 +0100
    11.2 +++ b/config/development.lua	Tue Feb 07 22:30:48 2012 +0100
    11.3 @@ -31,7 +31,7 @@
    11.4  
    11.5  config.motd_public = "==Public motd=="
    11.6  
    11.7 -config.motd_intern = "==Internal motd=="
    11.8 +--config.motd_intern = "==Internal motd=="
    11.9  
   11.10  config.public_access = "anonymous"
   11.11  
    12.1 --- a/static/style.css	Tue Feb 07 20:03:31 2012 +0100
    12.2 +++ b/static/style.css	Tue Feb 07 22:30:48 2012 +0100
    12.3 @@ -113,15 +113,26 @@
    12.4   */
    12.5  
    12.6  .topbar {
    12.7 -  background-color: #444;
    12.8 +  xbackground-color: #444;
    12.9    color: #fff;
   12.10    font-size: 75%;
   12.11    line-height: 140%;
   12.12 -  margin-bottom: 1.8ex;
   12.13 +  background: -webkit-gradient(
   12.14 +    linear, left bottom, left top, 
   12.15 +    color-stop(0%,#4c4c4c),
   12.16 +    color-stop(12%,#595959),
   12.17 +    color-stop(25%,#666666),
   12.18 +    color-stop(39%,#474747),
   12.19 +    color-stop(50%,#2c2c2c),
   12.20 +    color-stop(51%,#000000),
   12.21 +    color-stop(60%,#111111),
   12.22 +    color-stop(76%,#2b2b2b),
   12.23 +    color-stop(91%,#1c1c1c),
   12.24 +    color-stop(100%,#131313)
   12.25 +  );
   12.26  }
   12.27  
   12.28  .topbar a {
   12.29 -  background-color: #444;
   12.30    color: #fff;
   12.31  }
   12.32  
   12.33 @@ -192,9 +203,14 @@
   12.34   */
   12.35  
   12.36  .title_bar {
   12.37 -  border-bottom: 1px solid #777;
   12.38 -  padding-top: 1ex;
   12.39 -  padding-bottom: 0.5ex;
   12.40 +  padding-top: 2ex;
   12.41 +  padding-bottom: 1ex;
   12.42 +  xbackground-color: #def;
   12.43 +  background: -webkit-gradient(linear, left top, left bottom, 
   12.44 +    
   12.45 +color-stop(0%,#abd3ee), color-stop(100%,#ffffff)
   12.46 +                               
   12.47 +  ); 
   12.48  }
   12.49  
   12.50  .title_bar_content {
   12.51 @@ -222,22 +238,30 @@
   12.52  
   12.53  .title {
   12.54    color: #000;
   12.55 -  margin-bottom: 0.5ex;
   12.56 +  margin-bottom: 1ex;
   12.57  }
   12.58  
   12.59  .slot_title {
   12.60  }
   12.61  
   12.62  .title div {
   12.63 -  font-weight: bold;
   12.64 -  font-size: 135%;
   12.65 +  font-size: 125%;
   12.66    line-height: 110%;
   12.67  }
   12.68  
   12.69 +.title div a {
   12.70 +  xfont-weight: bold;
   12.71 +}
   12.72 +
   12.73  .title a {
   12.74    color: #000;
   12.75  }
   12.76  
   12.77 +.title2 div {
   12.78 +  margin-bottom: 2ex;
   12.79 +  xline-height: 130%;
   12.80 +}
   12.81 +
   12.82  .member_image_avatar {
   12.83    float: left;
   12.84    margin-right: 0.5em;
   12.85 @@ -258,6 +282,7 @@
   12.86    padding: 1px 0.5em 1px 0.0em;
   12.87    margin-right: 1em;
   12.88    vertical-align: middle;
   12.89 +  border-radius: 5px;
   12.90  }
   12.91  
   12.92  .content_navigation {
   12.93 @@ -288,6 +313,10 @@
   12.94    background-color: #d7d7d7;
   12.95  }
   12.96  
   12.97 +.title_bar .actions a:hover {
   12.98 +  background-color: #fff;
   12.99 +}
  12.100 +
  12.101  .actions img {
  12.102    padding-left: 0.2em;
  12.103    padding-right: 0.2em;
  12.104 @@ -451,15 +480,19 @@
  12.105   */
  12.106  
  12.107  .ui_tabs_links {
  12.108 -  margin-top: 4ex;
  12.109 +  margin-top: 2ex;
  12.110 +  margin-bottom: 2ex;
  12.111    font-size: 75%;
  12.112  }
  12.113  
  12.114  .ui_tabs_links a {
  12.115    padding: 1ex;
  12.116 -  line-height: 200%;
  12.117 +  line-height: 300%;
  12.118    background-color: #e7e7e7;
  12.119    white-space: nowrap;
  12.120 +  border-radius: 5px;
  12.121 +  margin-right: 5px;
  12.122 +  font-weight: bold;
  12.123  }
  12.124  
  12.125  .ui_tabs_links a:hover {
  12.126 @@ -474,8 +507,8 @@
  12.127  }
  12.128  
  12.129  .ui_tabs_content {
  12.130 -  border: 1px solid #444;
  12.131 -  padding: 1ex 1ex 1ex 1ex;
  12.132 +  xborder: 1px solid #444;
  12.133 +  xpadding: 1ex 1ex 1ex 1ex;
  12.134  }
  12.135  
  12.136  .web10 .ui_tabs_accordeon_head {

Impressum / About Us