source: remit/remit_templates/vouchers/reimbursementrequest_list.html

Last change on this file was bc1da44, checked in by Alex Dehnert <adehnert@…>, 11 years ago

Add missing CSRF token

  • Property mode set to 100644
File size: 4.0 KB
Line 
1{% extends "base.html" %}
2{% load url from future %}
3{% load misc %}
4
5{% block title %}List reimbursement requests{% endblock %}
6{% block content %}
7
8<h2>List Reimbursement Requests</h2>
9
10{%if useronly%}
11<p>Displaying only vouchers related to you.</p>
12{%else%}
13<p>You have permission to list all vouchers.</p>
14{%endif%}
15
16<form method='get' action=''>
17<h3>Filter and Sort</h3>
18
19<table class='pretty-table'>
20<tr>
21    <th>Approval Status</th>
22    <td><select name='approval_status'>
23    <option value='all'{%ifequal approval_status "all"%} selected='selected'{%endifequal%}>All</option>
24    {% for id,label in approval_states %}
25    <option value='{{id}}'{%ifequal approval_status id%} selected='selected'{%endifequal%}>{{label}}</option>
26    {% endfor %}
27    </select></td>
28</tr>
29<tr>
30    <th>Order</th>
31    <td><select name='order'>
32    {% for name,label,cols in orders %}
33    <option value='{{name}}'{%ifequal order name%} selected='selected'{%endifequal%}>{{label}}</option>
34    {% endfor %}
35    </select></td>
36</tr>
37<tr>
38    <th colspan='2'><input type='submit' name='submit' value='Submit' /></th>
39</tr>
40</table>
41</form>
42
43<p><br /></p>
44
45<form method='post' action=''>
46<h3>Request List</h3>
47
48<table class='pretty-table' id='request-list'>
49<tr>
50    <th>#</th>
51    <th>Name</th>
52    <th>Amount</th>
53    <th>Check to</th>
54    <th>Accounts</th>
55    <th>Approval state (date)</th>
56</tr>
57{% for object in object_list %}
58<tr>
59    <td>
60        <input type='checkbox' name='select' value='{{object.pk}}'{%ifin object.pk selected_ids %} checked='checked'{%endifin%}></input>
61        <a href='{% url "review_request" object.pk %}'>{{ object.pk }}</a>
62    </td>
63    <td>
64        <em><a href='{% url "review_request" object.pk %}'>{{ object.name }}</a></em>
65        {% if object.documentation %}<br /><a href='{{object.documentation.backing_file.url}}'>(view docs)</a>{%endif%}
66    </td>
67    <td>
68        ${{ object.amount }}
69    </td>
70    <td>
71        {{ object.check_to_first_name }} {{ object.check_to_last_name }}<br />
72        <a href='mailto:{{ object.check_to_email }}'>{{ object.check_to_email }}</a><br />
73        (Submitter {{ object.submitter }})
74    </td>
75    <td>
76        Term: {{ object.budget_term }}<br />
77        Budget: {{ object.budget_area|budgetarea_pathstr:3 }}<br />
78        GL: {{ object.expense_area|budgetarea_pathstr:2 }}
79    </td>
80    <td class='request-status-{{ object.approval_status|approval_status_class}}'>
81        {{ object.approval_status|approval_status }} ({{ object.approval_time|date:"SHORT_DATETIME_FORMAT"}})
82        {% if object.voucher %}
83        <br />[Voucher: {{object.voucher.pk}}]
84        {% endif %}
85        {% if object.rfp %}
86        <br />[{{object.rfp}}]
87        {% endif %}
88    </td>
89</tr>
90{% endfor %}
91</table>
92
93<ul class='select-modifiers'>
94<li><a id='select-all'   href='#'>Select All</a></li>
95<li><a id='select-none'  href='#'>Select None</a></li>
96<li><a id='select-other' href='#'>Invert Selection</a></li>
97</ul>
98
99<script type='text/javascript'>
100$('#select-all').click(function(){
101    $('#request-list input:checkbox').attr('checked', 'checked');
102    return false;
103});
104$('#select-none').click(function(){
105    $('#request-list input:checkbox').removeAttr('checked');
106    return false;
107});
108$('#select-other').click(function(){
109    $('#request-list input:checkbox').each(function(){
110        this.checked = !this.checked;
111    });
112    return false;
113});
114</script>
115
116<h3>Bulk Actions</h3>
117
118<p>
119    <select name='action'>
120        <option value="none" selected="selected">-----------</option>
121        {% for action in actions %}
122        <option value='{{action.name}}'>{{action.label}}</option>
123        {%endfor%}
124    </select>
125    <input type='submit' name='apply-action' value='Apply' />
126</p>
127
128{%if action_message%}
129<p>{{action_message}}</p>
130{% if action_errors %}
131<p>Errors:</p>
132<table class='pretty-table'>
133<tr>
134    <th>ID</th>
135    <th>Message</th>
136{% for err in action_errors %}
137<tr><th>{{err.0.pk}}</th><td>{{err.1}}</td></tr>
138{%endfor%}
139</ul>
140{%endif%}
141{%endif%}
142
143{% csrf_token %}
144</form>
145
146{% endblock %}
Note: See TracBrowser for help on using the repository browser.