Commit 4d7de174 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

451: Reimplement automatic offline crawl capabilities (OPENED)

Task-Url: search#451
parent e3a46b34
......@@ -58,11 +58,11 @@ DatamodelEditor.prototype.triggerDropDatamodel = function (datamodelId) {
bootbox.confirm(__translator.translate("~eu.dariah.de.minfba.search.view.datamodels.confirm_drop"), function(result) {
if(result) {
$.ajax({
url: __util.composeRelativeUrl("dropDatamodel"),
url: __util.composeRelativeUrl("async/dropDatamodel"),
type: "GET",
dataType: "json",
success: function(data) {
_this.refresh();
window.location.reload();
},
error: __util.processServerError
});
......
......@@ -57,14 +57,7 @@ DatamodelsEditor.prototype.createTable = function() {
"data" : "entity.docs",
"class" : "td-no-wrap",
}, {
"targets": [4],
"searchable": false,
"sortable" : false,
"visible" : __util.uauth,
"class" : "td-no-wrap",
"data": function (row, type, val, meta) { return editor.renderActionColumn(row, type, val, meta); }
}, {
"targets": [0,1,2,3,4],
"targets": [0,1,2,3],
"render": function ( data, type, row, meta ) {
return '<a href="' + __util.composeRelativeUrl(row.entity.id) + '/">' + data + '</a>';
}
......@@ -180,34 +173,6 @@ DatamodelsEditor.prototype.renderStateColumn = function(row, type, val, meta) {
}
};
DatamodelsEditor.prototype.renderActionColumn = function(row, type, val, meta) {
if (type!=="display") {
return "";
}
var result = "";
//result += '<a class="btn btn-link" target="_blank" href="' + row.entity.linkUrl + '"><i class="fas fa-external-link-alt" aria-hidden="true"></i> ' + __translator.translate("~eu.dariah.de.minfba.search.view.models.show_in_DME") + '</a>';
if (__util.ulevel >= 100) {
//result += "<button type='button' onclick='editor.triggerClearIndex(\"" + row.entity.id + "\"); return false;' class='btn btn-link'><i class='fas fa-sync-alt'></i> " + __translator.translate("~eu.dariah.de.minfba.search.actions.datamodels.clear") + "</button>";
//result += "<button type='button' onclick='editor.triggerDropDatamodel(\"" + row.entity.id + "\"); return false;' class='btn btn-link'><span class='fas fa-trash-alt'></span> " + __translator.translate("~eu.dariah.de.minfba.common.actions.delete") + "</button>";
}
/*result += "<div class='btn-group'>" +
"<button type='button' class='btn btn-default btn-xs'>~ View stats</button>" +
"<button type='button' class='btn btn-default btn-xs dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>" +
"<span class='caret'></span>" +
"<span class='sr-only'>Toggle Dropdown</span>" +
"</button>" +
"<ul class='dropdown-menu'>" +
"<li><a href='#' onclick='editor.triggerClearIndex(\"" + row.entity.id + "\"); return false;'>Clear all</a></li>" +
"<li><a href='#' onclick='editor.triggerClearRebuildIndex(\"" + row.entity.id + "\"); return false;'>Clear and rebuild</a></li>" +
"</ul>" +
"</div>";*/
return result;
};
DatamodelsEditor.prototype.triggerSync = function () {
bootbox.confirm({
title: __translator.translate("~eu.dariah.de.minfba.search.view.datamodels.confirm_resync_dme.head"),
......
Supports Markdown
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