liquid_feedback_frontend

view env/ui/tabs.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 80c215dbf076
children 00d1004545f1
line source
1 function ui.tabs(tabs)
2 ui.container{
3 attr = { class = "ui_tabs" },
4 content = function()
5 local params = param.get_all_cgi()
6 local current_tab = params["tab"]
7 ui.container{
8 attr = { class = "ui_tabs_links" },
9 content = function()
10 for i, tab in ipairs(tabs) do
11 params["tab"] = i > 1 and tab.name or nil
12 ui.link{
13 attr = {
14 class = (
15 tab.name == current_tab and "selected" or
16 not current_tab and i == 1 and "selected" or
17 ""
18 )
19 },
20 module = request.get_module(),
21 view = request.get_view(),
22 id = param.get_id_cgi(),
23 text = tab.label,
24 params = params
25 }
26 slot.put(" ")
27 end
28 end
29 }
30 for i, tab in ipairs(tabs) do
31 if tab.name == current_tab or not current_tab and i == 1 then
32 ui.container{
33 attr = { class = "ui_tabs_content" },
34 content = tab.content
35 }
36 end
37 end
38 end
39 }
40 end

Impressum / About Us