File: /var/www/vhost/disk-apps/demo-telemedicina.teky.com.co/resources/views/centers/main.blade.php
@extends('layouts.head') @section('content')
<h2>{{ __("messages.centers.main_title") }}</h2>
<form method="POST" action="{{ url('centers') }}">
{{ csrf_field() }}
<div class="row">
<div class="col-xs-3">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.name") }}</label>
<input type="text" class="form-control" name="name" placeholder="{{
__("messages.centers.name")
}}" required>
</div>
</div>
<div class="col-xs-3">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.description") }}</label>
<input type="text" class="form-control" name="description"
placeholder="{{ __('messages.centers.description') }}" required />
</div>
</div>
<div class="col-xs-2">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.phone") }}</label>
<input type="text" class="form-control" name="phone" placeholder="{{ __('messages.centers.phone') }}"
required />
</div>
</div>
<div class="col-xs-2">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.contact_person") }}</label>
<input type="text" class="form-control" name="contact" placeholder="{{ __('messages.centers.contact_person') }}"
required />
</div>
</div>
</div>
<div class="row">
<div class="col-xs-3">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.authorization") }}</label>
<input type="text" class="form-control" name="authorization_code"
placeholder="{{ __('messages.centers.authorization') }}" required />
</div>
</div>
<div class="col-xs-3">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.email") }}</label>
<input type="email" class="form-control" name="email" placeholder="{{ __('messages.centers.email') }}"
required />
</div>
</div>
<div class="col-xs-3">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.address") }}</label>
<input type="text" class="form-control" name="address" placeholder="{{ __('messages.centers.address') }}"
required />
</div>
</div>
</div>
<div class="row">
<div class="col-xs-3">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.country") }}</label>
<select class="form-control" name="country_id" id="country_id" required>
<option value="">{{ __("messages.centers.select") }}</option>
@foreach($countries as $c)
<option value="{{$c->id}}">{{$c->name}}</option>
@endforeach
</select>
</div>
</div>
<div class="col-xs-3">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.state") }}</label>
<select class="form-control" name="department_id" id="department_id" required>
<option value="">{{ __("messages.centers.select") }}</option>
</select>
</div>
</div>
<div class="col-xs-3">
<div class="form-group">
<label for="exampleFormControlInput1">{{ __("messages.centers.city") }}</label>
<select class="form-control" name="city_id" id="city_id" required>
<option value="">{{ __("messages.centers.select") }}</option>
</select>
</div>
</div>
</div>
<div class="box-header">
<button type="submit" class="btn btn-success pull-right"
style="margin-right:5px; background-color:#f79708; border-color:#f79708;">
<i class="fa fa-plus" style="margin-right:4px;"></i>{{ __("messages.centers.btn_create") }}
</button>
</div>
<br />
</form>
{{-- Table --}}
<div class="box">
<div class="box-body table-responsive no-padding" style="padding: 10px !important;">
<table id="example2" class="table table-bordered table-hover dataTable" role="grid"
aria-describedby="example2_info">
<thead>
<tr role="row">
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1"
aria-label="Browser: activate to sort column ascending">
{{ __("messages.centers.table.col1") }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1"
aria-label="Platform(s): activate to sort column ascending">
{{ __("messages.centers.table.col2") }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1"
aria-label="Engine version: activate to sort column ascending">
{{ __("messages.centers.table.col3") }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1"
aria-label="Engine version: activate to sort column ascending">
{{ __("messages.centers.table.col4") }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1"
aria-label="Engine version: activate to sort column ascending">
{{ __("messages.centers.table.col5") }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1"
aria-label="Engine version: activate to sort column ascending">
{{ __("messages.centers.table.col6") }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1"
aria-label="Engine version: activate to sort column ascending">
{{ __("messages.centers.table.col7") }}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1"
aria-label="Engine version: activate to sort column ascending">
{{ __("messages.centers.table.col8") }}
</th>
</tr>
</thead>
<tbody>
@foreach($centros as $c)
<tr>
<td>{{$c->id}}</td>
<td>{{$c->name}}</td>
<td>{{$c->phone}}</td>
<td>{{$c->email}}</td>
<td>{{$c->contact}}</td>
<td>{{ isset($c->city) ? $c->city->name : "" }}</td>
<td>
<div class="switch">
<label>
@if($c->active == 0)
<div class="checkbox checbox-switch switch-success">
<label>
{{ __("messages.centers.no") }}
<input type="checkbox" class="chkcenter" data-id="{{$c->id}}" id="Checkactivo" name="Checkactivo" />
<span></span>
{{ __("messages.centers.yes") }}
</label>
</div>
@else
<div class="checkbox checbox-switch switch-success">
<label>
{{ __("messages.centers.no") }}
<input type="checkbox" class="chkcenter" data-id="{{$c->id}}" id="Checkactivo" name="Checkactivo"
checked="" />
<span></span>
{{ __("messages.centers.yes") }}
</label>
</div>
@endif
</label>
</div>
</td>
<td style="font-size: 16px;">
<a href="{{ url('centers/' . $c->id . '/edit') }}" style="color:black;">
<i class="fa fa-pencil iconMini editarPedido" style="cursor:pointer;"
title="{{ __('messages.centers.btn_edit') }}"></i>
</a>
<a href="#" onclick="deleteRegister({{$c->id}}, 'medical_centers')" style="color:black;">
<i class="fa fa-trash iconMini " style="cursor:pointer;" title="Eliminar"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<script src="{{ asset('js/centers/centers.js') }}"></script>
<script src="{{ asset('js/delete_register.js') }}"></script>
@endsection