Repository: OCHA-DAP/hdx-ckan

Issue:
Change feedback button to link to http://docs.hdx.rwlabs.org/get-involved/



Discussion:

Resolving patch:
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/version.py b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
--- a/ckanext-hdx_theme/ckanext/hdx_theme/version.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/version.py
@@ -1 +1 @@
-hdx_version = 'v0.4.5'
+hdx_version = 'v0.4.6'
diff --git a/ckanext-sitemap/ckanext/sitemap/controller.py b/ckanext-sitemap/ckanext/sitemap/controller.py
--- a/ckanext-sitemap/ckanext/sitemap/controller.py
+++ b/ckanext-sitemap/ckanext/sitemap/controller.py
@@ -20,7 +20,7 @@ class SitemapController(BaseController):
     def _render_sitemap(self, page):
         root = etree.Element("urlset", nsmap={None: SITEMAP_NS})
         #pkgs = Session.query(Package).all()
-        pkgs = Session.query(Package).filter(Package.private == 0).offset(int(page)*25).limit(25)
+        pkgs = Session.query(Package).filter(Package.private == False).offset(int(page)*25).limit(25)
         for pkg in pkgs:
             url = etree.SubElement(root, 'url')
             loc = etree.SubElement(url, 'loc')
@@ -40,7 +40,7 @@ def _render_sitemap(self, page):
     def view(self):
         #Sitemap Index
         root = etree.Element("sitemapindex", nsmap={None: SITEMAP_NS})
-        pkgs = Session.query(Package).count()
+        pkgs = Session.query(Package).filter(Package.private == False).count()
         count = pkgs/25
         for i in range(1,count):
             sitemap = etree.SubElement(root, 'sitemap')
diff --git a/ckanext-sitemap/setup.py b/ckanext-sitemap/setup.py
--- a/ckanext-sitemap/setup.py
+++ b/ckanext-sitemap/setup.py
@@ -1,32 +1,33 @@
 from setuptools import setup, find_packages
-import sys, os
+import sys
+import os
 
 version = '0.1'
 
 setup(
-	name='ckanext-sitemap',
-	version=version,
-	description="Sitemap extension for CKAN",
-	long_description="""\
+        name='ckanext-sitemap',
+        version=version,
+        description="Sitemap extension for CKAN",
+        long_description="""\
 	""",
-	classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
-	keywords='',
-	author='Aleksi Suomalainen',
-	author_email='aleksi.suomalainen@nomovok.com',
-	url='https://github.com/locusf/ckanext-sitemap',
-	license='AGPL',
-	packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
-	namespace_packages=['ckanext', 'ckanext.sitemap'],
-	include_package_data=True,
-	zip_safe=False,
-	install_requires=[
-		# -*- Extra requirements: -*-
-	],
-	setup_requires=[
-		'nose'
-	],
-	entry_points=\
-	"""
+        classifiers=[
+        ],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+        keywords='',
+        author='Aleksi Suomalainen',
+        author_email='aleksi.suomalainen@nomovok.com',
+        url='https://github.com/locusf/ckanext-sitemap',
+        license='AGPL',
+        packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
+        namespace_packages=['ckanext', 'ckanext.sitemap'],
+        include_package_data=True,
+        zip_safe=False,
+        install_requires=[
+                # -*- Extra requirements: -*-
+        ],
+        setup_requires=[
+                'nose'
+        ],
+        entry_points="""
         [ckan.plugins]
 	# Add plugins here, eg
 	sitemap=ckanext.sitemap.plugin:SitemapPlugin


Test patch:
diff --git a/ckanext-hdx_search/ckanext/hdx_search/tests/test_search.py b/ckanext-hdx_search/ckanext/hdx_search/tests/test_search.py
--- a/ckanext-hdx_search/ckanext/hdx_search/tests/test_search.py
+++ b/ckanext-hdx_search/ckanext/hdx_search/tests/test_search.py
@@ -20,7 +20,7 @@ class TestHDXSearch(hdx_test_base.HdxBaseTest):
     @classmethod
     def _load_plugins(cls):
         try:
-            p.load('hdx_search')
+            hdx_test_base.load_plugin('hdx_search hdx_org_group hdx_theme')
         except Exception as e:
             log.warn('Module already loaded')
             log.info(str(e))
@@ -61,6 +61,7 @@ def test_sort(self):
 
     def test_package_search(self):
         import ckanext.hdx_search.controllers.search_controller as search
+        import ckanext.hdx_search.actions.actions as hdx_actions
         user = model.User.by_name('hdx')
         data_dict = {
                 'q': '',
@@ -73,17 +74,17 @@ def test_package_search(self):
             }
         context = {'model': model, 'session': model.Session,
                        'user': user, 'for_view': True, 'auth_user_obj': user}
-        s = search.package_search(context, data_dict)
+        s = hdx_actions.package_search(context, data_dict)
         assert len(s['results']) > 0
 
-    def test_new_sort_org(self):
-        org = h.url_for(
-            controller='organization', action='list')
-        response = self.app.get(org, params={'sort':'title+asc'})
-        assert '200' in response.status
-
-    def test_new_sort_grp(self):
-        grp = h.url_for(
-            controller='group', action='list')
-        response = self.app.get(grp, params={'sort':'title+asc'})
-        assert '200' in response.status
+#     def test_new_sort_org(self):
+#         org = h.url_for(
+#             controller='organization', action='list')
+#         response = self.app.get(org, params={'sort':'title+asc'})
+#         assert '200' in response.status
+# 
+#     def test_new_sort_grp(self):
+#         grp = h.url_for(
+#             controller='group', action='list')
+#         response = self.app.get(grp, params={'sort':'title+asc'})
+#         assert '200' in response.status