diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2009-01-29 17:38:46 +1100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2009-01-29 17:38:46 +1100 |
commit | c105cb0f107a7459abc8c33988d2da24582a7a5a (patch) | |
tree | b45da7063fc8a4598e169b61d475d6a915e5641e /templates/patchwork | |
parent | 6eb48bb0ca07765185fc21015fe815be18282f07 (diff) | |
download | patchwork-c105cb0f107a7459abc8c33988d2da24582a7a5a.tar.bz2 patchwork-c105cb0f107a7459abc8c33988d2da24582a7a5a.tar.xz |
Initial bundle reordering support
todo:
* implement ajax reorder api
* finish migration script
* order patches in bundle view
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'templates/patchwork')
-rw-r--r-- | templates/patchwork/bundle.html | 11 | ||||
-rw-r--r-- | templates/patchwork/patch-list.html | 152 |
2 files changed, 89 insertions, 74 deletions
diff --git a/templates/patchwork/bundle.html b/templates/patchwork/bundle.html index 68bf570..d9a2785 100644 --- a/templates/patchwork/bundle.html +++ b/templates/patchwork/bundle.html @@ -2,6 +2,17 @@ {% load person %} +{% block headers %} + <script language="JavaScript" type="text/javascript" + src="/js/jquery-1.2.6.js"> + </script> + <script language="JavaScript" type="text/javascript" + src="/js/jquery.tablednd_0_5.js"> + </script> + <script language="JavaScript" type="text/javascript" + src="/js/bundle.js"> + </script> +{% endblock %} {% block title %}{{project.name}}{% endblock %} {% block heading %}bundle: {{bundle.name}}{% endblock %} diff --git a/templates/patchwork/patch-list.html b/templates/patchwork/patch-list.html index 4c6b8a5..5518805 100644 --- a/templates/patchwork/patch-list.html +++ b/templates/patchwork/patch-list.html @@ -22,84 +22,87 @@ <form method="post"> <input type="hidden" name="form" value="patchlistform"/> <input type="hidden" name="project" value="{{project.id}}"/> -<table class="patchlist"> - <tr> - {% if user.is_authenticated %} - <th> - <input type="checkbox" onChange="select_all(this)"/> - </th> - {% endif %} +<table class="patchlist" id="patchlist"> + <thead> + <tr> + {% if user.is_authenticated %} + <th> + <input type="checkbox" onChange="select_all(this)"/> + </th> + {% endif %} + + <th> + {% ifequal order.name "name" %} + <a class="colactive" + href="{% listurl order=order.reversed_name %}"><img + src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + width="16" height="16" + ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}">Patch</a> + {% else %} + <a class="colinactive" href="{% listurl order="name" %}">Patch</a> + {% endifequal %} + </th> + + <th> + {% ifequal order.name "date" %} + <a class="colactive" + href="{% listurl order=order.reversed_name %}"><img + src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + width="16" height="16" + ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}">Date</a> + {% else %} + <a class="colinactive" href="{% listurl order="date" %}">Date</a> + {% endifequal %} + </th> + + <th> + {% ifequal order.name "submitter" %} + <a class="colactive" + href="{% listurl order=order.reversed_name %}"><img + src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + width="16" height="16" + ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}">Submitter</a> + {% else %} + <a class="colinactive" href="{% listurl order="submitter" %}">Submitter</a> + {% endifequal %} + </th> + + <th> + {% ifequal order.name "delegate" %} + <a class="colactive" + href="{% listurl order=order.reversed_name %}"><img + src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + width="16" height="16" + ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}">Delegate</a> + {% else %} + <a class="colinactive" href="{% listurl order="delegate" %}">Delegate</a> + {% endifequal %} + </th> + + <th> + {% ifequal order.name "state" %} + <a class="colactive" + href="{% listurl order=order.reversed_name %}"><img + src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" + width="16" height="16" + ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}">State</a> + {% else %} + <a class="colinactive" href="{% listurl order="state" %}">State</a> + {% endifequal %} + </th> - <th> - {% ifequal order.name "name" %} - <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" - width="16" height="16" - ></a> <a class="colactive" - href="{% listurl order=order.reversed_name %}">Patch</a> - {% else %} - <a class="colinactive" href="{% listurl order="name" %}">Patch</a> - {% endifequal %} - </th> - - <th> - {% ifequal order.name "date" %} - <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" - width="16" height="16" - ></a> <a class="colactive" - href="{% listurl order=order.reversed_name %}">Date</a> - {% else %} - <a class="colinactive" href="{% listurl order="date" %}">Date</a> - {% endifequal %} - </th> - - <th> - {% ifequal order.name "submitter" %} - <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" - width="16" height="16" - ></a> <a class="colactive" - href="{% listurl order=order.reversed_name %}">Submitter</a> - {% else %} - <a class="colinactive" href="{% listurl order="submitter" %}">Submitter</a> - {% endifequal %} - </th> - - <th> - {% ifequal order.name "delegate" %} - <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" - width="16" height="16" - ></a> <a class="colactive" - href="{% listurl order=order.reversed_name %}">Delegate</a> - {% else %} - <a class="colinactive" href="{% listurl order="delegate" %}">Delegate</a> - {% endifequal %} - </th> - - <th> - {% ifequal order.name "state" %} - <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - src="/images/16-arrow-{% if order.reversed %}up{% else %}down{%endif%}.png" - width="16" height="16" - ></a> <a class="colactive" - href="{% listurl order=order.reversed_name %}">State</a> - {% else %} - <a class="colinactive" href="{% listurl order="state" %}">State</a> - {% endifequal %} - </th> - - </tr> + </tr> + </thead> {% if page %} + <tbody> {% for patch in page.object_list %} - <tr class="{% cycle 'odd' 'even' %}"> + <tr id="patch_row:{{patch.id}}" class="{% cycle 'odd' 'even' %}"> {% if user.is_authenticated %} <td> <input type="checkbox" name="patch_id:{{patch.id}}"/> @@ -113,6 +116,7 @@ <td>{{ patch.state }}</td> </tr> {% endfor %} + </tbody> </table> {% include "patchwork/pagination.html" %} |