uis
This commit is contained in:
parent
3881782019
commit
d662e4c576
|
@ -46,6 +46,10 @@ public class OrganizationSimpleView implements Serializable, Comparable<Organiza
|
||||||
@Column(name = "acronyms", columnDefinition = "text[]")
|
@Column(name = "acronyms", columnDefinition = "text[]")
|
||||||
private String[] acronyms;
|
private String[] acronyms;
|
||||||
|
|
||||||
|
@Type(type = "string-array")
|
||||||
|
@Column(name = "urls", columnDefinition = "text[]")
|
||||||
|
private String[] urls;
|
||||||
|
|
||||||
@Column(name = "status")
|
@Column(name = "status")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
@ -122,6 +126,14 @@ public class OrganizationSimpleView implements Serializable, Comparable<Organiza
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String[] getUrls() {
|
||||||
|
return urls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrls(final String[] urls) {
|
||||||
|
this.urls = urls;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(id);
|
return Objects.hash(id);
|
||||||
|
|
|
@ -487,10 +487,12 @@ CREATE VIEW organizations_simple_view AS SELECT
|
||||||
org.city,
|
org.city,
|
||||||
org.country,
|
org.country,
|
||||||
org.status,
|
org.status,
|
||||||
array_remove(array_agg(DISTINCT a.acronym), NULL) AS acronyms
|
array_remove(array_agg(DISTINCT a.acronym), NULL) AS acronyms,
|
||||||
|
array_remove(array_agg(DISTINCT u.url), NULL) AS urls
|
||||||
FROM
|
FROM
|
||||||
organizations org
|
organizations org
|
||||||
LEFT OUTER JOIN acronyms a ON (org.id = a.id)
|
LEFT OUTER JOIN acronyms a ON (org.id = a.id)
|
||||||
|
LEFT OUTER JOIN urls u ON (org.id = u.id)
|
||||||
GROUP BY
|
GROUP BY
|
||||||
org.id,
|
org.id,
|
||||||
org.name,
|
org.name,
|
||||||
|
|
|
@ -39,14 +39,10 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="card-footer text-right">
|
<div class="card-footer text-right">
|
||||||
<button class="btn btn-sm btn-primary" ng-click="saveFunction()" ng-if="showSaveButton && duplicates.length > 0">save</button>
|
|
||||||
<button class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#addDuplicateModal">add</button>
|
<button class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#addDuplicateModal">add</button>
|
||||||
|
<button class="btn btn-sm btn-primary" ng-click="saveFunction()" ng-if="showSaveButton && duplicates.length > 0">save</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<select-org-modal modal-id="addDuplicateModal" selected-org="newDuplicate" filter-status="suggested,discarded" on-select="addDuplicate()"></select-org-modal>
|
<select-org-modal modal-id="addDuplicateModal" selected-org="newDuplicate" filter-status="suggested,discarded" on-select="addDuplicate()"></select-org-modal>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ orgsModule.directive('selectOrgModal', function($http, $timeout) {
|
||||||
'selectedOrg' : '=',
|
'selectedOrg' : '=',
|
||||||
'onSelect' : '&'
|
'onSelect' : '&'
|
||||||
},
|
},
|
||||||
templateUrl: 'resources/html/modals/select_org.html',
|
templateUrl: 'resources/html/parts/select_org.modal.html',
|
||||||
link: function(scope, element, attrs, ctrl) {
|
link: function(scope, element, attrs, ctrl) {
|
||||||
scope.searchOrgs = {};
|
scope.searchOrgs = {};
|
||||||
scope.searchText = '';
|
scope.searchText = '';
|
||||||
|
@ -96,7 +96,7 @@ orgsModule.directive('resolveConflictsModal', function($http, $route) {
|
||||||
'orgs' : '=',
|
'orgs' : '=',
|
||||||
'selectedOrgs' : '='
|
'selectedOrgs' : '='
|
||||||
},
|
},
|
||||||
templateUrl: 'resources/html/modals/resolve_conflicts.html',
|
templateUrl: 'resources/html/parts/resolve_conflicts.modal.html',
|
||||||
link: function(scope, element, attrs, ctrl) {
|
link: function(scope, element, attrs, ctrl) {
|
||||||
scope.selectOrg = function(org) {
|
scope.selectOrg = function(org) {
|
||||||
var sel = angular.copy(org);
|
var sel = angular.copy(org);
|
||||||
|
@ -244,6 +244,7 @@ orgsModule.directive('orgResultsPage', function($http, $location, $route) {
|
||||||
scope.selectedOrg.city = o.city;
|
scope.selectedOrg.city = o.city;
|
||||||
scope.selectedOrg.country = o.country;
|
scope.selectedOrg.country = o.country;
|
||||||
scope.selectedOrg.acronyms = o.acronyms;
|
scope.selectedOrg.acronyms = o.acronyms;
|
||||||
|
scope.selectedOrg.urls = o.urls;
|
||||||
scope.selectedOrg.status = o.status;
|
scope.selectedOrg.status = o.status;
|
||||||
|
|
||||||
if (scope.onSelect) {
|
if (scope.onSelect) {
|
||||||
|
@ -273,9 +274,9 @@ orgsModule.directive('orgDuplicates', function($http, $location, $route) {
|
||||||
'localId' : scope.orgId,
|
'localId' : scope.orgId,
|
||||||
'oaOriginalId' : scope.newDuplicate.id,
|
'oaOriginalId' : scope.newDuplicate.id,
|
||||||
'oaName' : scope.newDuplicate.name,
|
'oaName' : scope.newDuplicate.name,
|
||||||
'oaAcronym' : scope.newDuplicate.acronyms,
|
'oaAcronym' : scope.newDuplicate.acronyms.join(),
|
||||||
'oaCountry' : scope.newDuplicate.country,
|
'oaCountry' : scope.newDuplicate.country,
|
||||||
'oaUrl' : '-',
|
'oaUrl' : scope.newDuplicate.urls.join(),
|
||||||
'oaCollectedFrom' : 'user',
|
'oaCollectedFrom' : 'user',
|
||||||
'relType' : 'is_similar'
|
'relType' : 'is_similar'
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue