2020-11-04 15:06:34 +01:00
<!doctype html>
< html lang = "en" xmlns = "http://www.w3.org/1999/xhtml" xmlns:th = "http://www.thymeleaf.org" xmlns:sec = "http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" >
< head >
<!-- Required meta tags -->
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1, shrink-to-fit=no" >
< meta http-equiv = "Cache-Control" content = "no-cache, no-store, must-revalidate" >
< meta http-equiv = "Pragma" content = "no-cache" >
< meta http-equiv = "Expires" content = "0" >
<!-- Bootstrap CSS -->
2021-07-07 11:41:02 +02:00
< link rel = "stylesheet" href = "common/css/bootstrap.cerulean.min.css" / >
2020-11-04 15:06:34 +01:00
<!-- Icons CSS -->
2021-07-07 11:03:29 +02:00
< link rel = "stylesheet" href = "common/css/fontawesome-all.min.css" >
2020-11-04 15:06:34 +01:00
< style type = "text/css" >
.table > tbody > tr > td { vertical-align : middle !important; }
.card > .table { margin-bottom : 0 !important; }
fieldset > legend { font-size : 1.2rem !important; }
.overlaydiv {
position: fixed;
width: 100%;
height: 100%;
z-index: 10000;
visibility: hidden;
}
.grayRectangle {
position: absolute;
background-color: black;
opacity:0.6;
top: 30%;
left: 40%;
width: 20%;
height: 20%;
z-index: 100;
border-radius: 15px;
}
2021-04-06 17:45:26 +02:00
.text-deleted {
color: gray !important;
text-decoration: line-through !important;
}
2022-01-31 14:35:21 +01:00
.btn-link {
text-align: left !important;
}
2022-09-16 15:47:13 +02:00
.table-noborder td, .table-noborder th {
border: none !important;
}
2020-11-04 15:06:34 +01:00
< / style >
2021-09-28 16:05:21 +02:00
< title th:text = "${sysconf.title}" > < / title >
2020-11-04 15:06:34 +01:00
< / head >
< body ng-app = "orgs" sec:authorize = "isAuthenticated()" >
< div id = "spinnerdiv" class = "overlaydiv" >
< span class = "grayRectangle" > <!-- The spinner is added on loading here --> < / span >
< / div >
< nav class = "navbar navbar-expand-lg navbar-dark bg-primary" ng-controller = "menuCtrl" >
2021-11-19 12:14:42 +01:00
< a class = "navbar-brand" href = "#" > < img src = "resources/images/openaire_logo_small.png" width = "30" height = "30" alt = "OpenAIRE logo" > < span th:text = "${sysconf.title}" > < / span > < / a >
< button class = "navbar-toggler" type = "button" data-toggle = "collapse" data-target = "#navbarSupportedContent" > < span class = "navbar-toggler-icon" > < / span > < / button >
2020-11-04 15:06:34 +01:00
< div class = "collapse navbar-collapse w-100 order-1" id = "navbarSupportedContent" >
< ul class = "navbar-nav mr-auto" >
< li class = "nav-item dropdown" >
< a class = "nav-link dropdown-toggle" href = "javascript:void(0)" data-toggle = "dropdown" > Search< / a >
< div class = "dropdown-menu" >
2020-11-12 11:44:46 +01:00
< a class = "dropdown-item" href = "#!/search" > Simple search< / a >
2020-11-04 15:06:34 +01:00
< div class = "dropdown-divider" > < / div >
2020-11-12 11:44:46 +01:00
< a class = "dropdown-item" href = "#!/countries/1" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN') or hasRole('ROLE_OPENORGS_NATIONAL_ADMIN')" > Browse by country< / a >
< a class = "dropdown-item" href = "#!/countries/0" sec:authorize = "hasRole('ROLE_OPENORGS_USER')" > Browse by country< / a >
< a class = "dropdown-item" href = "#!/types/1" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN') or hasRole('ROLE_OPENORGS_NATIONAL_ADMIN')" > Browse by type< / a >
< a class = "dropdown-item" href = "#!/types/0" sec:authorize = "hasRole('ROLE_OPENORGS_USER')" > Browse by type< / a >
2020-11-04 15:06:34 +01:00
< / div >
< / li >
< li class = "nav-item dropdown" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN') or hasRole('ROLE_OPENORGS_NATIONAL_ADMIN')" >
< a class = "nav-link dropdown-toggle" href = "javascript:void(0)" data-toggle = "dropdown" > Curation< / a >
< div class = "dropdown-menu" >
2020-11-12 11:44:46 +01:00
< advanced-menu-item menu = "Suggested organizations" description = "Organizations that have been suggested by an User or by the Dedup OpenAIRE Workflow" url = "#!/pendings/_" badge = "{{info.data.total.nPendingOrgs}}" first = "1" > < / advanced-menu-item >
< advanced-menu-item menu = "Organizations with new duplicates" description = "Organizations that presents duplicates suggested by the Dedup OpenAIRE Workflow" url = "#!/duplicates/_" badge = "{{info.data.total.nDuplicates}}" > < / advanced-menu-item >
< advanced-menu-item menu = "Potential conflicts" description = "Approved Organizations that need to be merged" url = "#!/conflicts/_" badge = "{{info.data.total.nConflicts}}" > < / advanced-menu-item >
2020-11-04 15:06:34 +01:00
< / div >
< / li >
< li class = "nav-item dropdown" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN') or hasRole('ROLE_OPENORGS_NATIONAL_ADMIN')" >
2020-11-12 11:44:46 +01:00
< a class = "nav-link dropdown-toggle" href = "javascript:void(0)" data-toggle = "dropdown" > Create< / a >
2020-11-04 15:06:34 +01:00
< div class = "dropdown-menu" >
2020-11-12 11:44:46 +01:00
< a class = "dropdown-item" href = "#!/new" > A new organization< / a >
2020-11-04 15:06:34 +01:00
< / div >
< / li >
< li class = "nav-item dropdown" sec:authorize = "hasRole('ROLE_OPENORGS_USER')" >
< a class = "nav-link dropdown-toggle" href = "javascript:void(0)" data-toggle = "dropdown" > Curation< / a >
< div class = "dropdown-menu" >
2020-11-12 11:44:46 +01:00
< advanced-menu-item menu = "Organizations with new duplicates" description = "Organizations that presents duplicates suggested by the Dedup OpenAIRE Workflow" url = "#!/duplicates/_" badge = "{{info.data.total.nDuplicates}}" first = "1" > < / advanced-menu-item >
2020-11-04 15:06:34 +01:00
< / div >
< / li >
2021-09-29 12:06:17 +02:00
< li class = "nav-item dropdown" sec:authorize = "hasRole('ROLE_OPENORGS_USER')" >
2020-11-04 15:06:34 +01:00
< a class = "nav-link dropdown-toggle" href = "javascript:void(0)" data-toggle = "dropdown" > Suggest< / a >
< div class = "dropdown-menu" >
2020-11-12 11:44:46 +01:00
< a class = "dropdown-item" href = "#!/new" > A new organization< / a >
2020-11-04 15:06:34 +01:00
< / div >
< / li >
< / ul >
< ul class = "navbar-nav ml-auto" >
< li class = "nav-item dropdown" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN') or hasRole('ROLE_OPENORGS_NATIONAL_ADMIN')" >
< a class = "nav-link dropdown-toggle" href = "javascript:void(0)" data-toggle = "dropdown" > < i class = "fa fa-cog" > < / i > < / a >
< div class = "dropdown-menu dropdown-menu-right" >
2021-09-28 16:05:21 +02:00
< a class = "dropdown-item" href = "#!/sysconf" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN')" > System configuration< / a >
2021-09-29 12:06:17 +02:00
< a class = "dropdown-item" href = "#!/utils" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN')" > System utilities< / a >
< a class = "dropdown-item" href = "#!/lastImport" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN')" > Last import of suggestions< / a >
2021-09-28 16:05:21 +02:00
< div class = "dropdown-divider" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN')" > < / div >
2022-09-23 14:55:25 +02:00
< a class = "dropdown-item" href = "#!/persistentOrgs" > Configure persistent organizations< / a >
< div class = "dropdown-divider" sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN')" > < / div >
2020-11-12 11:44:46 +01:00
< a class = "dropdown-item" href = "#!/users" > Manage users< / a >
2020-11-04 15:06:34 +01:00
< / div >
< / li >
< li class = "nav-item dropdown" >
< a class = "nav-link dropdown-toggle" href = "javascript:void(0)" data-toggle = "dropdown" > < i class = "fa fa-user" > < / i > < / a >
< div class = "dropdown-menu dropdown-menu-right" >
< p class = "px-4 pt-2 text-muted small" >
2020-11-23 12:02:33 +01:00
< b > Logged as:< / b > < br / > < span th:text = "${email}" id = "current_user" > < / span > < br / >
2020-11-13 10:08:14 +01:00
< b > Role:< / b > < br / >
< span sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN')" > Super Admin< / span >
< span sec:authorize = "hasRole('ROLE_OPENORGS_NATIONAL_ADMIN')" > National Admin< / span >
< span sec:authorize = "hasRole('ROLE_OPENORGS_USER')" > Simple User< / span >
2020-11-04 15:06:34 +01:00
< / p >
< div class = "dropdown-divider" > < / div >
< a class = "dropdown-item" th:href = "@{/logout}" > Logout< / a >
< / div >
< / li >
2021-04-26 11:32:17 +02:00
< li class = "nav-item dropdown" >
< a class = "nav-link dropdown-toggle" href = "javascript:void(0)" data-toggle = "dropdown" > < i class = "fa fa-question-circle" > < / i > < / a >
< div class = "dropdown-menu dropdown-menu-right" >
2021-11-19 12:14:42 +01:00
< a class = "dropdown-item" th:href = "${sp.value}" th:each = "sp : ${supportPages}" th:text = '${sp.key}' target = "_blank" > < / a >
< div class = "dropdown-divider" > < / div >
2021-04-26 11:32:17 +02:00
< a class = "dropdown-item" href = "doc" target = "_blank" > APIs (swagger)< / a >
< a class = "dropdown-item" href = "dbmodel/index.html" target = "_blank" > Description of the database< / a >
< / div >
< / li >
2020-11-04 15:06:34 +01:00
< / ul >
< / div >
< / nav >
2021-09-28 16:05:21 +02:00
< div class = "alert alert-danger text-center" th:if = "${sysconf.readonly}" > The portal is running in READ-ONLY mode.< / div >
2020-11-04 15:06:34 +01:00
< div class = "container-fluid small mt-4" ng-view > < / div >
< script sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN')" >
function superAdminMode() { return true; }
< / script >
< script sec:authorize = "!hasRole('ROLE_OPENORGS_ADMIN')" >
function superAdminMode() { return false; }
< / script >
< script sec:authorize = "hasRole('ROLE_OPENORGS_ADMIN') or hasRole('ROLE_OPENORGS_NATIONAL_ADMIN')" >
function adminMode() { return true; }
< / script >
< script sec:authorize = "!hasRole('ROLE_OPENORGS_ADMIN') and !hasRole('ROLE_OPENORGS_NATIONAL_ADMIN')" >
function adminMode() { return false; }
< / script >
< script >
function currentUser() { return document.getElementById('current_user').textContent; }
< / script >
2021-07-07 11:41:02 +02:00
< script src = "common/js/jquery.min.js" > < / script >
2021-07-07 11:03:29 +02:00
< script src = "common/js/popper.min.js" > < / script >
< script src = "common/js/bootstrap.min.js" > < / script >
< script src = "common/js/angular.min.js" > < / script >
< script src = "common/js/angular-route.min.js" > < / script >
< script src = 'common/js/checklist-model.js' > < / script >
< script src = "common/js/spin.js" > < / script >
2020-11-04 15:06:34 +01:00
< script src = "resources/js/organizations.js" > < / script >
< script >
// Spinner show/hide methods ~ Andrea Mannocci
var spinnerOpts = {
lines: 15,
length: 16,
width: 5,
radius: 25,
color: '#eeeeee',
className: 'spinner',
top: '40%'
};
var spinnerTarget = document.getElementById('spinnerdiv');
var spinner;
function showSpinner() {
spinner = new Spinner(spinnerOpts).spin(spinnerTarget);
spinnerTarget.style.visibility = 'visible';
}
function hideSpinner() {
spinnerTarget.style.visibility = 'hidden';
spinner.stop();
}
2021-09-28 16:05:21 +02:00
2020-11-04 15:06:34 +01:00
function call_http_get($http, url, onSuccess) {
showSpinner();
2021-04-09 15:32:32 +02:00
2020-11-04 15:06:34 +01:00
$http.get(url).then(function successCallback(res) {
hideSpinner();
if((typeof res.data) == 'string') {
alert("Session expired !"); location.reload(true);
} else {
onSuccess(res);
}
}, function errorCallback(res) {
hideSpinner();
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')');
});
}
2021-09-28 16:05:21 +02:00
function force_http_post($http, url, obj, onSuccess) {
showSpinner();
$http.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";
$http.post(url, obj).then(function successCallback(res) {
hideSpinner();
if ((typeof res.data) == 'string') {
alert("Session expired !"); location.reload(true);
} else {
onSuccess(res);
}
}, function errorCallback(res) {
hideSpinner();
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')');
});
}
< / script >
2020-11-04 15:06:34 +01:00
2021-09-28 16:05:21 +02:00
< script th:if = "${sysconf.readonly}" >
function call_http_post($http, url, obj, onSuccess) {
alert("Method not permitted in READ-ONLY mode !")
}
function call_http_delete($http, url, onSuccess) {
alert("Method not permitted in READ-ONLY mode !")
}
< / script >
< script th:if = "${!sysconf.readonly}" >
2020-11-04 15:06:34 +01:00
function call_http_post($http, url, obj, onSuccess) {
showSpinner();
$http.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";
$http.post(url, obj).then(function successCallback(res) {
hideSpinner();
if ((typeof res.data) == 'string') {
alert("Session expired !"); location.reload(true);
} else {
onSuccess(res);
}
}, function errorCallback(res) {
hideSpinner();
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')');
});
}
function call_http_delete($http, url, onSuccess) {
showSpinner();
$http.delete(url).then(function successCallback(res) {
hideSpinner();
if ((typeof res.data) == 'string') {
alert("Session expired !"); location.reload(true);
} else {
onSuccess(res);
}
}, function errorCallback(res) {
hideSpinner();
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')');
});
}
< / script >
< / body >
< / html >