Files
streamline-emr/docker/streamline-src/Modules/ClinicalData/Resources/views/clinics/index.blade.php
T

121 lines
4.7 KiB
PHP
Executable File

@extends('layouts.main')
@push('styles')
<link href="{{ asset('/elite/bower_components/datatables/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('elite/tables/css/buttons.dataTables.min.css') }}" rel="stylesheet" type="text/css" />
@endpush
@section('content')
<div class="row bg-title">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h4 class="page-title">{{ __('clinics.clinics') }}</h4>
</div>
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="{{ route('home') }}">{{ __('clinics.dashboard') }}</a></li>
<li><a href="/clinics/">{{ __('clinics.clinics') }}</a></li>
<li class="active">{{ __('clinics.view') }}</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-sm-12">
@include('clinical_data::clinics.menu')
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="white-box">
@include('flash::message')
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>{{ __('clinics.clinic_name') }}</th>
<th>{{ __('clinics.clinic_type') }}</th>
<th></th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th>{{ __('clinics.clinic_name') }}</th>
<th>{{ __('clinics.clinic_type') }}</th>
<th></th>
<th></th>
</tr>
</tfoot>
<tbody>
@foreach($clinics as $clinic)
<tr>
<td>{{ $clinic->name }}</td>
<td>{{ $clinic_types[$clinic->slug] }}</td>
<td>
<a href="/clinics/{{ $clinic->id }}/edit/" class="btn btn-info"><i class="fa fa-pencil"></i> {{ __('clinics.edit') }}</a>
</td>
<td>
@if (empty($clinic_ids[$clinic->id]))
{{ Form::model($clinic->id ,['method' => 'DELETE', 'route' => ['clinics.destroy', $clinic->id]]) }}
<button type="submit" class="btn btn-danger" onclick="return confirm('<?php echo __('clinics.are_you_sure');?>')"><i class="fa fa-trash"></i> {{ __('clinics.delete') }}</button>
{{ Form::close() }}
@else
<b class="text-success">Clinic in use</b>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script src="{{ asset('elite/bower_components/datatables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.flash.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/jszip.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/pdfmake.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/vfs_fonts.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.html5.min.js') }}"></script>
<script src="{{ asset('elite/tables/js/buttons.print.min.js') }}"></script>
<script>
$('.table').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', {
extend: 'pdf',
exportOptions: {
columns: [0]
},
title: 'Clinics'
},
{
extend: 'print',
exportOptions: {
columns: [0]
},
title: 'Clinics'
},
{
extend: 'excel',
exportOptions: {
columns: [0]
},
title: 'Clinics'
}
]
});
</script>
@endpush