Add conditional empty state modules to Requests, Workspace Members, and Workspace Projects

This commit is contained in:
Andrew Croce 2018-07-30 16:10:28 -04:00
parent a7f49d1299
commit d9d638ab3b
3 changed files with 163 additions and 144 deletions

View File

@ -1,5 +1,9 @@
{% extends "base.html.to" %}
{% block template_vars %}
{% set requestsEmpty = False %}
{% end %}
{% block modal %}
{% if modalOpen() %}
{% apply modal %}
@ -31,6 +35,16 @@
{% block content %}
{% if requestsEmpty %}
{% module EmptyState(
'There are currently no active requests for you to see.',
actionLabel='Create a new JEDI Cloud Request',
actionHref='/requests/new',
icon='document'
)%}
{% else %}
{% module Alert('Pending Financial Verification',
message="<p>Your next step is to create a Task Order (T.O.) associated with JEDI Cloud. Please consult a Contracting Officer (KO) or Contracting Officer Representative (COR) to help with this step.</p>"
@ -95,3 +109,5 @@
{% end %}
{% end %}

View File

@ -1,7 +1,22 @@
{% extends "base_workspace.html.to" %}
{% block template_vars %}
{% set membersEmpty = False %}
{% end %}
{% block workspace_content %}
{% if membersEmpty %}
{% module EmptyState(
'There are currently no members in this Workspace.',
actionLabel='Invite a new Member',
actionHref='/members/new',
icon='avatar'
)%}
{% else %}
<form class='search-bar'>
<div class='usa-input search-input'>
@ -33,36 +48,6 @@
</div>
</form>
{# <div class='panel panel__actions'>
<div class='row'>
<div class='col col--grow col--pad'>
<form class="usa-search usa-search-small">
<label class="usa-sr-only" for="search-field-small">Search small</label>
<input id="search-field-small" type="search" name="search" placeholder="Search by name">
<button type="submit">
<span class="usa-sr-only">Search</span>
</button>
</form>
</div>
<div class='col col--grow col--pad'>
<select id="filter_status" name="filter_status" required="">
<option value="" selected disabled>Filter by status</option>
<option value="">Active</option>
<option value="">Pending</option>
<option value="">Denied</option>
</select>
</div>
<div class='col col--grow col--pad'>
<select id="filter_role" name="filter_role" required="">
<option value="" selected disabled>Filter by role</option>
<option value="">Admin</option>
<option value="">CCPO</option>
<option value="">Developer</option>
</select>
</div>
</div>
</div> #}
<div class='responsive-table-wrapper'>
<table>
@ -87,6 +72,7 @@
</table>
</div>
{% end %}
{% end %}

View File

@ -1,7 +1,22 @@
{% extends "base_workspace.html.to" %}
{% block template_vars %}
{% set projectsEmpty = False %}
{% end %}
{% block workspace_content %}
{% if projectsEmpty %}
{% module EmptyState(
'There are currently no projects set up for this Workspace.',
actionLabel='Create a new Project',
actionHref='/project/new',
icon='cloud'
)%}
{% else %}
{% for project in projects %}
<div class='block-list project-list-item'>
<header class='block-list__header'>
@ -31,3 +46,5 @@
{% end %}
{% end %}