[views] Replace home-grown RSS icon with entypo and bootstrap button
authorRémi Cardona <remi.cardona@logilab.fr>
Wed, 28 Jan 2015 18:54:15 +0100
changeset 1786 c5a5055ec854
parent 1733 46b0fec4df00
child 1787 812fc073bd10
[views] Replace home-grown RSS icon with entypo and bootstrap button Closes #4881324
data/cubes.apycot.css
data/feed-logo.png
data/feed-logo.svg
views/rss.py
--- a/data/cubes.apycot.css	Tue Dec 23 15:39:21 2014 +0100
+++ b/data/cubes.apycot.css	Wed Jan 28 18:54:15 2015 +0100
@@ -4,23 +4,6 @@
  * http://www.logilab.fr/ -- mailto:contact@logilab.fr
  */
 
-a.feed_label{
-           background-color: #FA7805;
-           -moz-border-radius:4px;
-           -webkit-border-radius:4px;
-           border:1px solid orange;
-           margin:4px;
-           /*float:left;*/
-           padding:2px 5px 2px 25px;
-           background-image:url('feed-logo.png');
-           background-repeat:no-repeat;
-           background-position: 4px 3px;
-           color:white;
-           font-family:'arial';
-           font-size:1.1em;
-           font-weight: bold;
-          }
-
 table.projectEnvConfiguration th {
      padding-left : 0.3em;
 }
@@ -217,4 +200,4 @@
 
 table.plotlegend td{
     padding : 0 5px 0 10px
-}
\ No newline at end of file
+}
Binary file data/feed-logo.png has changed
--- a/data/feed-logo.svg	Tue Dec 23 15:39:21 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="64px"
-   height="64px"
-   id="svg2383"
-   sodipodi:version="0.32"
-   inkscape:version="0.46"
-   sodipodi:docname="dessin.svg"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape"
-   inkscape:export-filename="/home/cheb/rssapycot/rss.png"
-   inkscape:export-xdpi="22.209999"
-   inkscape:export-ydpi="22.209999">
-  <defs
-     id="defs2385">
-    <inkscape:perspective
-       sodipodi:type="inkscape:persp3d"
-       inkscape:vp_x="0 : 32 : 1"
-       inkscape:vp_y="0 : 1000 : 0"
-       inkscape:vp_z="64 : 32 : 1"
-       inkscape:persp3d-origin="32 : 21.333333 : 1"
-       id="perspective2391" />
-    <filter
-       inkscape:collect="always"
-       id="filter3283">
-      <feGaussianBlur
-         inkscape:collect="always"
-         stdDeviation="0.60527299"
-         id="feGaussianBlur3285" />
-    </filter>
-    <filter
-       inkscape:collect="always"
-       id="filter3287">
-      <feGaussianBlur
-         inkscape:collect="always"
-         stdDeviation="0.60527299"
-         id="feGaussianBlur3289" />
-    </filter>
-    <filter
-       inkscape:collect="always"
-       id="filter3477">
-      <feGaussianBlur
-         inkscape:collect="always"
-         stdDeviation="0.31363637"
-         id="feGaussianBlur3479" />
-    </filter>
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="7.53125"
-     inkscape:cx="32"
-     inkscape:cy="32"
-     inkscape:current-layer="layer1"
-     showgrid="true"
-     inkscape:document-units="px"
-     inkscape:grid-bbox="true"
-     inkscape:window-width="1310"
-     inkscape:window-height="672"
-     inkscape:window-x="307"
-     inkscape:window-y="384" />
-  <metadata
-     id="metadata2388">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     id="layer1"
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer">
-    <path
-       style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3283)"
-       d="M 0.18181818,31.090909 C 0.18181818,31.090909 34.909092,29.272727 34.909091,64.181818"
-       id="path3203"
-       sodipodi:nodetypes="cc"
-       inkscape:export-filename="/home/cheb/rssapycot/rss.png"
-       inkscape:export-xdpi="22"
-       inkscape:export-ydpi="22" />
-    <path
-       style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3287)"
-       d="M -0.5373583,13.388702 C -0.5373583,13.388702 53.244524,10.572897 53.244523,64.636359"
-       id="path3207"
-       sodipodi:nodetypes="cc"
-       inkscape:export-filename="/home/cheb/rssapycot/rss.png"
-       inkscape:export-xdpi="22"
-       inkscape:export-ydpi="22" />
-    <path
-       sodipodi:type="arc"
-       style="fill:#ffffff;stroke:none;stroke-width:5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3477);fill-opacity:1"
-       id="path3209"
-       sodipodi:cx="9.727273"
-       sodipodi:cy="60.090908"
-       sodipodi:rx="6.2727275"
-       sodipodi:ry="6.2727275"
-       d="M 16,60.090908 A 6.2727275,6.2727275 0 1 1 3.4545455,60.090908 A 6.2727275,6.2727275 0 1 1 16,60.090908 z"
-       transform="matrix(1.3361117,0,0,1.3361117,-4.3603597,-24.742714)"
-       inkscape:export-xdpi="22"
-       inkscape:export-ydpi="22"
-       inkscape:export-filename="/home/cheb/rssapycot/rss.png" />
-  </g>
-</svg>
--- a/views/rss.py	Tue Dec 23 15:39:21 2014 +0100
+++ b/views/rss.py	Wed Jan 28 18:54:15 2015 +0100
@@ -69,13 +69,13 @@
     order = 110
 
     def render_body(self, w):
-        self._cw.add_css('cubes.apycot.css')
+        self._cw.add_css(('cubes.apycot.css', 'cubicweb.pictograms.css'))
         entity = self.cw_rset.get_entity(self.cw_row or 0, self.cw_col or 0)
         label = entity.rss_label(vid=self.rss_vid)
         description = entity.rss_description(vid=self.rss_vid)
         rql = entity.rss_rql(vid=self.rss_vid)
         url = self._cw.build_url('view', vid=self.rss_vid, rql=rql)
-        w(u'<a href="%s" title="%s" class="toolbarButton feed_label">%s</a>' % (
+        w(u'<a href="%s" title="%s" class="toolbarButton icon-rss btn btn-default">%s</a>' % (
             xml_escape(url), xml_escape(description), xml_escape(label)))