Merge branch 'staging' into to-builder-previous-button
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{% from "components/alert.html" import Alert %}
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/label.html" import Label %}
|
||||
{% from 'components/save_button.html' import SaveButton %}
|
||||
@@ -10,10 +11,13 @@
|
||||
new_env_form) %}
|
||||
|
||||
<h3>{{ "portfolios.applications.settings.environments" | translate }}</h3>
|
||||
{% if portfolio.num_task_orders == 0 -%}
|
||||
{{ Alert(message="portfolios.applications.environments.funding_alert"|translate({'name': portfolio.name})) }}
|
||||
{%- endif %}
|
||||
{% if g.matchesPath("application-environments") -%}
|
||||
{% include "fragments/flash.html" %}
|
||||
{%- endif %}
|
||||
<section class="panel" id="application-environments">
|
||||
{% if g.matchesPath("application-environments") -%}
|
||||
{% include "fragments/flash.html" %}
|
||||
{%- endif %}
|
||||
{% if 0 == environments_obj | length -%}
|
||||
<div class="empty-state panel__content">
|
||||
<p class="empty-state__message">
|
||||
@@ -30,14 +34,21 @@
|
||||
<li class="accordion-table__item">
|
||||
<div class="accordion-table__item-content">
|
||||
<div class="environment-list__item">
|
||||
<span>
|
||||
<a
|
||||
href='{{ url_for("applications.access_environment", environment_id=env.id)}}'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'>
|
||||
{{ env['name'] }} {{ Icon('link', classes='icon--medium icon--primary') }}
|
||||
</a>
|
||||
</span>
|
||||
{% if not env["pending"] -%}
|
||||
<span>
|
||||
<a
|
||||
href='{{ url_for("applications.access_environment", environment_id=env.id)}}'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'>
|
||||
{{ env['name'] }} {{ Icon('link', classes='icon--medium icon--primary') }}
|
||||
</a>
|
||||
</span>
|
||||
{% else -%}
|
||||
<span>
|
||||
{{ env['name'] }}
|
||||
</span>
|
||||
{{ Label(type="pending_creation", classes='label--below')}}
|
||||
{%- endif %}
|
||||
{% if user_can(permissions.EDIT_ENVIRONMENT) -%}
|
||||
{{
|
||||
ToggleButton(
|
||||
@@ -57,10 +68,6 @@
|
||||
classes="environment-list__item__members"
|
||||
)
|
||||
}}
|
||||
<br>
|
||||
{% if env['pending'] -%}
|
||||
{{ Label(type="changes_pending", classes='label--below')}}
|
||||
{%- endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -24,11 +24,8 @@
|
||||
{% if not portfolio.applications %}
|
||||
|
||||
{{ EmptyState(
|
||||
header="portfolios.applications.empty_state.header"|translate,
|
||||
message="portfolios.applications.empty_state.message"|translate,
|
||||
button_text="portfolios.applications.empty_state.button_text"|translate,
|
||||
resource='applications',
|
||||
button_link=url_for("applications.view_new_application_step_1", portfolio_id=portfolio.id),
|
||||
view_only_text="portfolios.applications.empty_state.view_only_text"|translate,
|
||||
user_can_create=can_create_applications,
|
||||
) }}
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<div id='app-root'>
|
||||
{% include 'components/usa_header.html' %}
|
||||
|
||||
{% include 'navigation/topbar.html' %}
|
||||
<div class='login-topbar'>{% include 'navigation/topbar.html' %}</div>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
|
@@ -1,14 +1,22 @@
|
||||
{% macro EmptyState(header, message, button_text, button_link, view_only_text, user_can_create=True) %}
|
||||
{% macro EmptyState(resource, button_link, user_can_create=False) %}
|
||||
{% if user_can_create %}
|
||||
{% set perms = 'edit' %}
|
||||
{% else %}
|
||||
{% set perms = 'view' %}
|
||||
{% endif %}
|
||||
|
||||
{% set header = "empty_state.{}.header.{}".format(resource, perms) | translate | safe %}
|
||||
{% set message = "empty_state.{}.message.{}".format(resource, perms) | translate | safe %}
|
||||
{% set button_text = "empty_state.{}.button_text".format(resource) | translate | safe %}
|
||||
|
||||
<div class="empty-state">
|
||||
<h3>{{ header }}</h3>
|
||||
<p>{{ message }}</p>
|
||||
<hr>
|
||||
<div class="empty-state__footer">
|
||||
{% if user_can_create %}
|
||||
{% if user_can_create -%}
|
||||
<hr>
|
||||
<div class="empty-state__footer">
|
||||
<a href="{{ button_link }}" class="usa-button usa-button-primary">{{ button_text }}</a>
|
||||
{% else %}
|
||||
<p>{{ view_only_text }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
@@ -9,6 +9,11 @@
|
||||
"text": "changes pending",
|
||||
"color": "default",
|
||||
},
|
||||
"pending_creation": {
|
||||
"icon": "clock",
|
||||
"text": "pending creation",
|
||||
"color": "default",
|
||||
},
|
||||
"ppoc": {"text": "primary point of contact"}
|
||||
} %}
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<div class="topbar__context">
|
||||
{% if g.current_user %}
|
||||
<a href="{{ url_for('users.user') }}" class="topbar__link">
|
||||
{{ Icon('avatar', classes='topbar__link-icon') }}
|
||||
{{ Icon('user', classes='topbar__link-icon') }}
|
||||
<span class="topbar__link-label">{{ g.current_user.first_name + " " + g.current_user.last_name }}</span>
|
||||
</a>
|
||||
<a href="#" class="topbar__link">
|
||||
|
@@ -22,7 +22,7 @@
|
||||
{{ TextInput(portfolio_form.name, validation="portfolioName", optional=False) }}
|
||||
{{ TextInput(portfolio_form.description, validation="defaultTextAreaField", paragraph=True) }}
|
||||
<div class='edit-portfolio-name action-group'>
|
||||
{{ SaveButton(text='Save Changes', additional_classes='usa-button-big') }}
|
||||
{{ SaveButton(text='Save Changes') }}
|
||||
</div>
|
||||
</form>
|
||||
</base-form>
|
||||
|
@@ -10,10 +10,11 @@
|
||||
|
||||
<main class="usa-section usa-content">
|
||||
{% include "fragments/flash.html" %}
|
||||
<div class='portfolio-header__name'>
|
||||
<p>{{ "portfolios.header" | translate }}</p>
|
||||
<h1>{{ "portfolios.new.title" | translate }}</h1>
|
||||
</div>
|
||||
<div class="portfolio-header-new">
|
||||
<div class='portfolio-header__name'>
|
||||
<p>{{ "portfolios.header" | translate }}</p>
|
||||
<h1>{{ 'portfolios.new.title' | translate }}</h1>
|
||||
</div>
|
||||
{{ StickyCTA(text="portfolios.new.cta_step_1"|translate, context=("portfolios.new.sticky_header_context"|translate({"step": "1"}) )) }}
|
||||
<base-form inline-template>
|
||||
<div class="row">
|
||||
|
@@ -6,17 +6,10 @@
|
||||
{% if not portfolio.applications %}
|
||||
|
||||
{% set can_create_applications = user_can(permissions.CREATE_APPLICATION) %}
|
||||
{% set message = ('portfolios.reports.empty_state.sub_message.can_create_applications' | translate)
|
||||
if can_create_applications
|
||||
else ('portfolios.reports.empty_state.sub_message.cannot_create_applications' | translate)
|
||||
%}
|
||||
|
||||
{{ EmptyState(
|
||||
header='portfolios.reports.empty_state.message' | translate,
|
||||
message=message,
|
||||
button_text="portfolios.applications.empty_state.button_text"|translate,
|
||||
resource='applications_reporting',
|
||||
button_link=url_for("applications.view_new_application_step_1", portfolio_id=portfolio.id),
|
||||
view_only_text="portfolios.applications.empty_state.view_only_text"|translate,
|
||||
user_can_create=can_create_applications,
|
||||
) }}
|
||||
|
||||
|
@@ -85,11 +85,8 @@
|
||||
{% endcall %}
|
||||
{% else %}
|
||||
{{ EmptyState(
|
||||
header="task_orders.empty_state.header"|translate,
|
||||
message="task_orders.empty_state.message"|translate,
|
||||
resource="task_orders",
|
||||
button_link=url_for('task_orders.form_step_one_add_pdf', portfolio_id=portfolio.id),
|
||||
button_text="task_orders.empty_state.button_text"|translate,
|
||||
view_only_text="task_orders.empty_state.view_only_text"|translate,
|
||||
user_can_create=user_can(permissions.CREATE_TASK_ORDER),
|
||||
) }}
|
||||
{% endif %}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class='col'>
|
||||
<div class='col user-edit'>
|
||||
|
||||
{% include "fragments/flash.html" %}
|
||||
|
||||
|
Reference in New Issue
Block a user