liquid_feedback_frontend
view app/main/draft/show.lua @ 1092:5b65ea5c24f5
Fixed free timings in poll mode
| author | bsw | 
|---|---|
| date | Fri Oct 17 13:03:31 2014 +0200 (2014-10-17) | 
| parents | 701a5cf6b067 | 
| children | fede09736f2b | 
 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 = "issue",
     6   view = "_head",
     7   params = { issue = draft.initiative.issue }
     8 }
    10 ui.section( function()
    12   ui.sectionHead( function()
    13     ui.link{
    14       module = "initiative", view = "show", id = draft.initiative.id,
    15       content = function ()
    16         ui.heading { 
    17           level = 1,
    18           content = draft.initiative.display_name
    19         }
    20       end
    21     }
    22     ui.container { attr = { class = "right" }, content = function()
    23       if source then
    24         ui.link{
    25           content = _"Rendered",
    26           module = "draft",
    27           view = "show",
    28           id = param.get_id(),
    29           params = { source = false }
    30         }
    31       else
    32         ui.link{
    33           content = _"Source",
    34           module = "draft",
    35           view = "show",
    36           id = param.get_id(),
    37           params = { source = true }
    38         }
    39       end
    40     end }
    41     ui.heading { level = 2, content = _("Draft revision #{id}", { id = draft.id } ) }
    42   end)
    44   ui.sectionRow( function()
    46     execute.view{
    47       module = "draft",
    48       view = "_show",
    49       params = { draft = draft, source = source }
    50     }
    51   end)
    52 end)
