liquid_feedback_frontend
diff app/main/draft/_show.lua @ 160:cc7650c7053f
better title for draft/show
add source view mode into show draft fixes bug #298
add source view mode into show draft fixes bug #298
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Sat Oct 09 04:25:11 2010 +0200 (2010-10-09) |
parents | de6b80867eb7 |
children | aec9df5b4cd3 |
line diff
1.1 --- a/app/main/draft/_show.lua Sat Oct 09 03:42:48 2010 +0200 1.2 +++ b/app/main/draft/_show.lua Sat Oct 09 04:25:11 2010 +0200 1.3 @@ -1,4 +1,5 @@ 1.4 local draft = param.get("draft", "table") 1.5 +local source = param.get("source", atom.boolean) 1.6 1.7 ui.form{ 1.8 attr = { class = "vertical" }, 1.9 @@ -46,7 +47,14 @@ 1.10 ui.container{ 1.11 attr = { class = "draft_content wiki" }, 1.12 content = function() 1.13 - slot.put(draft:get_content("html")) 1.14 + if source then 1.15 + ui.tag{ 1.16 + tag = "pre", 1.17 + content = draft.content 1.18 + } 1.19 + else 1.20 + slot.put(draft:get_content("html")) 1.21 + end 1.22 end 1.23 } 1.24 end