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[]")
|
||||
private String[] acronyms;
|
||||
|
||||
@Type(type = "string-array")
|
||||
@Column(name = "urls", columnDefinition = "text[]")
|
||||
private String[] urls;
|
||||
|
||||
@Column(name = "status")
|
||||
private String status;
|
||||
|
||||
|
@ -122,6 +126,14 @@ public class OrganizationSimpleView implements Serializable, Comparable<Organiza
|
|||
this.status = status;
|
||||
}
|
||||
|
||||
public String[] getUrls() {
|
||||
return urls;
|
||||
}
|
||||
|
||||
public void setUrls(final String[] urls) {
|
||||
this.urls = urls;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id);
|
||||
|
|
|
@ -487,10 +487,12 @@ CREATE VIEW organizations_simple_view AS SELECT
|
|||
org.city,
|
||||
org.country,
|
||||
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
|
||||
organizations org
|
||||
LEFT OUTER JOIN acronyms a ON (org.id = a.id)
|
||||
LEFT OUTER JOIN urls u ON (org.id = u.id)
|
||||
GROUP BY
|
||||
org.id,
|
||||
org.name,
|
||||
|
|
|
@ -39,14 +39,10 @@
|
|||
</table>
|
||||
|
||||
<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-primary" ng-click="saveFunction()" ng-if="showSaveButton && duplicates.length > 0">save</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<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' : '=',
|
||||
'onSelect' : '&'
|
||||
},
|
||||
templateUrl: 'resources/html/modals/select_org.html',
|
||||
templateUrl: 'resources/html/parts/select_org.modal.html',
|
||||
link: function(scope, element, attrs, ctrl) {
|
||||
scope.searchOrgs = {};
|
||||
scope.searchText = '';
|
||||
|
@ -96,7 +96,7 @@ orgsModule.directive('resolveConflictsModal', function($http, $route) {
|
|||
'orgs' : '=',
|
||||
'selectedOrgs' : '='
|
||||
},
|
||||
templateUrl: 'resources/html/modals/resolve_conflicts.html',
|
||||
templateUrl: 'resources/html/parts/resolve_conflicts.modal.html',
|
||||
link: function(scope, element, attrs, ctrl) {
|
||||
scope.selectOrg = function(org) {
|
||||
var sel = angular.copy(org);
|
||||
|
@ -244,6 +244,7 @@ orgsModule.directive('orgResultsPage', function($http, $location, $route) {
|
|||
scope.selectedOrg.city = o.city;
|
||||
scope.selectedOrg.country = o.country;
|
||||
scope.selectedOrg.acronyms = o.acronyms;
|
||||
scope.selectedOrg.urls = o.urls;
|
||||
scope.selectedOrg.status = o.status;
|
||||
|
||||
if (scope.onSelect) {
|
||||
|
@ -273,9 +274,9 @@ orgsModule.directive('orgDuplicates', function($http, $location, $route) {
|
|||
'localId' : scope.orgId,
|
||||
'oaOriginalId' : scope.newDuplicate.id,
|
||||
'oaName' : scope.newDuplicate.name,
|
||||
'oaAcronym' : scope.newDuplicate.acronyms,
|
||||
'oaAcronym' : scope.newDuplicate.acronyms.join(),
|
||||
'oaCountry' : scope.newDuplicate.country,
|
||||
'oaUrl' : '-',
|
||||
'oaUrl' : scope.newDuplicate.urls.join(),
|
||||
'oaCollectedFrom' : 'user',
|
||||
'relType' : 'is_similar'
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue