liquid_feedback_frontend
diff app/main/draft/diff.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 | 5d797c6706d5 |
children | 161cebfc44d4 |
line diff
1.1 --- a/app/main/draft/diff.lua Sat Oct 09 03:42:48 2010 +0200 1.2 +++ b/app/main/draft/diff.lua Sat Oct 09 04:25:11 2010 +0200 1.3 @@ -20,34 +20,13 @@ 1.4 local old_draft = Draft:by_id(old_draft_id) 1.5 local new_draft = Draft:by_id(new_draft_id) 1.6 1.7 -local initiative = new_draft.initiative 1.8 -local issue = initiative.issue 1.9 +execute.view{ 1.10 + module = "draft", 1.11 + view = "_head", 1.12 + params = { draft = new_draft} 1.13 +} 1.14 1.15 -slot.select("title", function() 1.16 - ui.link{ 1.17 - content = issue.area.name, 1.18 - module = "area", 1.19 - view = "show", 1.20 - id = issue.area.id 1.21 - } 1.22 - slot.put(" · ") 1.23 - ui.link{ 1.24 - content = _("Issue ##{id}", { id = issue.id }), 1.25 - module = "issue", 1.26 - view = "show", 1.27 - id = issue.id 1.28 - } 1.29 - slot.put(" · ") 1.30 - ui.link{ 1.31 - content = _("Initiative: ")..initiative.name, 1.32 - module = "initiative", 1.33 - view = "show", 1.34 - id = initiative.id 1.35 - } 1.36 - slot.put(" · ") 1.37 - slot.put_into("title", _"Diff") 1.38 - 1.39 -end) 1.40 +slot.put_into("title", " · " .. _"Diff") 1.41 1.42 if app.session.member_id and not new_draft.initiative.revoked then 1.43 local supporter = Supporter:new_selector():add_where{"member_id = ?", app.session.member_id}:count()