コード例 #1
0
ファイル: AdminUsersController.php プロジェクト: strikles/php
 public function getEdit($user)
 {
     \AssetManager::addStyle(\URL::asset('chosen_v1.3.0/chosen.css'));
     \AssetManager::addScript(\URL::asset('chosen_v1.3.0/chosen.jquery.js'));
     \AssetManager::addScript(\URL::asset('js/chosenpicker.js'));
     $title = 'Users';
     $roles = $user->roles()->lists('id', 'name');
     error_log('>>> Roles ' . json_encode($roles));
     $html = view('admin.users.edit', compact('title', 'user', 'roles'))->render();
     return Admin::view($html);
 }
コード例 #2
0
 public function getEdit($group)
 {
     \AssetManager::addStyle(\URL::asset('chosen_v1.3.0/chosen.css'));
     \AssetManager::addScript(\URL::asset('chosen_v1.3.0/chosen.jquery.js'));
     \AssetManager::addScript(\URL::asset('js/chosenpicker.js'));
     $title = 'Groups';
     $users = $group->users()->get();
     $gusers = $users->lists('name', 'id');
     error_log(json_encode($gusers));
     $html = view('admin.groups.edit', compact('title', 'group', 'gusers'))->render();
     return Admin::view($html);
 }
コード例 #3
0
ファイル: table.blade.php プロジェクト: procoders/admin
AssetManager::addScript('admin::js/jquery.dataTables.js');
AssetManager::addScript('admin::js/dataTables.colReorder.js');
AssetManager::addScript('admin::js/dataTables.keyTable.js');
AssetManager::addScript('admin::js/dataTables.fixedHeader.js');
AssetManager::addScript('admin::js/dataTables.colVis.js');
AssetManager::addScript('admin::js/table-manager.js');
?>
    <script>
        <?php 
AssetManager::addScript('admin::js/bootstrap-datepicker.js');
AssetManager::addStyle('admin::css/datepicker.css');
AssetManager::addStyle('admin::css/model-filters.css');
AssetManager::addScript('admin::js/editable.js');
AssetManager::addScript('admin::js/parsley.min.js');
AssetManager::addStyle('admin::css/bootstrap-editable.css');
AssetManager::addStyle('admin::css/editable.css');
?>

        var filters = {!! json_encode($jsFilters) !!};

        $(document).ready(function() {
            var table = AdminTable.init('{{$tableId}}', {
                exclColumns: {{count($columns)-1}},
                sortConfig: [{!! json_encode($unsortableColumns) !!}],
                filters: filters
            });
        });

    </script>
@stop
コード例 #4
0
ファイル: form.blade.php プロジェクト: procoders/admin
@extends('admin::_layout.inner')

@section('innerContent')
    <?php 
AssetManager::addStyle('admin::css/bootstrap-select.min.css');
AssetManager::addScript('admin::js/bootstrap-select.min.js');
AssetManager::addScript('admin::js/form-plugins.js');
?>

    @if (!empty($form->getGroups()))
            {!! $form->render(true) !!}
    @else
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-inverse">
                    <div class="panel-heading">
                        {{{ $title }}}
                    </div>
                    <div class="panel-body">
                        {!! $form->render() !!}
                    </div>
                </div>
            </div>
        </div>
    @endif
    <script>
        var myFile = document.getElementById("teq");
        if(myFile) {
            myFile.addEventListener('change', function() {
                var max_filesize = 5242880;
                if (this.files[0].size > max_filesize) {
コード例 #5
0
ファイル: items.blade.php プロジェクト: procoders/printrock
<?php

$id = uniqid();
AssetManager::addScript('admin::js/lightbox-2.6.min.js');
AssetManager::addStyle('admin::css/lightbox.css');
?>

<div class="panel-group" id="accordion">
    @foreach ($itemsField as $key => $item)
        <div class="panel panel-inverse">
            <div class="panel-heading">
                <div class="panel-heading-btn">
                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove" data-original-title="" title=""><i class="fa fa-times"></i></a>
                </div>
                <h3 class="panel-title">
                    <a class="accordion-toggle accordion-toggle-styled" data-toggle="collapse" data-parent="#accordion" href="#collapse_{{$key}}">
                        <i class="fa fa-plus-circle pull-right"></i>
                        Item {{$key + 1}}
                    </a>
                </h3>
            </div>
            <div id="collapse_{{$key}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading_{{$key}}">
                <div class="panel-body">
                    <div class="form-group">
                        <label class="col-md-2 control-label">Photo</label>
                        <div class="col-md-10">
                            <a href="/{{$photos[$key]->image}}" data-lightbox="{{$id}}">
                                <img class="thumbnail" src="/{{$photos[$key]->image}}" width="200px">
                            </a>
                        </div>
                    </div>
コード例 #6
0
ファイル: filters.blade.php プロジェクト: procoders/admin
<?php

AssetManager::addScript('admin::js/bootstrap-datepicker.js');
AssetManager::addStyle('admin::css/datepicker.css');
?>
<div class="row">
    <div class="col-lg-12">
        <form action="{{$_SERVER['REQUEST_URI']}}" id="filterForm" method="GET">
            <div class="filter-wrapper">
                @foreach ($viewFilters as $filterIndex => $filter)
                    {!! $filter->render($tableId, $filterIndex) !!}
                @endforeach
                <a href="#" id="reset-{{$tableId}}" class="reset">Reset form</a>
            </div>
        </form>
    </div>
</div>