liquid_feedback_frontend
changeset 1452:0739091c56fa
Updated layout for admin member list view
author | bsw |
---|---|
date | Thu Oct 18 17:20:42 2018 +0200 (2018-10-18) |
parents | fc89a38b52c5 |
children | d310cca38a87 |
files | app/main/admin/member_list.lua |
line diff
1.1 --- a/app/main/admin/member_list.lua Thu Oct 18 17:18:19 2018 +0200 1.2 +++ b/app/main/admin/member_list.lua Thu Oct 18 17:20:42 2018 +0200 1.3 @@ -1,100 +1,97 @@ 1.4 local search = param.get("search") 1.5 1.6 -ui.titleAdmin(_"Member list") 1.7 - 1.8 -ui.section( function() 1.9 - 1.10 - ui.sectionHead( function() 1.11 - ui.heading { level = 1, content = _"Member list" } 1.12 - end ) 1.13 +ui.grid{ content = function() 1.14 1.15 - ui.sectionRow( function () 1.16 - ui.form{ 1.17 - module = "admin", view = "member_list", 1.18 - content = function() 1.19 - 1.20 - ui.field.text{ label = _"search", name = "search", value = search } 1.21 - 1.22 - ui.submit{ value = _"search" } 1.23 - 1.24 - end 1.25 - } 1.26 - end ) 1.27 + ui.cell_main{ content = function() 1.28 + ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() 1.29 + ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() 1.30 + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Member list" } 1.31 + end } 1.32 + ui.container{ attr = { class = "mdl-card__content" }, content = function() 1.33 + ui.form{ 1.34 + module = "admin", view = "member_list", 1.35 + content = function() 1.36 + 1.37 + ui.field.text{ label = _"search", name = "search", value = search } 1.38 + 1.39 + ui.submit{ value = _"search" } 1.40 + 1.41 + end 1.42 + } 1.43 1.44 - 1.45 - ui.sectionRow( function () 1.46 - local members_selector = Member:build_selector{ 1.47 - admin_search = search, 1.48 - order = "identification" 1.49 - } 1.50 - 1.51 + local members_selector = Member:build_selector{ 1.52 + admin_search = search, 1.53 + order = "identification" 1.54 + } 1.55 1.56 - ui.paginate{ 1.57 - selector = members_selector, 1.58 - per_page = 30, 1.59 - content = function() 1.60 - ui.list{ 1.61 - records = members_selector:exec(), 1.62 - columns = { 1.63 - { 1.64 - label = _"Id", 1.65 - content = function(record) 1.66 - ui.link{ 1.67 - text = record.id, 1.68 - module = "admin", 1.69 - view = "member_edit", 1.70 - id = record.id 1.71 - } 1.72 - end 1.73 - }, 1.74 - { 1.75 - label = _"Identification", 1.76 - content = function(record) 1.77 - ui.link{ 1.78 - text = record.identification or "", 1.79 - module = "admin", 1.80 - view = "member_edit", 1.81 - id = record.id 1.82 - } 1.83 - end 1.84 - }, 1.85 - { 1.86 - label = _"Screen name", 1.87 - content = function(record) 1.88 - ui.link{ 1.89 - text = record.name or "", 1.90 - module = "admin", 1.91 - view = "member_edit", 1.92 - id = record.id 1.93 - } 1.94 - end 1.95 - }, 1.96 - { 1.97 - content = function(record) 1.98 - if record.admin then 1.99 - ui.field.text{ value = "admin" } 1.100 - end 1.101 - end 1.102 - }, 1.103 - { 1.104 - content = function(record) 1.105 - if not record.activated then 1.106 - ui.field.text{ value = "not activated" } 1.107 - elseif not record.active then 1.108 - ui.field.text{ value = "inactive" } 1.109 - end 1.110 - end 1.111 - }, 1.112 - { 1.113 - content = function(record) 1.114 - if record.locked then 1.115 - ui.field.text{ value = "locked" } 1.116 - end 1.117 - end 1.118 - }, 1.119 - } 1.120 + ui.paginate{ 1.121 + selector = members_selector, 1.122 + per_page = 30, 1.123 + content = function() 1.124 + ui.list{ 1.125 + records = members_selector:exec(), 1.126 + columns = { 1.127 + { 1.128 + label = _"Id", 1.129 + content = function(record) 1.130 + ui.link{ 1.131 + text = record.id, 1.132 + module = "admin", 1.133 + view = "member_edit", 1.134 + id = record.id 1.135 + } 1.136 + end 1.137 + }, 1.138 + { 1.139 + label = _"Identification", 1.140 + content = function(record) 1.141 + ui.link{ 1.142 + text = record.identification or "", 1.143 + module = "admin", 1.144 + view = "member_edit", 1.145 + id = record.id 1.146 + } 1.147 + end 1.148 + }, 1.149 + { 1.150 + label = _"Screen name", 1.151 + content = function(record) 1.152 + ui.link{ 1.153 + text = record.name or "", 1.154 + module = "admin", 1.155 + view = "member_edit", 1.156 + id = record.id 1.157 + } 1.158 + end 1.159 + }, 1.160 + { 1.161 + content = function(record) 1.162 + if record.admin then 1.163 + ui.field.text{ value = "admin" } 1.164 + end 1.165 + end 1.166 + }, 1.167 + { 1.168 + content = function(record) 1.169 + if not record.activated then 1.170 + ui.field.text{ value = "not activated" } 1.171 + elseif not record.active then 1.172 + ui.field.text{ value = "inactive" } 1.173 + end 1.174 + end 1.175 + }, 1.176 + { 1.177 + content = function(record) 1.178 + if record.locked then 1.179 + ui.field.text{ value = "locked" } 1.180 + end 1.181 + end 1.182 + }, 1.183 + } 1.184 + } 1.185 + end 1.186 } 1.187 - end 1.188 - } 1.189 - end ) 1.190 -end ) 1.191 \ No newline at end of file 1.192 + end } 1.193 + end } 1.194 + end } 1.195 +end }