[Mpuls-commits] r4526 - in base/trunk: . mpulsweb/lib mpulsweb/public/images/icons mpulsweb/public/styles mpulsweb/templates

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jan 27 10:54:08 CET 2011


Author: roland
Date: 2011-01-27 10:54:06 +0100 (Thu, 27 Jan 2011)
New Revision: 4526

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/helpers.py
   base/trunk/mpulsweb/public/images/icons/arrow_right_small.png
   base/trunk/mpulsweb/public/styles/screen.css
   base/trunk/mpulsweb/templates/switch_to_other_datasets.mako
Log:
issue1716: show 'reload' icon in the menu for switching datasets. The CSS for this is now in the base.

Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2011-01-25 16:38:06 UTC (rev 4525)
+++ base/trunk/ChangeLog	2011-01-27 09:54:06 UTC (rev 4526)
@@ -1,3 +1,12 @@
+2011-01-26  Roland Geider <roland.geider at intevation.de>
+
+	* mpulsweb/lib/helpers.py,
+	  mpulsweb/public/styles/screen.css,
+	  mpulsweb/public/images/icons/arrow_right_small.png,
+	  mpulsweb/templates/switch_to_other_datasets.mako: issue1716: show
+	  'reload' icon in the menu for switching datasets, but not for the
+	  link for user permissions. The CSS for this is now in the base.
+
 2011-01-25  Roland Geider <roland.geider at intevation.de>
 
 	* mpulsweb/public/styles/screen.css,

Modified: base/trunk/mpulsweb/lib/helpers.py
===================================================================
--- base/trunk/mpulsweb/lib/helpers.py	2011-01-25 16:38:06 UTC (rev 4525)
+++ base/trunk/mpulsweb/lib/helpers.py	2011-01-27 09:54:06 UTC (rev 4526)
@@ -225,17 +225,17 @@
             try:
                 name = parser.get(sec, 'mpuls.app.name')
                 url = parser.get(sec, 'mpuls.app.url')
-                l.append((name, url))
+                l.append((name, url, False))
             except:
                 pass
-    if l > 1: # Administration is only neede if there are more than one datasets
+    if l > 1: # Administration is only needed if there are more than one datasets
         try:
             path = parser.get('app:redirector', 'location')
             if request.url.find(path) > 0 and hasRole(['admin']):
-                l.append((_('Userpersmissions'), os.path.join(path, 'permissions')))
+                l.append((_('Userpersmissions'), os.path.join(path, 'permissions'), True))
         except:
             pass
-    return l 
+    return l
 
 # Helper functions to get some information about the logged in user
 

Modified: base/trunk/mpulsweb/public/images/icons/arrow_right_small.png
===================================================================
(Binary files differ)

Modified: base/trunk/mpulsweb/public/styles/screen.css
===================================================================
--- base/trunk/mpulsweb/public/styles/screen.css	2011-01-25 16:38:06 UTC (rev 4525)
+++ base/trunk/mpulsweb/public/styles/screen.css	2011-01-27 09:54:06 UTC (rev 4526)
@@ -359,6 +359,18 @@
 	margin-left:0em;
 }
 
+/* Show a "reload" icon in the menu for switching datasets */
+
+div.menu + .switchdataset .actions a
+{
+    background-image: url("../images/icons/refresh_active_16.png");
+}
+
+div.menu + .switchdataset .actions a.dataset_permissions
+{
+    background-image: url("../images/icons/arrow_right_small.png")
+}
+
 /*------------*/
 /* 5. Content */
 /*------------*/

Modified: base/trunk/mpulsweb/templates/switch_to_other_datasets.mako
===================================================================
--- base/trunk/mpulsweb/templates/switch_to_other_datasets.mako	2011-01-25 16:38:06 UTC (rev 4525)
+++ base/trunk/mpulsweb/templates/switch_to_other_datasets.mako	2011-01-27 09:54:06 UTC (rev 4526)
@@ -7,7 +7,11 @@
       <ul>
         % for l in h.get_urls_for_other_datasets():
         <li>
-          <a href="${l[1]}">${l[0]}</a>
+        % if l[2]:
+            <a href="${l[1]}" class="dataset_permissions">${l[0]}</a>
+        % else:
+            <a href="${l[1]}">${l[0]}</a>
+        %endif
         </li>
         % endfor
       </ul>



More information about the Mpuls-commits mailing list