liquid_feedback_frontend
view app/main/draft/_show.lua @ 109:e2ea6dbd2dbc
add custom script slot
| author | Daniel Poelzleithner <poelzi@poelzi.org> | 
|---|---|
| date | Sun Sep 19 04:44:58 2010 +0200 (2010-09-19) | 
| parents | 134fce4bede3 | 
| 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 }
