forked from extern/django-helpdesk
Fix templates and javascript for reports
This commit is contained in:
parent
d5a06a8082
commit
7c64a01e6f
@ -16,14 +16,12 @@
|
|||||||
<p>{% trans "You haven't created any tickets yet, so you cannot run any reports." %}</p>
|
<p>{% trans "You haven't created any tickets yet, so you cannot run any reports." %}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
<div class="row">
|
<div class="card mb-3">
|
||||||
<div class="col-lg-12">
|
<div class="card-header">
|
||||||
<div class="panel panel-primary">
|
<i class="fas fa-info-circle"></i>
|
||||||
<div class="panel-heading">
|
|
||||||
{% trans "Current Ticket Stats" %}
|
{% trans "Current Ticket Stats" %}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.panel-heading -->
|
<div class="card-body">
|
||||||
<div class="panel-body">
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-bordered table-hover">
|
<table class="table table-striped table-bordered table-hover">
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -65,20 +63,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.table-responsive -->
|
<!-- /.table-responsive -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.panel-body -->
|
<!-- /.card-body -->
|
||||||
</div>
|
|
||||||
<!-- /.panel -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.card -->
|
||||||
|
|
||||||
<div class="row">
|
<div class="card mb-3">
|
||||||
<div class="col-lg-12">
|
<div class="card-header">
|
||||||
<div class="panel panel-primary">
|
<i class="fas fa-print"></i>
|
||||||
<div class="panel-heading">
|
|
||||||
{% trans "Generate Report" %}
|
{% trans "Generate Report" %}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.panel-heading -->
|
<div class="card-body">
|
||||||
<div class="panel-body">
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>{% trans "Reports By User" %}
|
<li>{% trans "Reports By User" %}
|
||||||
<ul>
|
<ul>
|
||||||
@ -98,10 +92,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.panel-body -->
|
<!-- /.card-body -->
|
||||||
</div>
|
|
||||||
<!-- /.panel -->
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.card -->
|
||||||
|
|
||||||
{% endif %}{% endblock %}
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
@ -5,6 +5,77 @@
|
|||||||
|
|
||||||
{% block helpdesk_head %}
|
{% block helpdesk_head %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block helpdesk_breadcrumb %}
|
||||||
|
<li class="breadcrumb-item">
|
||||||
|
<a href="{% url 'helpdesk:report_index' %}">{% trans "Reports & Statistics" %}</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item active">{{ title }}</li>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block helpdesk_body %}
|
||||||
|
<h2>{% trans "Reports & Statistics" %}</h2>
|
||||||
|
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-header">
|
||||||
|
<i class="fas fa-filter"></i>
|
||||||
|
{% trans 'Saved Queries' %}
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{% if user_saved_queries_ %}
|
||||||
|
<p>{% trans "You can run this query on filtered data by using one of your saved queries." %}</p>
|
||||||
|
<form method='GET' action='./'>
|
||||||
|
<label for='saved_query'>{% trans "Select Query:" %}</label>
|
||||||
|
<select name='saved_query'>
|
||||||
|
<option value="">--------</option>{% for q in user_saved_queries_ %}
|
||||||
|
<option value="{{ q.id }}"{% ifequal saved_query q %} selected{% endifequal %}>{{ q.title }}</option>{% endfor %}
|
||||||
|
</select>
|
||||||
|
<input class="btn btn-primary" type='submit' value='{% trans "Filter Report" %}'>
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<p>{% trans "Want to filter this report to just show a subset of data? Go to the Ticket List, filter your query, and save your query." %}</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card -->
|
||||||
|
|
||||||
|
<div class="card mb-3">
|
||||||
|
<div class="card-header">
|
||||||
|
<i class="fas fa-chart-line"></i>
|
||||||
|
{{ title }}
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-bordered table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>{% for h in headings %}
|
||||||
|
<th>{% if forloop.first %}{{ h|title }}{% else %}{{ h }}{% endif %}</th>{% endfor %}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for d in data %}
|
||||||
|
<tr class='row_{% cycle 'odd' 'even' %}'>
|
||||||
|
{% for f in d %}<td class='report'>{{ f }}</td>{% endfor %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.table-responsive -->
|
||||||
|
<div class="flot-chart">
|
||||||
|
<div class="flot-chart-content" id="chart-content"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card -->
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block helpdesk_js %}
|
||||||
|
|
||||||
<!-- Flot Charts JavaScript -->
|
<!-- Flot Charts JavaScript -->
|
||||||
<script src="/static/helpdesk/vendor/flot/excanvas.min.js"></script>
|
<script src="/static/helpdesk/vendor/flot/excanvas.min.js"></script>
|
||||||
<script src="/static/helpdesk/vendor/flot/jquery.flot.js"></script>
|
<script src="/static/helpdesk/vendor/flot/jquery.flot.js"></script>
|
||||||
@ -23,79 +94,6 @@
|
|||||||
<script src="{% static 'helpdesk/vendor/morrisjs/morris.min.js' %}"></script>
|
<script src="{% static 'helpdesk/vendor/morrisjs/morris.min.js' %}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block helpdesk_breadcrumb %}
|
|
||||||
<li class="breadcrumb-item">
|
|
||||||
<a href="{% url 'helpdesk:report_index' %}">{% trans "Reports & Statistics" %}</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumb-item active">{{ title }}</li>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block helpdesk_body %}
|
|
||||||
<h2>{% trans "Reports & Statistics" %}</h2>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<div class="panel panel-primary">
|
|
||||||
<div class="panel-heading">
|
|
||||||
{% trans 'Saved Queries' %}
|
|
||||||
</div>
|
|
||||||
<!-- /.panel-heading -->
|
|
||||||
<div class="panel-body">
|
|
||||||
{% if user_saved_queries_ %}
|
|
||||||
<p>{% trans "You can run this query on filtered data by using one of your saved queries." %}</p>
|
|
||||||
<form method='GET' action='./'>
|
|
||||||
<label for='saved_query'>{% trans "Select Query:" %}</label>
|
|
||||||
<select name='saved_query'>
|
|
||||||
<option value="">--------</option>{% for q in user_saved_queries_ %}
|
|
||||||
<option value="{{ q.id }}"{% ifequal saved_query q %} selected{% endifequal %}>{{ q.title }}</option>{% endfor %}
|
|
||||||
</select>
|
|
||||||
<input class="btn btn-primary" type='submit' value='{% trans "Filter Report" %}'>
|
|
||||||
</form>
|
|
||||||
{% else %}
|
|
||||||
<p>{% trans "Want to filter this report to just show a subset of data? Go to the Ticket List, filter your query, and save your query." %}</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<!-- /.panel-body -->
|
|
||||||
</div>
|
|
||||||
<!-- /.panel -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<div class="panel panel-primary">
|
|
||||||
<div class="panel-heading">
|
|
||||||
{{ title }}
|
|
||||||
</div>
|
|
||||||
<!-- /.panel-heading -->
|
|
||||||
<div class="panel-body">
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-striped table-bordered table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>{% for h in headings %}
|
|
||||||
<th>{% if forloop.first %}{{ h|title }}{% else %}{{ h }}{% endif %}</th>{% endfor %}
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for d in data %}<tr class='row_{% cycle 'odd' 'even' %}'>
|
|
||||||
{% for f in d %}<td class='report'>{{ f }}</td>{% endfor %}
|
|
||||||
</tr>{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<!-- /.table-responsive -->
|
|
||||||
<div class="flot-chart">
|
|
||||||
<div class="flot-chart-content" id="chart-content"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- /.panel-body -->
|
|
||||||
</div>
|
|
||||||
<!-- /.panel -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if charttype == "date" %}
|
{% if charttype == "date" %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user