# HG changeset patch # User bsw # Date 1539876042 -7200 # Node ID 0739091c56fa419efe41980d042473a45bc409de # Parent fc89a38b52c59a88fa56c7b336d10265e98abb10 Updated layout for admin member list view diff -r fc89a38b52c5 -r 0739091c56fa app/main/admin/member_list.lua --- a/app/main/admin/member_list.lua Thu Oct 18 17:18:19 2018 +0200 +++ b/app/main/admin/member_list.lua Thu Oct 18 17:20:42 2018 +0200 @@ -1,100 +1,97 @@ local search = param.get("search") -ui.titleAdmin(_"Member list") - -ui.section( function() - - ui.sectionHead( function() - ui.heading { level = 1, content = _"Member list" } - end ) +ui.grid{ content = function() - ui.sectionRow( function () - ui.form{ - module = "admin", view = "member_list", - content = function() - - ui.field.text{ label = _"search", name = "search", value = search } - - ui.submit{ value = _"search" } - - end - } - end ) + ui.cell_main{ content = function() + ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() + ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Member list" } + end } + ui.container{ attr = { class = "mdl-card__content" }, content = function() + ui.form{ + module = "admin", view = "member_list", + content = function() + + ui.field.text{ label = _"search", name = "search", value = search } + + ui.submit{ value = _"search" } + + end + } - - ui.sectionRow( function () - local members_selector = Member:build_selector{ - admin_search = search, - order = "identification" - } - + local members_selector = Member:build_selector{ + admin_search = search, + order = "identification" + } - ui.paginate{ - selector = members_selector, - per_page = 30, - content = function() - ui.list{ - records = members_selector:exec(), - columns = { - { - label = _"Id", - content = function(record) - ui.link{ - text = record.id, - module = "admin", - view = "member_edit", - id = record.id - } - end - }, - { - label = _"Identification", - content = function(record) - ui.link{ - text = record.identification or "", - module = "admin", - view = "member_edit", - id = record.id - } - end - }, - { - label = _"Screen name", - content = function(record) - ui.link{ - text = record.name or "", - module = "admin", - view = "member_edit", - id = record.id - } - end - }, - { - content = function(record) - if record.admin then - ui.field.text{ value = "admin" } - end - end - }, - { - content = function(record) - if not record.activated then - ui.field.text{ value = "not activated" } - elseif not record.active then - ui.field.text{ value = "inactive" } - end - end - }, - { - content = function(record) - if record.locked then - ui.field.text{ value = "locked" } - end - end - }, - } + ui.paginate{ + selector = members_selector, + per_page = 30, + content = function() + ui.list{ + records = members_selector:exec(), + columns = { + { + label = _"Id", + content = function(record) + ui.link{ + text = record.id, + module = "admin", + view = "member_edit", + id = record.id + } + end + }, + { + label = _"Identification", + content = function(record) + ui.link{ + text = record.identification or "", + module = "admin", + view = "member_edit", + id = record.id + } + end + }, + { + label = _"Screen name", + content = function(record) + ui.link{ + text = record.name or "", + module = "admin", + view = "member_edit", + id = record.id + } + end + }, + { + content = function(record) + if record.admin then + ui.field.text{ value = "admin" } + end + end + }, + { + content = function(record) + if not record.activated then + ui.field.text{ value = "not activated" } + elseif not record.active then + ui.field.text{ value = "inactive" } + end + end + }, + { + content = function(record) + if record.locked then + ui.field.text{ value = "locked" } + end + end + }, + } + } + end } - end - } - end ) -end ) \ No newline at end of file + end } + end } + end } +end }