Skip to content
Snippets Groups Projects
Commit ac1a2f00 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

page listing configuration items implemented

parent 1c1be052
No related branches found
No related tags found
1 merge request!36Resolve "configuration panel"
<li><a href="{% url 'web.views.appointments' %}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">
<a href="{% url 'web.views.configuration' %}">Configuration</a>
</li>
{% extends "_base.html" %}
{% load static %}
{% block styles %}
{{ block.super }}
<!-- DataTables -->
<link rel="stylesheet" href="{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.css' %}">
{% endblock styles %}
{% block ui_active_tab %}'configuration'{% endblock ui_active_tab %}
{% block page_header %}Configuration{% endblock page_header %}
{% block page_description %}{% endblock page_description %}
{% block title %}{{ block.super }} - Configuration{% endblock %}
{% block breadcrumb %}
{% include "configuration/breadcrumb.html" %}
{% endblock breadcrumb %}
{% block maincontent %}
<div>
<div>
<table id="table" class="table table-bordered table-striped">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<hr/>
</div>
</div>
{% endblock maincontent %}
{% block scripts %}
{{ block.super }}
<script src="{% static 'AdminLTE/plugins/datatables/jquery.dataTables.min.js' %}"></script>
<script src="{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.min.js' %}"></script>
<script src="{% static 'AdminLTE/plugins/moment.js/moment.min.js' %}"></script>
<script>
$(function () {
$(function () {
var table = $('#table').DataTable({
serverSide: true,
processing: true,
ordering: false,
ajax: "{% url 'web.api.configuration_items' %}",
columns: [
{"data": "name"},
{"data": "value"},
],
});
$('#table_filter').css("display", "none");
});
});
</script>
{% endblock scripts %}
......@@ -58,4 +58,11 @@
</a>
</li>
<li data-desc="configuration">
<a href="{% url 'web.views.configuration' %}">
<i class="fa fa-wrench"></i>
<span>Configuration</span>
</a>
</li>
</ul>
\ No newline at end of file
......@@ -115,6 +115,12 @@ urlpatterns = [
url(r'^export$', views.export.export, name='web.views.export'),
url(r'^export/(?P<type>[A-z]+)$', views.export.export_to_csv2, name='web.views.export_to_csv2'),
####################
# CONFIGURATION #
####################
url(r'^configuration$', views.configuration_item.configuration_items, name='web.views.configuration'),
####################
# AUTH #
####################
......
......@@ -61,3 +61,4 @@ import mails
import statistics
import export
import contact_attempt
import configuration_item
# coding=utf-8
from . import wrap_response
def configuration_items(request):
return wrap_response(request, "configuration/index.html", {})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment