dossiers: print all quotations
font-awesome styles added for icons effects Closes #5012
This commit is contained in:
parent
181c62ade8
commit
2c6641c85c
|
@ -4,7 +4,7 @@
|
|||
{% block appbar %}
|
||||
<h2>Dossiers</h2>
|
||||
<a href=".">Retourner aux dossiers</a>
|
||||
<button id='print-button'>Imprimer</button>
|
||||
<button id='print-button' class='icon-print'>Imprimer</button>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<table id="dossiers" class="main">
|
||||
<table id="dossiers" class="main screen-only">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">N° dossier
|
||||
|
@ -72,14 +72,14 @@
|
|||
<td>{{ patient_record.object.id }}</td>
|
||||
<td><span class="lastname">{{ patient_record.object.last_name }}</span></td>
|
||||
<td>{{ patient_record.object.first_name }}</td>
|
||||
<td>{{ patient_record.object.birthdate|date:"SHORT_DATE_FORMAT" }}</td>
|
||||
<td>{{ patient_record.object.birthdate|date:"d-m-Y" }}</td>
|
||||
<td class="{{ patient_record.state_class }}">{{ patient_record.state }}</td>
|
||||
<td>{% if patient_record.next_rdv_date %}
|
||||
{{ patient_record.next_rdv_date|date:"DATETIME_FORMAT" }}
|
||||
{{ patient_record.next_rdv_date|date:"d-m-Y, H:i" }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{% if patient_record.last_rdv_date %}
|
||||
{{ patient_record.last_rdv_date|date:"DATETIME_FORMAT" }}
|
||||
{{ patient_record.last_rdv_date|date:"d-m-Y, H:i" }}
|
||||
{% endif %}</td>
|
||||
<td>{% if patient_record.mises %}<span class="icon-ok"></span>{% endif %}</td>
|
||||
<td>{% if patient_record.anap %}<span class="icon-ok"></span>{% endif %}</td>
|
||||
|
@ -90,7 +90,7 @@
|
|||
</table>
|
||||
|
||||
{% if request.GET %}
|
||||
<div class="pagination">
|
||||
<div class="pagination screen-only">
|
||||
<span class="step-links">
|
||||
{% if paginate_patient_records.has_previous %}
|
||||
<a href="?{{ query }}&page={{ paginate_patient_records.previous_page_number }}">««</a>
|
||||
|
|
|
@ -909,16 +909,22 @@ class PatientRecordsQuotationsView(cbv.ListView):
|
|||
service=self.service)
|
||||
patient_records = []
|
||||
page = self.request.GET.get('page')
|
||||
paginator = Paginator(ctx['object_list'].filter(), 50)
|
||||
try:
|
||||
paginate_patient_records = paginator.page(page)
|
||||
except PageNotAnInteger:
|
||||
paginate_patient_records = paginator.page(1)
|
||||
except EmptyPage:
|
||||
paginate_patient_records = paginator.page(paginator.num_pages)
|
||||
all = 'all' in self.request.GET
|
||||
if all:
|
||||
patient_records = ctx['object_list']
|
||||
ctx['all'] = all
|
||||
self.template_name = 'dossiers/quotations_print.html'
|
||||
else:
|
||||
paginator = Paginator(ctx['object_list'].filter(), 50)
|
||||
try:
|
||||
patient_records = paginator.page(page)
|
||||
except PageNotAnInteger:
|
||||
patient_records = paginator.page(1)
|
||||
except EmptyPage:
|
||||
patient_records = paginator.page(paginator.num_pages)
|
||||
ctx['paginate_patient_records'] = patient_records
|
||||
|
||||
ctx['patient_records'] = self._get_search_result(paginate_patient_records)
|
||||
ctx['paginate_patient_records'] = paginate_patient_records
|
||||
ctx['patient_records'] = self._get_search_result(patient_records)
|
||||
|
||||
query = self.request.GET.copy()
|
||||
if 'page' in query:
|
||||
|
|
|
@ -89,4 +89,15 @@ div#activity {
|
|||
|
||||
div#activity .header {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* quotations printing */
|
||||
|
||||
table.main {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.main td, table.main th {
|
||||
border: 1px solid #555;
|
||||
padding: 0 .5em;
|
||||
}
|
|
@ -1288,6 +1288,14 @@ div.pagination {
|
|||
.icon-uncheck:before {content: "\f096";margin-right: 5px;}
|
||||
.icon-car:before {content: "\f1b9";margin-right: 5px;}
|
||||
.icon-phone:before { content: "\f095"; margin-right: 3px;}
|
||||
.icon-wip:before {
|
||||
content: "\f110";
|
||||
margin-right: 3px;
|
||||
-webkit-animation: spin 2s infinite linear;
|
||||
-moz-animation: spin 2s infinite linear;
|
||||
-o-animation: spin 2s infinite linear;
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
|
||||
/* periodic event search form */
|
||||
|
||||
|
|
|
@ -375,7 +375,21 @@ function load_tab8_medical() {
|
|||
window.location.href = window.location.pathname;
|
||||
return false;
|
||||
});
|
||||
$('#print-button').click(function() { window.print(); });
|
||||
$('#print-button').click(function() {
|
||||
var button = $(this);
|
||||
var title = button.html();
|
||||
button.html('Préparation de l\'impression en cours');
|
||||
button.attr({disabled: 'disabled'});
|
||||
button.toggleClass('icon-wip');
|
||||
$('.pagination').next().remove();
|
||||
$.get(window.location + '&all', function(data) {
|
||||
button.toggleClass('icon-wip');
|
||||
button.removeAttr('disabled');
|
||||
button.html(title);
|
||||
$('.content').append(data);
|
||||
window.print();
|
||||
});
|
||||
});
|
||||
|
||||
$('#new-patientrecord').click(function() {
|
||||
generic_ajaxform_dialog('new', 'Nouveau dossier',
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<title>{% block title %}{{ service_name }}{% endblock %}</title>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/style.css"/>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/font-awesome.min.css" />
|
||||
<link rel="stylesheet" type="text/css" media="print" href="{{ STATIC_URL }}css/print.css"/>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/smoothness/jquery-ui-1.8.21.custom.css"/>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/ajax_select.css"/>
|
||||
|
|
Reference in New Issue