annotate app/main/area/show.lua @ 860:71e39af90f13
Show extended voting filter only in open issues view
 | author | 
 bsw | 
 | date | 
 Fri Aug 17 19:51:08 2012 +0200 (2012-08-17) | 
 | parents | 
 7878f3c20a86  | 
 | children | 
 ef266d313c85  | 
 
 | rev | 
   line source | 
| 
bsw@197
 | 
     1 local area = Area:by_id(param.get_id())
 | 
| 
bsw@197
 | 
     2 
 | 
| 
bsw/jbe@0
 | 
     3 
 | 
| 
jorges@103
 | 
     4 app.html_title.title = area.name
 | 
| 
jorges@103
 | 
     5 app.html_title.subtitle = _("Area")
 | 
| 
jorges@103
 | 
     6 
 | 
| 
bsw@197
 | 
     7 util.help("area.show")
 | 
| 
bsw@197
 | 
     8 
 | 
| 
bsw@526
 | 
     9 slot.select("head", function()
 | 
| 
bsw@795
 | 
    10   execute.view{ module = "area", view = "_head", params = { area = area, show_content = true, member = app.session.member } }
 | 
| 
bsw@526
 | 
    11 end)
 | 
| 
bsw/jbe@0
 | 
    12 
 | 
| 
bsw/jbe@0
 | 
    13 ui.container{
 | 
| 
bsw/jbe@0
 | 
    14   attr = { class = "vertical"},
 | 
| 
bsw/jbe@0
 | 
    15   content = function()
 | 
| 
bsw/jbe@0
 | 
    16     ui.field.text{ value = area.description }
 | 
| 
bsw/jbe@0
 | 
    17   end
 | 
| 
bsw/jbe@0
 | 
    18 }
 | 
| 
bsw/jbe@0
 | 
    19 
 | 
| 
bsw@197
 | 
    20 
 | 
| 
bsw@271
 | 
    21 
 | 
| 
bsw/jbe@0
 | 
    22 
 | 
| 
bsw@277
 | 
    23 if app.session.member then
 | 
| 
bsw@277
 | 
    24   execute.view{
 | 
| 
bsw@277
 | 
    25     module = "area",
 | 
| 
bsw@277
 | 
    26     view = "show_tab",
 | 
| 
bsw@277
 | 
    27     params = { area = area }
 | 
| 
bsw@277
 | 
    28   }
 | 
| 
bsw@277
 | 
    29 else
 | 
| 
bsw@277
 | 
    30   execute.view{
 | 
| 
bsw@277
 | 
    31     module = "issue",
 | 
| 
bsw@277
 | 
    32     view = "_list",
 | 
| 
bsw@277
 | 
    33     params = {
 | 
| 
bsw@277
 | 
    34       issues_selector = area:get_reference_selector("issues"),
 | 
| 
bsw@277
 | 
    35       filter = cgi.params["filter"],
 | 
| 
bsw@277
 | 
    36       filter_voting = param.get("filter_voting"),
 | 
| 
bsw@277
 | 
    37       for_area_list = true
 | 
| 
bsw@277
 | 
    38     }
 | 
| 
bsw@277
 | 
    39   }
 | 
| 
bsw@277
 | 
    40 end
 |