Commit 9d08de5c authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

977: Limit queries to custom search to predefined datamodel

Task-Url: https://pm.winseda.de/issues/977
parent 1051e15a
......@@ -86,7 +86,7 @@ CustomSearchEditor.prototype.showCustomSearches = function(data) {
element += '<span class="glyphicon glyphicon-eye-close" title="' + __translator.translate("~eu.dariah.de.minfba.search.view.custom_search.view.info.not_shared") + '"><input type="hidden" class="user-collection-shared" value="false" /></span> ';
}*/
if (uc.brandedSearchActive) {
if (uc.brandedSearch) {
element += '<span class="glyphicon glyphicon-globe"></span> ';
}
......@@ -189,8 +189,28 @@ CustomSearchEditor.prototype.refreshDetails = function() {
success: function(data) {
$("#user-collection-detail-name").text(data.name);
$("#user-collection-detail-description").text(data.description);
$("#user-collection-detail-is_branded").html(data.brandedSearchActive ? "<span class=\"glyphicon glyphicon-ok\" aria-hidden=\"true\"></span>" : "<span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span>");
$("#user-collection-detail-uri_prefix").text(data.uriPrefix);
$("#user-collection-detail-is_branded").html(data.brandedSearch ? "<span class=\"glyphicon glyphicon-ok\" aria-hidden=\"true\"></span>" : "<span class=\"glyphicon glyphicon-remove\" aria-hidden=\"true\"></span>");
if (data.url!==null && data.url!==undefined && data.url!=="") {
var url = location.protocol + "//" + data.url;
$("#user-collection-detail-uri_prefix").html(
data.prefix + " (" +
"<a href='" + url + "' target='_blank'>" +
"<i class='fa fa-external-link' aria-hidden='true'></i>" + url +
"</a> " +
")");
} else {
$("#user-collection-detail-uri_prefix").text(data.prefix);
}
if (data.datamodelName!==undefined && data.datamodelName!==null && data.datamodelName!=="") {
$("#user-collection-detail-datamodel").text(data.datamodelName + " (" + data.datamodelId + ")");
} else {
$("#user-collection-detail-datamodel").text(data.datamodelId);
}
$("#user-collection-detail-dark_color").text(data.darkThemeColor);
$("#user-collection-detail-light_color").text(data.lightThemeColor);
$("#user-collection-detail-contrast_color").text(data.contrastThemeColor);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment