@extends('ui::layouts.app')

@section('content')

    <div class="ui grid two column">
        <div class="column"><h2 class="ui header">@lang('overide::label.roles')</h2></div>
        <div class="column right aligned">
            <a href="{{ route('overide::roles.create') }}" class="ui button primary"><i class="icon plus"></i> @lang('overide::action.add')
            </a></div>
    </div>
    <div class="ui grid">
        <div class="column sixteen wide">
            <div class="ui cards three doubling">
                @foreach($roles as $role)
                    <a href="{{ route('overide::roles.edit', $role['id']) }}" class="ui card">
                        <div class="content">
                            <h3 class="header link">{{ $role['name'] }}</h3>
                        </div>
                        <div class="extra content">
                            <i class="icon users"></i>{{ $role->users->count() }}
                            <span class="right floated"><i class="icon options"></i> {{ $role->permissions->count() }}</span>
                        </div>
                        {{--<div class="extra content">--}}
                        {{--<a href="{{ route('overide::roles.edit', $role['id']) }}" class="ui button fluid"><i class="icon setting"></i> @lang('overide::action.manage')</a>--}}
                        {{--</div>--}}
                    </a>
                @endforeach
            </div>
        </div>
    </div>

@endsection
