From 667bc3b3c90e6d3a4a10df15516dee2ae3d15005 Mon Sep 17 00:00:00 2001 From: richard-dds Date: Wed, 5 Jun 2019 11:55:36 -0400 Subject: [PATCH] Add task order action buttons --- styles/sections/_task_order.scss | 9 +++++++++ templates/portfolios/task_orders/index.html | 18 +++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/styles/sections/_task_order.scss b/styles/sections/_task_order.scss index fa275d34..03f80fdb 100644 --- a/styles/sections/_task_order.scss +++ b/styles/sections/_task_order.scss @@ -66,6 +66,10 @@ } } +.task-order-card__action { + min-width: 10rem; +} + .task-order-summary { margin: $gap * 4; @@ -583,6 +587,11 @@ margin-bottom: $gap * 2; display: flex; align-items: baseline; + justify-content: space-around; + + .card__status-spacer { + flex-grow: 10; + } } .card__header { diff --git a/templates/portfolios/task_orders/index.html b/templates/portfolios/task_orders/index.html index ef042edc..05234096 100644 --- a/templates/portfolios/task_orders/index.html +++ b/templates/portfolios/task_orders/index.html @@ -6,10 +6,9 @@ {% block portfolio_content %} -{% macro ViewLink(task_order) %} - - View - {{ Icon("caret_right", classes="icon--tiny") }} +{% macro ViewLink(task_order, text="Edit", className="usa-button-primary") %} + + {{ text }} {% endmacro %} @@ -29,12 +28,15 @@ {% endmacro %} - {% macro TaskOrderActions(task_order) %}
- {% if task_order.is_active %} - {% elif task_order.is_expired %} + {% if task_order.is_pending %} + {{ ViewLink(task_order, text="Edit") }} + {% elif task_order.is_active %} + {{ ViewLink(task_order, text="Add Funding", className="usa-button-secondary") }} + {{ ViewLink(task_order, text="Modify") }} {% else %} + {{ ViewLink(task_order, text="View") }} {% endif %}
{% endmacro %} @@ -46,7 +48,9 @@
{{ task_order.display_status }} {{ TaskOrderDate(task_order) }} + + {{ TaskOrderActions(task_order) }}