{{#let route.params.nspace route.model.dc route.model.items loader.data as |nspace dc items topology|}}
{{! Make a map of key=enabled to tell us which notices are enabled }} {{! The `false` here is so we can easily open all the notices up by changing to `true` }} {{#let (from-entries (array (array 'filtered-by-acls' (or false topology.FilteredByACLs)) (array 'default-allow' (or false (eq dc.DefaultACLPolicy 'allow'))) (array 'wildcard-intention' (or false topology.wildcardIntention)) (array 'not-defined-intention' (or false topology.notDefinedIntention)) (array 'no-dependencies' (or false (and topology.noDependencies (can 'use acls')))) (array 'acls-disabled' (or false (and topology.noDependencies (not (can 'use acls'))))) )) as |notices|}} {{! Make an array only of truthy values to we know how many notices are enabled }} {{#let (without false (values notices) ) as |noticesEnabled|}} {{! Render any enabled notices }} {{#each-in notices as |prop enabled|}} {{#if enabled}}

{{compute (fn route.t 'notice.${prop}.header' (hash prop=prop ) )}}

{{#if disclosure.expanded}}

{{compute (fn route.t 'notice.${prop}.body' (hash prop=prop ) )}}

{{/if}} {{#let (compute (fn route.t 'notice.${prop}.footer' (hash route_intentions=(href-to 'dc.services.show.intentions') prop=prop htmlSafe=true ) )) as |footer|}} {{#if (and disclosure.expanded (not-eq prop 'filtered-by-acls'))}} {{footer}} {{/if}} {{/let}}
{{/if}} {{/each-in}} {{! If more than 2 notices are enabled let the user close them }} {{#if (gt noticesEnabled.length 2)}} {{compute (fn route.t 'notices.${expanded}' (hash expanded=(if disclosure.expanded 'close' 'open') ) )}} {{/if}} {{/let}} {{/let}}
{{#if config.data}} {{/if}}
{{/let}}