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

View File

@ -48,8 +48,18 @@
<br ng-if="$index > 0"/> <br ng-if="$index > 0"/>
{{a.fullname}}<span ng-if="a.orcid"> (ORCID: {{a.orcid}})</span> {{a.fullname}}<span ng-if="a.orcid"> (ORCID: {{a.orcid}})</span>
</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> </td>
</tr> </tr>
<tr ng-class="{'success' : val.highlight.pids && val.highlight.pids.length > 0}"> <tr ng-class="{'success' : val.highlight.pids && val.highlight.pids.length > 0}">
<th>PID(s)</th> <th>PID(s)</th>
<td> <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))); 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) { $scope.isSubjectHighlighted = function(subject, list) {
if (list) { if (list) {
@ -272,9 +282,6 @@ openaireBrokerControllers.controller('queryCtrl', function ($scope, $http, $sce,
return false; return false;
} }
$scope.prepareAdvancedSearchForm = function() { $scope.prepareAdvancedSearchForm = function() {
$scope.tempQuery = angular.copy($scope.query); $scope.tempQuery = angular.copy($scope.query);
if ($scope.tempQuery.titles.length == 0) { $scope.tempQuery.titles.push(''); } 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"> <span ng-repeat="a in val.result.creators track by $index">
<br ng-if="$index > 0"/> <br ng-if="$index > 0"/>
{{a.fullname}}<span ng-if="a.orcid"> (ORCID: {{a.orcid}})</span> {{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> </span>
</td> </td>
</tr> </tr>