mirror of https://github.com/portainer/portainer
77 lines
3.2 KiB
HTML
77 lines
3.2 KiB
HTML
<rd-header>
|
|
<rd-header-title title="Teams">
|
|
<a data-toggle="tooltip" title="Refresh" ui-sref="teams" ui-sref-opts="{reload: true}">
|
|
<i class="fa fa-refresh" aria-hidden="true"></i>
|
|
</a>
|
|
</rd-header-title>
|
|
<rd-header-content>Teams management</rd-header-content>
|
|
</rd-header>
|
|
|
|
<div class="row" ng-if="isAdmin">
|
|
<div class="col-lg-12 col-md-12 col-xs-12">
|
|
<rd-widget>
|
|
<rd-widget-header icon="fa-plus" title="Add a new team">
|
|
</rd-widget-header>
|
|
<rd-widget-body>
|
|
<form class="form-horizontal">
|
|
<!-- name-input -->
|
|
<div class="form-group">
|
|
<label for="teamname" class="col-sm-1 control-label text-left">Name</label>
|
|
<div class="col-sm-9">
|
|
<div class="input-group">
|
|
<input type="text" class="form-control" id="teamname" ng-model="formValues.Name" ng-change="checkNameValidity()" placeholder="e.g. development">
|
|
<span class="input-group-addon"><i ng-class="{true: 'fa fa-check green-icon', false: 'fa fa-times red-icon'}[state.validName]" aria-hidden="true"></i></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- !name-input -->
|
|
<!-- team-leaders -->
|
|
<div class="form-group" ng-if="users.length > 0">
|
|
<div class="col-sm-12" >
|
|
<label class="control-label text-left">
|
|
Select team leader(s)
|
|
<portainer-tooltip position="bottom" message="You can assign one or more leaders to this team. Team leaders can manage their teams users and resources."></portainer-tooltip>
|
|
</label>
|
|
<span isteven-multi-select
|
|
ng-if="users.length > 0"
|
|
input-model="users"
|
|
output-model="formValues.Leaders"
|
|
button-label="Username"
|
|
item-label="Username"
|
|
tick-property="ticked"
|
|
helper-elements="filter"
|
|
search-property="Username"
|
|
translation="{nothingSelected: 'Select one or more team leaders', search: 'Search...'}"
|
|
style="margin-left: 20px;">
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<!-- !team-leaders -->
|
|
<div class="form-group">
|
|
<div class="col-sm-12">
|
|
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !state.validName || formValues.Name === ''" ng-click="addTeam()" button-spinner="state.actionInProgress">
|
|
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create team</span>
|
|
<span ng-show="state.actionInProgress">Creating team...</span>
|
|
</button>
|
|
<span class="text-danger" ng-if="state.teamCreationError" style="margin: 5px;">
|
|
<i class="fa fa-exclamation-circle" aria-hidden="true"></i> {{ state.teamCreationError }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</rd-widget-body>
|
|
</rd-widget>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<teams-datatable
|
|
title="Teams" title-icon="fa-users"
|
|
dataset="teams" table-key="teams"
|
|
order-by="Name" show-text-filter="true"
|
|
remove-action="removeAction"
|
|
></teams-datatable>
|
|
</div>
|
|
</div>
|