Ignore:
Timestamp:
Jul 25, 2010, 4:31:09 AM (15 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, client
Children:
0e2f379
Parents:
dd6edfb
git-author:
Alex Dehnert <adehnert@…> (07/25/10 04:31:09)
git-committer:
Alex Dehnert <adehnert@…> (07/25/10 04:31:09)
Message:

Add bulk actions to request list (Trac: #4)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • remit/remit_templates/vouchers/reimbursementrequest_list.html

    r33cb144 r3e372da  
    4040<p><br /></p>
    4141
    42 <table class='pretty-table'>
     42<form method='post' action=''>
     43
     44<table class='pretty-table' id='request-list'>
    4345<tr>
    4446    <th>#</th>
     
    4951    <th>Approval state (date)</th>
    5052</tr>
    51 
    5253{% for object in object_list %}
    5354<tr>
    54     <td><a href='{% url review_request object.pk %}'>{{ object.pk }}</a></td>
     55    <td>
     56        <input type='checkbox' name='select' value='{{object.pk}}'{%ifin object.pk selected_ids %} checked='checked'{%endifin%}></input>
     57        <a href='{% url review_request object.pk %}'>{{ object.pk }}</a>
     58    </td>
    5559    <td>
    5660        <a href='{% url review_request object.pk %}'>{{ object.name }}</a>
     
    7781</table>
    7882
     83<p>Bulk action:
     84    <select name='action'>
     85        <option value="none" selected="selected">-----------</option>
     86        {% for action in actions %}
     87        <option value='{{action.name}}'>{{action.label}}</option>
     88        {%endfor%}
     89    </select>
     90    <input type='submit' name='apply-action' value='Apply' />
     91</p>
     92
     93{%if action_message%}
     94<p>{{action_message}}</p>
     95{% if action_errors %}
     96<p>Errors:</p>
     97<table class='pretty-table'>
     98<tr>
     99    <th>ID</th>
     100    <th>Message</th>
     101{% for err in action_errors %}
     102<tr><th>{{err.0.pk}}</th><td>{{err.1}}</td></tr>
     103{%endfor%}
     104</ul>
     105{%endif%}
     106{%endif%}
     107</form>
     108
    79109{% endblock %}
Note: See TracChangeset for help on using the changeset viewer.