@extends('admin.layouts.app')

@section('title')
    Language
@endsection

@section('content')
    <div class="content">
        <div class="box box-primary">
            <div class="box-body">
                <div class="row" style="padding-left: 20px">
                    <dl class="dl-horizontal">
                        @include('admin.languages.show_fields')
                    </dl>
                    {!! Form::open(['route' => ['admin.languages.destroy', $language->code], 'method' => 'delete']) !!}
                    <div class='btn-group'>
                        @ability('super-admin' ,'languages.show')
                        <a href="{!! route('admin.languages.index') !!}" class="btn btn-default">
                            <i class="glyphicon glyphicon-arrow-left"></i> Back
                        </a>
                        @endability
                        @ability('super-admin' ,'languages.edit')
                        <a href="{{ route('admin.languages.edit', $language->code) }}" class='btn btn-default'>
                            <i class="glyphicon glyphicon-edit"></i> Edit
                        </a>
                        @endability
                        @ability('super-admin' ,'languages.destroy')
                        {!! Form::button('<i class="glyphicon glyphicon-trash"></i> Delete', [
                            'type' => 'submit',
                            'class' => 'btn btn-danger',
                            'onclick' => "confirmDelete($(this).parents('form')[0]); return false;"
                        ]) !!}
                        @endability
                    </div>
                    {!! Form::close() !!}
                </div>
            </div>
        </div>
    </div>
@endsection