Adds additional buttons and functionality to app team settings.

"Add to existing environment" table, "delete member", and environment
roles and env role edit buttons added for every user in the team
settings list. Accompanying CSS changes.
This commit is contained in:
dandds
2019-05-09 15:38:44 -04:00
parent 802c62e3e9
commit ff41a20ad8
5 changed files with 141 additions and 88 deletions

View File

@@ -11,7 +11,11 @@
<toggler inline-template>
<li class="accordion-table__item">
<div class="accordion-table__item-content row">
<div class="col col--grow">{{ member_form.user_name.data }}</div>
<div class="col col--grow">
<div class="member-list__name">
{{ member_form.user_name.data }}
</div>
</div>
<div class="col col--grow">{{ OptionsInput(permissions_form.perms_team_mgmt, label=False, watch=True) }}</div>
<div class="col col--grow">{{ OptionsInput(permissions_form.perms_env_mgmt, label=False, watch=True) }}</div>
<div class="col col--grow">{{ OptionsInput(permissions_form.perms_del_env, label=False, watch=True) }}</div>
@@ -26,30 +30,47 @@
{{
ToggleButton(
open_html=open_html,
close_html=close_html,
section_name="environments"
)
open_html=open_html,
close_html=close_html,
section_name="environments"
)
}}
</div>
</div>
{% call ToggleSection(section_name="environments") %}
{% call ToggleSection(section_name="environments") %}
<ul>
{% for environment_form in environment_roles_form %}
<li class="accordion-table__item__expanded">
<li class="accordion-table__item__expanded row">
<div class="col col--grow">
{{ environment_form.environment_name.data }}
</li>
</div>
<div class="accordion-table__item__expanded-role col col--grow">
<div class="right">
<span>
{{ environment_form.role.data }}
</span>
<div class="icon-link">
{{ Icon("edit") }}
</div>
</div>
</div>
</li>
{% endfor %}
{% if user_can(permissions.DELETE_APPLICATION_MEMBER) %}
<li class="accordion-table__item__expanded action-group">
<span class="usa-button button-danger" v-on:click="openModal('{{ delete_modal_id }}')">
{{ "portfolios.applications.remove_member.button" | translate }}
</span>
</li>
{% endif %}
</ul>
{% endcall %}
{{ member_form.user_id() }}
<div class="accordion-table__item__action-group">
<a class="icon-link">
{{ "portfolios.applications.team_settings.add_to_environment" | translate }}
{{ Icon("plus") }}
</a>
<button
id="delete-application"
type="button"
class='usa-button button-danger'
>
{{ "portfolios.members.archive_button" | translate }}
</button>
</div>
{% endcall %}
{{ member_form.user_id() }}
</li>
</toggler>
{% endfor %}