@@ -35,11 +35,13 @@
|
||||
|
||||
<div class='application-list'>
|
||||
{% for application in portfolio.applications|sort(attribute='name') %}
|
||||
<div is='toggler' v-cloak class='accordion application-list-item'>
|
||||
<template slot-scope='props'>
|
||||
{% set section_name = "application-{}".format(application.id) %}
|
||||
|
||||
<toggler inline-template>
|
||||
<div class='accordion application-list-item'>
|
||||
<header class='accordion__header row'>
|
||||
<div class='col col-grow'>
|
||||
<h3 class='icon-link accordion__title' v-on:click="props.toggle">{{ application.name }}</h3>
|
||||
<h3 class='icon-link accordion__title' v-on:click="toggleSection('{{ section_name }}')">{{ application.name }}</h3>
|
||||
<span class='accordion__description'>{{ application.description }}</span>
|
||||
<div class='accordion__actions'>
|
||||
{% if user_can(permissions.VIEW_APPLICATION) %}
|
||||
@@ -59,17 +61,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class='col'>
|
||||
<span v-on:click="props.toggle" class='icon-link toggle-link'>
|
||||
<template v-if="props.isVisible">
|
||||
<span class='icon-link toggle-link' v-on:click="toggleSection('{{ section_name }}')">
|
||||
<span v-if="selectedSection === '{{ section_name }}'">
|
||||
{{ Icon('minus') }}
|
||||
</template>
|
||||
<template v-else>
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ Icon('plus') }}
|
||||
</template>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</header>
|
||||
<ul v-if="props.isVisible">
|
||||
<ul v-show="selectedSection === '{{ section_name }}'">
|
||||
{% for environment in application.environments %}
|
||||
<li class='accordion__item application-list-item__environment'>
|
||||
<div class='application-list-item__environment__name'>
|
||||
@@ -83,8 +85,8 @@
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</toggler>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{% from "components/empty_state.html" import EmptyState %}
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/toggle_list.html" import ToggleList %}
|
||||
{% from "components/toggle_list.html" import ToggleButton, ToggleSection %}
|
||||
|
||||
{% set secondary_breadcrumb = 'portfolios.applications.team_settings.title' | translate({ "application_name": application.name }) %}
|
||||
|
||||
@@ -67,29 +67,48 @@
|
||||
{% set user_info = environment_users[user.id] %}
|
||||
{% set user_permissions = user_info["permissions"] %}
|
||||
|
||||
{% set user_row %}
|
||||
<span>{{ user.full_name }}</span>
|
||||
<span>{{ user_permissions["delete_access"] }}</span>
|
||||
<span>{{ user_permissions["environment_management"] }}</span>
|
||||
<span>{{ user_permissions["team_management"] }}</span>
|
||||
{% endset %}
|
||||
|
||||
{% call ToggleList(
|
||||
item_name=user_row,
|
||||
item_type=("portfolios.applications.team_settings.environments" | translate),
|
||||
length=(user_info["environments"] | length)
|
||||
)
|
||||
%}
|
||||
<ul>
|
||||
{% for environment in user_info["environments"] %}
|
||||
<li class="accordion-table__item__expanded">
|
||||
<div class="accordion-table__item-content">
|
||||
{{ environment.name }}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endcall %}
|
||||
<toggler inline-template>
|
||||
<li class="accordion-table__item">
|
||||
<div class="accordion-table__item-content">
|
||||
<span>
|
||||
{{ name }}
|
||||
<span>{{ user.full_name }}</span>
|
||||
<span>{{ user_permissions["delete_access"] }}</span>
|
||||
<span>{{ user_permissions["environment_management"] }}</span>
|
||||
<span>{{ user_permissions["team_management"] }}</span>
|
||||
</span>
|
||||
<span class="icon-link icon-link--large accordion-table__item__toggler">
|
||||
{% set open_html %}
|
||||
{{ "common.show" | translate }} {{ "portfolios.applications.team_settings.environments" | translate }} ({{ user_info['environments'] | length }})
|
||||
{% endset %}
|
||||
|
||||
{% set close_html %}
|
||||
{{ "common.hide" | translate }} {{ "portfolios.applications.team_settings.environments" | translate }} ({{ user_info['environments'] | length }})
|
||||
{% endset %}
|
||||
|
||||
{{
|
||||
ToggleButton(
|
||||
open_html=open_html,
|
||||
close_html=close_html,
|
||||
section_name="environments"
|
||||
)
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
{% call ToggleSection(section_name="environments") %}
|
||||
<ul>
|
||||
{% for environment in user_info["environments"] %}
|
||||
<li>
|
||||
<div class="accordion-table__item-content">
|
||||
{{ environment.name }}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endcall %}
|
||||
</li>
|
||||
</toggler>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user