diff --git a/smash/web/templates/includes/subject_vouchers_box.html b/smash/web/templates/includes/subject_vouchers_box.html new file mode 100644 index 0000000000000000000000000000000000000000..36638b10787183d64546baaa7fc5d2ec3810f496 --- /dev/null +++ b/smash/web/templates/includes/subject_vouchers_box.html @@ -0,0 +1,48 @@ +<div class="row"> + <div class="col-lg-12"> + <div class="box box-success"> + <div class="box-header with-border"> + <h3>Vouchers <a title="add a new voucher" + id="add-voucher" + href="{% url 'web.views.voucher_add' %}?study_subject_id={{ subject.id }}" + class="text-primary" + ><i class="fa fa-plus-circle text-success"></i></a></h3> + </div> + <div class="box-body"> + <table class="table table-bordered table-striped"> + <thead> + <tr> + + <th class="text-center">Number</th> + <th class="text-center">Type</th> + <th class="text-center">Issue date</th> + <th class="text-center">Expiry date</th> + <th class="text-center">Status</th> + <th class="text-center">Use date</th> + <th class="text-center">Partner</th> + <th class="text-center">Feedback</th> + <th class="text-center">Edit</th> + </tr> + </thead> + <tbody> + {% for voucher in subject.vouchers.all %} + <tr> + <td>{{ voucher.number }}</td> + <td>{{ voucher.voucher_type }}</td> + <td>{{ voucher.issue_date }}</td> + <td>{{ voucher.expiry_date }}</td> + <td>{{ voucher.status }}</td> + <td>{{ voucher.use_date }}</td> + <td>{{ voucher.usage_partner.first_name }} {{ voucher.usage_partner.last_name }}</td> + <td>{{ voucher.feedback }}</td> + <td><a href="{% url 'web.views.voucher_edit' voucher.id %}"><i class="fa fa-edit"></i></a> + </td> + </tr> + {% endfor %} + </tbody> + </table> + </div> + </div> + + </div> +</div> diff --git a/smash/web/templates/subjects/edit.html b/smash/web/templates/subjects/edit.html index 1dedffbc01f4a185c5cc4b9c94871f2ec3e8910e..669f863086174f60aaca05907bf6713c84725340 100644 --- a/smash/web/templates/subjects/edit.html +++ b/smash/web/templates/subjects/edit.html @@ -109,11 +109,16 @@ </div><!-- /.col-md-12 --> </div><!-- /.row --> + {% if study_subject.study.columns.vouchers %} + {% include 'includes/subject_vouchers_box.html' with subject=study_subject %} + {% endif %} + {% include 'includes/mail_templates_box.html' with instance_id=study_subject.id %} {% include 'includes/contact_attempts_box.html' with subject=study_subject contact_attempts=contact_attempts %} + <div class="modal modal-danger fade" id="confirm-dead-resigned-mark-dialog" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content">