liquid_feedback_frontend

changeset 635:56f8b045b730

Small optical enhancements
author bsw
date Mon Jun 25 17:10:54 2012 +0200 (2012-06-25)
parents b2c61341112f
children b0e22740bd20
files app/main/event/_list.lua app/main/issue/_show.lua
line diff
     1.1 --- a/app/main/event/_list.lua	Mon Jun 25 17:04:40 2012 +0200
     1.2 +++ b/app/main/event/_list.lua	Mon Jun 25 17:10:54 2012 +0200
     1.3 @@ -45,13 +45,6 @@
     1.4      last_event_id = event.id
     1.5      event.issue:load_everything_for_member_id(app.session.member_id)
     1.6  
     1.7 -    local class = "issue"
     1.8 -    if event.is_interested then
     1.9 -      class = class .. " interested"
    1.10 -    elseif event.is_interested_by_delegation_to_member_id then
    1.11 -      class = class .. " interested_by_delegation"
    1.12 -    end
    1.13 -
    1.14      ui.container{ attr = { class = "issue_policy_info" }, content = function()
    1.15        if (app.session.member_id or config.public_access == "pseudonym") and event.member_id then
    1.16          if app.session.member_id then
    1.17 @@ -117,91 +110,26 @@
    1.18        end
    1.19      end }
    1.20  
    1.21 -    ui.container{ attr = { class = class }, content = function()
    1.22 +    ui.container{ attr = { class = "issue" }, content = function()
    1.23 +
    1.24 +      execute.view{ module = "delegation", view = "_info", params = { issue = event.issue } }
    1.25  
    1.26 -      ui.container { attr = { class = "issue_info" }, content = function()
    1.27 -      
    1.28 -        if event.is_interested then
    1.29 -          ui.tag{
    1.30 -            tag = "div", attr = { class = "interest_by_delegation"},
    1.31 -            content = function()
    1.32 -              local text = "You are interested in this issue"
    1.33 -              ui.image{ attr = { alt = text, title = text }, static = "icons/16/eye.png" }
    1.34 -            end
    1.35 -          }
    1.36 -          
    1.37 -        elseif event.is_interested_by_delegation_to_member_id then
    1.38 -          ui.tag{
    1.39 -            tag = "div", attr = { class = "interest_by_delegation"},
    1.40 -            content = function()
    1.41 -              local member = Member:by_id(event.is_interested_by_delegation_to_member_id)
    1.42 -              local text = _"delegated to"
    1.43 -              ui.image{
    1.44 -                attr = { class = "delegation_arrow", alt = text, title = text },
    1.45 -                static = "delegation_arrow_24_horizontal.png"
    1.46 -              }
    1.47 -              execute.view{
    1.48 -                module = "member_image",
    1.49 -                view = "_show",
    1.50 -                params = {
    1.51 -                  member = member,
    1.52 -                  image_type = "avatar",
    1.53 -                  show_dummy = true,
    1.54 -                  class = "micro_avatar",
    1.55 -                  popup_text = member.name
    1.56 -                }
    1.57 -              }
    1.58 -              if event.is_interested_by_delegation_to_member_id ~= event.is_interested_via_member_id then
    1.59 -                if event.delegation_chain_length > 2 then
    1.60 -                  local text = _"delegated to"
    1.61 -                  ui.image{
    1.62 -                    attr = { class = "delegation_arrow", alt = text, title = text },
    1.63 -                    static = "delegation_arrow_24_horizontal.png"
    1.64 -                  }
    1.65 -                  ui.tag{ content = "..." }
    1.66 -                end
    1.67 -              local text = _"delegated to"
    1.68 -                ui.image{
    1.69 -                  attr = { class = "delegation_arrow", alt = text, title = text },
    1.70 -                  static = "delegation_arrow_24_horizontal.png"
    1.71 -                }
    1.72 -                local member = Member:by_id(event.is_interested_via_member_id)
    1.73 -                execute.view{
    1.74 -                  module = "member_image",
    1.75 -                  view = "_show",
    1.76 -                  params = {
    1.77 -                    member = member,
    1.78 -                    image_type = "avatar",
    1.79 -                    show_dummy = true,
    1.80 -                    class = "micro_avatar",
    1.81 -                    popup_text = member.name
    1.82 -                  }
    1.83 -                }
    1.84 -              end
    1.85 -            end
    1.86 -          }
    1.87 -        end
    1.88 -
    1.89 -        ui.container{ content = function()
    1.90 -          ui.link{
    1.91 -            attr = { class = "issue_id" },
    1.92 -            text = _("Issue ##{id}", { id = tostring(event.issue_id) }),
    1.93 -            module = "issue",
    1.94 -            view = "show",
    1.95 -            id = event.issue_id
    1.96 -          }
    1.97 -
    1.98 -          slot.put(" · ")
    1.99 -          ui.tag{ content = event.issue.policy.name }
   1.100 -          slot.put(" · ")
   1.101 -          ui.tag{ content = event.issue.area.name }
   1.102 -          slot.put(" · ")
   1.103 -          ui.tag{ content = event.issue.area.unit.name }
   1.104 -        end }
   1.105 -
   1.106 -
   1.107 +      ui.container{ attr = { class = "content" }, content = function()
   1.108 +        ui.tag{ content = event.issue.area.name }
   1.109 +        slot.put(" · ")
   1.110 +        ui.tag{ content = event.issue.area.unit.name }
   1.111        end }
   1.112        
   1.113 +      ui.container{ attr = { class = "title" }, content = function()
   1.114 +        ui.link{
   1.115 +          attr = { class = "issue_id" },
   1.116 +          text = _("#{policy} ##{id}", { policy = event.issue.policy.name, id = event.issue_id }),
   1.117 +          module = "issue",
   1.118 +          view = "show",
   1.119 +          id = event.issue_id
   1.120 +        }
   1.121 +      end }
   1.122 +
   1.123        if event.suggestion_id then
   1.124          ui.container{ attr = { class = "suggestion" }, content = function()
   1.125            ui.link{
     2.1 --- a/app/main/issue/_show.lua	Mon Jun 25 17:04:40 2012 +0200
     2.2 +++ b/app/main/issue/_show.lua	Mon Jun 25 17:10:54 2012 +0200
     2.3 @@ -26,6 +26,14 @@
     2.4  
     2.5    execute.view{ module = "delegation", view = "_info", params = { issue = issue } }
     2.6  
     2.7 +  if for_listing then
     2.8 +    ui.container{ attr = { class = "content" }, content = function()
     2.9 +      ui.tag{ content = issue.area.unit.name }
    2.10 +      slot.put(" · ")
    2.11 +      ui.tag{ content = issue.area.name }
    2.12 +    end }
    2.13 +  end
    2.14 +
    2.15    ui.container{ attr = { class = "title" }, content = function()
    2.16      
    2.17      ui.link{
    2.18 @@ -39,13 +47,6 @@
    2.19        id = issue.id
    2.20      }
    2.21    end }
    2.22 -  if for_listing then
    2.23 -    ui.container{ attr = { class = "content" }, content = function()
    2.24 -      ui.tag{ content = issue.area.unit.name }
    2.25 -      slot.put(" · ")
    2.26 -      ui.tag{ content = issue.area.name }
    2.27 -    end }
    2.28 -  end
    2.29    
    2.30    ui.tag{
    2.31      attr = { class = "content issue_policy_info" },

Impressum / About Us