liquid_feedback_frontend
diff app/main/draft/show.lua @ 1045:701a5cf6b067
Imported LiquidFeedback Frontend 3.0 branch
author | bsw |
---|---|
date | Thu Jul 10 01:19:48 2014 +0200 (2014-07-10) |
parents | 99852ec8ee37 |
children | fede09736f2b |
line diff
1.1 --- a/app/main/draft/show.lua Thu Jul 10 01:02:43 2014 +0200 1.2 +++ b/app/main/draft/show.lua Thu Jul 10 01:19:48 2014 +0200 1.3 @@ -2,39 +2,51 @@ 1.4 local source = param.get("source", atom.boolean) 1.5 1.6 execute.view{ 1.7 - module = "draft", 1.8 + module = "issue", 1.9 view = "_head", 1.10 - params = { draft = draft} 1.11 + params = { issue = draft.initiative.issue } 1.12 } 1.13 1.14 -slot.put_into("title", " · " .. _"History") 1.15 - 1.16 -if source then 1.17 - ui.actions(function() 1.18 - ui.link{ 1.19 - content = _"Rendered", 1.20 - module = "draft", 1.21 - view = "show", 1.22 - id = param.get_id(), 1.23 - params = { source = false } 1.24 - } 1.25 - end 1.26 - ) 1.27 -else 1.28 - ui.actions(function() 1.29 +ui.section( function() 1.30 + 1.31 + ui.sectionHead( function() 1.32 ui.link{ 1.33 - content = _"Source", 1.34 - module = "draft", 1.35 - view = "show", 1.36 - id = param.get_id(), 1.37 - params = { source = true } 1.38 + module = "initiative", view = "show", id = draft.initiative.id, 1.39 + content = function () 1.40 + ui.heading { 1.41 + level = 1, 1.42 + content = draft.initiative.display_name 1.43 + } 1.44 + end 1.45 } 1.46 - end 1.47 - ) 1.48 -end 1.49 - 1.50 -execute.view{ 1.51 - module = "draft", 1.52 - view = "_show", 1.53 - params = { draft = draft, source = source } 1.54 -} 1.55 + ui.container { attr = { class = "right" }, content = function() 1.56 + if source then 1.57 + ui.link{ 1.58 + content = _"Rendered", 1.59 + module = "draft", 1.60 + view = "show", 1.61 + id = param.get_id(), 1.62 + params = { source = false } 1.63 + } 1.64 + else 1.65 + ui.link{ 1.66 + content = _"Source", 1.67 + module = "draft", 1.68 + view = "show", 1.69 + id = param.get_id(), 1.70 + params = { source = true } 1.71 + } 1.72 + end 1.73 + end } 1.74 + ui.heading { level = 2, content = _("Draft revision #{id}", { id = draft.id } ) } 1.75 + end) 1.76 + 1.77 + ui.sectionRow( function() 1.78 + 1.79 + execute.view{ 1.80 + module = "draft", 1.81 + view = "_show", 1.82 + params = { draft = draft, source = source } 1.83 + } 1.84 + end) 1.85 +end)