@extends('reseller.layouts.master')

@section('page_title')
    Groups - View Detail
@endsection


@push('styles')

@endpush

@section('page_content')
    <div class="page-content container-fluid">
        <div class="row">
            <div class="col-md-10 col-md-offset-1">
                <div class="panel" id="exampleWizardForm">
                    <div class="panel-heading">
                        <div class="panel-title">
                            <h3>Groups - View Detail</h3>
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-6">
                                <h5 style="color: brown">&nbsp;</h5>
                                <table class="table table-bordered table-condensed table-stripped">
                                    <tr>
                                        <th width="40%" class="text-uppercase">Group Name</th>
                                        <td>{{strtoupper($record->name)}}</td>
                                    </tr>
                                    <tr>
                                        <th class="text-uppercase">Group Description</th>
                                        <td>{{ucwords($record->description)}}</td>
                                    </tr>
                                </table>
                                <a href="{{route('groups.index')}}" class="btn btn-default btn-sm">&laquo; Back</a>
                            </div>
                            <div class="col-md-6">
                                <h5 style="color: brown">Permissions</h5>
                                <table class="table table-bordered table-condensed table-stripped">
                                    @unless(empty($record->permissions))
                                        @foreach($record->permissions()->orderBy('id')->get() as $permission)
                                            <tr>
                                                <th class="text-uppercase">{{$permission->description}}</th>
                                            </tr>
                                        @endforeach
                                    @endunless
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
