[ckan-dev] Organization hierarchy

lucia.espona at wsl.ch lucia.espona at wsl.ch
Tue Aug 16 12:52:22 UTC 2016


 Hi Stefan

I have found an issue with the hierarchy extension. When I now try to search in the search field of the organization read view by some word I get always zero datasets. 
I can see the datasets if I leave blank the search field. If I search in the data read view, selecting one organization facet, all goes fine and datasets are found.
For example:

http://envidat02.wsl.ch:5000/organization/wsl -> 2 Datasets
http://envidat02.wsl.ch:5000/organization/wsl?q=test&sort=score+desc%2C+metadata_modified+desc -> 0 Datasets!!
http://envidat02.wsl.ch:5000/dataset?q=test&organization=wsl&sort=score+desc%2C+metadata_modified+desc -> 1 Dataset


I have been taking a look to the datagovuk who developed the extension, there when you search in the organization read you get redirected to data/search?q=xxxx&organization=yyy

Do you or someone have an idea of where could be the problem? The extension doesn't seem to be doing much changes, and what I added is only for displaying purposes.

Many thanks in advance,
Lucia

 
_________________________________________________________
Dr. Lucia Espona Pernas

Swiss Federal Institute for Forest, Snow and Landscape Research WSL
Hauptgebäaude Labortrakt (HL C21)
Zürcherstrasse 111
8903 Birmensdorf
Switzerland

+41 44 739 28 71 phone direct
+41 44 739 21 11 reception

www.wsl.ch

-----"ckan-dev" <ckan-dev-bounces at lists.okfn.org> wrote: -----
To: ckan-dev at lists.okfn.org
From: lucia.espona at wsl.ch
Sent by: "ckan-dev" 
Date: 11.08.2016 18:50
Subject: [ckan-dev] Fwd:  Organization hierarchy

I forgot to cc the mail list :)

Lucía.

Begin forwarded message:

From: "Lucia Espona Pernas" <lucia.espona at wsl.ch>
Date: 10. August 2016 um 21:50:04 MESZ
To: "Stefan Oderbolz" <stefan.oderbolz at liip.ch>
Subject: Re: [ckan-dev] Organization hierarchy

Thanks Stefan

The parameter fixed the issue!

I also improved a bit the display of the organization tree and included a section in the side pane of the organization read page. This last works well because I have short organization names, maybe not for everyone :)

Here is the modified extension: https://github.com/espona/ckanext-hierarchy 

I will go fight with the Solr facets then. I saw in data.gov.uk instance that they have an option to include datasets from children organizations (sub-publishers). I will try to get something like that.

Best,
Lucia
 


_________________________________________________________
Dr. Lucia Espona Pernas

Swiss Federal Institute for Forest, Snow and Landscape Research WSL
Hauptgebäaude Labortrakt (HL C21)
Zürcherstrasse 111
8903 Birmensdorf
Switzerland

+41 44 739 28 71 phone direct
+41 44 739 21 11 reception

www.wsl.ch

-----Stefan Oderbolz <stefan.oderbolz at liip.ch> wrote: -----
To: lucia.espona at wsl.ch
From: Stefan Oderbolz <stefan.oderbolz at liip.ch>
Date: 10.08.2016 17:10
Cc: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Subject: Re: [ckan-dev] Organization hierarchy

Thanks for the code!

It all works well, the links point to the proper locations. My problem is that the link_for I added for the upstream organizations generates a hiperlink in shown in bold, for example:
<a class=" active" href="/organization/lfi">LFI</a>
Is there a possibility to avoid thet the class "active" is added to the link? 

There is an argument called "suppress_active_class" which does exactly that:

{% link_for parent_node.title|truncate(35), controller='organization', action='read', id=parent_node.name, suppress_active_class=true %}
 
- Stefan

-- 
Liip AG  // Limmatstrasse 183 //  CH-8005 Zürich
Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch
    
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160816/52a1b753/attachment-0003.html>


More information about the ckan-dev mailing list