Пример #1
0
                                <input


                                <?php 
$disabled = false;
if (isset($role)) {
    if ($role->hasPermission($perm->slug)) {
        echo "checked='checked' ";
    }
    if ($role->su) {
        if ($perm->su) {
            $disabled = true;
        }
    }
}
if (!$disabled and (!$perm->assignable and !Laralum::loggedInUser()->su)) {
    $disabled = true;
}
if ($disabled) {
    echo "disabled ";
}
?>


                                name="{{ $perm->id }}" type="checkbox"  tabindex="0" class="@if(!$disabled) checkable @endif hidden">
                            <label>{{ Laralum::permissionName($perm->slug) }}</label>
                        </div><i data-variation="wide" data-title="{{ $perm->slug }}" data-content="{{ Laralum::permissionDescription($perm->slug) }}" data-position="right center" class="grey question pop icon"></i>
                        @if(!$perm->assignable and !Laralum::loggedInUser()->su)<i data-variation="wide" class="red lock icon pop" data-position="right center" data-title="{{ trans('laralum.unassignable_permission') }}" data-content="{{ trans('laralum.unassignable_permission_desc') }}"></i>@endif
                        @if(!$perm->assignable and Laralum::loggedInUser()->su and !$disabled)<i data-variation="wide" class="red unlock icon pop" data-position="right center" data-title="{{ trans('laralum.unassignable_permission_unlocked') }}" data-content="{{ trans('laralum.unassignable_permission_unlocked_desc') }}"></i>@endif
                        @if(Laralum::loggedInUser()->su and $disabled)<i data-variation="wide" class="red asterisk icon pop" data-position="right center" data-title="{{ trans('laralum.su_permission_and_role') }}" data-content="{{ trans('laralum.su_permission_and_role_desc') }}"></i>@endif
                    </div>
Пример #2
0
?>
@foreach($roles as $role)
    <div class="inline field">
        <div class="ui slider checkbox">
            <input
            <?php 
if (isset($row)) {
    if ($row->hasRole($role->name)) {
        echo "checked='checked' ";
    }
}
$disabled = false;
if ($role->su) {
    $disabled = true;
}
if (!$role->assignable and !Laralum::loggedInUser()->su) {
    $disabled = true;
}
if ($disabled) {
    echo "disabled";
}
?>
            type="checkbox" name="{{ $role->id }}" tabindex="0" class="hidden">
            <label>{{ $role->name }}
                @if($role->su)<i class="red asterisk thin icon pop" data-variation="wide" data-position="right center" data-title="{{ trans('laralum.su_role') }}" data-content="{{ trans('laralum.su_role_desc') }}"></i>@endif
                @if(!$role->assignable and !Laralum::loggedInUser()->su)
                    <i data-variation="wide" class="red lock icon pop" data-position="right center" data-title="{{ trans('laralum.unassignable_role') }}" data-content="{{ trans('laralum.unassignable_role_desc') }}"></i>
                @endif
                @if(!$role->assignable and Laralum::loggedInUser()->su)
                    <i data-variation="wide" class="red unlock icon pop" data-position="right center" data-title="{{ trans('laralum.unassignable_role_unlocked') }}" data-content="{{ trans('laralum.unassignable_role_unlocked_desc') }}"></i>
                @endif
Пример #3
0
| regardless of it's differences.                            				|
|																			|
+---------------------------------------------------------------------------+
*/
include 'SimpleGet.php';
# Get the row table columns
$columns = Schema::getColumnListing($table);
# Add su_hidden to hidden if the row is su
if (Schema::hasColumn($table, 'su') and $row->su) {
    # Add the su_hidden fields to the hiden variable
    foreach ($su_hidden as $su_hid) {
        array_push($hidden, $su_hid);
    }
}
# Gets the fields available to edit / update
$final_columns = [];
foreach ($columns as $column) {
    $add = true;
    foreach ($hidden as $hide) {
        if ($column == $hide) {
            $add = false;
        }
    }
    if ($column == Laralum::allowEditingField() and !Laralum::loggedInUser()->su) {
        $add = false;
    }
    if ($add) {
        array_push($final_columns, $column);
    }
}
$fields = $final_columns;
Пример #4
0
			    <div class="page-content">
					<div class="menu-pusher">
		      			@yield('content')
					</div>
				</div>
				<br><br>
				<div class="page-footer">
					<div class="ui bottom fixed padded segment">
						<div class="menu-pusher">
			      			<div class="ui container">
								<a href="{{ url('/') }}" class="ui tiny header">
									{{ Laralum::websiteTitle() }}
								</a>
									 <?php 
$locales = Laralum::locales();
if ($locale = Laralum::loggedInUser()->locale) {
    $locale = $locales[$locale];
} else {
    $locale = $locales['en'];
}
?>
								-
								<a href="{{ $locale['website'] }}" class="ui tiny header">
									{{ trans('laralum.translated_by', ['author' => $locale['author']]) }}
								</a>
								<a class="ui tiny header right floated" href='https://github.com/ConsoleTVs/Laralum'>&copy; Copyright Laralum {{ Laralum::version() }}</a>
								<a class="ui tiny header right floated" href="https://erik.cat">Author</a>
							</div>
						</div>
					</div>
				</div>