liquid_feedback_frontend
view app/main/admin/unit_list.lua @ 631:a9fd951b67bb
Updated englisch, esperanto and french translation file for new strings
| author | bsw | 
|---|---|
| date | Mon Jun 25 16:50:30 2012 +0200 (2012-06-25) | 
| parents | bc6934411019 | 
| children | 36fa53881a8e | 
 line source
     1 local units = Unit:get_flattened_tree{ active = true }
     3 ui.title(_"Unit list")
     5 ui.actions(function()
     6   ui.link{
     7     text = _"Create new unit",
     8     module = "admin",
     9     view = "unit_edit"
    10   }
    11 end)
    13 ui.list{
    14   records = units,
    15   columns = {
    16     {
    17       label = "name",
    18       name = "name"
    19     },
    20     {
    21       content = function(unit)
    22         ui.link{
    23           text = _"Edit unit",
    24           module = "admin", view = "unit_edit", id = unit.id
    25         }
    26         slot.put(" ")
    27         ui.link{
    28           text = _"Edit areas",
    29           module = "admin", view = "area_list", params = { unit_id = unit.id }
    30         }
    31       end 
    32     }
    33   }
    34 }
