- adds delete-confirmation Vue component - refactors some button styles to make them globally available
34 lines
1.4 KiB
HTML
34 lines
1.4 KiB
HTML
{% from "components/confirmation_button.html" import ConfirmationButton %}
|
|
|
|
{% for subform in member_perms_form.members_permissions %}
|
|
{% set modal_id = "portfolio_id_{}_user_id_{}".format(portfolio.id, subform.user_id.data) %}
|
|
{% set ppoc = subform.user_id.data == portfolio.owner.id %}
|
|
|
|
<tr {% if ppoc %}class="members-table-ppoc"{% endif %}>
|
|
<td class='name'>{{ subform.member.data }}
|
|
{% if subform.user_id.data == user.id %}
|
|
<span class='you'>(<span class='green'>you</span>)</span>
|
|
{% set archive_button_class = 'usa-button-disabled' %}
|
|
{% elif ppoc %}
|
|
{% set archive_button_class = 'usa-button-disabled' %}
|
|
{% else %}
|
|
{% set archive_button_class = 'button-danger-outline' %}
|
|
{% endif %}
|
|
</td>
|
|
|
|
<td>{{ OptionsInput(subform.perms_app_mgmt, label=False, disabled=ppoc) }}</td>
|
|
<td>{{ OptionsInput(subform.perms_funding, label=False, disabled=ppoc) }}</td>
|
|
<td>{{ OptionsInput(subform.perms_reporting, label=False, disabled=ppoc) }}</td>
|
|
<td>{{ OptionsInput(subform.perms_portfolio_mgmt, label=False, disabled=ppoc) }}</td>
|
|
|
|
<td>
|
|
<a v-on:click="openModal('{{ modal_id }}')" class='usa-button {{ archive_button_class }}'>
|
|
{{ "portfolios.members.archive_button" | translate }}
|
|
</a>
|
|
</td>
|
|
{% if not ppoc %}
|
|
{{ subform.user_id() }}
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|