This commit is contained in:
parent
b293654528
commit
1f5e812bfa
|
@ -13,7 +13,7 @@
|
|||
<li class="nav-item">
|
||||
<a href="javascript:void(0)" class="nav-link" ng-class="{'active': currentTab == 1}" ng-click="gotoTab(1)">Metadata Management</a>
|
||||
</li>
|
||||
<li class="nav-item" ng-show="org.status == 'approved'">
|
||||
<li class="nav-item" ng-show="org.status == 'approved' || (org.status == 'suggested')">
|
||||
<a href="javascript:void(0)" class="nav-link" ng-class="{'active': currentTab == 2}" ng-click="gotoTab(2)">Duplicates <span class="badge badge-danger ml-2" ng-if="info.nDuplicates > 0" title="{{info.nDuplicates}} duplicate(s) to validate">new</span></a>
|
||||
</li>
|
||||
<li class="nav-item" ng-show="org.status == 'approved' && adminMode">
|
||||
|
@ -33,13 +33,18 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="card-body" ng-if="currentTab == 2 && (org.status == 'approved' || org.status == 'suggested')">
|
||||
<div class="card-body" ng-if="currentTab == 2 && org.status == 'approved'">
|
||||
<org-details org="org" org-title="Current organization" show="default"></org-details>
|
||||
<org-duplicates org-id="{{org.id}}" duplicates="duplicates" save-function="saveDuplicates()" show-save-button="1"></org-form-duplicates>
|
||||
<org-duplicates org-id="{{org.id}}" duplicates="duplicates" save-function="saveDuplicates()" show-buttons="1"></org-form-duplicates>
|
||||
</div>
|
||||
|
||||
<div class="card-body" ng-if="currentTab == 2 && org.status == 'suggested'">
|
||||
<org-details org="org" org-title="Current organization" show="default"></org-details>
|
||||
<org-duplicates org-id="{{org.id}}" duplicates="duplicates" readonly="1"></org-form-duplicates>
|
||||
</div>
|
||||
|
||||
<div class="card-body" ng-if="adminMode && currentTab == 3 && (org.status == 'approved' || org.status == 'suggested')">
|
||||
<org-conflicts org="org" conflicts="conflicts" show-save-button="1"></org-form-conflicts>
|
||||
<org-conflicts org="org" conflicts="conflicts" show-buttons="1"></org-form-conflicts>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<div class="card-footer bg-secondary py-1">
|
||||
<button class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#addConflictModal">add</button>
|
||||
<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#resolveConflictsModal" ng-click="prepareConflictsModal()" ng-if="showSaveButton && conflicts.length > 0">resolve conflicts</button>
|
||||
<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#resolveConflictsModal" ng-click="prepareConflictsModal()" ng-if="showButtons && conflicts.length > 0">resolve conflicts</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<td class="col-2 text-center small"><img ng-src="resources/images/flags/{{sr.oaCountry}}.gif" /> {{sr.oaCountry}}</td>
|
||||
<td class="col-3 small"><b>Collected from:</b> {{sr.oaCollectedFrom}}<br /> <b>Original Id:</b> <span class="text-monospace">{{sr.oaOriginalId}}</span></td>
|
||||
<td class="col-2 text-right">
|
||||
<div class="btn-group btn-group-toggle btn-group-sm" data-toggle="buttons">
|
||||
<div class="btn-group btn-group-toggle btn-group-sm" data-toggle="buttons" ng-hide="readonly">
|
||||
<label class="btn" ng-class="{'btn-danger' : sr.relType == 'is_different', 'btn-outline-danger' : sr.relType != 'is_different'}"> <input type="radio" autocomplete="off" ng-model="sr.relType"
|
||||
value="is_different" ng-class="{'active' : sr.relType == 'is_different'}"><i class="fas fa-times fa-fw"></i>
|
||||
</label>
|
||||
|
@ -33,12 +33,17 @@
|
|||
value="is_similar" ng-class="{'active' : sr.relType == 'is_similar'}" /><i class="fas fa-check fa-fw"></i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm" ng-show="readonly">
|
||||
<label class="btn btn-outline-dark"><i class="fas fa-times fa-fw"></i></label>
|
||||
<label class="btn btn-dark"><i class="fas fa-question fa-fw"></i></label>
|
||||
<label class="btn btn-outline-dark"><i class="fas fa-check fa-fw"></i></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="card-footer text-right" ng-if="showSaveButton">
|
||||
<div class="card-footer text-right" ng-if="showButtons">
|
||||
<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="duplicates.length > 0">save</button>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<form name="organizationForm">
|
||||
|
||||
<div ng-if="mode == 'approve'" class="alert alert-warning">
|
||||
This is a pending organization. Please evaluate it before approving.
|
||||
This organization is not yet subsumed by an OpenOrg. You can resolve this anomaly by: <ul>
|
||||
<li>creating a new OpenOrg ID for this organization, or</li>
|
||||
<li>adding the organization as a duplicate of an existing OpenOrg</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div ng-if="mode == 'readonly'" class="alert alert-secondary">
|
||||
<span class="badge badge-primary">{{org.status}}</span> This organization is managed by the system. You can not edit.
|
||||
|
|
|
@ -227,10 +227,11 @@ orgsModule.directive('orgDuplicates', function($http, $location, $route) {
|
|||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
'orgId' : '@',
|
||||
'duplicates' : '=',
|
||||
'showSaveButton' : '@',
|
||||
'saveFunction' : '&'
|
||||
'orgId' : '@',
|
||||
'duplicates' : '=',
|
||||
'showButtons' : '@',
|
||||
'readonly' : '@',
|
||||
'saveFunction' : '&'
|
||||
},
|
||||
templateUrl: 'resources/html/parts/org_duplicates.html',
|
||||
link: function(scope, element, attrs, ctrl) {
|
||||
|
@ -248,16 +249,13 @@ orgsModule.directive('orgDuplicates', function($http, $location, $route) {
|
|||
'relType' : 'is_similar'
|
||||
});
|
||||
|
||||
|
||||
call_http_get($http, 'api/organizations/duplicates?id=' + scope.newDuplicate.id, function(res) {
|
||||
angular.forEach(res.data, function(dup) {
|
||||
dup.localId = scope.orgId;
|
||||
scope.duplicates.push(dup);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -266,9 +264,9 @@ orgsModule.directive('orgConflicts', function($http, $location, $route, $q) {
|
|||
return {
|
||||
restrict: 'E',
|
||||
scope: {
|
||||
'org' : '=',
|
||||
'conflicts' : '=',
|
||||
'showSaveButton' : '@'
|
||||
'org' : '=',
|
||||
'conflicts' : '=',
|
||||
'showButtons' : '@'
|
||||
},
|
||||
templateUrl: 'resources/html/parts/org_conflicts.html',
|
||||
link: function(scope, element, attrs, ctrl) {
|
||||
|
|
Loading…
Reference in New Issue