Merge pull request #627 from dod-ccpo/portfolio-admin-reskin
Portfolio admin reskin
This commit is contained in:
commit
8669502222
@ -22,11 +22,20 @@ def portfolios():
|
|||||||
return render_template("portfolios/blank_slate.html")
|
return render_template("portfolios/blank_slate.html")
|
||||||
|
|
||||||
|
|
||||||
@portfolios_bp.route("/portfolios/<portfolio_id>/edit")
|
@portfolios_bp.route("/portfolios/<portfolio_id>/admin")
|
||||||
def portfolio(portfolio_id):
|
def portfolio(portfolio_id):
|
||||||
portfolio = Portfolios.get_for_update_information(g.current_user, portfolio_id)
|
portfolio = Portfolios.get_for_update_information(g.current_user, portfolio_id)
|
||||||
form = PortfolioForm(data={"name": portfolio.name})
|
form = PortfolioForm(data={"name": portfolio.name})
|
||||||
return render_template("portfolios/edit.html", form=form, portfolio=portfolio)
|
pagination_opts = Paginator.get_pagination_opts(http_request)
|
||||||
|
audit_events = AuditLog.get_portfolio_events(
|
||||||
|
g.current_user, portfolio, pagination_opts
|
||||||
|
)
|
||||||
|
return render_template(
|
||||||
|
"portfolios/admin.html",
|
||||||
|
form=form,
|
||||||
|
portfolio=portfolio,
|
||||||
|
audit_events=audit_events,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@portfolios_bp.route("/portfolios/<portfolio_id>/edit", methods=["POST"])
|
@portfolios_bp.route("/portfolios/<portfolio_id>/edit", methods=["POST"])
|
||||||
|
@ -163,6 +163,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.activity-log {
|
||||||
|
border-top: 3px solid $color-blue;
|
||||||
|
|
||||||
|
.subheading {
|
||||||
|
border-top: 0;
|
||||||
|
border-bottom: 1px solid $color-gray-lightest;
|
||||||
|
padding: 1.6rem 1.6rem;
|
||||||
|
font-weight: $font-bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.portfolio-applications {
|
.portfolio-applications {
|
||||||
@ -360,3 +372,21 @@
|
|||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.portfolio-admin {
|
||||||
|
.edit-portfolio-name.action-group {
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-row {
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.form-col {
|
||||||
|
.usa-input {
|
||||||
|
input {
|
||||||
|
max-width: 45em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -25,6 +25,10 @@
|
|||||||
border-top: 3px solid $color-blue;
|
border-top: 3px solid $color-blue;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
box-shadow: 0 2px 4px 0 rgba(216,218,222,0.58);
|
box-shadow: 0 2px 4px 0 rgba(216,218,222,0.58);
|
||||||
|
|
||||||
|
&.row {
|
||||||
|
background: $color-white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordian__title {
|
.accordian__title {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
@mixin block-list {
|
@mixin block-list {
|
||||||
@include panel-margin;
|
@include panel-margin;
|
||||||
|
@include shadow-panel
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
ul, dl {
|
ul, dl {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@ -15,6 +17,9 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
background-color: $color-gray-lightest;
|
||||||
|
padding: $gap 2 * $gap;
|
||||||
|
color: $color-gray;
|
||||||
|
|
||||||
.icon-tooltip {
|
.icon-tooltip {
|
||||||
margin: -$gap;
|
margin: -$gap;
|
||||||
@ -59,7 +64,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: $gap * 2;
|
padding: $gap * 2;
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
border-bottom: 1px dashed $color-gray-light;
|
border-bottom: 1px solid $color-gray-lightest;
|
||||||
|
|
||||||
@at-root li#{&} {
|
@at-root li#{&} {
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
@ -23,4 +23,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header.accordian__header {
|
||||||
|
padding: 1.6rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
{% from "components/pagination.html" import Pagination %}
|
{% from "components/pagination.html" import Pagination %}
|
||||||
|
|
||||||
<section class="block-list">
|
<section class="block-list activity-log">
|
||||||
<header class="block-list__header">
|
<div class='subheading'>{{ "portfolios.admin.activity_log_title" | translate }}</div>
|
||||||
<h1 class="block-list__title">{{ "audit_log.header_title" | translate }}</h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for event in audit_events %}
|
{% for event in audit_events %}
|
||||||
<li class="block-list__item">
|
<li class="block-list__item">
|
||||||
|
33
templates/portfolios/admin.html
Normal file
33
templates/portfolios/admin.html
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{% extends "portfolios/base.html" %}
|
||||||
|
|
||||||
|
{% from "components/pagination.html" import Pagination %}
|
||||||
|
{% from "components/icon.html" import Icon %}
|
||||||
|
{% from "components/text_input.html" import TextInput %}
|
||||||
|
|
||||||
|
{% set secondary_breadcrumb = "navigation.portfolio_navigation.portfolio_admin" | translate %}
|
||||||
|
|
||||||
|
{% block portfolio_content %}
|
||||||
|
|
||||||
|
{% include "fragments/flash.html" %}
|
||||||
|
|
||||||
|
<div v-cloak class="portfolio-admin portfolio-content">
|
||||||
|
|
||||||
|
|
||||||
|
<form method="POST" action="{{ url_for('portfolios.edit_portfolio', portfolio_id=portfolio.id) }}" autocomplete="false">
|
||||||
|
{{ form.csrf_token }}
|
||||||
|
<div class='form-row'>
|
||||||
|
<div class='form-col form-col--half'>
|
||||||
|
{{ TextInput(form.name, validation="portfolioName") }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='edit-portfolio-name action-group'>
|
||||||
|
<button type="submit" class="usa-button usa-button-big usa-button-primary" tabindex="0">Save</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% include "fragments/audit_events_log.html" %}
|
||||||
|
|
||||||
|
{{ Pagination(audit_events, 'portfolios.portfolio_activity', portfolio_id=portfolio_id) }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -1,38 +0,0 @@
|
|||||||
{% extends "portfolios/base.html" %}
|
|
||||||
|
|
||||||
{% from "components/icon.html" import Icon %}
|
|
||||||
{% from "components/text_input.html" import TextInput %}
|
|
||||||
|
|
||||||
{% set secondary_breadcrumb = "navigation.portfolio_navigation.breadcrumbs.admin" | translate %}
|
|
||||||
|
|
||||||
{% block portfolio_content %}
|
|
||||||
|
|
||||||
{% include "fragments/flash.html" %}
|
|
||||||
|
|
||||||
<form method="POST" action="{{ url_for('portfolios.edit_portfolio', portfolio_id=portfolio.id) }}" autocomplete="false">
|
|
||||||
{{ form.csrf_token }}
|
|
||||||
|
|
||||||
<div class="panel">
|
|
||||||
|
|
||||||
<div class="panel__heading">
|
|
||||||
<h1>Portfolio Settings</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="panel__content">
|
|
||||||
{{ TextInput(form.name, validation="portfolioName") }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class='action-group'>
|
|
||||||
<button type="submit" class="usa-button usa-button-big usa-button-primary" tabindex="0">Save</button>
|
|
||||||
<a href='{{ url_for("portfolios.portfolio_applications", portfolio_id=portfolio.id) }}' class='action-group__action icon-link'>
|
|
||||||
{{ Icon('x') }}
|
|
||||||
<span>Cancel</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
@ -303,6 +303,7 @@ navigation:
|
|||||||
applications: Applications
|
applications: Applications
|
||||||
portfolio_funding: Funding
|
portfolio_funding: Funding
|
||||||
portfolio_settings: Portfolio Settings
|
portfolio_settings: Portfolio Settings
|
||||||
|
portfolio_admin: Portfolio Administration
|
||||||
breadcrumbs:
|
breadcrumbs:
|
||||||
admin: Admin
|
admin: Admin
|
||||||
funding: Funding
|
funding: Funding
|
||||||
@ -500,6 +501,8 @@ portfolios:
|
|||||||
team_management:
|
team_management:
|
||||||
title: '{application_name} Team Management'
|
title: '{application_name} Team Management'
|
||||||
subheading: Team Management
|
subheading: Team Management
|
||||||
|
admin:
|
||||||
|
activity_log_title: Activity Log
|
||||||
testing:
|
testing:
|
||||||
example_string: Hello World
|
example_string: Hello World
|
||||||
example_with_variables: 'Hello, {name}!'
|
example_with_variables: 'Hello, {name}!'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user