<label class="control-label">Solderwide</label>
    <div class="controls">
        <label for="solder-full"><input type="checkbox" name="solder-full" id="solder-full" value="1"{{ $checked = ($user->permission->solder_full ? " checked" : "") }}> Full Solder Access (Blanket permission)</label>
        <label for="manage-users"><input type="checkbox" name="manage-users" id="manage-users" value="1"{{ $checked = ($user->permission->solder_users ? " checked" : "") }}> Manage Users</label>
        <label for="manage-packs"><input type="checkbox" name="manage-packs" id="manage-packs" value="1"{{ $checked = ($user->permission->solder_modpacks ? " checked" : "") }}> Manage Modpacks</label>
        <label for="manage-mods"><input type="checkbox" name="manage-mods" id="manage-mods" value="1"{{ $checked = ($user->permission->solder_mods ? " checked" : "") }}> Manage Mods</label>
    </div>
</div>
<div class="control-group">
    <label class="control-label">Mod Library</label>
    <div class="controls">
        <label for="mod-create"><input type="checkbox" name="mod-create" id="mod-create" value="1"{{ $checked = ($user->permission->mods_create ? " checked" : "") }}> Create Mods</label>
        <label for="mod-manage"><input type="checkbox" name="mod-manage" id="mod-manage" value="1"{{ $checked = ($user->permission->mods_manage ? " checked" : "") }}> Manage Mods</label>
        <label for="mod-delete"><input type="checkbox" name="mod-delete" id="mod-delete" value="1"{{ $checked = ($user->permission->mods_delete ? " checked" : "") }}> Delete Mods</label>
    </div>
</div>
<div class="control-group">
    <label class="control-label">Modpack Access</label>
    <div class="controls">
        <label for="solder-create"><input type="checkbox" name="solder-create" id="solder-create" value="1"{{ $checked = ($user->permission->solder_create ? " checked" : "") }}> Create Modpacks</label>
        @foreach (Modpack::all() as $modpack)
            <label for="{{ $modpack->slug }}"><input type="checkbox" name="modpack[]" id="{{ $modpack->slug }}" value="{{ $modpack->id }}"{{ $checked = (in_array($modpack->id, $user->permission->modpacks) ? " checked" : "") }}> {{ $modpack->name }}</label>
        @endforeach
    </div>
</div>
@endif
<?php 
echo Form::actions(array(Button::primary_submit('Save changes'), Button::link(URL::to('user/list'), 'Go Back')));
?>
{{ Form::close() }}
@endsection
Example #2
0
    $errors = Session::get('errors');
    if ($errors) {
        return Alert::error('<strong>The following errors occurred</strong>' . HTML::ul($errors->all(':message')));
    }
});
// Show "Create" button for a resource
HTML::macro('resourceCreate', function ($resourceName, $buttonValue) {
    if (Authority::can('create', $resourceName)) {
        return Button::link(URL::route($resourceName . '.create'), $buttonValue);
    }
});
// Show "Edit" button for a specific resource
HTML::macro('resourceUpdate', function ($resourceName, $resourceItem, $buttonValue) {
    $resourceItemId = is_object($resourceItem) ? $resourceItem->id : $resourceItem;
    if (Authority::can('update', $resourceName, $resourceItem)) {
        return Button::link(URL::route($resourceName . '.edit', array($resourceName => $resourceItemId)), $buttonValue);
    }
});
// Show "Delete" button for a specific resource
HTML::macro('resourceDelete', function ($resourceName, $resourceItem, $buttonValue) {
    $resourceItemId = is_object($resourceItem) ? $resourceItem->id : $resourceItem;
    if (Authority::can('delete', $resourceName, $resourceItem)) {
        $output = Form::open(array('route' => array($resourceName . '.destroy', $resourceItemId), 'method' => 'DELETE', 'data-confirm' => 'Are you sure?', 'class' => 'resource-destroy'));
        $output .= Button::submit($buttonValue, array('title' => 'Delete ' . $resourceName));
        $output .= Form::close();
        return $output;
    }
});
// Show user avatar with status info
HTML::macro('userAvatar', function ($user, $size = 'small', $classes = array()) {
    if (!is_array($classes)) {