72 lines
2.5 KiB
HTML
72 lines
2.5 KiB
HTML
{% extends "portfolios/base.html" %}
|
|
|
|
{% from "components/label.html" import Label %}
|
|
{% from "components/pagination.html" import Pagination %}
|
|
{% from 'components/save_button.html' import SaveButton %}
|
|
{% from 'components/sticky_cta.html' import StickyCTA %}
|
|
{% from "components/text_input.html" import TextInput %}
|
|
|
|
{% block portfolio_content %}
|
|
|
|
{{ StickyCTA(text="Settings") }}
|
|
|
|
<div v-cloak class="portfolio-admin">
|
|
{% include "fragments/flash.html" %}
|
|
<!-- max width of this section is 460px -->
|
|
<section class="form-container__half">
|
|
<h3>Portfolio name and component</h3>
|
|
{% if user_can(permissions.EDIT_PORTFOLIO_NAME) %}
|
|
<base-form inline-template>
|
|
<form method="POST" action="{{ url_for('portfolios.edit', portfolio_id=portfolio.id) }}" autocomplete="false">
|
|
{{ portfolio_form.csrf_token }}
|
|
{{ TextInput(portfolio_form.name, validation="portfolioName", optional=False) }}
|
|
{{ TextInput(portfolio_form.description, paragraph=True) }}
|
|
<div class='edit-portfolio-name action-group'>
|
|
{{ SaveButton(text='Save Changes') }}
|
|
</div>
|
|
</form>
|
|
</base-form>
|
|
{% else %}
|
|
<div>
|
|
<div class='admin-title'>
|
|
{{ "portfolios.admin.portfolio_name" | translate }}
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<div class='admin-content'>
|
|
{{ portfolio.name }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class='defense-row'>
|
|
<div>
|
|
<div class='admin-title'>{{ "portfolios.admin.defense_component_label" | translate }}</div>
|
|
{% if portfolio.defense_component %}
|
|
<div class='admin-content'>
|
|
{% for component in portfolio.defense_component %}
|
|
{{ "forms.portfolio.defense_component.choices.%s" | format(component) | translate }}<br>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class='admin-content'>{{ "fragments.portfolio_admin.none" | translate }}</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<hr>
|
|
|
|
{% if user_can(permissions.VIEW_PORTFOLIO_USERS) %}
|
|
{% include "portfolios/fragments/portfolio_members.html" %}
|
|
{% endif %}
|
|
|
|
{% if user_can(permissions.VIEW_PORTFOLIO_ACTIVITY_LOG) and config.get("USE_AUDIT_LOG", False) %}
|
|
{% include "fragments/audit_events_log.html" %}
|
|
{{ Pagination(audit_events, url_for('portfolios.admin', portfolio_id=portfolio.id)) }}
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|