liquid_feedback_frontend
view app/main/draft/show.lua @ 736:e642bf111347
Added missing config option
| author | bsw | 
|---|---|
| date | Thu Jun 28 18:36:47 2012 +0200 (2012-06-28) | 
| parents | cc7650c7053f | 
| children | 99852ec8ee37 | 
 line source
     1 local draft = Draft:new_selector():add_where{ "id = ?", param.get_id() }:single_object_mode():exec()
     2 local source = param.get("source", atom.boolean)
     4 execute.view{
     5   module = "draft",
     6   view = "_head",
     7   params = { draft = draft}
     8 }
    10 slot.put_into("title", " · " .. _"History")
    12 if source then
    13   slot.select("actions", function()
    14     ui.link{
    15       content = _"Rendered",
    16       module = "draft",
    17       view = "show",
    18       id = param.get_id(),
    19       params = { source = false }
    20     }
    21     end
    22   )
    23 else
    24   slot.select("actions", function()
    25     ui.link{
    26       content = _"Source",
    27       module = "draft",
    28       view = "show",
    29       id = param.get_id(),
    30       params = { source = true }
    31     }
    32     end
    33   )
    34 end
    36 execute.view{
    37   module = "draft",
    38   view = "_show",
    39   params = { draft = draft, source = source }
    40 }
