misc: apply djhtml (#69422)
This commit is contained in:
parent
f0eee6137f
commit
318d6fb378
|
@ -3,14 +3,14 @@
|
|||
<div class="errornotice">
|
||||
<p>{% trans "There were errors processing your form." %}</p>
|
||||
{% for error in form.non_field_errors %}
|
||||
<p>{{ error }}</p>
|
||||
<p>{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% for field in form %}
|
||||
{% if field.is_hidden and field.errors %}
|
||||
<p>
|
||||
{% for error in field.errors %}
|
||||
{% blocktrans with name=field.name %}(Hidden field {{name}}) {{ error }}{% endblocktrans %}
|
||||
{% if not forloop.last %}<br>{% endif %}
|
||||
{% blocktrans with name=field.name %}(Hidden field {{name}}) {{ error }}{% endblocktrans %}
|
||||
{% if not forloop.last %}<br>{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
|
|
@ -11,47 +11,47 @@ Expected context variables:
|
|||
|
||||
{% endcomment %}
|
||||
{% if page_obj.paginator.num_pages > 1 %}
|
||||
{% with page_key=page_key|default:"page" %}
|
||||
{% spaceless %}
|
||||
<p class="paginator">
|
||||
{% if page_obj.number > 4 %}
|
||||
<a href="{% querystring page_key=1 without without_key %}{{ anchor }}">1</a>
|
||||
…
|
||||
{% else %}
|
||||
{% if page_obj.number >= 3 %}
|
||||
<a href="{% querystring page_key=1 without without_key %}{{ anchor }}">1</a>
|
||||
{% if page_obj.number == 4 %}
|
||||
<a href="{% querystring page_key=2 without without_key %}{{ anchor }}">2</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% with page_key=page_key|default:"page" %}
|
||||
{% spaceless %}
|
||||
<p class="paginator">
|
||||
{% if page_obj.number > 4 %}
|
||||
<a href="{% querystring page_key=1 without without_key %}{{ anchor }}">1</a>
|
||||
…
|
||||
{% else %}
|
||||
{% if page_obj.number >= 3 %}
|
||||
<a href="{% querystring page_key=1 without without_key %}{{ anchor }}">1</a>
|
||||
{% if page_obj.number == 4 %}
|
||||
<a href="{% querystring page_key=2 without without_key %}{{ anchor }}">2</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="{% querystring page_key=page_obj.previous_page_number without without_key %}{{ anchor }}">{{ page_obj.previous_page_number }}</a>
|
||||
{% endif %}
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="{% querystring page_key=page_obj.previous_page_number without without_key %}{{ anchor }}">{{ page_obj.previous_page_number }}</a>
|
||||
{% endif %}
|
||||
|
||||
<span class="this-page">{{ page_obj.number }}</span>
|
||||
<span class="this-page">{{ page_obj.number }}</span>
|
||||
|
||||
{% if page_obj.has_next %}
|
||||
<a href="{% querystring page_key=page_obj.next_page_number without without_key %}{{ anchor }}">{{ page_obj.next_page_number }}</a>
|
||||
{% endif %}
|
||||
{% if page_obj.has_next %}
|
||||
<a href="{% querystring page_key=page_obj.next_page_number without without_key %}{{ anchor }}">{{ page_obj.next_page_number }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if page_obj.number < page_obj.paginator.num_pages|add:"-3" %}
|
||||
{% if page_obj.next_page_number != page_obj.paginator.num_pages %}
|
||||
…
|
||||
<a href="{% querystring page_key=page_obj.paginator.num_pages without without_key %}{{ anchor }}">{{ page_obj.paginator.num_pages }}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if page_obj.number <= page_obj.paginator.num_pages|add:"-2" %}
|
||||
{% if page_obj.number == page_obj.paginator.num_pages|add:"-3" %}
|
||||
{% with a_page_key=page_obj.paginator.num_pages|add:"-1" %}
|
||||
<a href="{% querystring page_key=a_page_key without without_key %}{{ anchor }}">{{ a_page_key }}</a>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
<a href="{% querystring page_key=page_obj.paginator.num_pages without without_key %}{{ anchor }}">{{ page_obj.paginator.num_pages }}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endspaceless %}
|
||||
{% endwith %}
|
||||
{% if page_obj.number < page_obj.paginator.num_pages|add:"-3" %}
|
||||
{% if page_obj.next_page_number != page_obj.paginator.num_pages %}
|
||||
…
|
||||
<a href="{% querystring page_key=page_obj.paginator.num_pages without without_key %}{{ anchor }}">{{ page_obj.paginator.num_pages }}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if page_obj.number <= page_obj.paginator.num_pages|add:"-2" %}
|
||||
{% if page_obj.number == page_obj.paginator.num_pages|add:"-3" %}
|
||||
{% with a_page_key=page_obj.paginator.num_pages|add:"-1" %}
|
||||
<a href="{% querystring page_key=a_page_key without without_key %}{{ anchor }}">{{ a_page_key }}</a>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
<a href="{% querystring page_key=page_obj.paginator.num_pages without without_key %}{{ anchor }}">{{ page_obj.paginator.num_pages }}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endspaceless %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% block widget-attrs %}role="radiogroup"{% endblock %}
|
||||
|
||||
{% block widget-control %}
|
||||
{% for option in field %}
|
||||
{{ option }}
|
||||
{% endfor %}
|
||||
{% for option in field %}
|
||||
{{ option }}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -6,108 +6,108 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
{% block gadjo-favicon %}
|
||||
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
|
||||
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
|
||||
{% endblock %}
|
||||
{% block gadjo-css %}
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/gadjo.css" %}?{% start_timestamp %} "/>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/gadjo.css" %}?{% start_timestamp %} "/>
|
||||
{% block css %}
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/style.css" %}?{% start_timestamp %}"/>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/style.css" %}?{% start_timestamp %}"/>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
{% block gadjo-js %}
|
||||
<script src="{% xstatic 'jquery' 'jquery.min.js' %}"></script>
|
||||
<script src="{% xstatic 'jquery-ui' 'jquery-ui.min.js' %}"></script>
|
||||
<script src="{% static "js/gadjo.js" %}?{% start_timestamp %}"></script>
|
||||
<script src="{% xstatic 'jquery' 'jquery.min.js' %}"></script>
|
||||
<script src="{% xstatic 'jquery-ui' 'jquery-ui.min.js' %}"></script>
|
||||
<script src="{% static "js/gadjo.js" %}?{% start_timestamp %}"></script>
|
||||
{% endblock %}
|
||||
{{ media }}
|
||||
{% block extrascripts %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body data-gadjo="true" {% block bodyargs %}{% endblock %}>
|
||||
<div id="top">
|
||||
{% block sidepage %}
|
||||
{% endblock %}
|
||||
{% block user-links %}
|
||||
<ul class="user-info">
|
||||
{% if global_title %}
|
||||
<li class="ui-platform-name">{% if portal_url %}<a href="{{portal_url}}">{{ global_title }}</a>{% else %}{{ global_title }}{% endif %}</li>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<li class="ui-avatar">{{ user.get_full_name|slice:":1" }}</li>
|
||||
<li class="ui-name">{% block user-name %}{{ user.get_full_name }}{% endblock %}</li>
|
||||
<li class="ui-logout"><a href="{% block logout-url %}index.html{% endblock %}"
|
||||
title="{% trans "Logout" %}"><span class="sr-only">{% trans "Logout" %}</span></a></li>
|
||||
{% endif %}
|
||||
{% block help-link %}
|
||||
<div id="top">
|
||||
{% block sidepage %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block user-links %}
|
||||
<ul class="user-info">
|
||||
{% if global_title %}
|
||||
<li class="ui-platform-name">{% if portal_url %}<a href="{{portal_url}}">{{ global_title }}</a>{% else %}{{ global_title }}{% endif %}</li>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<li class="ui-avatar">{{ user.get_full_name|slice:":1" }}</li>
|
||||
<li class="ui-name">{% block user-name %}{{ user.get_full_name }}{% endblock %}</li>
|
||||
<li class="ui-logout"><a href="{% block logout-url %}index.html{% endblock %}"
|
||||
title="{% trans "Logout" %}"><span class="sr-only">{% trans "Logout" %}</span></a></li>
|
||||
{% endif %}
|
||||
{% block help-link %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="header">
|
||||
{% block site-header %}
|
||||
<h1>{% block site-title %}{% endblock %}</h1>
|
||||
{% block subheader %}{% endblock %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="main">
|
||||
|
||||
<div id="main-content" {% block main-content-attributes %}{% endblock %}>
|
||||
{% block main-content %}
|
||||
<div id="more-user-links">
|
||||
{% block more-user-links %}
|
||||
<span id="breadcrumb">
|
||||
{% block breadcrumb %}
|
||||
<a href="{% block homepage-url %}/{% endblock %}">{% block homepage-title %}{% trans "Homepage" %}{% endblock %}</a>
|
||||
{% endblock %}
|
||||
</span>
|
||||
<div id="main-content" {% block main-content-attributes %}{% endblock %}>
|
||||
{% block main-content %}
|
||||
<div id="more-user-links">
|
||||
{% block more-user-links %}
|
||||
<span id="breadcrumb">
|
||||
{% block breadcrumb %}
|
||||
<a href="{% block homepage-url %}/{% endblock %}">{% block homepage-title %}{% trans "Homepage" %}{% endblock %}</a>
|
||||
{% endblock %}
|
||||
</span>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="content">
|
||||
|
||||
<div id="appbar">
|
||||
{% block appbar %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% block messages %}
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block beforecontent %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
<br style="clear: both;"/>
|
||||
|
||||
{% block aftercontent %}
|
||||
{% endblock %}
|
||||
|
||||
</div> <!-- #content -->
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="content">
|
||||
</div> <!-- #main-content -->
|
||||
|
||||
<div id="appbar">
|
||||
{% block appbar %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% block messages %}
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block beforecontent %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
<br style="clear: both;"/>
|
||||
|
||||
{% block aftercontent %}
|
||||
{% endblock %}
|
||||
|
||||
</div> <!-- #content -->
|
||||
{% block after-main-content %}
|
||||
{% endblock %}
|
||||
</div> <!-- #main-content -->
|
||||
|
||||
{% block after-main-content %}
|
||||
{% block sidebar %}
|
||||
{% endblock %}
|
||||
|
||||
</div> <!-- #main -->
|
||||
|
||||
|
||||
<div id="footer">
|
||||
{% block footer %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% block page-end %}
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% endblock %}
|
||||
|
||||
</div> <!-- #main -->
|
||||
|
||||
|
||||
<div id="footer">
|
||||
{% block footer %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% block page-end %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,39 +1,39 @@
|
|||
{% load gadjo i18n %}
|
||||
<div class="widget
|
||||
{{ field.css_classes }}
|
||||
django-{{ field|field_class_name }}
|
||||
{% if field.errors %}widget-with-error{% endif %}
|
||||
{% if field.field.required %}widget-required{% else %}widget-optional{% endif %}"
|
||||
id="{{field.id_for_label}}_p">
|
||||
{{ field.css_classes }}
|
||||
django-{{ field|field_class_name }}
|
||||
{% if field.errors %}widget-with-error{% endif %}
|
||||
{% if field.field.required %}widget-required{% else %}widget-optional{% endif %}"
|
||||
id="{{field.id_for_label}}_p">
|
||||
{% block widget-title %}
|
||||
<div class="title" id="{{ field.name }}">
|
||||
{{ field.label_tag }}
|
||||
{% if field.field.required %}
|
||||
<span title="{% trans "This field is required." %}" class="required">*</span>
|
||||
{% else %}
|
||||
<span class="optional">{% trans "(optional)" %}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="title" id="{{ field.name }}">
|
||||
{{ field.label_tag }}
|
||||
{% if field.field.required %}
|
||||
<span title="{% trans "This field is required." %}" class="required">*</span>
|
||||
{% else %}
|
||||
<span class="optional">{% trans "(optional)" %}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block widget-content %}
|
||||
<div class="content" aria-labelledby="{{ field.name }}" {% block widget-attrs %}{% endblock %}>
|
||||
{% block widget-error %}
|
||||
{% if field.errors %}
|
||||
<div class="error"><p>
|
||||
{% for error in field.errors %}
|
||||
{{ error }}{% if not forloop.last %}<br>{% endif %}
|
||||
{% endfor %}
|
||||
</p></div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block widget-control %}
|
||||
{{ field }}
|
||||
{% endblock %}
|
||||
{% block widget-hint %}
|
||||
{% if field.help_text %}
|
||||
<div class="hint">{{ field.help_text|safe }}</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="content" aria-labelledby="{{ field.name }}" {% block widget-attrs %}{% endblock %}>
|
||||
{% block widget-error %}
|
||||
{% if field.errors %}
|
||||
<div class="error"><p>
|
||||
{% for error in field.errors %}
|
||||
{{ error }}{% if not forloop.last %}<br>{% endif %}
|
||||
{% endfor %}
|
||||
</p></div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block widget-control %}
|
||||
{{ field }}
|
||||
{% endblock %}
|
||||
{% block widget-hint %}
|
||||
{% if field.help_text %}
|
||||
<div class="hint">{{ field.help_text|safe }}</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue