123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- @extends('layouts.app')
-
- @section('title', 'Nuevo Usuario | Gerencia Docente')
-
- @section('content')
- <div class="mdc-layout-grid__inner dashboard-grid">
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
- <div class="mdc-layout-grid__inner">
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone">
- <h2 class="mdc-typography--heading1">Usuario Nuevo</h2>
- </div>
- </div>
- @if ($errors->any())
- <div class="mdc-layout-grid__inner">
- <div class="alert alert-danger alert-dismissible fade show mdc-layout-grid__cell mdc-layout-grid__cell--span-12" role="alert">
- <button type="button" class="close" data-dismiss="modal" aria-label="close">
- <span aria-hidden="true">×</span>
- </button>
- <ul class="mdc-list">
- @foreach ($errors->all() as $error)
- <li class="mcd-list-item"><span class="mdc-list-item__text">{{ $error }}</span></li>
- @endforeach
- </ul>
- </div>
- </div>
- <br>
- @endif
- <div class="mdc-layout-grid__inner">
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
- <br>
- <form method="POST" action="{{ route('user.store') }}">
- @csrf
- <div class="mdc-layout-grid__inner">
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
- <div class="form-field">
- <div class="mdc-text-field" data-mdc-auto-init="MDCTextField">
- <input type="email" id="email-field" class="mdc-text-field__input" name="email">
- <label class="mdc-floating-label" for="email-field">E-mail</label>
- <div class="mdc-line-ripple"></div>
- </div>
- </div>
- </div>
- <hr class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
- <h3 class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--span-4-mobile">
- Permisos
- </h3>
- @if (Auth::user()->is_admin)
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
- <div class="mdc-form-field">
- <div class="mdc-checkbox" data-mdc-auto-init="MDCCheckbox">
- <input type="checkbox" class="mdc-checkbox__native-control" id="checkbox-admin" name="admin" value="1">
- <div class="mdc-checkbox__background">
- <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
- <path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
- </svg>
- <div class="mdc-checkbox__mixedmark"></div>
- </div>
- <div class="mdc-checkbox__ripple"></div>
- </div>
- <label for="checkbox-admin">Nivel recinto</label>
- </div>
- </div>
- @endif
- @if ($faculties->isNotEmpty())
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6">
- <div class="mdc-layout-grid__inner">
- <h4 class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">Facultades</h4>
- @foreach ($faculties->sortBy('name') as $faculty)
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6">
- <div class="mdc-form-field">
- <div class="mdc-checkbox">
- <input type="checkbox" class="mdc-checkbox__native-control" id="checkbox-f-{{ $loop->index }}" name="faculties[]" value="{{ $faculty->id }}">
- <div class="mdc-checkbox__background">
- <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
- <path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
- </svg>
- <div class="mdc-checkbox__mixedmark"></div>
- </div>
- <div class="mdc-checkbox__ripple"></div>
- </div>
- <label for="checkbox-f-{{ $loop->index }}">{{ $faculty->name }}</label>
- </div>
- </div>
- @endforeach
- </div>
- </div>
- @endif
- @if ($departments->isNotEmpty())
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6">
- <div class="mdc-layout-grid__inner">
- <h4 class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">Departamentos</h4>
- @foreach ($departments->sortBy('title') as $department)
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6">
- <div class="mdc-form-field">
- <div class="mdc-checkbox" data-auto-init="MDCCheckbox">
- <input type="checkbox" class="mdc-checkbox__native-control" id="checkbox-d-{{ $loop->index }}" name="departments[]" value="{{ $department->id }}">
- <div class="mdc-checkbox__background">
- <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
- <path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
- </svg>
- <div class="mdc-checkbox__mixedmark"></div>
- </div>
- <div class="mdc-checkbox__ripple"></div>
- </div>
- <label for="checkbox-d-{{ $loop->index }}">{{ $department->name ?: $department->code }}</label>
- </div>
- </div>
- @endforeach
- </div>
- </div>
- @endif
- <hr class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
- <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
- <input type="submit" class="mdc-button mdc-button--raised" value="Añadir usuario">
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- @endsection
-
- @section('modals')
- @include('modal.semester')
- @include('modal.semester-clone')
- @include('modal.user-add')
- @endsection
-
- @section('scripts')
- <script type="text/javascript" src="/js/dashboard.js"></script>
- @endsection
|