liquid_feedback_frontend

changeset 1462:6929d3ced007

New layout for admin policy list view
author bsw
date Thu Oct 18 17:33:11 2018 +0200 (2018-10-18)
parents 22a1a6711154
children 16868516595f
files app/main/admin/policy_list.lua
line diff
     1.1 --- a/app/main/admin/policy_list.lua	Thu Oct 18 17:31:19 2018 +0200
     1.2 +++ b/app/main/admin/policy_list.lua	Thu Oct 18 17:33:11 2018 +0200
     1.3 @@ -5,56 +5,55 @@
     1.4  
     1.5  ui.titleAdmin(_"Policy list")
     1.6  
     1.7 -ui.section( function()
     1.8 -  ui.sectionHead( function()
     1.9 -    ui.heading { level = 1, content = _"Policy list" }
    1.10 -  end )
    1.11 -  
    1.12 -  ui.sectionRow( function()
    1.13 +ui.grid{ content = function()
    1.14  
    1.15 -    if show_not_in_use then
    1.16 -      ui.link{
    1.17 -        text = _"Show policies in use",
    1.18 -        module = "admin",
    1.19 -        view = "policy_list"
    1.20 -      }
    1.21 +  ui.cell_main{ content = function()
    1.22 +    ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
    1.23 +      ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
    1.24 +        ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Policy list" }
    1.25 +      end }
    1.26 +      ui.container{ attr = { class = "mdl-card__content" }, content = function()
    1.27 +
    1.28 +        if show_not_in_use then
    1.29 +          ui.link{
    1.30 +            text = _"Show policies in use",
    1.31 +            module = "admin",
    1.32 +            view = "policy_list"
    1.33 +          }
    1.34  
    1.35 -    else
    1.36 -      ui.link{
    1.37 -        text = _"Create new policy",
    1.38 -        module = "admin",
    1.39 -        view = "policy_show"
    1.40 -      }
    1.41 -      slot.put(" · ")
    1.42 -      ui.link{
    1.43 -        text = _"Show policies not in use",
    1.44 -        module = "admin",
    1.45 -        view = "policy_list",
    1.46 -        params = { show_not_in_use = true }
    1.47 -      }
    1.48 +        else
    1.49 +          ui.link{
    1.50 +            text = _"Create new policy",
    1.51 +            module = "admin",
    1.52 +            view = "policy_show"
    1.53 +          }
    1.54 +          slot.put(" · ")
    1.55 +          ui.link{
    1.56 +            text = _"Show policies not in use",
    1.57 +            module = "admin",
    1.58 +            view = "policy_list",
    1.59 +            params = { show_not_in_use = true }
    1.60 +          }
    1.61  
    1.62 -    end
    1.63 -
    1.64 -  end )
    1.65 -  
    1.66 -  ui.sectionRow( function()
    1.67 +        end
    1.68  
    1.69 -    ui.list{
    1.70 -      records = policies,
    1.71 -      columns = {
    1.72 +        ui.list{
    1.73 +          records = policies,
    1.74 +          columns = {
    1.75  
    1.76 -        { content = function(record)
    1.77 -            ui.link{
    1.78 -              text = record.name,
    1.79 -              module = "admin",
    1.80 -              view = "policy_show",
    1.81 -              id = record.id
    1.82 +            { content = function(record)
    1.83 +                ui.link{
    1.84 +                  text = record.name,
    1.85 +                  module = "admin",
    1.86 +                  view = "policy_show",
    1.87 +                  id = record.id
    1.88 +                }
    1.89 +              end
    1.90              }
    1.91 -          end
    1.92 +
    1.93 +          }
    1.94          }
    1.95 -
    1.96 -      }
    1.97 -    }
    1.98 -
    1.99 -  end )
   1.100 -end )
   1.101 \ No newline at end of file
   1.102 +      end }
   1.103 +    end }
   1.104 +  end }
   1.105 +end }

Impressum / About Us