annotate app/main/member/settings_display.lua @ 587:f0ffe4420fe2
Make member menu right aligned
 | author | 
 bsw | 
 | date | 
 Wed Jun 20 22:29:33 2012 +0200 (2012-06-20) | 
 | parents | 
 418b590fa9ed  | 
 | children | 
  | 
 
 | rev | 
   line source | 
| 
bsw@564
 | 
     1 ui.title(_"Display settings")
 | 
| 
bsw@75
 | 
     2 
 | 
| 
bsw@75
 | 
     3 util.help("member.settings.display", _"Display settings")
 | 
| 
bsw@75
 | 
     4 
 | 
| 
bsw@75
 | 
     5 ui.form{
 | 
| 
bsw@75
 | 
     6   attr = { class = "vertical" },
 | 
| 
bsw@75
 | 
     7   module = "member",
 | 
| 
bsw@75
 | 
     8   action = "update_display",
 | 
| 
bsw@75
 | 
     9   routing = {
 | 
| 
bsw@75
 | 
    10     ok = {
 | 
| 
bsw@75
 | 
    11       mode = "redirect",
 | 
| 
bsw@75
 | 
    12       module = "index",
 | 
| 
bsw@75
 | 
    13       view = "index"
 | 
| 
bsw@75
 | 
    14     }
 | 
| 
bsw@75
 | 
    15   },
 | 
| 
bsw@75
 | 
    16   content = function()
 | 
| 
bsw@75
 | 
    17     ui.field.select{
 | 
| 
bsw@75
 | 
    18       label = _"Number of initiatives to preview",
 | 
| 
bsw@75
 | 
    19       foreign_records = {
 | 
| 
bsw@75
 | 
    20         { id =  3, name = "3" },
 | 
| 
bsw@75
 | 
    21         { id =  4, name = "4" },
 | 
| 
bsw@75
 | 
    22         { id =  5, name = "5" },
 | 
| 
bsw@75
 | 
    23         { id =  6, name = "6" },
 | 
| 
bsw@75
 | 
    24         { id =  7, name = "7" },
 | 
| 
bsw@75
 | 
    25         { id =  8, name = "8" },
 | 
| 
bsw@75
 | 
    26         { id =  9, name = "9" },
 | 
| 
bsw@75
 | 
    27         { id = 10, name = "10" },
 | 
| 
bsw@75
 | 
    28       },
 | 
| 
bsw@75
 | 
    29       foreign_id = "id",
 | 
| 
bsw@75
 | 
    30       foreign_name = "name",
 | 
| 
bsw@75
 | 
    31       name = "initiatives_preview_limit",
 | 
| 
bsw@75
 | 
    32       value = app.session.member:get_setting_value("initiatives_preview_limit")
 | 
| 
bsw@75
 | 
    33     }
 | 
| 
bsw@75
 | 
    34     ui.submit{ value = _"Change display settings" }
 | 
| 
bsw@75
 | 
    35   end
 | 
| 
bsw@75
 | 
    36 }
 |