liquid_feedback_frontend
diff app/main/issue/_list.lua @ 1696:446d2798f424
Automatically switch to single unit mode for users having only one unit
| author | bsw |
|---|---|
| date | Thu Sep 23 17:47:58 2021 +0200 (2021-09-23) |
| parents | 6a82661ea3cb |
| children | 26b0b4fb09fe |
line diff
1.1 --- a/app/main/issue/_list.lua Thu Sep 23 14:30:18 2021 +0200 1.2 +++ b/app/main/issue/_list.lua Thu Sep 23 17:47:58 2021 +0200 1.3 @@ -15,8 +15,8 @@ 1.4 mode = "timeline" 1.5 end 1.6 1.7 -if config.single_unit_id then 1.8 - for_unit = Unit:by_id(config.single_unit_id) 1.9 +if app.single_unit_id then 1.10 + for_unit = Unit:by_id(app.single_unit_id) 1.11 end 1.12 1.13 local selector 1.14 @@ -201,8 +201,8 @@ 1.15 if not for_issue and not for_initiative then 1.16 ui.container{ attr = { class = "mdl-card__title mdl-card--has-fab mdl-card--border card-issue" }, content = function() 1.17 ui.container{ attr = { class = "contextlinks" }, content = function() 1.18 - if not (config.single_unit_id and config.single_area_id) then 1.19 - if not config.single_unit_id then 1.20 + if not (app.single_unit_id and config.single_area_id) then 1.21 + if not app.single_unit_id then 1.22 ui.icon("group") 1.23 slot.put(" ") 1.24 ui.link{ 1.25 @@ -210,7 +210,7 @@ 1.26 attr = { class = "unit" }, content = issue.area.unit.name } 1.27 end 1.28 if not config.single_area_id then 1.29 - if not config.single_unit_id then 1.30 + if not app.single_unit_id then 1.31 slot.put(" ") 1.32 end 1.33 ui.icon("category")