| Path : /var/www/html/thb_loan_system/resources/views/branch/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : //var/www/html/thb_loan_system/resources/views/branch/show.blade.php |
@extends('layouts.master')
@section('title')
{{ $branch->name }}
@endsection
@section('content')
<div class="row">
<div class="col-md-4">
<div class="panel panel-white">
<div class="panel-heading">
<h6 class="panel-title">{{ $branch->name }}</h6>
<div class="heading-elements">
</div>
</div>
<div class="panel-body">
{!! $branch->notes !!}
</div>
<!-- /.panel-body -->
<div class="panel-footer">
<div class="heading-elements">
<span class="heading-text">{{ translate('created_at') }}
: {{$branch->created_at}}</span>
</div>
</div>
</div>
<!-- /.box -->
</div>
<div class="col-md-8">
<div class="panel panel-white">
<div class="panel-heading">
<h6 class="panel-title">{{ translate('user') }}</h6>
<div class="heading-elements">
@if(Sentinel::hasAccess('branches.assign'))
<a href="#" data-toggle="modal" data-target="#addUser"
class="btn btn-info btn-sm">{{translate('add user')}}</a>
@endif
</div>
</div>
<div class="panel-body">
<div class="table-responsive">
<table id="" class="table table-striped basic-data-table table-condensed table-hover">
<thead>
<tr>
<th>{{translate('full_name')}}</th>
<th>{{translate('id')}}#</th>
<th>{{translate('phone')}}</th>
<th>{{translate('email')}}</th>
<th>{{ translate('action') }}</th>
</tr>
</thead>
<tbody>
@foreach($branch->users as $key)
@if(!empty($key->user))
<tr>
<td>{{ $key->user->first_name }} {{ $key->user->last_name }}</td>
<td>{{ $key->user->id }}</td>
<td>{{ $key->user->phone }}</td>
<td>{{ $key->user->email }}</td>
<td>
<ul class="icons-list">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="icon-menu9"></i>
</a>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
@if(Sentinel::hasAccess('users.view'))
<li><a href="{{ url('user/'.$key->user->id.'/show') }}"><i
class="fa fa-search"></i> {{translate('detail')}}
</a></li>
@endif
@if(Sentinel::hasAccess('users.update'))
<li><a href="{{ url('user/'.$key->user->id.'/edit') }}"><i
class="fa fa-edit"></i> {{ translate('edit') }}
</a>
</li>
@endif
@if(Sentinel::hasAccess('branches.assign'))
<li>
<a href="{{ url('branch/'.$key->id.'/remove_user') }}"
class="delete"><i
class="fa fa-trash"></i> {{ translate('remove') }}
</a>
</li>
@endif
</ul>
</li>
</ul>
</td>
</tr>
@endif
@endforeach
</tbody>
</table>
</div>
</div>
<!-- /.panel-body -->
</div>
<!-- /.box -->
</div>
</div>
<div class="modal fade" id="addUser">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">*</span></button>
<h4 class="modal-title">{{translate('add user')}}</h4>
</div>
{!! Form::open(array('url' => url('branch/'.$branch->id.'/add_user'),'method'=>'post')) !!}
<div class="modal-body">
<div class="form-group">
<div class="form-line">
{!! Form::label('user_id',translate('user'),array('class'=>' control-label')) !!}
{!! Form::select('user_id',$users,null,array('class'=>' select2','placeholder'=>translate('select'),'required'=>'required')) !!}
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-info">{{translate('save')}}</button>
<button type="button" class="btn default"
data-dismiss="modal">{{translate('close')}}</button>
</div>
{!! Form::close() !!}
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
@endsection