diff options
-rw-r--r-- | htdocs/images/16-arrow-down.png | bin | 354 -> 0 bytes | |||
-rw-r--r-- | htdocs/images/16-arrow-up.png | bin | 332 -> 0 bytes | |||
-rw-r--r-- | patchwork/templates/patchwork/patch-list.html | 55 | ||||
-rw-r--r-- | patchwork/utils.py | 5 |
4 files changed, 20 insertions, 40 deletions
diff --git a/htdocs/images/16-arrow-down.png b/htdocs/images/16-arrow-down.png Binary files differdeleted file mode 100644 index fa0ff7b..0000000 --- a/htdocs/images/16-arrow-down.png +++ /dev/null diff --git a/htdocs/images/16-arrow-up.png b/htdocs/images/16-arrow-up.png Binary files differdeleted file mode 100644 index 60c4eb9..0000000 --- a/htdocs/images/16-arrow-up.png +++ /dev/null diff --git a/patchwork/templates/patchwork/patch-list.html b/patchwork/templates/patchwork/patch-list.html index 4b3cb23..cd691ae 100644 --- a/patchwork/templates/patchwork/patch-list.html +++ b/patchwork/templates/patchwork/patch-list.html @@ -53,14 +53,9 @@ <th> {% ifequal order.name "name" %} <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - {% if order.reversed %} - src="{% static "images/16-arrow-up.png" %}" - {% else %} - src="{% static "images/16-arrow-down.png" %}" - {%endif%} - width="16" height="16" - ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}"><span + class="glyphicon glyphicon-chevron-{{ order.updown }}" + ></span></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">Patch</a> {% else %} {% if not order.editable %} @@ -80,14 +75,9 @@ <th> {% ifequal order.name "date" %} <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - {% if order.reversed %} - src="{% static "images/16-arrow-up.png" %}" - {% else %} - src="{% static "images/16-arrow-down.png" %}" - {%endif%} - width="16" height="16" - ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}"><span + class="glyphicon glyphicon-chevron-{{ order.updown }}" + ></span></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">Date</a> {% else %} {% if not order.editable %} @@ -101,14 +91,9 @@ <th> {% ifequal order.name "submitter" %} <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - {% if order.reversed %} - src="{% static "images/16-arrow-up.png" %}" - {% else %} - src="{% static "images/16-arrow-down.png" %}" - {%endif%} - width="16" height="16" - ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}"><span + class="glyphicon glyphicon-chevron-{{ order.updown }}" + ></span></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">Submitter</a> {% else %} {% if not order.editable %} @@ -122,14 +107,9 @@ <th> {% ifequal order.name "delegate" %} <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - {% if order.reversed %} - src="{% static "images/16-arrow-up.png" %}" - {% else %} - src="{% static "images/16-arrow-down.png" %}" - {%endif%} - width="16" height="16" - ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}"><span + class="glyphicon glyphicon-chevron-{{ order.updown }}" + ></span></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">Delegate</a> {% else %} {% if not order.editable %} @@ -143,14 +123,9 @@ <th> {% ifequal order.name "state" %} <a class="colactive" - href="{% listurl order=order.reversed_name %}"><img - {% if order.reversed %} - src="{% static "images/16-arrow-up.png" %}" - {% else %} - src="{% static "images/16-arrow-down.png" %}" - {%endif%} - width="16" height="16" - ></a> <a class="colactive" + href="{% listurl order=order.reversed_name %}"><span + class="glyphicon glyphicon-chevron-{{ order.updown }}" + ></span></a> <a class="colactive" href="{% listurl order=order.reversed_name %}">State</a> {% else %} {% if not order.editable %} diff --git a/patchwork/utils.py b/patchwork/utils.py index 0dfe8dc..d69cb21 100644 --- a/patchwork/utils.py +++ b/patchwork/utils.py @@ -93,6 +93,11 @@ class Order(object): else: return '-' + self.order + def updown(self): + if self.reversed: + return 'up' + return 'down' + def apply(self, qs): q = self.order_map[self.order] if self.reversed: |