mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 13:39:57 -04:00
This works in a similar way to the create_letter_branding view function, but with a few minor differences: * Since we already have a file, uploading a file is no longer required (since we can just use the current file if a new one is not uploaded) * We save the changes in the database, then upload the new files to S3. If saving to S3 raises an error, we now rollback the database changes to prevent any errors when trying to view letters with the original logo.
39 lines
1.1 KiB
HTML
39 lines
1.1 KiB
HTML
{% extends "views/platform-admin/_base_template.html" %}
|
||
{% from "components/live-search.html" import live_search %}
|
||
|
||
{% block per_page_title %}
|
||
Letter branding
|
||
{% endblock %}
|
||
|
||
{% block platform_admin_content %}
|
||
|
||
<div class="grid-row bottom-gutter-2-3">
|
||
<div class="column-two-thirds">
|
||
<h1 class="heading-large">Letter branding</h1>
|
||
</div>
|
||
<div class="column-one-third">
|
||
<a href="{{ url_for('.create_letter_branding') }}" class="button align-with-heading">Add new brand</a>
|
||
</div>
|
||
</div>
|
||
{{ live_search(target_selector='.letter-brand', show=True, form=search_form) }}
|
||
<nav>
|
||
{% for brand in letter_brandings %}
|
||
<div class="letter-brand">
|
||
<div class="message-name">
|
||
<a href="{{ url_for('.update_letter_branding', branding_id=brand.id) }}">
|
||
{{ brand.name }}
|
||
</a>
|
||
</div>
|
||
<p class="message-type">
|
||
{% if brand.domain %}
|
||
Default for {{ brand.domain }}
|
||
{% else %}
|
||
–
|
||
{% endif %}
|
||
</p>
|
||
</div>
|
||
{% endfor %}
|
||
</nav>
|
||
|
||
{% endblock %}
|