mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 17:45:32 -04:00
Their priority should always add up to 100%. Currently we have to ensure this by hand. Adding this form means there’s no way to not set their combined priorities to 100%. And it’s a bit more of an intuitive UI than two textboxes on separate pages.
94 lines
3.1 KiB
HTML
94 lines
3.1 KiB
HTML
{% extends "views/platform-admin/_base_template.html" %}
|
|
{% from "components/textbox.html" import textbox %}
|
|
{% from "components/page-header.html" import page_header %}
|
|
{% from "components/page-footer.html" import page_footer %}
|
|
{% from "components/form.html" import form_wrapper %}
|
|
{% from "components/radios.html" import radios %}
|
|
|
|
{% block per_page_title %}
|
|
Text message providers
|
|
{% endblock %}
|
|
|
|
{% block platform_admin_content %}
|
|
|
|
{{ page_header('Text message providers') }}
|
|
|
|
|
|
<h2 class="heading-small top-gutter">
|
|
Now
|
|
</h2>
|
|
<div class="bottom-gutter">
|
|
<div class="history-list-item">
|
|
<div class="grid-row">
|
|
<div class="column-one-third"> </div>
|
|
<div class="column-two-thirds">
|
|
<div class="history-list-percentage-without-border">
|
|
<div class="history-list-percentage-left-label">
|
|
MMG
|
|
</div>
|
|
<div class="history-list-percentage-right-label">
|
|
Firetext
|
|
</div>
|
|
{% call form_wrapper() %}
|
|
<div class="radio-slider" data-module="radio-slider">
|
|
{{ radios(form.ratio, inline=True, hide_legend=True) }}
|
|
<div class="radio-slider-left-value">
|
|
—
|
|
</div>
|
|
<div class="radio-slider-right-value">
|
|
—
|
|
</div>
|
|
</div>
|
|
{{ page_footer('Update', centered_button=True) }}
|
|
{% endcall %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% for day, versions in versions %}
|
|
<h2 class="heading-small top-gutter">
|
|
{% if day %}
|
|
{{ day|format_date_human|title }}
|
|
{% else %}
|
|
Start
|
|
{% endif %}
|
|
</h2>
|
|
<ul class="bottom-gutter">
|
|
{% for version in versions %}
|
|
<li class="history-list-item">
|
|
<div class="grid-row">
|
|
<div class="column-one-third">
|
|
<div class="history-list-user">
|
|
{{ version.created_by.name or (' '|safe) }}
|
|
</div>
|
|
{% if version.updated_at %}
|
|
<div class="history-list-time">
|
|
{{ version.updated_at|format_time }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="column-two-thirds">
|
|
{% set percentage = (version.priority / (version.priority + version.other_provider.priority) * 100) %}
|
|
<div class="history-list-percentage">
|
|
<div class="history-list-percentage-left-label">
|
|
{{ version.display_name }}<br><br>
|
|
{{ percentage|format_thousands }}%
|
|
</div>
|
|
<div class="history-list-percentage-right-label">
|
|
{{ version.other_provider.display_name }}<br><br>
|
|
{{ (100 - percentage)|format_thousands }}%
|
|
</div>
|
|
<div class="history-list-percentage-marker" style="left: {{ (100 -percentage)|format_thousands }}%"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|