@extends('webprofile.backend.layouts.master')

@section('title')
  {{ $title }}
@stop

@section('assets')
    <link rel="stylesheet" href="{!! asset('backend/assets/select2/select2.min.css') !!}">
@endsection

@section('breadcrumbs')
<li><a href="{{ url('dashboard') }}">@lang('label.dashboard')</a></li>
<li class="active">@lang('feature.create_setting')</li>
@stop

@section('content')
{!! Form::open(array('url' => route('person.store'), 'method' => 'POST', 'id' => 'setting', 'class' => 'form-horizontal')) !!}
{!! csrf_field() !!}
<!-- page start-->
<div class="row">
	<div class="col-md-12">
	    <div class="panel panel-default">
	        <div class="panel-heading">
	            <h3 class="panel-title"><strong>@lang('label.update')</strong> @lang('label.unit')</h3>
	        </div>
	        <div class="panel-body">
	            <div class="row">
	                <div class="col-md-12">
	                    <div class="form-group @if ($errors->has('value_setting')) has-error @endif">
	                        <label class="col-md-2 control-label">@lang('label.name') @lang('feature.setting')</label>
	                        <div class="col-md-10">
	                          {{ Form::select('value_setting', $unit, $pick ? $pick->value_setting : null, ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 14pt;', 'id' => 'value_setting', 'placeholder' => app('translator')->getFromJson('feature.category'), 'required']) }}
	                          @if ($errors->has('value_setting'))
	                          <label id="login-error" class="error" for="login">{{$errors->first('value_setting')}}</label>
	                          @endif
	                        </div>
	                    </div>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
	<div class="col-md-12">
	    <div class="panel panel-default">
	        <div class="panel-footer">
              <a href="{{ url('webprofile/settings') }}" class="btn btn-default pull-right">@lang('label.cancel')</a>
	            <button class="btn btn-info pull-right">@lang('label.save')</button>
	        </div>
	    </div>
    </div>
    <div class="col-md-12">
	    <div class="panel panel-default">
            <div class="panel-body">
	            <div class="row">
	                <div class="col-md-12">
                        <h1>@lang('label.lecturer')</h1>
                        <div style="padding: 10px; color: blue; font-size: 14px;">
                            URL : <a href="{{ url('team/lecturer') }}" target="_blank">{{ url('lecturer') }}</a>
                            <label id="urllecturer" hidden>team/lecturer</label>
                            <button type="button" onclick="copyToClipboard('#urllecturer')" class="btn btn-info btn-xs">Copy URL</button>
                        </div>
                        <table class="table table-hover" width="100%">
                            <tr>
                                <th width="20%">NIP</th>
                                <th>Nama</th>
                            </tr>
                            @if(array_key_exists(1, $listTeam))
                            @foreach ($listTeam[1] as $value)
                            <tr>
                                <td>{{ $value['nip'] }}</td>
                                <td>{{ $value['namalengkap'] }}</td>
                            </tr> 
                            @endforeach
                            @endif
                        </table>
                        <h1>@lang('label.employe')</h1>
                        <div style="padding: 10px; color: blue; font-size: 14px;">
                            URL : <a href="{{ url('team/academic-staff') }}" target="_blank">{{ url('academic-staff') }}</a>
                            <label id="urlemploye" hidden>team/academic-staff</label>
                            <button type="button" onclick="copyToClipboard('#urlemploye')" class="btn btn-info btn-xs">Copy URL</button>
                        </div>
                        <table class="table table-hover" width="100%">
                            <tr>
                                <th width="20%">NIP</th>
                                <th>Nama</th>
                            </tr>
                            @if(array_key_exists(0, $listTeam))
                            @foreach ($listTeam[0] as $value)
                            <tr>
                                <td>{{ $value['nip'] }}</td>
                                <td>{{ $value['namalengkap'] }}</td>
                            </tr> 
                            @endforeach
                            @endif
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{!! Form::close() !!}
<!-- page end-->
@stop

@section('script')
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-datepicker.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-timepicker.min.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-file-input.js') !!}
{!! Html::script('backend/assets/select2/select2.full.min.js') !!}

<script type="text/javascript">
  $('#value_setting').select2();
</script>
{{ Html::script('js/master/team.js') }}
@stop
