This commit is contained in:
Michele Artini 2020-07-03 11:39:42 +02:00
parent e787faea59
commit f0e850f3db
3 changed files with 29 additions and 3 deletions

View File

@ -48,8 +48,18 @@
<br ng-if="$index > 0"/>
{{a.fullname}}<span ng-if="a.orcid"> (ORCID: {{a.orcid}})</span>
</span>
<span ng-if="val.highlight.creators && isAuthorHighlighted(a, val.highlight.creators)">
<span class="label label-success">added</span>
<span class="pull-right">
<b>from: </b>
<a href="{{val.provenance.url}}" target="_blank" ng-if="val.provenance.url">{{val.provenance.repositoryName}}</a>
<span ng-if="!val.provenance.url">{{val.provenance.repositoryName}}</span>
<span ng-if="val.provenance.id">(ID: {{val.provenance.id}})</span>
</span>
</span>
</td>
</tr>
<tr ng-class="{'success' : val.highlight.pids && val.highlight.pids.length > 0}">
<th>PID(s)</th>
<td>

View File

@ -193,6 +193,16 @@ openaireBrokerControllers.controller('queryCtrl', function ($scope, $http, $sce,
return (s && ((s.min && s.min.trim().length > 0) || (s.max && s.max.trim().length > 0)));
}
$scope.isAuthorHighlighted = function(author, list) {
if (list) {
for (var i=0; i<list.length; i++) {
if (author.fullname + author.orcid == list[i].fullname + list[i].orcid) {
return true;
}
}
}
return false;
}
$scope.isSubjectHighlighted = function(subject, list) {
if (list) {
@ -272,9 +282,6 @@ openaireBrokerControllers.controller('queryCtrl', function ($scope, $http, $sce,
return false;
}
$scope.prepareAdvancedSearchForm = function() {
$scope.tempQuery = angular.copy($scope.query);
if ($scope.tempQuery.titles.length == 0) { $scope.tempQuery.titles.push(''); }

View File

@ -48,6 +48,15 @@
<span ng-repeat="a in val.result.creators track by $index">
<br ng-if="$index > 0"/>
{{a.fullname}}<span ng-if="a.orcid"> (ORCID: {{a.orcid}})</span>
<span ng-if="val.highlight.creators && isAuthorHighlighted(a, val.highlight.creators)">
<span class="label label-success">added</span>
<span class="pull-right">
<b>from: </b>
<a href="{{val.provenance.url}}" target="_blank" ng-if="val.provenance.url">{{val.provenance.repositoryName}}</a>
<span ng-if="!val.provenance.url">{{val.provenance.repositoryName}}</span>
<span ng-if="val.provenance.id">(ID: {{val.provenance.id}})</span>
</span>
</span>
</span>
</td>
</tr>