liquid_feedback_frontend

annotate env/ui/order.lua @ 9:0ee1e0c42d4c

Version beta5

Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.

Changing of name and login is possible while a history of these changes is written and accessible by all users.

Statistics shown in area list

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

Impressum / About Us