liquid_feedback_frontend
diff app/main/member/settings_applications.lua @ 1309:32cc544d5a5b
Cumulative patch for upcoming frontend version 4
author | bsw/jbe |
---|---|
date | Sun Jul 15 14:07:29 2018 +0200 (2018-07-15) |
parents | |
children | afff8198bd98 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/member/settings_applications.lua Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -0,0 +1,41 @@ 1.4 +ui.titleMember(_"Connected applications") 1.5 + 1.6 +ui.grid{ content = function() 1.7 + ui.cell_main{ content = function() 1.8 + 1.9 + ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() 1.10 + ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() 1.11 + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Connected applications" } 1.12 + end } 1.13 + 1.14 + local applications = MemberApplication:by_member_id(app.session.member_id) 1.15 + 1.16 + for i, application in ipairs(applications) do 1.17 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.18 + if application.system_application_id then 1.19 + ui.heading{ level = 2, content = application.system_application.name } 1.20 + else 1.21 + ui.heading{ level = 2, content = application.domain } 1.22 + end 1.23 + local scopes = {} 1.24 + for scope in string.gmatch(application.scope, "[^ ]+") do 1.25 + scopes[#scopes+1] = util.scope_name(scope) 1.26 + end 1.27 + local scopes_string = table.concat(scopes, ", ") 1.28 + ui.container{ content = scopes_string } 1.29 + ui.link{ content = _"Remove application", module = "member", action = "remove_application", id = application.id } 1.30 + end } 1.31 + end 1.32 + 1.33 + end } 1.34 + end } 1.35 + 1.36 + ui.cell_sidebar{ content = function() 1.37 + execute.view { 1.38 + module = "member", view = "_sidebar_whatcanido", params = { 1.39 + member = app.session.member 1.40 + } 1.41 + } 1.42 + end } 1.43 + 1.44 +end }