[ckan-changes] commit/ckanextiati: amercader: Fix bug when editing group permissions

Bitbucket commits-noreply at bitbucket.org
Fri Nov 11 10:49:32 UTC 2011


1 new commit in ckanextiati:


https://bitbucket.org/okfn/ckanextiati/changeset/1700cf06b293/
changeset:   1700cf06b293
user:        amercader
date:        2011-11-11 11:49:21
summary:     Fix bug when editing group permissions

It's not actually fixed. For some reason c.group.extras is not accessible
after editing the group permissions, and causes templates to crash. As it
will probably be modified during the groups refactor, we just not use the
extras for the time being.
affected #:  2 files

diff -r e7f9ea1bdf30b026cd70c03909924c1f43528b2c -r 1700cf06b29331dd5d457f082cfcf9ff988d2af3 ckanext/iati/controllers/group_iati.py
--- a/ckanext/iati/controllers/group_iati.py
+++ b/ckanext/iati/controllers/group_iati.py
@@ -25,6 +25,9 @@
         c.publisher_source_types = PUBLISHER_SOURCE_TYPES
         c.countries = [(v, k) for k, v in COUNTRIES]
 
+       c.show_publisher_info = not (request.environ['pylons.routes_dict']['action'] == 'authz')
+
+
     def _form_to_db_schema(self):
         schema = group_form_schema()
         schema.update({


diff -r e7f9ea1bdf30b026cd70c03909924c1f43528b2c -r 1700cf06b29331dd5d457f082cfcf9ff988d2af3 ckanext/iati/templates/group/layout.html
--- a/ckanext/iati/templates/group/layout.html
+++ b/ckanext/iati/templates/group/layout.html
@@ -42,7 +42,7 @@
       
     </div>
 
-    <div py:if="c.group" class="box" id="publisher-info">
+    <div py:if="c.show_publisher_info" class="box" id="publisher-info"><h2>About this publisher</h2>

Repository URL: https://bitbucket.org/okfn/ckanextiati/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list