[PATCH 03/49] list: Replace the 16-arrow* icons by glyphicons

Damien Lespiau damien.lespiau at intel.com
Fri Oct 2 00:12:08 AEST 2015


They look more modern.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
Acked-by: Stephen Finucane <stephen.finucane at intel.com>
---
 htdocs/images/16-arrow-down.png               | Bin 354 -> 0 bytes
 htdocs/images/16-arrow-up.png                 | Bin 332 -> 0 bytes
 patchwork/templates/patchwork/patch-list.html |  55 +++++++-------------------
 patchwork/utils.py                            |   5 +++
 4 files changed, 20 insertions(+), 40 deletions(-)
 delete mode 100644 htdocs/images/16-arrow-down.png
 delete mode 100644 htdocs/images/16-arrow-up.png

diff --git a/htdocs/images/16-arrow-down.png b/htdocs/images/16-arrow-down.png
deleted file mode 100644
index fa0ff7b3204cde4110c41b9c907896325697401f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 354
zcmV-o0iFJdP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUz1W80eRCwBA{Qv(y10{fQa2c?3$2x{P
z-}m7)QH9fq(cL2m&SycE1Zmb*v}Ul?3u1s63^R+7fsv7s;qaw(3|H^(`|r*W#E8`Z
z5cv1+FT;;tpBeuB|HA-t9Y`}1BMVp#9WbFeukrfB6AVB9d}8?a>m9?_pRd6f#0H6h
z<Une08UO?hAmY^ZT at 1hfd}jFh`#l(g*dQ at vH8{Nhvf<8?ef84v-x<FDegzieWDsMx
z`{XW$?buuZx8dIX&kStL{9p`XW3wHX0brY+JbT5!%_alJAT~DJaT)-#>F(XPV2sOl
zd<KARy!+%f0|?`?9cv&Wy8@^YukC{)GXVq`0J1BIBu0_2dH?_b07*qoM6N<$g4+9<
A0RR91

diff --git a/htdocs/images/16-arrow-up.png b/htdocs/images/16-arrow-up.png
deleted file mode 100644
index 60c4eb9cff183104e4a0c7dfa2699bc1d6dfd88a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 332
zcmV-S0ki&zP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUy?ny*JRCwBA{Qv(y10{fQa2c?3$2t_r
zJKy(#B~>_`7?H)@J%ZqDCR`?iG;1qbGk`G6AZ&mIpYzN$J;3zU`$uuAVZvp*nyewi
z*I#eI7{tcq3Y=chQ8r at u_VX1OgV;oS0c4Ymlo-RaADb9{{(TP?V`mm*0Eyjsw(mcB
zfMRulvZ4UPpMT#N{{8y}#vnFGjGz}lwkycUGcYnTF)%Z6Ft9T7f-#5<5(CMhhXo6!
ziEIoUETRmIK&gNKe?i0;*%;Va1c7od at P`4=e~ovZ?5n@`<TlPg1F6C1f(D=hLaDc5
eaAhWd00RI#MQARJ**GZx0000<MNUMnLSTZi$%d=|

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:
-- 
2.1.0



More information about the Patchwork mailing list