Revision 58255
Added by Michele Artini about 4 years ago
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/html/modals/resolve_conflicts.html | ||
---|---|---|
8 | 8 |
<div class="modal-body" style="min-height: 300px"> |
9 | 9 |
<div class="row"> |
10 | 10 |
<div class="col-6"> |
11 |
<div ng-repeat="o in orgs" ng-show="o.show != 'hidden'"> |
|
12 |
<org-details org="o" org-title="Organization {{$index+1}}" show="{{o.show}}"></org-details> |
|
13 |
<div class="text-right mb-3"> |
|
14 |
<button type="button" class="btn btn-sm btn-primary" ng-click="selectOrg(o)">select >></button> |
|
11 |
<div class="card border-primary"> |
|
12 |
<div class="card-header text-white bg-primary">Suggested organizations</div> |
|
13 |
<div class="card-body" ng-repeat="o in orgs | filter:{show:'secondary'}" ng-class="{'pb-0' : $index==0 , 'py-0' : $index > 0 }"> |
|
14 |
<org-details org="o" org-title="{{o.id}}" show="{{o.show}}"></org-details> |
|
15 |
<div class="text-right mb-3"> |
|
16 |
<button type="button" class="btn btn-sm btn-primary" ng-click="selectOrg(o)">select >></button> |
|
17 |
</div> |
|
15 | 18 |
</div> |
19 |
<div class="card-body text-secondary text-center" ng-show="selectedOrgs.length == orgs.length">no organization(s)</div> |
|
16 | 20 |
</div> |
17 |
<div class="card border-secondary mb-3" ng-show="selectedOrgs.length == orgs.length"> |
|
18 |
<div class="card-body text-secondary text-center">no organization(s)</div> |
|
19 |
</div> |
|
20 | 21 |
</div> |
21 | 22 |
<div class="col-6"> |
22 |
<div ng-repeat="o in selectedOrgs"> |
|
23 |
<org-details org="o" org-title="{{($index==0)?'Master organization':'Secondary organization ' + $index}}" show="{{o.show}}"></org-details> |
|
24 |
</div> |
|
25 |
<div class="card border-secondary mb-3" ng-show="selectedOrgs.length == 0"> |
|
26 |
<div class="card-body text-secondary text-center">select master organization</div> |
|
27 |
</div> |
|
28 |
<div class="card border-secondary mb-3" ng-show="selectedOrgs.length == 1"> |
|
29 |
<div class="card-body text-secondary text-center">select secondary organization(s)</div> |
|
30 |
</div> |
|
31 |
<button type="button" class="btn btn-sm btn-secondary" ng-click="reset()" ng-if="selectedOrgs.length > 0">reset</button> |
|
32 |
<button type="button" class="btn btn-sm btn-primary float-right" ng-click="createGroup()" ng-if="selectedOrgs.length > 1">create group</button> |
|
23 |
<div class="card border-primary"> |
|
24 |
<div class="card-header text-white bg-primary">New group</div> |
|
25 |
<div class="card-body" ng-repeat="o in selectedOrgs" ng-class="{'pb-0' : $index==0 , 'py-0' : $index > 0 }"> |
|
26 |
<org-details org="o" org-title="{{($index==0)?'Master organization':'Secondary organization ' + $index}}" show="{{o.show}}"></org-details> |
|
27 |
</div> |
|
28 |
<div class="card-body" ng-show="selectedOrgs.length == 0"> |
|
29 |
<div class="card border-secondary"> |
|
30 |
<div class="card-body text-secondary text-center">select master organization</div> |
|
31 |
</div> |
|
32 |
</div> |
|
33 |
<div class="card-body pt-0" ng-show="selectedOrgs.length == 1"> |
|
34 |
<div class="card border-secondary"> |
|
35 |
<div class="card-body text-secondary text-center">select secondary organization(s)</div> |
|
36 |
</div> |
|
37 |
</div> |
|
38 |
<div class="card-footer" ng-show="selectedOrgs.length > 0"> |
|
39 |
<button type="button" class="btn btn-sm btn-secondary" ng-click="reset()" ng-show="selectedOrgs.length > 0">reset</button> |
|
40 |
<button type="button" class="btn btn-sm btn-primary float-right" ng-click="createGroup()" ng-show="selectedOrgs.length > 1">create group</button> |
|
41 |
</div> |
|
42 |
</div> |
|
33 | 43 |
</div> |
34 | 44 |
</div> |
35 | 45 |
</div> |
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/html/parts/org_details.html | ||
---|---|---|
1 | 1 |
<div class="card mb-3" ng-show="show != 'hidden'"> |
2 |
<div class="card-header text-white py-1" ng-class="{'bg-primary' : show == 'default', 'bg-success' : show == 'success', 'bg-info' : show == 'info' }">{{orgTitle}}</div> |
|
2 |
<div class="card-header py-1" ng-class="{ |
|
3 |
'text-white bg-primary' : show == 'default', |
|
4 |
'text-white bg-success' : show == 'success', |
|
5 |
'text-white bg-info' : show == 'info', |
|
6 |
'bg-secondary' : show == 'secondary', |
|
7 |
}">{{orgTitle}}</div> |
|
3 | 8 |
<table class="table table-sm table-condensed"> |
4 | 9 |
<tr class="d-flex"> |
5 |
<th class="col-4">Name</th> |
|
10 |
<th class="col-4 pl-3">Name</th>
|
|
6 | 11 |
<td class="col-8">{{org.name}}</td> |
7 | 12 |
</tr> |
8 | 13 |
<tr class="d-flex"> |
9 |
<th class="col-4">Type</th> |
|
14 |
<th class="col-4 pl-3">Type</th>
|
|
10 | 15 |
<td class="col-8">{{org.type}}</td> |
11 | 16 |
</tr> |
12 | 17 |
<tr class="d-flex"> |
13 |
<th class="col-4">Place</th> |
|
18 |
<th class="col-4 pl-3">Place</th>
|
|
14 | 19 |
<td class="col-8">{{org.city}}, {{org.country}}</td> |
15 | 20 |
</tr> |
16 | 21 |
<tr class="d-flex"> |
17 |
<th class="col-4">Acronyms</th> |
|
22 |
<th class="col-4 pl-3">Acronyms</th>
|
|
18 | 23 |
<td class="col-8">{{org.acronyms.join(', ')}}</td> |
19 | 24 |
</tr> |
20 | 25 |
<tr class="d-flex"> |
21 |
<th class="col-4">Also known as</th> |
|
26 |
<th class="col-4 pl-3">Also known as</th>
|
|
22 | 27 |
<td class="col-8"><span ng-repeat="n in org.otherNames">{{n.name}}<br /></span></td> |
23 | 28 |
</tr> |
24 | 29 |
<tr class="d-flex"> |
25 |
<th class="col-4">Urls</th> |
|
30 |
<th class="col-4 pl-3">Urls</th>
|
|
26 | 31 |
<td class="col-8"><span ng-repeat="u in org.urls"><a href="{{u}}" target="_blank">{{u}}</a><br /></span></td> |
27 | 32 |
</tr> |
28 | 33 |
</table> |
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/js/organizations.js | ||
---|---|---|
63 | 63 |
|
64 | 64 |
scope.reset = function() { |
65 | 65 |
scope.selectedOrgs = []; |
66 |
angular.forEach(scope.orgs, function(org) { org.show = 'default'; });
|
|
66 |
angular.forEach(scope.orgs, function(org) { org.show = 'secondary'; });
|
|
67 | 67 |
} |
68 | 68 |
|
69 | 69 |
scope.createGroup = function() { |
... | ... | |
262 | 262 |
|
263 | 263 |
$q.all(gets).then(function(responses) { |
264 | 264 |
scope.orgs = responses.map((resp) => resp.data); |
265 |
angular.forEach(scope.orgs, function(org) { org.show = 'default'; });
|
|
265 |
angular.forEach(scope.orgs, function(org) { org.show = 'secondary'; });
|
|
266 | 266 |
}); |
267 | 267 |
} |
268 | 268 |
|
Also available in: Unified diff
partial implementation of merge orgs modal