Commit 86657da6 authored by Nicolas Widart's avatar Nicolas Widart

Adding a roles tab to the user edit view

parent a2e45c80
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a href="#tab_1-1" data-toggle="tab">Data</a></li> <li class="active"><a href="#tab_1-1" data-toggle="tab">Data</a></li>
<li class=""><a href="#tab_2-2" data-toggle="tab">Permissions</a></li> <li class=""><a href="#tab_2-2" data-toggle="tab">Roles</a></li>
<li class=""><a href="#tab_3-3" data-toggle="tab">Permissions</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="tab_1-1"> <div class="tab-pane active" id="tab_1-1">
...@@ -53,21 +54,23 @@ ...@@ -53,21 +54,23 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row"> </div>
<div class="col-md-6"> </div>
<div class="form-group"> <div class="tab-pane" id="tab_2-2">
<label>Role(s)</label> <div class="row">
<select multiple="" class="form-control" name="roles[]"> <div class="col-md-6">
<?php foreach($roles as $role): ?> <div class="form-group">
<option value="{{ $role->id }}" <?php echo $user->roles()->whereId($role->id)->count() >= 1 ? 'selected' : '' ?>>{{ $role->name }}</option> <label>Role(s)</label>
<?php endforeach; ?> <select multiple="" class="form-control" name="roles[]">
</select> <?php foreach($roles as $role): ?>
</div> <option value="{{ $role->id }}" <?php echo $user->roles()->whereId($role->id)->count() >= 1 ? 'selected' : '' ?>>{{ $role->name }}</option>
<?php endforeach; ?>
</select>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="tab-pane" id="tab_2-2"> <div class="tab-pane" id="tab_3-3">
<div class="box-body"> <div class="box-body">
@include('user::admin.users.partials.permissions') @include('user::admin.users.partials.permissions')
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment