[web ui] change "table actions" icon to arrow-up stable
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Sun, 08 Nov 2009 19:37:08 +0100
branchstable
changeset 3807 8ae53322ffcc
parent 3806 6a4191b0eb9a
child 3808 60e78e93a0e5
[web ui] change "table actions" icon to arrow-up
web/data/external_resources
web/data/puce_up.png
web/views/tableview.py
--- a/web/data/external_resources	Sun Nov 08 19:34:31 2009 +0100
+++ b/web/data/external_resources	Sun Nov 08 19:37:08 2009 +0100
@@ -38,6 +38,7 @@
 
 #FCKEDITOR_PATH = /usr/share/fckeditor/
 
+PUCE_UP = DATADIR/puce_up.png
 
 # icons for entity types
 BOOKMARK_ICON = DATADIR/icon_bookmark.gif
@@ -57,4 +58,4 @@
 OK_ICON = DATADIR/ok.png
 CANCEL_ICON = DATADIR/cancel.png
 APPLY_ICON = DATADIR/plus.png
-TRASH_ICON = DATADIR/trash_can_small.png
\ No newline at end of file
+TRASH_ICON = DATADIR/trash_can_small.png
Binary file web/data/puce_up.png has changed
--- a/web/views/tableview.py	Sun Nov 08 19:34:31 2009 +0100
+++ b/web/views/tableview.py	Sun Nov 08 19:37:08 2009 +0100
@@ -15,6 +15,7 @@
 from cubicweb.selectors import nonempty_rset, match_form_params
 from cubicweb.utils import make_uid
 from cubicweb.view import EntityView, AnyRsetView
+from cubicweb.common import tags
 from cubicweb.common.uilib import toggle_action, limitsize, htmlescape
 from cubicweb.web import jsonize
 from cubicweb.web.htmlwidgets import (TableWidget, TableColumn, MenuWidget,
@@ -180,9 +181,8 @@
 
     def render_actions(self, divid, actions):
         box = MenuWidget('', 'tableActionsBox', _class='', islist=False)
-        label = '<img src="%s" alt="%s"/>' % (
-            self.req.datadir_url + 'liveclipboard-icon.png',
-            xml_escape(self.req._('action(s) on this selection')))
+        label = tags.img(src=self.req.external_resource('PUCE_UP'),
+                         alt=xml_escape(self.req._('action(s) on this selection')))
         menu = PopupBoxMenu(label, isitem=False, link_class='actionsBox',
                             ident='%sActions' % divid)
         box.append(menu)