liquid_feedback_frontend

changeset 156:74f1d4abf19e

fix that bailout can not be seen after the vote

linkify title
author Daniel Poelzleithner <poelzi@poelzi.org>
date Fri Oct 08 20:06:23 2010 +0200 (2010-10-08)
parents 329425e4128e
children 24e47baf5f9b
files app/main/vote/list.lua
line diff
     1.1 --- a/app/main/vote/list.lua	Fri Oct 08 19:29:45 2010 +0200
     1.2 +++ b/app/main/vote/list.lua	Fri Oct 08 20:06:23 2010 +0200
     1.3 @@ -4,6 +4,7 @@
     1.4  local member
     1.5  
     1.6  local readonly = false
     1.7 +
     1.8  if member_id then
     1.9    if not issue.closed then
    1.10      error("access denied")
    1.11 @@ -13,25 +14,32 @@
    1.12  end
    1.13  
    1.14  if issue.closed then
    1.15 -  slot.put_into("error", _"This issue is already closed.")
    1.16 -
    1.17 -  slot.select("actions", function()
    1.18 -    ui.link{
    1.19 -      content = _("Issue ##{id}", { id = issue.id }),
    1.20 -      module = "issue",
    1.21 -      view = "show",
    1.22 -      id = issue.id
    1.23 -    }
    1.24 -    end
    1.25 -  )
    1.26 -  return
    1.27 +  if not member then
    1.28 +    slot.put_into("error", _"This issue is already closed.")
    1.29 +  end
    1.30 +  member = app.session.member
    1.31 +  readonly = true
    1.32  end
    1.33  
    1.34  if member then
    1.35 -  slot.put_into("title", _("Ballot of '#{member_name}' for issue ##{issue_id}", {
    1.36 -    member_name = member.name,
    1.37 -    issue_id = issue.id
    1.38 -  }))
    1.39 +  local str = _("Ballot of '#{member_name}' for issue ##{issue_id}",
    1.40 +                  {member_name = string.format('<a href="%s">%s</a>',
    1.41 +                                          encode.url{
    1.42 +                                            module    = "member",
    1.43 +                                            view      = "show",
    1.44 +                                            id        = member.id,
    1.45 +                                          },
    1.46 +                                          encode.html(member.name)),
    1.47 +                   issue_id = string.format('<a href="%s">%s</a>',
    1.48 +                                          encode.url{
    1.49 +                                            module    = "issue",
    1.50 +                                            view      = "show",
    1.51 +                                            id        = issue.id,
    1.52 +                                          },
    1.53 +                                          encode.html(tostring(issue.id)))
    1.54 +                  }
    1.55 +              )
    1.56 +  slot.put_into("title", str)
    1.57  else
    1.58    member = app.session.member
    1.59    slot.put_into("title", _"Voting")

Impressum / About Us