mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-11 09:09:42 +00:00
Modified configs so that templates are rendered. Functionality and styling are NOT complete (need to change css framework)
This commit is contained in:
17
assets/templates/helpers/paginator.html
Normal file
17
assets/templates/helpers/paginator.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% if is_paginated %}
|
||||
<ul class="pagination center-align">
|
||||
{% if page_obj.has_previous %}
|
||||
<li class="waves-effect"><a href="?page={{ page_obj.previous_page_number }}" class="no-pad"><i class="material-icons nnt-purple">chevron_left</i></a></li>
|
||||
{% else %}
|
||||
<li class="disabled"><i class="material-icons grey-text">chevron_left</i></li>
|
||||
{% endif %}
|
||||
|
||||
<li class="nnt-orange" id="page">{{ page_obj.number }} of {{ page_obj.paginator.num_pages }}</li>
|
||||
|
||||
{% if page_obj.has_next %}
|
||||
<li class="waves-effect"><a href="?page={{ page_obj.next_page_number }}" class="no-pad"><i class="material-icons nnt-purple">chevron_right</i></a></li>
|
||||
{% else %}
|
||||
<li class="disabled"><i class="material-icons grey-text">chevron_right</i></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
15
assets/templates/helpers/render_field.html
Normal file
15
assets/templates/helpers/render_field.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% load widget_tweaks %}
|
||||
|
||||
<div class="input-field col {{ width|default:'s12' }}">
|
||||
{% if css %}
|
||||
{% render_field field|add_class:css %}
|
||||
{% elif disable_if_filled and field.value %}
|
||||
{% render_field field|attr:'disabled' %}
|
||||
{% elif css and disable_if_filled %}
|
||||
{% render_field field|add_class:css|attr:'disabled' %}
|
||||
{% else %}
|
||||
{{ field }}
|
||||
{% endif %}
|
||||
<label for="{{ field.id_for_label }}">{{ label|default:field.label }}</label>
|
||||
<span class="helper-text" data-error="{{ field.errors.text }}"></span>
|
||||
</div>
|
||||
Reference in New Issue
Block a user