liquid_feedback_frontend
view env/ui/order.lua @ 6:8d91bccab0bf
Version beta2
Possibility to browse voters of a closed issue
Registration with invite code
Email confirmation and password recovery
Download function (for database dumps) added
Critical bug solved, which made it impossible to select your opinion on other peoples suggestions
Catching error, when trying to set an opinion on a suggestion which has been meanwhile deleted
Fixed wrong sorting order for "supporters" or "potential supporters"
Added format info for birthday (Error when entering dates in wrong format is NOT fixed in this release)
Strip space characters from certain fields and ensure they contain at least 3 characters
Showing grade in opinion/list as clear text instead of integer value
More information on initiative is displayed while voting
Colored notification box shown on pages of issues or initiatives which are currently in voting state
Changed default filter for issues to "Open"
Back link on suggestion page
Some optical changes
Removed wrong space character in LICENSE file
Possibility to browse voters of a closed issue
Registration with invite code
Email confirmation and password recovery
Download function (for database dumps) added
Critical bug solved, which made it impossible to select your opinion on other peoples suggestions
Catching error, when trying to set an opinion on a suggestion which has been meanwhile deleted
Fixed wrong sorting order for "supporters" or "potential supporters"
Added format info for birthday (Error when entering dates in wrong format is NOT fixed in this release)
Strip space characters from certain fields and ensure they contain at least 3 characters
Showing grade in opinion/list as clear text instead of integer value
More information on initiative is displayed while voting
Colored notification box shown on pages of issues or initiatives which are currently in voting state
Changed default filter for issues to "Open"
Back link on suggestion page
Some optical changes
Removed wrong space character in LICENSE file
| author | bsw/jbe | 
|---|---|
| date | Sat Jan 02 12:00:00 2010 +0100 (2010-01-02) | 
| parents | afd9f769c7ae | 
| 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
