mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Add pages for ‘service settings’ flow
Adds the pages and wires them together, so that it’s possible to click through them. The wording is not quite English, but attempts to be an rough description of what the consequences are for each of the four actions.
This commit is contained in:
20
app/templates/components/browse-list.html
Normal file
20
app/templates/components/browse-list.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% macro browse_list(items) %}
|
||||
{% if items %}
|
||||
<nav class="browse-list">
|
||||
<ul>
|
||||
{% for item in items %}
|
||||
{% if item.title and item.link %}
|
||||
<li class="browse-list-item">
|
||||
<a href="{{ item.link }}" class="browse-list-link{% if item.destructive %}-destructive{% endif %}">{{ item.title }}</a>
|
||||
{% if item.hint %}
|
||||
<div class="browse-list-hint">
|
||||
{{ item.hint }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
11
app/templates/components/list.html
Normal file
11
app/templates/components/list.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% macro list(items) %}
|
||||
{% if items %}
|
||||
<ul class="list list-bullet">
|
||||
{% for item in items %}
|
||||
<li>
|
||||
{{ item }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
@@ -1,9 +1,9 @@
|
||||
{% macro submit_form(button_text, back_link=False) %}
|
||||
{% macro submit_form(button_text, back_link=False, back_link_text="Back", destructive=False) %}
|
||||
<div class="submit-form">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="button" value="{{ button_text }}" />
|
||||
<input type="submit" class="button{% if destructive %}-destructive{% endif %}" value="{{ button_text }}" />
|
||||
{% if back_link %}
|
||||
<a class="submit-form-back-link" role="button" href="{{ back_link }}">Back</a>
|
||||
<a class="submit-form-back-link" role="button" href="{{ back_link }}">{{ back_link_text }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% macro table(items, caption='', field_headings='', field_headings_visible=True, caption_visible=True) -%}
|
||||
{% macro mapping_table(caption='', field_headings=[], field_headings_visible=True, caption_visible=True) -%}
|
||||
<table class="table">
|
||||
<caption class="heading-medium table-heading{{ ' visuallyhidden' if not caption_visible}}">
|
||||
{{ caption }}
|
||||
@@ -17,21 +17,34 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if items %}
|
||||
{% for item in items %}
|
||||
<tr class="table-row">
|
||||
{{ caller(item) }}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p class="table-no-content">
|
||||
{{ empty_message }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{{ caller() }}
|
||||
</tbody>
|
||||
</table>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro list_table(items, caption='', empty_message='', field_headings=[], field_headings_visible=True, caption_visible=True) -%}
|
||||
{% if items %}
|
||||
{% set parent_caller = caller %}
|
||||
{% call mapping_table(caption, field_headings, field_headings_visible, caption_visible) %}
|
||||
{% for item in items %}
|
||||
{% call row() %}
|
||||
{{ parent_caller(item) }}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
{%- endcall %}
|
||||
{% else %}
|
||||
<p class="summary-item-no-content">
|
||||
{{ empty_message }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro row() -%}
|
||||
<tr class="table-row">
|
||||
{{ caller() }}
|
||||
</tr>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro field(align='left', status='') -%}
|
||||
<td class="table-field{% if align == 'right' %}-right-aligned{% endif %}">
|
||||
<span class="{{ 'table-field-status-' + status if status }}">{{ caller() }}</span>
|
||||
|
||||
Reference in New Issue
Block a user