liquid_feedback_frontend
annotate app/main/admin/member_list.lua @ 239:86988175dc89
Fix some typos
author | Ingo Bormuth <mail@ibormuth.de> |
---|---|
date | Tue Dec 27 02:13:46 2011 +0100 (2011-12-27) |
parents | 46351752814f |
children | 7b5b2449d2d5 |
rev | line source |
---|---|
bsw@193 | 1 local show_locked = param.get("show_locked", atom.boolean) |
bsw@193 | 2 |
bsw@193 | 3 local members_selector = Member:build_selector{ |
bsw@193 | 4 active = not show_locked, |
bsw@193 | 5 order = "login" |
bsw@193 | 6 } |
bsw@193 | 7 |
bsw@193 | 8 |
bsw/jbe@0 | 9 slot.put_into("title", _"Member list") |
bsw/jbe@0 | 10 |
bsw@193 | 11 |
bsw/jbe@0 | 12 slot.select("actions", function() |
bsw/jbe@0 | 13 ui.link{ |
bsw/jbe@0 | 14 attr = { class = { "admin_only" } }, |
bsw/jbe@0 | 15 text = _"Register new member", |
bsw/jbe@0 | 16 module = "admin", |
bsw/jbe@0 | 17 view = "member_edit" |
bsw/jbe@0 | 18 } |
bsw@193 | 19 if show_locked then |
bsw/jbe@0 | 20 ui.link{ |
bsw/jbe@0 | 21 attr = { class = { "admin_only" } }, |
bsw/jbe@0 | 22 text = _"Show active members", |
bsw/jbe@0 | 23 module = "admin", |
bsw/jbe@0 | 24 view = "member_list" |
bsw/jbe@0 | 25 } |
bsw/jbe@0 | 26 else |
bsw/jbe@0 | 27 ui.link{ |
bsw/jbe@0 | 28 attr = { class = { "admin_only" } }, |
bsw/jbe@0 | 29 text = _"Show locked members", |
bsw/jbe@0 | 30 module = "admin", |
bsw/jbe@0 | 31 view = "member_list", |
bsw/jbe@0 | 32 params = { show_locked = true } |
bsw/jbe@0 | 33 } |
bsw/jbe@0 | 34 end |
bsw/jbe@0 | 35 end) |
bsw/jbe@0 | 36 |
bsw/jbe@0 | 37 |
bsw/jbe@0 | 38 ui.paginate{ |
bsw/jbe@0 | 39 selector = members_selector, |
bsw@193 | 40 per_page = 30, |
bsw/jbe@0 | 41 content = function() |
bsw/jbe@0 | 42 ui.list{ |
bsw/jbe@0 | 43 records = members_selector:exec(), |
bsw/jbe@0 | 44 columns = { |
bsw/jbe@0 | 45 { |
bsw/jbe@0 | 46 field_attr = { style = "text-align: right;" }, |
bsw/jbe@0 | 47 label = _"Id", |
bsw/jbe@0 | 48 name = "id" |
bsw/jbe@0 | 49 }, |
bsw/jbe@0 | 50 { |
bsw/jbe@0 | 51 label = _"Login", |
bsw/jbe@0 | 52 name = "login" |
bsw/jbe@0 | 53 }, |
bsw/jbe@0 | 54 { |
bsw/jbe@0 | 55 label = _"Name", |
bsw/jbe@0 | 56 content = function(record) |
bsw/jbe@0 | 57 util.put_highlighted_string(record.name) |
bsw/jbe@0 | 58 end |
bsw/jbe@0 | 59 }, |
bsw/jbe@0 | 60 { |
bsw/jbe@0 | 61 label = _"Ident number", |
bsw/jbe@0 | 62 name = "ident_number" |
bsw/jbe@0 | 63 }, |
bsw/jbe@0 | 64 { |
bsw/jbe@0 | 65 label = _"Admin?", |
bsw/jbe@0 | 66 name = "admin" |
bsw/jbe@0 | 67 }, |
bsw/jbe@0 | 68 { |
bsw/jbe@0 | 69 content = function(record) |
bsw@193 | 70 if not record.active then |
bsw/jbe@0 | 71 ui.field.text{ value = "locked" } |
bsw/jbe@0 | 72 end |
bsw/jbe@0 | 73 end |
bsw/jbe@0 | 74 }, |
bsw/jbe@0 | 75 { |
bsw/jbe@0 | 76 content = function(record) |
bsw@193 | 77 ui.link{ |
bsw@193 | 78 attr = { class = "action admin_only" }, |
bsw@193 | 79 text = _"Edit", |
bsw@193 | 80 module = "admin", |
bsw@193 | 81 view = "member_edit", |
bsw@193 | 82 id = record.id |
bsw@193 | 83 } |
bsw/jbe@0 | 84 end |
bsw/jbe@0 | 85 } |
bsw/jbe@0 | 86 } |
bsw/jbe@0 | 87 } |
bsw/jbe@0 | 88 end |
bsw/jbe@0 | 89 } |