liquid_feedback_frontend
view app/main/draft/_show.lua @ 81:134fce4bede3
Cache for rendered wiki texts; Accountless API keys; Reverse id order for initiative API
- Support for caching html version of drafts
- Using pre-rendered html versions of help messages
- Added Support for api keys not connected to an account
- Added order option "id_desc" to initiative API
- Support for caching html version of drafts
- Using pre-rendered html versions of help messages
- Added Support for api keys not connected to an account
- Added order option "id_desc" to initiative API
| author | bsw | 
|---|---|
| date | Sat Jul 24 17:22:05 2010 +0200 (2010-07-24) | 
| parents | d63d32c9fb37 | 
| children | de6b80867eb7 | 
 line source
     1 local draft = param.get("draft", "table")
     3 ui.form{
     4   attr = { class = "vertical" },
     5   record = draft,
     6   readonly = true,
     7   content = function()
     9     if app.session.member_id or config.public_access == "pseudonym" then
    10       ui.field.text{
    11         label = _"Last author",
    12         value = _(
    13           "#{author} at #{date}", {
    14             author = draft.author_name,
    15             date = format.timestamp(draft.created)
    16           }
    17         )
    18       }
    19     else
    20       ui.field.text{
    21         label = _"Last author",
    22         value = _(
    23           "#{author} at #{date}", {
    24             author = _"[not displayed public]",
    25             date = format.timestamp(draft.created)
    26           }
    27         )
    28       }
    29     end
    31     ui.container{
    32       attr = { class = "draft_content wiki" },
    33       content = function()
    34         slot.put(draft:get_content("html"))
    35       end
    36     }
    37   end
    38 }
