liquid_feedback_frontend
diff app/main/issue/_show_head.lua @ 278:fecd4c13054a
Code/css clean up and minor enhancements
author | bsw |
---|---|
date | Mon Feb 13 01:53:41 2012 +0100 (2012-02-13) |
parents | bde068b37608 |
children | b77e6a17ca77 |
line diff
1.1 --- a/app/main/issue/_show_head.lua Mon Feb 13 00:16:42 2012 +0100 1.2 +++ b/app/main/issue/_show_head.lua Mon Feb 13 01:53:41 2012 +0100 1.3 @@ -64,129 +64,6 @@ 1.4 1.5 end) 1.6 1.7 - 1.8 - --[[ 1.9 -slot.select("content_navigation", function() 1.10 - 1.11 - if app.session.member_id then 1.12 - local records 1.13 - local this = 0 1.14 - local issues_selector = Issue:new_selector() 1.15 - 1.16 - -- FIXME: !DRY 1.17 - local issue_filter_map = { 1.18 - new = "new.png", 1.19 - accepted = "comments.png", 1.20 - half_frozen = "lock.png", 1.21 - frozen ="email_open.png", 1.22 - finished = "tick.png", 1.23 - cancelled = "cross.png", 1.24 - } 1.25 - 1.26 - 1.27 - local mk_link = function(index, text, icon, module) 1.28 - content = function() 1.29 - if index > 0 then 1.30 - slot.put(text) 1.31 - ui.image{ static = "icons/16/"..icon } 1.32 - else 1.33 - ui.image{ static = "icons/16/"..icon } 1.34 - slot.put(text) 1.35 - end 1.36 - end 1.37 - if records[this+index] then 1.38 - ui.link{ 1.39 - content = content, 1.40 - module = module, 1.41 - view = "show", 1.42 - id = records[this+index].id, 1.43 - } 1.44 - else 1.45 - ui.container{ 1.46 - content = content, 1.47 - } 1.48 - end 1.49 - end 1.50 - 1.51 - issues_selector 1.52 - :add_where{"issue.area_id = ?", issue.area.id} 1.53 - 1.54 - local filters = execute.load_chunk{module="issue", chunk="_filters.lua", params = {filter = "frozen"}} 1.55 - 1.56 - local state = issue.state 1.57 - 1.58 - -- FIXME: fix filter names to reflect issue.state values 1.59 - if state == "voting" then 1.60 - state = "frozen" 1.61 - elseif state == "frozen" then 1.62 - state = "half_frozen" 1.63 - end 1.64 - 1.65 - filter = filters:get_filter("filter", state) 1.66 - if filter then 1.67 - filter.selector_modifier(issues_selector) 1.68 - 1.69 - -- add subfilter to voting pager, so only not voted entries will be shown 1.70 - -- as this seems the most usefull exception 1.71 - if filter.name == "frozen" then 1.72 - filter_voting_name = "not_voted" 1.73 - local vfilter = filters:get_filter("filter_voting", "not_voted") 1.74 - if vfilter then 1.75 - vfilter.selector_modifier(issues_selector) 1.76 - end 1.77 - end 1.78 - end 1.79 - 1.80 - records = issues_selector:exec() 1.81 - 1.82 - for i,cissue in ipairs(records) do 1.83 - if cissue.id == issue.id then 1.84 - this = i 1.85 - break 1.86 - end 1.87 - end 1.88 - 1.89 - mk_link(-1, _("Previous issue"), "resultset_previous.png", "issue") 1.90 - if issue.area then 1.91 - ui.link{ 1.92 - content = function() 1.93 - if issue_filter_map[state] then 1.94 - ui.image{ static = "icons/16/"..issue_filter_map[state] } 1.95 - end 1.96 - slot.put(issue.area.name) 1.97 - end, 1.98 - module = "area", 1.99 - view = "show", 1.100 - id = issue.area.id, 1.101 - params = { 1.102 - filter = filter and filter.name or nil, 1.103 - filter_voting = filter_voting_name, 1.104 - tab = "issues" 1.105 - } 1.106 - } 1.107 - end 1.108 - mk_link(1, _("Next issue"), "resultset_next.png", "issue") 1.109 - 1.110 - -- show pager for initiatives if available 1.111 - if initiative then 1.112 - ui.container{ content = function() end, attr = {class = "content_navigation_seperator"}} 1.113 - 1.114 - records = issue:get_reference_selector("initiatives"):exec() 1.115 - for i,cissue in ipairs(records) do 1.116 - if cissue.id == initiative.id then 1.117 - this = i 1.118 - break 1.119 - end 1.120 - end 1.121 - mk_link(-1, _("Previous initiative"), "resultset_previous.png", "initiative") 1.122 - mk_link(1, _("Next initiative"), "resultset_next.png", "initiative") 1.123 - end 1.124 - end 1.125 -end 1.126 - 1.127 -) 1.128 - --]] 1.129 - 1.130 slot.select("actions", function() 1.131 1.132 if app.session.member_id then 1.133 @@ -256,10 +133,6 @@ 1.134 1.135 local issue = param.get("issue", "table") 1.136 1.137 - 1.138 - 1.139 --- ui.twitter("http://example.com/t" .. tostring(issue.id)) 1.140 - 1.141 if config.public_access_issue_head and not app.session.member_id then 1.142 config.public_access_issue_head(issue) 1.143 end