covid-formity/templates/changelog_edit.html

66 lines
2.0 KiB
HTML

{% extends "admin/model/edit.html" %}
{% from "_changelog.html" import render_changelog %}
{% block body %}
{{ super() }}
{% if model is defined %}
{{ render_changelog(model) }}
{% endif %}
{% endblock %}
{% block navlinks %}
<ul class="nav nav-tabs">
<li>
<a href="{{ return_url }}">{{ _gettext('List') }}</a>
</li>
{%- if admin_view.can_create -%}
<li>
<a href="{{ get_url('.create_view', url=return_url) }}">{{ _gettext('Create') }}</a>
</li>
{%- endif -%}
<li class="active">
<a href="javascript:void(0)">{{ _gettext('Edit') }}</a>
</li>
{% if model is defined %}
{%- if admin_view.can_view_details -%}
<li>
<a href="{{ get_url('.details_view', id=request.args.get('id'), url=return_url) }}">{{ _gettext('Details') }}</a>
</li>
{%- endif -%}
<li>
<a href="{{ url_for('faceshieldrequest.label', id=model.id) }}" title="Print label"><span class="glyphicon glyphicon-print"></span> Print label</a>
</li>
<li>
<a href="{{ url_for('map.index_view', id=model.id) }}" title="Show on map"><span class="glyphicon glyphicon-map-marker"></span> Show on map</a>
</li>
{% endif %}
</ul>
{% endblock %}
{% macro row(form, form_opts={}) %}
<div class="row">
{{ caller() }}
</div>
{% endmacro %}
{% macro split(form, form_opts={}) %}
<div class="col-md-6">
{{ caller() }}
</div>
{% endmacro %}
{% macro render_submit() %}
<div class="row">
<div class="pull-right">
<input type="submit" class="btn btn-primary btn-lg" value="{{ _gettext('Save') }}" />
</div>
</div>
{% endmacro %}
{% macro render_readonly(form, name, field) %}
<div class="form-group">
<label for="" class="col-md-2 control-label">{{ name }}</label>
<div class="col-md-10" style="white-space: pre-line;"><div class="checkbox">{% if model is defined %}{{ model[field] }}{% endif %}</div></div>
</div>
{% endmacro %}