README.md edited
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n static jet_dashboard_tags %}
|
||||
|
||||
{% block html %}{% get_dashboard 'app_index' as dashboard %}{{ block.super }}{% endblock %}
|
||||
|
||||
{% block extrastyle %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />
|
||||
|
||||
{% for css in dashboard.media.css %}
|
||||
<link href="{% static css %}" rel="stylesheet" />
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extrahead %}
|
||||
{{ block.super }}
|
||||
|
||||
{% for js in dashboard.media.js %}
|
||||
<script src="{% static js %}"></script>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }} dashboard jet app-{{ app_label }}{% endblock %}
|
||||
|
||||
{% block sidebar %}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{% if not is_popup %}
|
||||
<div class="breadcrumbs"></div>
|
||||
{% endif %}
|
||||
|
||||
{{ dashboard.render_tools }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ dashboard.render }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,37 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n admin_static jet_dashboard_tags static %}
|
||||
|
||||
{% block html %}{% get_dashboard 'index' as dashboard %}{{ block.super }}{% endblock %}
|
||||
|
||||
{% block extrastyle %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />
|
||||
|
||||
{% for css in dashboard.media.css %}
|
||||
<link href="{% static css %}" rel="stylesheet" />
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extrahead %}
|
||||
{{ block.super }}
|
||||
|
||||
{% for js in dashboard.media.js %}
|
||||
<script src="{% static js %}"></script>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }} dashboard jet{% endblock %}
|
||||
|
||||
{% block sidebar %}{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{% if not is_popup %}
|
||||
<div class="breadcrumbs"></div>
|
||||
{% endif %}
|
||||
|
||||
{{ dashboard.render_tools }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ dashboard.render }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,37 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="dashboard-container columns_{{ columns|length }} cf">
|
||||
{% for i in columns %}
|
||||
<div class="dashboard-column-wrapper">
|
||||
<div class="dashboard-column{% if forloop.first %} first{% endif %}">
|
||||
{% for module in modules %}
|
||||
{% if module.model.column == i %}
|
||||
{% include "jet.dashboard/module.html" with module=module %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="dialog-confirm" id="module-remove-dialog" title="{% trans "Delete widget" %}">
|
||||
<p>{% trans "Are you sure want to delete this widget?" %}</p>
|
||||
</div>
|
||||
|
||||
<form action="{% url "jet-dashboard:update_dashboard_modules" %}" method="POST" id="update-dashboard-modules-form">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="app_label" value="{% if app_label %}{{ app_label }}{% endif %}">
|
||||
<input type="hidden" name="modules">
|
||||
</form>
|
||||
|
||||
<form action="{% url "jet-dashboard:update_dashboard_module_collapse" %}" method="POST" id="update-dashboard-module-collapse-form">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="id">
|
||||
<input type="hidden" name="collapsed">
|
||||
</form>
|
||||
|
||||
<form action="{% url "jet-dashboard:remove_dashboard_module" %}" method="POST" id="remove-dashboard-module-form">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="id">
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="dashboard-tools-toggle-container">
|
||||
<a href="#" class="dashboard-tools-toggle button">
|
||||
<span class="dashboard-tools-toggle-icon icon-settings"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="dashboard-tools">
|
||||
<form action="{% url "jet-dashboard:add_user_dashboard_module" %}" method="POST" id="add-dashboard-module-form">
|
||||
{% csrf_token %}
|
||||
<select class="add-dashboard" name="module">
|
||||
<option>{% trans "widgets" %}</option>
|
||||
<optgroup label="{% trans "available" %}">
|
||||
{% for module in available_children %}
|
||||
<option value="{{ forloop.counter0 }}" data-type="available_children">{{ module.title }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
<optgroup label="{% trans "initials" %}">
|
||||
{% for module in children %}
|
||||
<option value="{{ forloop.counter0 }}" data-type="children">{{ module.title }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
</select><a href="#" class="button add-dashboard-link" title="{% trans "Add" %}"><span class="add-dashboard-link-icon icon-add"></span><span class="add-dashboard-link-label">{% trans "Add" %}</span></a>
|
||||
<input type="hidden" name="app_label" value="{% if app_label %}{{ app_label }}{% endif %}">
|
||||
<input type="hidden" name="type" value="">
|
||||
<a href="#" class="button transparent reset-dashboard-link" title="{% trans "Reset widgets" %}"><span class="reset-dashboard-link-icon icon-reset"></span><span class="reset-dashboard-link-label">{% trans "Reset widgets" %}</span></a>
|
||||
</form>
|
||||
<form action="{% url "jet-dashboard:reset_dashboard" %}" method="POST" id="reset-dashboard-form">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="app_label" value="{% if app_label %}{{ app_label }}{% endif %}">
|
||||
</form>
|
||||
<div class="dialog-confirm" id="reset-dashboard-dialog" title="{% trans "Reset widgets" %}">
|
||||
<p>{% trans "Are you sure want to reset widgets?" %}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="dashboard-item{% if module.collapsible %} collapsible{% endif %}{% if module.model.collapsed %} collapsed{% endif %}{% if module.deletable %} deletable{% endif %}{% if module.ajax_load %} ajax{% endif %}{% if module.draggable %} draggable{% endif %}"{% if module.ajax_load %} data-ajax-url="{% url "jet-dashboard:load_dashboard_module" pk=module.model.id %}"{% endif %} data-module-id="{{ module.model.id }}">
|
||||
<div class="dashboard-item-header">
|
||||
{% if module.draggable %}
|
||||
<span class="dashboard-item-header-drag icon-grid"></span>
|
||||
{% endif %}
|
||||
<span class="dashboard-item-header-buttons">
|
||||
<a href="{% url "jet-dashboard:update_module" pk=module.model.id %}" title="{% trans "Change" %}"><span class="icon-edit"></span></a>
|
||||
|
||||
{% if module.deletable %}
|
||||
<a href="#" title="{% trans "Delete" %}" class="dashboard-item-remove"><span class="icon-cross"></span></a>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="dashboard-item-header-title">
|
||||
{% if module.collapsible %}
|
||||
<a href="#" class="dashboard-item-collapse"><span class="dashboard-item-header-collapse-button icon-arrow-down"></span></a>
|
||||
<a href="#" class="dashboard-item-collapse"><span class="dashboard-item-header-collapse-button icon-arrow-up"></span></a>
|
||||
{% endif %}
|
||||
|
||||
{% if module.title_url %}
|
||||
<a href="{{ module.title_url }}">{{ module.title }}</a>
|
||||
{% else %}
|
||||
{{ module.title }}
|
||||
{% endif %}
|
||||
</span>
|
||||
<div class="cf"></div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-item-content{% if module.contrast %} contrast{% endif %}"{% if module.style %} style="{{ module.style }}"{% endif %}>
|
||||
{{ module.pre_content|default_if_none:"" }}
|
||||
{% if module.ajax_load %}
|
||||
<div class="loading-indicator-wrapper">
|
||||
<span class="icon-refresh loading-indicator"></span>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ module.render }}
|
||||
{% endif %}
|
||||
{{ module.post_content|default_if_none:"" }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
{% load i18n %}
|
||||
|
||||
<ul>
|
||||
{% for app in module.children %}
|
||||
<li class="contrast">
|
||||
{% if app.name != app.app_label|capfirst|escape %}
|
||||
<a href="{{ app.app_url }}" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">{{ app.name }}</a>
|
||||
{% else %}
|
||||
{% trans app.app_label as app_label %}
|
||||
<a href="{{ app.app_url }}" title="{% blocktrans with name=app_label %}Models in the {{ name }} application{% endblocktrans %}">{{ app_label }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
{% for model in app.models %}
|
||||
<li>
|
||||
<span class="float-right">
|
||||
{% if model.add_url %}
|
||||
<a href="{{ model.add_url }}" class="addlink" title="{% trans 'Add' %}"></a>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if model.admin_url %}
|
||||
<a href="{{ model.admin_url }}" class="changelink" title="{% trans 'Change' %}"></a>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</span>
|
||||
|
||||
{% if model.admin_url %}
|
||||
<a href="{{ model.admin_url }}">{{ model.name }}</a>
|
||||
{% else %}
|
||||
{{ model.name }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -0,0 +1,16 @@
|
||||
{% load i18n %}
|
||||
|
||||
<ul>
|
||||
{% if module.children %}
|
||||
{% for child in module.children %}
|
||||
<li>
|
||||
{% if child.date %}<span class="float-right dim">{{ child.date|date }}</span>{% endif %}
|
||||
{% if child.warning %}<span class="warning">{{ child.title }}</span>{% else %}<a href="{{ child.link }}" target="_blank" class="nowrap"><span class="icon-open-external"></span> {{ child.title }}</a>{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li>
|
||||
{% trans "Nothing to show" %}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
@@ -0,0 +1,38 @@
|
||||
{% load i18n %}
|
||||
|
||||
|
||||
{% if module.error %}
|
||||
<ul>
|
||||
<li>
|
||||
{{ module.error }}
|
||||
</li>
|
||||
</ul>
|
||||
{% elif module.children %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "users" as label %}{{ label|capfirst }}</th>
|
||||
<th>{% trans "sessions" as label %}{{ label|capfirst }}</th>
|
||||
<th>{% trans "views" as label %}{{ label|capfirst }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for data in module.children %}
|
||||
<tr>
|
||||
<th>{{ data.0 }}</th>
|
||||
<td width="1" align="center">{{ data.1.ga_users }}</td>
|
||||
<td width="1" align="center">{{ data.1.ga_sessions }}</td>
|
||||
<td width="1" align="center">{{ data.1.ga_pageviews }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<ul>
|
||||
<li>
|
||||
{% trans "Nothing to show" %}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if module.error %}
|
||||
<ul>
|
||||
<li>
|
||||
{{ module.error }}
|
||||
</li>
|
||||
</ul>
|
||||
{% elif module.children %}
|
||||
<div class="padding center">
|
||||
<canvas id="chart_{{ module.model.pk }}" style="width: 100%;">
|
||||
<div class="chart-fillColor"></div>
|
||||
<div class="chart-strokeColor"></div>
|
||||
<div class="chart-pointColor"></div>
|
||||
<div class="chart-pointHighlightFill"></div>
|
||||
<div class="chart-scaleGridLineColor"></div>
|
||||
<div class="chart-scaleLineColor"></div>
|
||||
<div class="chart-scaleFontColor"></div>
|
||||
<div class="chart-data">
|
||||
{% for data in module.children %}
|
||||
<div class="chart-data-item" data-date="{{ data.0|date:"d/m" }}" data-value="{{ data.1 }}"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</canvas>
|
||||
<script>jet.jQuery('#chart_{{ module.model.pk }}').googleAnalyticsChart();</script>
|
||||
</div>
|
||||
{% else %}
|
||||
<ul>
|
||||
<li>
|
||||
{% trans "Nothing to show" %}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,26 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if module.error %}
|
||||
<ul>
|
||||
<li>
|
||||
{{ module.error }}
|
||||
</li>
|
||||
</ul>
|
||||
{% elif module.children %}
|
||||
<div class="padding center">
|
||||
<ul class="inline bordered">
|
||||
{% for statistic in module.children %}
|
||||
<li>
|
||||
<div class="big">{{ statistic.value }}</div>
|
||||
<div class="dim">{{ statistic.title }}</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<ul>
|
||||
<li>
|
||||
{% trans "Nothing to show" %}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,29 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if module.children %}
|
||||
{% if module.layout == "stacked" %}
|
||||
<ul>
|
||||
{% for link in module.children %}
|
||||
<li>
|
||||
<a href="{{ link.url }}">{% if link.external %}<span class="icon-open-external"></span> {% endif %}{{ link.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% elif module.layout == "inline" %}
|
||||
<div class="padding center">
|
||||
<ul class="inline">
|
||||
{% for link in module.children %}
|
||||
<li>
|
||||
<a href="{{ link.url }}" class="nowrap">{% if link.external %}<span class="icon-open-external"></span> {% endif %}{{ link.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<ul>
|
||||
<li>
|
||||
{% trans "Nothing to show" %}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,27 @@
|
||||
{% load i18n %}
|
||||
|
||||
<ul>
|
||||
{% for model in module.children %}
|
||||
<li>
|
||||
<span class="float-right">
|
||||
{% if model.add_url %}
|
||||
<a href="{{ model.add_url }}" class="addlink" title="{% trans 'Add' %}"></a>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if model.admin_url %}
|
||||
<a href="{{ model.admin_url }}" class="changelink" title="{% trans 'Change' %}"></a>
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</span>
|
||||
|
||||
{% if model.admin_url %}
|
||||
<a href="{{ model.admin_url }}">{{ model.name }}</a>
|
||||
{% else %}
|
||||
{{ model.name }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -0,0 +1,42 @@
|
||||
{% load i18n jet_dashboard_tags %}
|
||||
|
||||
<ul>
|
||||
{% if not module.children %}
|
||||
<li>
|
||||
{% trans 'None available' %}
|
||||
</li>
|
||||
{% else %}
|
||||
{% for entry in module.children %}
|
||||
<li>
|
||||
<span class="float-right">
|
||||
<span class="icon-user tooltip" title="{{ entry.user }}"></span>
|
||||
<span class="icon-clock tooltip" title="{{ entry.action_time }}"></span>
|
||||
</span>
|
||||
|
||||
<div class="nowrap">
|
||||
{% if entry.is_addition %}
|
||||
<span class="icon-add3"></span>
|
||||
{% endif %}
|
||||
{% if entry.is_change %}
|
||||
<span class="icon-edit"></span>
|
||||
{% endif %}
|
||||
{% if entry.is_deletion %}
|
||||
<span class="icon-cross"></span>
|
||||
{% endif %}
|
||||
|
||||
{% if entry.content_type %}
|
||||
<span>{% filter capfirst %}{{ entry.content_type }}{% endfilter %}</span>
|
||||
{% else %}
|
||||
<span>{% trans 'Unknown content' %}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if entry.is_deletion or not entry.get_admin_url %}
|
||||
<span class="tooltip" title="{{ entry|format_change_message }}">{{ entry.object_repr }}</span>
|
||||
{% else %}
|
||||
<a title="{{ entry|format_change_message }}" class="tooltip" href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
@@ -0,0 +1,38 @@
|
||||
{% load i18n %}
|
||||
|
||||
|
||||
{% if module.error %}
|
||||
<ul>
|
||||
<li>
|
||||
{{ module.error }}
|
||||
</li>
|
||||
</ul>
|
||||
{% elif module.children %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Date" %}</th>
|
||||
<th>{% trans "visitors" as label %}{{ label|capfirst }}</th>
|
||||
<th>{% trans "visits" as label %}{{ label|capfirst }}</th>
|
||||
<th>{% trans "views" as label %}{{ label|capfirst }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for data in module.children %}
|
||||
<tr>
|
||||
<th>{{ data.0 }}</th>
|
||||
<td width="1" align="center">{{ data.1.visitors }}</td>
|
||||
<td width="1" align="center">{{ data.1.visits }}</td>
|
||||
<td width="1" align="center">{{ data.1.page_views }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<ul>
|
||||
<li>
|
||||
{% trans "Nothing to show" %}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if module.error %}
|
||||
<ul>
|
||||
<li>
|
||||
{{ module.error }}
|
||||
</li>
|
||||
</ul>
|
||||
{% elif module.children %}
|
||||
<div class="padding center">
|
||||
<canvas id="chart_{{ module.model.pk }}" style="width: 100%;">
|
||||
<div class="chart-fillColor"></div>
|
||||
<div class="chart-strokeColor"></div>
|
||||
<div class="chart-pointColor"></div>
|
||||
<div class="chart-pointHighlightFill"></div>
|
||||
<div class="chart-scaleGridLineColor"></div>
|
||||
<div class="chart-scaleLineColor"></div>
|
||||
<div class="chart-scaleFontColor"></div>
|
||||
<div class="chart-data">
|
||||
{% for data in module.children %}
|
||||
<div class="chart-data-item" data-date="{{ data.0|date:"d/m" }}" data-value="{{ data.1 }}"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</canvas>
|
||||
<script>jet.jQuery('#chart_{{ module.model.pk }}').yandexMetrikaChart();</script>
|
||||
</div>
|
||||
{% else %}
|
||||
<ul>
|
||||
<li>
|
||||
{% trans "Nothing to show" %}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,26 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if module.error %}
|
||||
<ul>
|
||||
<li>
|
||||
{{ module.error }}
|
||||
</li>
|
||||
</ul>
|
||||
{% elif module.children %}
|
||||
<div class="padding center">
|
||||
<ul class="inline bordered">
|
||||
{% for statistic in module.children %}
|
||||
<li>
|
||||
<div class="big">{{ statistic.value }}</div>
|
||||
<div class="dim">{{ statistic.title }}</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<ul>
|
||||
<li>
|
||||
{% trans "Nothing to show" %}
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,89 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n jet_tags static %}
|
||||
|
||||
{% if not is_popup %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
||||
{% if app %}
|
||||
› <a href="{{ app.app_url }}">{% if app.name != app.app_label|capfirst|escape %}{{ app.name }}{% else %}{% trans app.app_label as app_label %}{{ app_label|capfirst|escape }}{% endif %}</a>
|
||||
{% endif %}
|
||||
› {{ object.title|capfirst }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }} dashboard jet change-form{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content-main">
|
||||
{% block object-tools %}{% endblock %}
|
||||
|
||||
<form action="" method="post" novalidate>{% csrf_token %}{% block form_top %}{% endblock %}
|
||||
<div>
|
||||
{% if form.errors or settings_form.errors %}
|
||||
<p class="errornote">{% trans "Please correct the errors below." %}</p>
|
||||
{% endif %}
|
||||
|
||||
{% block field_sets %}
|
||||
<fieldset class="module aligned">
|
||||
{% include "jet.dashboard/update_module_fieldset.html" with form=form wrap=False %}
|
||||
|
||||
{% if settings_form %}
|
||||
{% include "jet.dashboard/update_module_fieldset.html" with form=settings_form wrap=False %}
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
{% endblock %}
|
||||
|
||||
{% block after_field_sets %}{% endblock %}
|
||||
|
||||
{% block inline_field_sets %}
|
||||
{% if children_formset %}
|
||||
<div class="inline-group">
|
||||
<fieldset class="module">
|
||||
<h2>{{ child_name_plural }}</h2>
|
||||
|
||||
{{ children_formset.management_form }}
|
||||
{{ children_formset.non_form_errors }}
|
||||
|
||||
{% for form in children_formset %}
|
||||
<div class="inline-related{% if forloop.last %} empty-form last-related{% else %} has_original{% endif %}">
|
||||
<h3>
|
||||
<b>{{ child_name|capfirst }}:</b> <span class="inline_label">#{{ forloop.counter }}</span>
|
||||
|
||||
{% if forloop.last %}
|
||||
<span><a href="#" class="inline-deletelink">{% trans "Delete" %}</a></span>
|
||||
{% elif children_formset.can_delete %}
|
||||
<span class="delete"><label>{{ form.DELETE }} {% trans "Delete" %}</label></span>
|
||||
{% endif %}
|
||||
</h3>
|
||||
|
||||
{% if form.non_field_errors %}{{ form.non_field_errors }}{% endif %}
|
||||
|
||||
{% include "jet.dashboard/update_module_fieldset.html" with form=form %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% with child_name as verbose_name %}
|
||||
<div class="add-row">
|
||||
<a href="#">{% blocktrans %}Add another {{ verbose_name }}{% endblocktrans %}</a>
|
||||
</div>
|
||||
{% endwith %}
|
||||
</fieldset>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block after_related_objects %}{% endblock %}
|
||||
|
||||
{% block submit_buttons_bottom %}
|
||||
<div class="submit-row">
|
||||
<input type="submit" value="{% trans 'Save' %}" class="default" name="_save" />
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block admin_change_form_document_ready %}{% endblock %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,22 @@
|
||||
{% load i18n jet_tags %}
|
||||
|
||||
{% if wrap != False %}<fieldset class="module aligned">{% endif %}
|
||||
{% for field in form %}
|
||||
{% if field.name != 'DELETE' %}
|
||||
<div class="form-row{% if field.errors %} errors{% endif %}">
|
||||
{{ field.errors }}
|
||||
|
||||
{% if field|jet_is_checkbox %}
|
||||
{{ field }} <label{% if field.field.required %} class="required"{% endif %} for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
{% else %}
|
||||
<label{% if field.field.required %} class="required"{% endif %} for="{{ field.id_for_label }}">{{ field.label }}:</label>
|
||||
{{ field }}
|
||||
{% endif %}
|
||||
|
||||
{% if field.field.help_text %}
|
||||
<p class="help">{{ field.field.help_text|safe }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if wrap != False %}</fieldset>{% endif %}
|
||||
Reference in New Issue
Block a user