-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
110 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
require('../app').controller('EBPSettingsController', /* @ngInject */function ($q, $translate, user, ngToast, Raven, User) { | ||
require('../app').controller('EBPSettingsController', /* @ngInject */function ($q, $stateParams, EBPSpecies) { | ||
const $ctrl = this | ||
|
||
$ctrl.selected = 'sources' | ||
|
||
if ($stateParams.settings) { | ||
$ctrl.selected = $stateParams.settings | ||
} | ||
|
||
$ctrl.requestSpecies = function () { | ||
$q.resolve(EBPSpecies.query().$promise).then(function (species) { | ||
$ctrl.species = species | ||
}) | ||
} | ||
|
||
$ctrl.requestSpecies() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
require('../app').factory('EBPSpecies', /* @ngInject */function ($resource, ENDPOINT_URL, localization) { | ||
const EBPSpecies = $resource(ENDPOINT_URL + '/ebp-species') | ||
return EBPSpecies | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div>Organizations</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div>Protocol</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div>Sources</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{{ $ctrl.species | json }} | ||
<form name="editform" | ||
role="form" | ||
class="table-responsive" | ||
confirm-on-exit="editform.$dirty" | ||
confirm-message-window="{{'SPECIES_UNSAVED_DATA_TITLE' | translate}}" | ||
confirm-message-route="{{'SPECIES_UNSAVED_DATA_MESSAGE' | translate}}"> | ||
<table class="table table-hover table-striped table-responsive"> | ||
<thead> | ||
<tr> | ||
<th>#</th> | ||
<th>EBP species code</th> | ||
<th>SB name la</th> | ||
<th>EBP name</th> | ||
<th class="btn-group btn-group-xs"> | ||
<button | ||
type="button" | ||
class="btn btn-info btn-xs" | ||
title="{{'SPECIES_BUTTON_ADD' | translate}}" | ||
ng-click="$ctrl.addSpecies()"> | ||
<i class="fa fa-plus fa-fw"></i> | ||
</button> | ||
<button ng-disabled="editform.$pristine" | ||
type="button" | ||
class="btn btn-success btn-xs" | ||
title="{{'SPECIES_BUTTON_SAVE' | translate}}" | ||
ng-click="$ctrl.saveSpecies()"> | ||
<i class="fa fa-check fa-fw"></i> | ||
</button> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr class="hover" ng-repeat="item in $ctrl.visibleSpecies track by item.ebpId"> | ||
<td>{{$index+1+($ctrl.page-1)*$ctrl.pageSize}}</td> | ||
<td> | ||
<field type="text" | ||
model="item.ebpId" | ||
required></field> | ||
</td> | ||
<td> | ||
<field type="text" | ||
model="item.sbNameLa" required></field> | ||
</td> | ||
<td> | ||
<field type="text" | ||
model="item.ebpNameLa"></field> | ||
</td> | ||
<td> | ||
<button type="button" class="btn btn-danger btn-xs visible-hover" | ||
ng-click="$ctrl.removeSpecies($index)"> | ||
<i class="fa fa-remove fa-fw"></i> | ||
</button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<th>#</th> | ||
<th>EBP species code</th> | ||
<th>SB name la</th> | ||
<th>EBP name</th> | ||
<th class="btn-group btn-group-xs"> | ||
<button | ||
type="button" | ||
class="btn btn-info btn-xs" | ||
title="{{'SPECIES_BUTTON_ADD' | translate}}" | ||
ng-click="$ctrl.addSpecies()"> | ||
<i class="fa fa-plus fa-fw"></i> | ||
</button> | ||
<button ng-disabled="editform.$pristine" | ||
type="button" | ||
class="btn btn-success btn-xs" | ||
title="{{'SPECIES_BUTTON_SAVE' | translate}}" | ||
ng-click="$ctrl.saveSpecies()"> | ||
<i class="fa fa-check fa-fw"></i> | ||
</button> | ||
</th> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div>Species status</div> |