Add conditional empty state modules to Requests, Workspace Members, and Workspace Projects
This commit is contained in:
@@ -1,32 +1,49 @@
|
||||
{% extends "base_workspace.html.to" %}
|
||||
|
||||
{% block template_vars %}
|
||||
{% set projectsEmpty = False %}
|
||||
{% end %}
|
||||
|
||||
{% block workspace_content %}
|
||||
|
||||
{% for project in projects %}
|
||||
<div class='block-list project-list-item'>
|
||||
<header class='block-list__header'>
|
||||
<h2 class='block-list__title'>{{ project['name'] }} ({{ len(project['environments'])}} environments)</h2>
|
||||
<a class='block-list__header__link' href='/workspaces/123456/projects/789/edit'>
|
||||
{% module Icon('edit') %}
|
||||
<span>edit</span>
|
||||
</a>
|
||||
</header>
|
||||
<ul>
|
||||
{% for environment in project['environments'] %}
|
||||
<li class='block-list__item project-list-item__environment'>
|
||||
<a href='/' target='_blank' rel='noopener noreferrer' class='project-list-item__environment__link'>
|
||||
{% module Icon('link') %}
|
||||
<span>{{ environment["name"]}}</span>
|
||||
</a>
|
||||
{% 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'>
|
||||
<h2 class='block-list__title'>{{ project['name'] }} ({{ len(project['environments'])}} environments)</h2>
|
||||
<a class='block-list__header__link' href='/workspaces/123456/projects/789/edit'>
|
||||
{% module Icon('edit') %}
|
||||
<span>edit</span>
|
||||
</a>
|
||||
</header>
|
||||
<ul>
|
||||
{% for environment in project['environments'] %}
|
||||
<li class='block-list__item project-list-item__environment'>
|
||||
<a href='/' target='_blank' rel='noopener noreferrer' class='project-list-item__environment__link'>
|
||||
{% module Icon('link') %}
|
||||
<span>{{ environment["name"]}}</span>
|
||||
</a>
|
||||
|
||||
<div class='project-list-item__environment__members'>
|
||||
<div class='label'>0</div>
|
||||
<span>members</span>
|
||||
</div>
|
||||
</li>
|
||||
{% end %}
|
||||
</ul>
|
||||
</div>
|
||||
{% end %}
|
||||
|
||||
<div class='project-list-item__environment__members'>
|
||||
<div class='label'>0</div>
|
||||
<span>members</span>
|
||||
</div>
|
||||
</li>
|
||||
{% end %}
|
||||
</ul>
|
||||
</div>
|
||||
{% end %}
|
||||
|
||||
{% end %}
|
||||
|
Reference in New Issue
Block a user