liquid_feedback_frontend
view app/main/issue/_show_head.lua @ 9:0ee1e0c42d4c
Version beta5
Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.
Changing of name and login is possible while a history of these changes is written and accessible by all users.
Statistics shown in area list
Trimming of user input also converts multiple whitespaces to single space character.
Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.
Changing of name and login is possible while a history of these changes is written and accessible by all users.
Statistics shown in area list
Trimming of user input also converts multiple whitespaces to single space character.
| author | bsw | 
|---|---|
| date | Mon Jan 04 12:00:00 2010 +0100 (2010-01-04) | 
| parents | 3941792e8be6 | 
| children | 72c5e0ee7c98 | 
 line source
     1 local issue = param.get("issue", "table")
     3 slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(issue.id) .. '.rss" />')
     5 slot.select("path", function()
     6   ui.link{
     7     content = _"Area '#{name}'":gsub("#{name}", issue.area.name),
     8     module = "area",
     9     view = "show",
    10     id = issue.area.id
    11   }
    12 end)
    14 slot.select("title", function()
    15   ui.link{
    16     content = _"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name),
    17     module = "issue",
    18     view = "show",
    19     id = issue.id
    20   }
    21 end)
    24 slot.select("actions", function()
    26   if issue.state == 'voting' then
    27     ui.link{
    28       content = function()
    29         ui.image{ static = "icons/16/email_open.png" }
    30         slot.put(_"Vote now")
    31       end,
    32       module = "vote",
    33       view = "list",
    34       params = { issue_id = issue.id }
    35     }
    36   end
    38   execute.view{
    39     module = "interest",
    40     view = "_show_box",
    41     params = { issue = issue }
    42   }
    43   -- TODO performance
    44   local interest = Interest:by_pk(issue.id, app.session.member.id)
    45   if not issue.closed and not issue.fully_frozen then
    46     if not interest then
    47       ui.link{
    48         content = function()
    49           ui.image{ static = "icons/16/user_add.png" }
    50           slot.put(_"Add my interest")
    51         end,
    52         module = "interest",
    53         action = "update",
    54         params = { issue_id = issue.id },
    55         routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
    56       }
    57     end
    58   end
    60   if not issue.closed then
    61     execute.view{
    62       module = "delegation",
    63       view = "_show_box",
    64       params = { issue_id = issue.id }
    65     }
    66   end
    68 --[[ 
    69   if issue.state == "accepted" then
    70     -- TODO
    71     ui.link{
    72       content = function()
    73         ui.image{ static = "icons/16/time.png" }
    74         slot.put(_"Vote now/later")
    75       end,
    76     }
    77   end
    78 --]]
    80 end)
    83 execute.view{
    84   module = "issue",
    85   view = "_show_box",
    86   params = { issue = issue }
    87 }
    89 --  ui.twitter("http://example.com/t" .. tostring(issue.id))
    92 if issue.state == 'voting' then
    93   ui.container{
    94     attr = { class = "voting_active_info" },
    95     content = function()
    96       slot.put(_"Voting for this issue is currently running!")
    97       slot.put(" ")
    98       ui.link{
    99         content = function()
   100           slot.put(_"Vote now")
   101         end,
   102         module = "vote",
   103         view = "list",
   104         params = { issue_id = issue.id }
   105       }
   106     end
   107   }
   108   slot.put("<br />")
   109 end
