Ignore:
Timestamp:
Aug 26, 2010, 10:55:42 PM (15 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, client
Children:
5cfd6f6
Parents:
0df317c (diff), af48a00 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Alex Dehnert <adehnert@…> (08/26/10 22:55:42)
git-committer:
Alex Dehnert <adehnert@…> (08/26/10 22:55:42)
Message:

Merge branch 'bulk-actions'

File:
1 edited

Legend:

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

    r33cb144 raf48a00  
    1313{%endif%}
    1414
    15 <form>
     15<form method='get' action=''>
     16<h3>Filter and Sort</h3>
     17
    1618<table class='pretty-table'>
    1719<tr>
     
    3335</tr>
    3436<tr>
    35     <th colspan='2'><input type='submit' name='submit' value='Submit'></th>
     37    <th colspan='2'><input type='submit' name='submit' value='Submit' /></th>
    3638</tr>
    3739</table>
     
    4042<p><br /></p>
    4143
    42 <table class='pretty-table'>
     44<form method='post' action=''>
     45<h3>Request List</h3>
     46
     47<table class='pretty-table' id='request-list'>
    4348<tr>
    4449    <th>#</th>
     
    4954    <th>Approval state (date)</th>
    5055</tr>
    51 
    5256{% for object in object_list %}
    5357<tr>
    54     <td><a href='{% url review_request object.pk %}'>{{ object.pk }}</a></td>
     58    <td>
     59        <input type='checkbox' name='select' value='{{object.pk}}'{%ifin object.pk selected_ids %} checked='checked'{%endifin%}></input>
     60        <a href='{% url review_request object.pk %}'>{{ object.pk }}</a>
     61    </td>
    5562    <td>
    5663        <a href='{% url review_request object.pk %}'>{{ object.name }}</a>
     
    7784</table>
    7885
     86<ul class='select-modifiers'>
     87<li><a id='select-all'   href='#'>Select All</a></li>
     88<li><a id='select-none'  href='#'>Select None</a></li>
     89<li><a id='select-other' href='#'>Invert Selection</a></li>
     90</ul>
     91
     92<script type='text/javascript'>
     93$('#select-all').click(function(){
     94    $('#request-list input:checkbox').attr('checked', 'checked');
     95    return false;
     96});
     97$('#select-none').click(function(){
     98    $('#request-list input:checkbox').removeAttr('checked');
     99    return false;
     100});
     101$('#select-other').click(function(){
     102    $('#request-list input:checkbox').each(function(){
     103        this.checked = !this.checked;
     104    });
     105    return false;
     106});
     107</script>
     108
     109<h3>Bulk Actions</h3>
     110
     111<p>
     112    <select name='action'>
     113        <option value="none" selected="selected">-----------</option>
     114        {% for action in actions %}
     115        <option value='{{action.name}}'>{{action.label}}</option>
     116        {%endfor%}
     117    </select>
     118    <input type='submit' name='apply-action' value='Apply' />
     119</p>
     120
     121{%if action_message%}
     122<p>{{action_message}}</p>
     123{% if action_errors %}
     124<p>Errors:</p>
     125<table class='pretty-table'>
     126<tr>
     127    <th>ID</th>
     128    <th>Message</th>
     129{% for err in action_errors %}
     130<tr><th>{{err.0.pk}}</th><td>{{err.1}}</td></tr>
     131{%endfor%}
     132</ul>
     133{%endif%}
     134{%endif%}
     135</form>
     136
    79137{% endblock %}
Note: See TracChangeset for help on using the changeset viewer.