liquid_feedback_frontend

view env/ui/order.lua @ 5:afd9f769c7ae

Version beta1

Final voting with Schulze-Method is now possible

Many bug fixes and code cleanup

Registration with invite codes

More sort and filter options

Seperated display of "supporters" and "potential supporters"

Optical changes

Flood limit / initiative contigent is now checked by frontend

Neccessary changes to access core beta11
author bsw/jbe
date Fri Dec 25 12:00:00 2009 +0100 (2009-12-25)
parents 3bfb2fcf7ab9
children
line source
1 function ui.order(args)
2 local name = args.name or "order"
3 local current_order = atom.string:load(cgi.params[name]) or args.options[1].name
4 local id = param.get_id_cgi()
5 local params = param.get_all_cgi()
6 ui.container{
7 attr = { class = "ui_order" },
8 content = function()
9 ui.container{
10 attr = { class = "ui_order_head" },
11 content = function()
12 slot.put(_"Order by")
13 slot.put(": ")
14 for i, option in ipairs(args.options) do
15 params[name] = option.name
16 local attr = {}
17 if current_order == option.name then
18 attr.class = "active"
19 if option.selector_modifier then
20 option.selector_modifier(args.selector)
21 else
22 args.selector:add_order_by(option.order_by)
23 end
24 end
25 ui.link{
26 attr = attr,
27 module = request.get_module(),
28 view = request.get_view(),
29 id = id,
30 params = params,
31 content = option.label
32 }
33 end
34 end
35 }
36 ui.container{
37 attr = { class = "ui_order_content" },
38 content = function()
39 args.content()
40 end
41 }
42 end
43 }
44 end

Impressum / About Us