[DEPRECATED] Open containing folder link

Deprecated as of Datafari v3.0

It is possible to configure the UI to show an “open containing folder” link for selected sources. The result will look like the screenshot bellow:

[Screenshot to be created]

The logic to show this link is always active. However the default list of sources for which this link must be shown is empty, so it does not appear. The list is defined in the search.js file (located at /opt/datafari/tomcat/webapp/Datafari/resources/js/search.js) in the definition of the SubClassResultWidget and LikesAndFavoritesWidget. It is advised to set the same list for both, as depending on the status of the likes and favorites feature one or the other will be used. The code looks like so:

if (window.isLikesAndFavoritesEnabled) Manager.addWidget(new AjaxFranceLabs.LikesAndFavoritesWidget({ /* List of repo sources for which the open folder link must be displayed */ openFolderSources: [] })); else Manager.addWidget(new AjaxFranceLabs.SubClassResultWidget({ /* List of repo sources for which the open folder link must be displayed */ openFolderSources: [] }));

The openFolderSources must be an array of String, each String representing the name of a source for which the “open containing folder” link must be displayed. Source names are compared to the repo_source field of the solr document to decide if the link should be shown or not.

The construction of the link is simple and simply removes anything after the last “/” in the URL of the document. Therefore it is not suited to any source.