9 |
10 |
11 |
12 |
13 |
18 |
19 |
20 |
Ubah Buku
21 |
22 |
23 |
24 | {!! Form::model($book, ['url' => route('books.update', $book->id),
25 | 'method' => 'put', 'files'=>'true', 'class'=>'form-horizontal']) !!}
26 | @include('books._form')
27 | {!! Form::close() !!}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | @endsection
38 |
--------------------------------------------------------------------------------
/resources/views/books/index.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
16 |
17 |
18 |
Buku
19 |
20 |
21 |
22 |
23 | Tambah
24 | Export
25 |
26 | {!! $html->table(['class'=>'table-striped']) !!}
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | @endsection
37 |
38 | @section('scripts')
39 | {!! $html->scripts() !!}
40 | @endsection
41 |
42 |
--------------------------------------------------------------------------------
/bootstrap/autoload.php:
--------------------------------------------------------------------------------
1 | books->count() > 0) {
19 | // menyiapkan pesan error
20 | $html = 'Penulis tidak bisa dihapus karena masih memiliki buku : ';
21 | $html .= '
';
22 | foreach ($author->books as $book) {
23 | $html .= "- $book->title
";//tampilkan buku
24 | }
25 | $html .= '
';
26 |
27 | Session::flash("flash_notification", [
28 | "level"=>"danger",
29 | "message"=>$html
30 | ]);
31 |
32 | // membatalkan proses penghapusan
33 | return false;
34 | }
35 | });
36 | }
37 |
38 | public function books()//panggil model books
39 | {
40 | return $this->hasMany('App\Book');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/public/css/theme/assets/js/easy-pie-chart.js:
--------------------------------------------------------------------------------
1 | var Script = function () {
2 |
3 | // easy pie chart
4 |
5 | $('.percentage').easyPieChart({
6 | animate: 1000,
7 | size: 135,
8 | barColor:'#ff6c60'
9 | });
10 | $('.percentage-light').easyPieChart({
11 | barColor: function(percent) {
12 | percent /= 100;
13 | return "rgb(" + Math.round(255 * (1-percent)) + ", " + Math.round(255 * percent) + ", 0)";
14 | },
15 | trackColor: '#666',
16 | scaleColor: false,
17 | lineCap: 'butt',
18 | lineWidth: 15,
19 | animate: 1000
20 | });
21 |
22 | $('.update-easy-pie-chart').click(function(){
23 | $('.easy-pie-chart .percentage').each(function() {
24 | var newValue = Math.floor(100*Math.random());
25 | $(this).data('easyPieChart').update(newValue);
26 | $('span', this).text(newValue);
27 | });
28 | });
29 |
30 | $('.updateEasyPieChart').on('click', function(e) {
31 | e.preventDefault();
32 | $('.percentage, .percentage-light').each(function() {
33 | var newValue = Math.round(100*Math.random());
34 | $(this).data('easyPieChart').update(newValue);
35 | $('span', this).text(newValue);
36 | });
37 | });
38 |
39 | }();
--------------------------------------------------------------------------------
/app/Http/Controllers/GuestController.php:
--------------------------------------------------------------------------------
1 | ajax()) {
18 | $books = Book::with('author');
19 | return Datatables::of($books)
20 | ->addColumn('stock', function($book){
21 | return $book->stock;
22 | })
23 | ->addColumn('action', function($book){
24 | if (Laratrust::hasRole('admin')) return '';// jika admin tidak muncul tombol pinjam
25 | return '
Pinjam';
26 | })->make(true);
27 | }
28 | $html = $htmlBuilder
29 | ->addColumn(['data' => 'title', 'name'=>'title', 'title'=>'Judul'])
30 | ->addColumn(['data' => 'stock', 'name'=>'stock', 'title'=>'Stok', 'orderable'=>false, 'searchable'=>false])
31 | ->addColumn(['data' => 'author.name', 'name'=>'author.name', 'title'=>'Penulis'])
32 | ->addColumn(['data' => 'action', 'name'=>'action', 'title'=>'', 'orderable'=>false, 'searchable'=>false]);
33 | return view('guest.index')->with(compact('html'));
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/resources/views/errors/503.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Be right back.
5 |
6 |
7 |
8 |
39 |
40 |
41 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/public/css/theme/assets/js/jquery.ui.touch-punch.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery UI Touch Punch 0.2.3
3 | *
4 | * Copyright 2011–2014, Dave Furfero
5 | * Dual licensed under the MIT or GPL Version 2 licenses.
6 | *
7 | * Depends:
8 | * jquery.ui.widget.js
9 | * jquery.ui.mouse.js
10 | */
11 | !function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
--------------------------------------------------------------------------------
/resources/views/auth/passwords/email.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 |
4 | @section('content')
5 |
6 |
7 |
8 |
9 |
Reset Password
10 |
11 | @if (session('status'))
12 |
13 | {{ session('status') }}
14 |
15 | @endif
16 |
17 | {!! Form::open(['url'=>'/password/email', 'class'=>'form-horizontal'])!!}
18 |
25 |
32 | {!! Form::close() !!}
33 |
34 |
35 |
36 |
37 |
38 |
39 | @endsection
40 |
--------------------------------------------------------------------------------
/resources/views/vendor/pagination/default.blade.php:
--------------------------------------------------------------------------------
1 | @if ($paginator->hasPages())
2 |
36 | @endif
37 |
--------------------------------------------------------------------------------
/routes/web.php:
--------------------------------------------------------------------------------
1 | 'admin', 'middleware'=>['auth', 'role:admin']], function () {
19 | Route::resource('authors', 'AuthorsController');
20 | Route::resource('books', 'BooksController');
21 | Route::get('export/books', [
22 | 'as' => 'export.books',
23 | 'uses' => 'BooksController@export'
24 | ]);
25 | Route::post('export/books', [
26 | 'as' => 'export.books.post',
27 | 'uses' => 'BooksController@exportPost'
28 | ]);
29 | });
30 |
31 | Route::get('books/{book}/borrow', [
32 | 'middleware' => ['auth', 'role:member'],
33 | 'as' => 'guest.books.borrow',
34 | 'uses' => 'BooksController@borrow'
35 | ]);
36 |
37 | Route::put('books/{book}/return', [
38 | 'middleware' => ['auth', 'role:member'],
39 | 'as' => 'member.books.return',
40 | 'uses' => 'BooksController@returnBack'
41 | ]);
42 |
43 |
--------------------------------------------------------------------------------
/public/js/custom.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function () {
2 | // confirm delete
3 | $(document.body).on('submit', '.js-confirm', function () {
4 | var $el = $(this)
5 | var text = $el.data('confirm') ? $el.data('confirm') : 'Anda yakin melakukan tindakan ini?'
6 | var c = confirm(text);
7 | return c;
8 | });
9 |
10 | // add selectize to select element
11 | $('.js-selectize').selectize({
12 | sortField: 'text'
13 | });
14 |
15 | // delete review book
16 | $(document.body).on('submit', '.js-review-delete', function () {
17 | var $el = $(this);
18 | var text = $el.data('confirm') ? $el.data('confirm') : 'Anda yakin melakukan tindakan ini?';
19 | var c = confirm(text);
20 | // cancel delete
21 | if (c === false) return c;
22 |
23 | // delete via ajax
24 | // disable behaviour default dari tombol submit
25 | event.preventDefault();
26 | // hapus data buku dengan ajax
27 | $.ajax({
28 | type : 'POST',
29 | url : $(this).attr('action'),
30 | dataType : 'json',
31 | data : {
32 | _method : 'DELETE',
33 | // menambah csrf token dari Laravel
34 | _token : $( this ).children( 'input[name=_token]' ).val()
35 | }
36 | }).done(function(data) {
37 | // cari baris yang dihapus
38 | baris = $('#form-'+data.id).closest('tr');
39 | // hilangkan baris (fadeout kemudian remove)
40 | baris.fadeOut(300, function() {$(this).remove()});
41 | });
42 | });
43 | });
44 |
45 |
--------------------------------------------------------------------------------
/app/User.php:
--------------------------------------------------------------------------------
1 | stock < 1) {
38 | throw new BookException("Buku $book->title sedang tidak tersedia.");
39 | }
40 |
41 | // cek apakah buku ini sedang dipinjam oleh user
42 | if($this->borrowLogs()->where('book_id',$book->id)->where('is_returned', 0)->count() > 0 ) {
43 | throw new BookException("Buku $book->title sedang Anda pinjam.");
44 | }
45 |
46 | $borrowLog = BorrowLog::create(['user_id'=>$this->id, 'book_id'=>$book->id]);
47 | return $borrowLog;
48 | }
49 |
50 | public function borrowLogs()
51 | {
52 | return $this->hasMany('App\BorrowLog');
53 | }
54 |
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/resources/assets/js/bootstrap.js:
--------------------------------------------------------------------------------
1 |
2 | window._ = require('lodash');
3 |
4 | /**
5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support
6 | * for JavaScript based Bootstrap features such as modals and tabs. This
7 | * code may be modified to fit the specific needs of your application.
8 | */
9 |
10 | window.$ = window.jQuery = require('jquery');
11 | require('bootstrap-sass');
12 |
13 | /**
14 | * Vue is a modern JavaScript library for building interactive web interfaces
15 | * using reactive data binding and reusable components. Vue's API is clean
16 | * and simple, leaving you to focus on building your next great project.
17 | */
18 |
19 | window.Vue = require('vue');
20 | require('vue-resource');
21 |
22 | /**
23 | * We'll register a HTTP interceptor to attach the "CSRF" header to each of
24 | * the outgoing requests issued by this application. The CSRF middleware
25 | * included with Laravel will automatically verify the header's value.
26 | */
27 |
28 | Vue.http.interceptors.push((request, next) => {
29 | request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
30 |
31 | next();
32 | });
33 |
34 | /**
35 | * Echo exposes an expressive API for subscribing to channels and listening
36 | * for events that are broadcast by Laravel. Echo and event broadcasting
37 | * allows your team to easily build robust real-time web applications.
38 | */
39 |
40 | // import Echo from "laravel-echo"
41 |
42 | // window.Echo = new Echo({
43 | // broadcaster: 'pusher',
44 | // key: 'your-pusher-key'
45 | // });
46 |
--------------------------------------------------------------------------------
/resources/views/dashboard/admin.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 | @section('content')
3 |
4 |
5 |
6 |
7 |
8 |
Dashboard
9 |
10 |
11 | Selamat datang di Menu Admin Ultraviolet Perpus. Silahkan pilih menu yang diinginkan.
12 |
13 |
14 |
15 |
16 |
17 |
18 | @endsection
19 |
20 | @section('scripts')
21 |
41 | @endsection
--------------------------------------------------------------------------------
/resources/views/vendor/pagination/bootstrap-4.blade.php:
--------------------------------------------------------------------------------
1 | @if ($paginator->hasPages())
2 |
36 | @endif
37 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "laravel/laravel",
3 | "description": "The Laravel Framework.",
4 | "keywords": ["framework", "laravel"],
5 | "license": "MIT",
6 | "type": "project",
7 | "require": {
8 | "php": ">=5.6.4",
9 | "laravel/framework": "5.3.*",
10 | "laravelcollective/html": "~5.3",
11 | "santigarcor/laratrust": "3.0.*",
12 | "yajra/laravel-datatables-oracle": "~6.0",
13 | "barryvdh/laravel-dompdf": "~0.7"
14 | },
15 | "require-dev": {
16 | "fzaninotto/faker": "~1.4",
17 | "mockery/mockery": "0.9.*",
18 | "phpunit/phpunit": "~5.0",
19 | "symfony/css-selector": "3.1.*",
20 | "symfony/dom-crawler": "3.1.*"
21 | },
22 | "autoload": {
23 | "classmap": [
24 | "database"
25 | ],
26 | "psr-4": {
27 | "App\\": "app/"
28 | }
29 | },
30 | "autoload-dev": {
31 | "classmap": [
32 | "tests/TestCase.php"
33 | ]
34 | },
35 | "scripts": {
36 | "post-root-package-install": [
37 | "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
38 | ],
39 | "post-create-project-cmd": [
40 | "php artisan key:generate"
41 | ],
42 | "post-install-cmd": [
43 | "Illuminate\\Foundation\\ComposerScripts::postInstall",
44 | "php artisan optimize"
45 | ],
46 | "post-update-cmd": [
47 | "Illuminate\\Foundation\\ComposerScripts::postUpdate",
48 | "php artisan optimize"
49 | ]
50 | },
51 | "config": {
52 | "preferred-install": "dist"
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/Book.php:
--------------------------------------------------------------------------------
1 | amount < $book->borrowed) {
19 | Session::flash("flash_notification", [
20 | "level"=>"danger",
21 | "message"=>"Jumlah buku $book->title harus >= " . $book->borrowed
22 | ]);
23 | return false;
24 | }
25 | });
26 |
27 | self::deleting(function($book)
28 | {
29 | if ($book->borrowLogs()->count() > 0) {
30 | Session::flash("flash_notification", [
31 | "level"=>"danger",
32 | "message"=>"Buku $book->title sedang dipinjam."
33 | ]);
34 | return false;
35 | }
36 | });
37 | }
38 |
39 | public function author()
40 | {
41 | return $this->belongsTo('App\Author');
42 | }
43 |
44 | public function borrowLogs()
45 | {
46 | return $this->hasMany('App\BorrowLog');
47 | }
48 |
49 | public function getStockAttribute()
50 | {
51 | $borrowed = $this->borrowLogs()->borrowed()->count();
52 | $stock = $this->amount - $borrowed;
53 | return $stock;
54 | }
55 |
56 | public function getBorrowedAttribute()
57 | {
58 | return $this->borrowLogs()->borrowed()->count();
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_KEY'),
36 | 'secret' => env('PUSHER_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | //
40 | ],
41 | ],
42 |
43 | 'redis' => [
44 | 'driver' => 'redis',
45 | 'connection' => 'default',
46 | ],
47 |
48 | 'log' => [
49 | 'driver' => 'log',
50 | ],
51 |
52 | 'null' => [
53 | 'driver' => 'null',
54 | ],
55 |
56 | ],
57 |
58 | ];
59 |
--------------------------------------------------------------------------------
/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
32 |
33 | $status = $kernel->handle(
34 | $input = new Symfony\Component\Console\Input\ArgvInput,
35 | new Symfony\Component\Console\Output\ConsoleOutput
36 | );
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Shutdown The Application
41 | |--------------------------------------------------------------------------
42 | |
43 | | Once Artisan has finished running. We will fire off the shutdown events
44 | | so that any final work may be done by the application before we shut
45 | | down the process. This is the last thing to happen to the request.
46 | |
47 | */
48 |
49 | $kernel->terminate($input, $status);
50 |
51 | exit($status);
52 |
--------------------------------------------------------------------------------
/resources/views/auth/login.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
10 |
11 |
12 |
13 | {!! Form::open(['url'=>'login', 'class'=>'form-horizontal']) !!}
14 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | @endsection
47 |
--------------------------------------------------------------------------------
/public/js/dataTables.bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | DataTables Bootstrap 3 integration
3 | ©2011-2015 SpryMedia Ltd - datatables.net/license
4 | */
5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(f.ext.classes,
6 | {sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new f.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};
7 | l=0;for(h=f.length;l
",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#",
8 | "aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};return f});
9 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Laravel PHP Framework
2 |
3 | [](https://travis-ci.org/laravel/framework)
4 | [](https://packagist.org/packages/laravel/framework)
5 | [](https://packagist.org/packages/laravel/framework)
6 | [](https://packagist.org/packages/laravel/framework)
7 | [](https://packagist.org/packages/laravel/framework)
8 |
9 | Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching.
10 |
11 | Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.
12 |
13 | ## Official Documentation
14 |
15 | Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs).
16 |
17 | ## Contributing
18 |
19 | Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions).
20 |
21 | ## Security Vulnerabilities
22 |
23 | If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
24 |
25 | ## License
26 |
27 | The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
28 |
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | /*
11 | |--------------------------------------------------------------------------
12 | | Register The Auto Loader
13 | |--------------------------------------------------------------------------
14 | |
15 | | Composer provides a convenient, automatically generated class loader for
16 | | our application. We just need to utilize it! We'll simply require it
17 | | into the script here so that we don't have to worry about manual
18 | | loading any of our classes later on. It feels nice to relax.
19 | |
20 | */
21 |
22 | require __DIR__.'/../bootstrap/autoload.php';
23 |
24 | /*
25 | |--------------------------------------------------------------------------
26 | | Turn On The Lights
27 | |--------------------------------------------------------------------------
28 | |
29 | | We need to illuminate PHP development, so let us turn on the lights.
30 | | This bootstraps the framework and gets it ready for use, then it
31 | | will load up this application so that we can run it and send
32 | | the responses back to the browser and delight our users.
33 | |
34 | */
35 |
36 | $app = require_once __DIR__.'/../bootstrap/app.php';
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Run The Application
41 | |--------------------------------------------------------------------------
42 | |
43 | | Once we have the application, we can handle the incoming request
44 | | through the kernel, and send the associated response back to
45 | | the client's browser allowing them to enjoy the creative
46 | | and wonderful application we have prepared for them.
47 | |
48 | */
49 |
50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
51 |
52 | $response = $kernel->handle(
53 | $request = Illuminate\Http\Request::capture()
54 | );
55 |
56 | $response->send();
57 |
58 | $kernel->terminate($request, $response);
59 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapApiRoutes();
39 |
40 | $this->mapWebRoutes();
41 |
42 | //
43 | }
44 |
45 | /**
46 | * Define the "web" routes for the application.
47 | *
48 | * These routes all receive session state, CSRF protection, etc.
49 | *
50 | * @return void
51 | */
52 | protected function mapWebRoutes()
53 | {
54 | Route::group([
55 | 'middleware' => 'web',
56 | 'namespace' => $this->namespace,
57 | ], function ($router) {
58 | require base_path('routes/web.php');
59 | });
60 | }
61 |
62 | /**
63 | * Define the "api" routes for the application.
64 | *
65 | * These routes are typically stateless.
66 | *
67 | * @return void
68 | */
69 | protected function mapApiRoutes()
70 | {
71 | Route::group([
72 | 'middleware' => 'api',
73 | 'namespace' => $this->namespace,
74 | 'prefix' => 'api',
75 | ], function ($router) {
76 | require base_path('routes/api.php');
77 | });
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/resources/views/books/_form.blade.php:
--------------------------------------------------------------------------------
1 |
8 |
9 |
18 |
19 |
29 |
30 |
42 |
43 |
48 |
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
60 | return response()->json(['error' => 'Unauthenticated.'], 401);
61 | }
62 |
63 | return redirect()->guest('login');
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/RegisterController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
41 | }
42 |
43 | /**
44 | * Get a validator for an incoming registration request.
45 | *
46 | * @param array $data
47 | * @return \Illuminate\Contracts\Validation\Validator
48 | */
49 | protected function validator(array $data)
50 | {
51 | return Validator::make($data, [
52 | 'name' => 'required|max:255',
53 | 'email' => 'required|email|max:255|unique:users',
54 | 'password' => 'required|min:6|confirmed',
55 | ]);
56 | }
57 |
58 | /**
59 | * Create a new user instance after a valid registration.
60 | *
61 | * @param array $data
62 | * @return User
63 | */
64 | protected function create(array $data)
65 | {
66 | $user = User::create([
67 | 'name' => $data['name'],
68 | 'email' => $data['email'],
69 | 'password' => bcrypt($data['password']),
70 | ]);
71 | $memberRole = Role::where('name', 'member')->first();
72 | $user->attachRole($memberRole);
73 | return $user;
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | 'local',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Default Cloud Filesystem Disk
23 | |--------------------------------------------------------------------------
24 | |
25 | | Many applications store files both locally and in the cloud. For this
26 | | reason, you may specify a default "cloud" driver here. This driver
27 | | will be bound as the Cloud disk implementation in the container.
28 | |
29 | */
30 |
31 | 'cloud' => 's3',
32 |
33 | /*
34 | |--------------------------------------------------------------------------
35 | | Filesystem Disks
36 | |--------------------------------------------------------------------------
37 | |
38 | | Here you may configure as many filesystem "disks" as you wish, and you
39 | | may even configure multiple disks of the same driver. Defaults have
40 | | been setup for each driver as an example of the required options.
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'visibility' => 'public',
55 | ],
56 |
57 | 's3' => [
58 | 'driver' => 's3',
59 | 'key' => 'your-key',
60 | 'secret' => 'your-secret',
61 | 'region' => 'your-region',
62 | 'bucket' => 'your-bucket',
63 | ],
64 |
65 | ],
66 |
67 | ];
68 |
--------------------------------------------------------------------------------
/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 | [
27 | \App\Http\Middleware\EncryptCookies::class,
28 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
29 | \Illuminate\Session\Middleware\StartSession::class,
30 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
31 | \App\Http\Middleware\VerifyCsrfToken::class,
32 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
33 | ],
34 |
35 | 'api' => [
36 | 'throttle:60,1',
37 | 'bindings',
38 | ],
39 | ];
40 |
41 | /**
42 | * The application's route middleware.
43 | *
44 | * These middleware may be assigned to groups or used individually.
45 | *
46 | * @var array
47 | */
48 | protected $routeMiddleware =
49 | [
50 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
51 | 'role' => \Laratrust\Middleware\LaratrustRole::class,
52 | 'permission' => \Laratrust\Middleware\LaratrustPermission::class,
53 | 'ability' => \Laratrust\Middleware\LaratrustAbility::class,
54 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
57 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
58 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
59 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
60 | ];
61 | }
62 |
--------------------------------------------------------------------------------
/public/css/theme/assets/lineicons/lte-ie7.js:
--------------------------------------------------------------------------------
1 | /* Use this script if you need to support IE 7 and IE 6. */
2 |
3 | window.onload = function() {
4 | function addIcon(el, entity) {
5 | var html = el.innerHTML;
6 | el.innerHTML = '' + entity + '' + html;
7 | }
8 | var icons = {
9 | 'li_heart' : '',
10 | 'li_cloud' : '',
11 | 'li_star' : '',
12 | 'li_tv' : '',
13 | 'li_sound' : '',
14 | 'li_video' : '',
15 | 'li_trash' : '',
16 | 'li_user' : '',
17 | 'li_key' : '',
18 | 'li_search' : '',
19 | 'li_settings' : '',
20 | 'li_camera' : '',
21 | 'li_tag' : '',
22 | 'li_lock' : '',
23 | 'li_bulb' : '',
24 | 'li_pen' : '',
25 | 'li_diamond' : '',
26 | 'li_display' : '',
27 | 'li_location' : '',
28 | 'li_eye' : '',
29 | 'li_bubble' : '',
30 | 'li_stack' : '',
31 | 'li_cup' : '',
32 | 'li_phone' : '',
33 | 'li_news' : '',
34 | 'li_mail' : '',
35 | 'li_like' : '',
36 | 'li_photo' : '',
37 | 'li_note' : '',
38 | 'li_clock' : '',
39 | 'li_paperplane' : '',
40 | 'li_params' : '',
41 | 'li_banknote' : '',
42 | 'li_data' : '',
43 | 'li_music' : '',
44 | 'li_megaphone' : '',
45 | 'li_study' : '',
46 | 'li_lab' : '',
47 | 'li_food' : '',
48 | 'li_t-shirt' : '',
49 | 'li_fire' : '',
50 | 'li_clip' : '',
51 | 'li_shop' : '',
52 | 'li_calendar' : '',
53 | 'li_vallet' : '',
54 | 'li_vynil' : '',
55 | 'li_truck' : '',
56 | 'li_world' : ''
57 | },
58 | els = document.getElementsByTagName('*'),
59 | i, attr, html, c, el;
60 | for (i = 0; i < els.length; i += 1) {
61 | el = els[i];
62 | attr = el.getAttribute('data-icon');
63 | if (attr) {
64 | addIcon(el, attr);
65 | }
66 | c = el.className;
67 | c = c.match(/li_[^\s'"]+/);
68 | if (c && icons[c[0]]) {
69 | addIcon(el, icons[c[0]]);
70 | }
71 | }
72 | };
--------------------------------------------------------------------------------
/resources/views/auth/passwords/reset.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
Reset Password
9 |
10 |
11 | @if (session('status'))
12 |
13 | {{ session('status') }}
14 |
15 | @endif
16 |
17 | {!! Form::open(['url'=>'/password/reset', 'class'=>'form-horizontal'])!!}
18 |
19 |
26 |
33 |
41 |
48 | {!! Form::close() !!}
49 |
50 |
51 |
52 |
53 |
54 |
55 | @endsection
56 |
--------------------------------------------------------------------------------
/resources/views/auth/register.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
Register
13 |
14 | {!! Form::open(['url'=>'/register', 'class'=>'form-horizontal']) !!}
15 |
22 |
29 |
36 |
43 |
50 | {!! Form::close() !!}
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | @endsection
59 |
--------------------------------------------------------------------------------
/resources/views/books/export.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
19 |
Export Buku
20 |
21 |
22 |
23 | {!! Form::open(['url' => route('export.books.post'),
24 | 'method' => 'post', 'class'=>'form-horizontal']) !!}
25 |
35 |
36 |
44 |
45 |
50 | {!! Form::close() !!}
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | @endsection
59 |
60 |
--------------------------------------------------------------------------------
/public/css/theme/assets/css/to-do.css:
--------------------------------------------------------------------------------
1 | /*--------------Tasks Widget--------------*/
2 |
3 | .task-content {
4 | margin-bottom: 30px;
5 | }
6 |
7 | .task-panel {
8 | background: #fff;
9 | text-align: left;
10 | box-shadow: 0px 3px 2px #aab2bd;
11 | margin: 5px;
12 | }
13 |
14 | .tasks-widget .task-content:after {
15 | clear: both;
16 | }
17 |
18 | .tasks-widget .task-footer {
19 | margin-top: 5px;
20 | }
21 |
22 | .tasks-widget .task-footer:after,
23 | .tasks-widget .task-footer:before {
24 | content: "";
25 | display: table;
26 | line-height: 0;
27 | }
28 |
29 | .tasks-widget .task-footer:after {
30 | clear: both;
31 | }
32 |
33 | .tasks-widget .task-list {
34 | padding:0;
35 | margin:0;
36 | }
37 |
38 | .tasks-widget .task-list > li {
39 | position:relative;
40 | padding:10px 5px;
41 | border-bottom:1px dashed #eaeaea;
42 | }
43 |
44 | .tasks-widget .task-list li.last-line {
45 | border-bottom:none;
46 | }
47 |
48 | .tasks-widget .task-list li > .task-bell {
49 | margin-left:10px;
50 | }
51 |
52 | .tasks-widget .task-list li > .task-checkbox {
53 | float:left;
54 | width:30px;
55 | }
56 |
57 | .tasks-widget .task-list li > .task-title {
58 | overflow:hidden;
59 | margin-right:10px;
60 | }
61 |
62 | .tasks-widget .task-list li > .task-config {
63 | position:absolute;
64 | top:10px;
65 | right:10px;
66 | }
67 |
68 | .tasks-widget .task-list li .task-title .task-title-sp {
69 | margin-right:5px;
70 | }
71 |
72 | .tasks-widget .task-list li.task-done .task-title-sp {
73 | text-decoration:line-through;
74 | color: #bbbbbb;
75 | }
76 |
77 | .tasks-widget .task-list li.task-done {
78 | background:#f6f6f6;
79 | }
80 |
81 | .tasks-widget .task-list li.task-done:hover {
82 | background:#f4f4f4;
83 | }
84 |
85 | .tasks-widget .task-list li:hover {
86 | background:#f9f9f9;
87 | }
88 |
89 | .tasks-widget .task-list li .task-config {
90 | display:none;
91 | }
92 |
93 | .tasks-widget .task-list li:hover > .task-config {
94 | display:block;
95 | margin-bottom:0 !important;
96 | }
97 |
98 |
99 | @media only screen and (max-width: 320px) {
100 |
101 | .tasks-widget .task-config-btn {
102 | float:inherit;
103 | display:block;
104 | }
105 |
106 | .tasks-widget .task-list-projects li > .label {
107 | margin-bottom:5px;
108 | }
109 |
110 | }
--------------------------------------------------------------------------------
/public/css/theme/assets/js/jquery.scrollTo.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2007-2013 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com
3 | * Dual licensed under MIT and GPL.
4 | * @author Ariel Flesler
5 | * @version 1.4.6
6 | */
7 | ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,targ,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
8 |
--------------------------------------------------------------------------------
/public/css/theme/assets/js/gritter/css/jquery.gritter0.css:
--------------------------------------------------------------------------------
1 | /* the norm */
2 | #gritter-notice-wrapper {
3 | position:fixed;
4 | top:20px;
5 | right:20px;
6 | width:301px;
7 | z-index:9999;
8 | }
9 | #gritter-notice-wrapper.top-left {
10 | left: 20px;
11 | right: auto;
12 | }
13 | #gritter-notice-wrapper.bottom-right {
14 | top: auto;
15 | left: auto;
16 | bottom: 20px;
17 | right: 20px;
18 | }
19 | #gritter-notice-wrapper.bottom-left {
20 | top: auto;
21 | right: auto;
22 | bottom: 20px;
23 | left: 20px;
24 | }
25 | .gritter-item-wrapper {
26 | position:relative;
27 | margin:0 0 10px 0;
28 | background:url('../images/ie-spacer.gif'); /* ie7/8 fix */
29 | }
30 | .gritter-top {
31 | background:url("..images/gritter.png") no-repeat left -30px;
32 | height:10px;
33 | }
34 | .hover .gritter-top {
35 | background-position:right -30px;
36 | }
37 | .gritter-bottom {
38 | background:url("../images/gritter.png") no-repeat left bottom;
39 | height:8px;
40 | margin:0;
41 | }
42 | .hover .gritter-bottom {
43 | background-position: bottom right;
44 | }
45 | .gritter-item {
46 | display:block;
47 | background:url("../images/gritter.png") no-repeat left -40px;
48 | color:#eee;
49 | padding:2px 11px 8px 11px;
50 | font-size: 11px;
51 | font-family:verdana;
52 | }
53 | .hover .gritter-item {
54 | background-position:right -40px;
55 | }
56 | .gritter-item p {
57 | padding:0;
58 | margin:0;
59 | word-wrap:break-word;
60 | }
61 | .gritter-close {
62 | display:none;
63 | position:absolute;
64 | top:5px;
65 | left:3px;
66 | background:url("../images/gritter.png") no-repeat left top;
67 | cursor:pointer;
68 | width:30px;
69 | height:30px;
70 | }
71 | .gritter-title {
72 | font-size:14px;
73 | font-weight:bold;
74 | padding:0 0 7px 0;
75 | display:block;
76 | text-shadow:1px 1px 0 #000; /* Not supported by IE :( */
77 | }
78 | .gritter-image {
79 | width:48px;
80 | height:48px;
81 | float:left;
82 | }
83 | .gritter-with-image,
84 | .gritter-without-image {
85 | padding:0;
86 | }
87 | .gritter-with-image {
88 | width:220px;
89 | float:right;
90 | }
91 | /* for the light (white) version of the gritter notice */
92 | .gritter-light .gritter-item,
93 | .gritter-light .gritter-bottom,
94 | .gritter-light .gritter-top,
95 | .gritter-light .gritter-close {
96 | background-image: url("../images/gritter-light.png");
97 | color: #222;
98 | }
99 | .gritter-light .gritter-title {
100 | text-shadow: none;
101 | }
102 |
--------------------------------------------------------------------------------
/public/css/theme/assets/js/gritter/css/jquery.gritter.css:
--------------------------------------------------------------------------------
1 | /* the norm */
2 | #gritter-notice-wrapper {
3 | position:fixed;
4 | top:20px;
5 | right:20px;
6 | width:301px;
7 | z-index:9999;
8 | }
9 | #gritter-notice-wrapper.top-left {
10 | left: 20px;
11 | right: auto;
12 | }
13 | #gritter-notice-wrapper.bottom-right {
14 | top: auto;
15 | left: auto;
16 | bottom: 20px;
17 | right: 20px;
18 | }
19 | #gritter-notice-wrapper.bottom-left {
20 | top: auto;
21 | right: auto;
22 | bottom: 20px;
23 | left: 20px;
24 | }
25 | .gritter-item-wrapper {
26 | position:relative;
27 | margin:0 0 10px 0;
28 | background:url('../images/ie-spacer.gif'); /* ie7/8 fix */
29 | }
30 | .gritter-top {
31 | background:url(../images/gritter.png) no-repeat left -30px;
32 | height:10px;
33 | }
34 | .hover .gritter-top {
35 | background-position:right -30px;
36 | }
37 | .gritter-bottom {
38 | background:url(../images/gritter.png) no-repeat left bottom;
39 | height:8px;
40 | margin:0;
41 | }
42 | .hover .gritter-bottom {
43 | background-position: bottom right;
44 | }
45 | .gritter-item {
46 | display:block;
47 | background:url(../images/gritter.png) no-repeat left -40px;
48 | color:#eee;
49 | padding:2px 11px 8px 11px;
50 | font-size: 11px;
51 | font-family:verdana;
52 | }
53 | .hover .gritter-item {
54 | background-position:right -40px;
55 | }
56 | .gritter-item p {
57 | padding:0;
58 | margin:0;
59 | word-wrap:break-word;
60 | }
61 | .gritter-close {
62 | display:none;
63 | position:absolute;
64 | top:5px;
65 | left:3px;
66 | background:url(../images/gritter.png) no-repeat left top;
67 | cursor:pointer;
68 | width:30px;
69 | height:30px;
70 | text-indent:-9999em;
71 | }
72 | .gritter-title {
73 | font-size:14px;
74 | font-weight:bold;
75 | padding:0 0 7px 0;
76 | display:block;
77 | text-shadow:1px 1px 0 #000; /* Not supported by IE :( */
78 | }
79 | .gritter-image {
80 | width:48px;
81 | height:48px;
82 | float:left;
83 | }
84 | .gritter-with-image,
85 | .gritter-without-image {
86 | padding:0;
87 | }
88 | .gritter-with-image {
89 | width:220px;
90 | float:right;
91 | }
92 | /* for the light (white) version of the gritter notice */
93 | .gritter-light .gritter-item,
94 | .gritter-light .gritter-bottom,
95 | .gritter-light .gritter-top,
96 | .gritter-light .gritter-close {
97 | background-image: url(../images/gritter-light.png);
98 | color: #222;
99 | }
100 | .gritter-light .gritter-title {
101 | text-shadow: none;
102 | }
103 |
--------------------------------------------------------------------------------
/database/migrations/2016_12_11_131056_laratrust_setup_tables.php:
--------------------------------------------------------------------------------
1 | increments('id');
17 | $table->string('name')->unique();
18 | $table->string('display_name')->nullable();
19 | $table->string('description')->nullable();
20 | $table->timestamps();
21 | });
22 |
23 | // Create table for associating roles to users (Many-to-Many)
24 | Schema::create('role_user', function (Blueprint $table) {
25 | $table->integer('user_id')->unsigned();
26 | $table->integer('role_id')->unsigned();
27 |
28 | $table->foreign('user_id')->references('id')->on('users')
29 | ->onUpdate('cascade')->onDelete('cascade');
30 | $table->foreign('role_id')->references('id')->on('roles')
31 | ->onUpdate('cascade')->onDelete('cascade');
32 |
33 | $table->primary(['user_id', 'role_id']);
34 | });
35 |
36 | // Create table for storing permissions
37 | Schema::create('permissions', function (Blueprint $table) {
38 | $table->increments('id');
39 | $table->string('name')->unique();
40 | $table->string('display_name')->nullable();
41 | $table->string('description')->nullable();
42 | $table->timestamps();
43 | });
44 |
45 | // Create table for associating permissions to roles (Many-to-Many)
46 | Schema::create('permission_role', function (Blueprint $table) {
47 | $table->integer('permission_id')->unsigned();
48 | $table->integer('role_id')->unsigned();
49 |
50 | $table->foreign('permission_id')->references('id')->on('permissions')
51 | ->onUpdate('cascade')->onDelete('cascade');
52 | $table->foreign('role_id')->references('id')->on('roles')
53 | ->onUpdate('cascade')->onDelete('cascade');
54 |
55 | $table->primary(['permission_id', 'role_id']);
56 | });
57 | }
58 |
59 | /**
60 | * Reverse the migrations.
61 | *
62 | * @return void
63 | */
64 | public function down()
65 | {
66 | Schema::drop('permission_role');
67 | Schema::drop('permissions');
68 | Schema::drop('role_user');
69 | Schema::drop('roles');
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/config/queue.php:
--------------------------------------------------------------------------------
1 | env('QUEUE_DRIVER', 'sync'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Queue Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may configure the connection information for each server that
26 | | is used by your application. A default configuration has been added
27 | | for each back-end shipped with Laravel. You are free to add more.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'sync' => [
34 | 'driver' => 'sync',
35 | ],
36 |
37 | 'database' => [
38 | 'driver' => 'database',
39 | 'table' => 'jobs',
40 | 'queue' => 'default',
41 | 'retry_after' => 90,
42 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'retry_after' => 90,
49 | ],
50 |
51 | 'sqs' => [
52 | 'driver' => 'sqs',
53 | 'key' => 'your-public-key',
54 | 'secret' => 'your-secret-key',
55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
56 | 'queue' => 'your-queue-name',
57 | 'region' => 'us-east-1',
58 | ],
59 |
60 | 'redis' => [
61 | 'driver' => 'redis',
62 | 'connection' => 'default',
63 | 'queue' => 'default',
64 | 'retry_after' => 90,
65 | ],
66 |
67 | ],
68 |
69 | /*
70 | |--------------------------------------------------------------------------
71 | | Failed Queue Jobs
72 | |--------------------------------------------------------------------------
73 | |
74 | | These options configure the behavior of failed queue job logging so you
75 | | can control which database and table are used to store the jobs that
76 | | have failed. You may change them to any database / table you wish.
77 | |
78 | */
79 |
80 | 'failed' => [
81 | 'database' => env('DB_CONNECTION', 'mysql'),
82 | 'table' => 'failed_jobs',
83 | ],
84 |
85 | ];
86 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Cache Stores
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the cache "stores" for your application as
26 | | well as their drivers. You may even define multiple stores for the
27 | | same cache driver to group types of items stored in your caches.
28 | |
29 | */
30 |
31 | 'stores' => [
32 |
33 | 'apc' => [
34 | 'driver' => 'apc',
35 | ],
36 |
37 | 'array' => [
38 | 'driver' => 'array',
39 | ],
40 |
41 | 'database' => [
42 | 'driver' => 'database',
43 | 'table' => 'cache',
44 | 'connection' => null,
45 | ],
46 |
47 | 'file' => [
48 | 'driver' => 'file',
49 | 'path' => storage_path('framework/cache'),
50 | ],
51 |
52 | 'memcached' => [
53 | 'driver' => 'memcached',
54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
55 | 'sasl' => [
56 | env('MEMCACHED_USERNAME'),
57 | env('MEMCACHED_PASSWORD'),
58 | ],
59 | 'options' => [
60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
61 | ],
62 | 'servers' => [
63 | [
64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
65 | 'port' => env('MEMCACHED_PORT', 11211),
66 | 'weight' => 100,
67 | ],
68 | ],
69 | ],
70 |
71 | 'redis' => [
72 | 'driver' => 'redis',
73 | 'connection' => 'default',
74 | ],
75 |
76 | ],
77 |
78 | /*
79 | |--------------------------------------------------------------------------
80 | | Cache Key Prefix
81 | |--------------------------------------------------------------------------
82 | |
83 | | When utilizing a RAM based store such as APC or Memcached, there might
84 | | be other applications utilizing the same cache. So, we'll specify a
85 | | value to get prefixed to all our keys so we can avoid collisions.
86 | |
87 | */
88 |
89 | 'prefix' => 'laravel',
90 |
91 | ];
92 |
--------------------------------------------------------------------------------
/resources/views/pdf/books.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Data Buku Ultraviolet Perpus
5 |
71 |
72 |
73 | Data Buku Ultraviolet Perpus
74 |
75 |
76 |
77 |
78 | | Judul |
79 | Jumlah |
80 | Stok |
81 | Penulis |
82 |
83 |
84 |
85 | @foreach ($books as $book)
86 |
87 | | {{ $book->title }} |
88 | {{ $book->amount }} |
89 | {{ $book->stock }} |
90 | {{ $book->author->name }} |
91 |
92 | @endforeach
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/resources/views/dashboard/member.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
Dashboard
15 |
16 |
17 |
18 | Welcome to UltraPerpus.
19 |
20 |
21 |
22 | | Buku dipinjam |
23 |
24 | @if ($borrowLogs->count() == 0)
25 | Tidak ada buku dipinjam
26 | @endif
27 |
28 | @foreach ($borrowLogs as $borrowLog)
29 | -
30 | {!! Form::open(['url' => route('member.books.return', $borrowLog->book_id),
31 | 'method' => 'put',
32 | 'class' => 'form-inline js-confirm',
33 | 'data-confirm' => "Anda yakin hendak mengembalikan " . $borrowLog->book->title . "?"] ) !!}
34 |
35 | {{ $borrowLog->book->title }}
36 | {!! Form::submit('Kembalikan', ['class'=>'btn btn-xs btn-default']) !!}
37 |
38 | {!! Form::close() !!}
39 |
40 | @endforeach
41 |
42 | |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | @endsection
56 | @section('scripts')
57 |
77 | @endsection
78 |
79 |
--------------------------------------------------------------------------------
/public/css/theme/assets/css/table-responsive.css:
--------------------------------------------------------------------------------
1 | /*Unseen Column*/
2 | @media only screen and (max-width: 800px) {
3 | #unseen table td:nth-child(2),
4 | #unseen table th:nth-child(2) {display: none;}
5 | }
6 |
7 | @media only screen and (max-width: 640px) {
8 | #unseen table td:nth-child(4),
9 | #unseen table th:nth-child(4),
10 | #unseen table td:nth-child(7),
11 | #unseen table th:nth-child(7),
12 | #unseen table td:nth-child(8),
13 | #unseen table th:nth-child(8){display: none;}
14 | }
15 |
16 | /*flip-scroll*/
17 |
18 | @media only screen and (max-width: 800px) {
19 | #flip-scroll .cf:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
20 | #flip-scroll * html .cf { zoom: 1; }
21 | #flip-scroll *:first-child+html .cf { zoom: 1; }
22 | #flip-scroll table { width: 100%; border-collapse: collapse; border-spacing: 0; }
23 |
24 | #flip-scroll th,
25 | #flip-scroll td { margin: 0; vertical-align: top; }
26 | #flip-scroll th { text-align: left; }
27 | #flip-scroll table { display: block; position: relative; width: 100%; }
28 | #flip-scroll thead { display: block; float: left; }
29 | #flip-scroll tbody { display: block; width: auto; position: relative; overflow-x: auto; white-space: nowrap; }
30 | #flip-scroll thead tr { display: block; }
31 | #flip-scroll th { display: block; text-align: right; }
32 | #flip-scroll tbody tr { display: inline-block; vertical-align: top; }
33 | #flip-scroll td { display: block; min-height: 1.25em; text-align: left; }
34 |
35 |
36 | /* sort out borders */
37 |
38 | #flip-scroll th { border-bottom: 0; border-left: 0; }
39 | #flip-scroll td { border-left: 0; border-right: 0; border-bottom: 0; }
40 | #flip-scroll tbody tr { border-left: 1px solid #babcbf; }
41 | #flip-scroll th:last-child,
42 | #flip-scroll td:last-child { border-bottom: 1px solid #babcbf; }
43 | }
44 |
45 | /*no more table*/
46 |
47 | @media only screen and (max-width: 800px) {
48 | /* Force table to not be like tables anymore */
49 | #no-more-tables table,
50 | #no-more-tables thead,
51 | #no-more-tables tbody,
52 | #no-more-tables th,
53 | #no-more-tables td,
54 | #no-more-tables tr {
55 | display: block;
56 | }
57 |
58 | /* Hide table headers (but not display: none;, for accessibility) */
59 | #no-more-tables thead tr {
60 | position: absolute;
61 | top: -9999px;
62 | left: -9999px;
63 | }
64 |
65 | #no-more-tables tr { border: 1px solid #ccc; }
66 |
67 | #no-more-tables td {
68 | /* Behave like a "row" */
69 | border: none;
70 | border-bottom: 1px solid #eee;
71 | position: relative;
72 | padding-left: 50%;
73 | white-space: normal;
74 | text-align:left;
75 | }
76 |
77 | #no-more-tables td:before {
78 | /* Now like a table header */
79 | position: absolute;
80 | /* Top/left values mimic padding */
81 | top: 6px;
82 | left: 6px;
83 | width: 45%;
84 | padding-right: 10px;
85 | white-space: nowrap;
86 | text-align:left;
87 | font-weight: bold;
88 | }
89 |
90 | /*
91 | Label the data
92 | */
93 | #no-more-tables td:before { content: attr(data-title); }
94 | }
--------------------------------------------------------------------------------
/config/auth.php:
--------------------------------------------------------------------------------
1 | [
17 | 'guard' => 'web',
18 | 'passwords' => 'users',
19 | ],
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Authentication Guards
24 | |--------------------------------------------------------------------------
25 | |
26 | | Next, you may define every authentication guard for your application.
27 | | Of course, a great default configuration has been defined for you
28 | | here which uses session storage and the Eloquent user provider.
29 | |
30 | | All authentication drivers have a user provider. This defines how the
31 | | users are actually retrieved out of your database or other storage
32 | | mechanisms used by this application to persist your user's data.
33 | |
34 | | Supported: "session", "token"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 |
44 | 'api' => [
45 | 'driver' => 'token',
46 | 'provider' => 'users',
47 | ],
48 | ],
49 |
50 | /*
51 | |--------------------------------------------------------------------------
52 | | User Providers
53 | |--------------------------------------------------------------------------
54 | |
55 | | All authentication drivers have a user provider. This defines how the
56 | | users are actually retrieved out of your database or other storage
57 | | mechanisms used by this application to persist your user's data.
58 | |
59 | | If you have multiple user tables or models you may configure multiple
60 | | sources which represent each model / table. These sources may then
61 | | be assigned to any extra authentication guards you have defined.
62 | |
63 | | Supported: "database", "eloquent"
64 | |
65 | */
66 |
67 | 'providers' => [
68 | 'users' => [
69 | 'driver' => 'eloquent',
70 | 'model' => App\User::class,
71 | ],
72 |
73 | // 'users' => [
74 | // 'driver' => 'database',
75 | // 'table' => 'users',
76 | // ],
77 | ],
78 |
79 | /*
80 | |--------------------------------------------------------------------------
81 | | Resetting Passwords
82 | |--------------------------------------------------------------------------
83 | |
84 | | You may specify multiple password reset configurations if you have more
85 | | than one user table or model in the application and you want to have
86 | | separate password reset settings based on the specific user types.
87 | |
88 | | The expire time is the number of minutes that the reset token should be
89 | | considered valid. This security feature keeps tokens short-lived so
90 | | they have less time to be guessed. You may change this as needed.
91 | |
92 | */
93 |
94 | 'passwords' => [
95 | 'users' => [
96 | 'provider' => 'users',
97 | 'table' => 'password_resets',
98 | 'expire' => 60,
99 | ],
100 | ],
101 |
102 | ];
103 |
--------------------------------------------------------------------------------
/public/css/theme/assets/js/common-scripts.js:
--------------------------------------------------------------------------------
1 | /*---LEFT BAR ACCORDION----*/
2 | $(function() {
3 | $('#nav-accordion').dcAccordion({
4 | eventType: 'click',
5 | autoClose: true,
6 | saveState: true,
7 | disableLink: true,
8 | speed: 'slow',
9 | showCount: false,
10 | autoExpand: true,
11 | // cookie: 'dcjq-accordion-1',
12 | classExpand: 'dcjq-current-parent'
13 | });
14 | });
15 |
16 | var Script = function () {
17 |
18 |
19 | // sidebar dropdown menu auto scrolling
20 |
21 | jQuery('#sidebar .sub-menu > a').click(function () {
22 | var o = ($(this).offset());
23 | diff = 250 - o.top;
24 | if(diff>0)
25 | $("#sidebar").scrollTo("-="+Math.abs(diff),500);
26 | else
27 | $("#sidebar").scrollTo("+="+Math.abs(diff),500);
28 | });
29 |
30 |
31 |
32 | // sidebar toggle
33 |
34 | $(function() {
35 | function responsiveView() {
36 | var wSize = $(window).width();
37 | if (wSize <= 768) {
38 | $('#container').addClass('sidebar-close');
39 | $('#sidebar > ul').hide();
40 | }
41 |
42 | if (wSize > 768) {
43 | $('#container').removeClass('sidebar-close');
44 | $('#sidebar > ul').show();
45 | }
46 | }
47 | $(window).on('load', responsiveView);
48 | $(window).on('resize', responsiveView);
49 | });
50 |
51 | $('.fa-bars').click(function () {
52 | if ($('#sidebar > ul').is(":visible") === true) {
53 | $('#main-content').css({
54 | 'margin-left': '0px'
55 | });
56 | $('#sidebar').css({
57 | 'margin-left': '-210px'
58 | });
59 | $('#sidebar > ul').hide();
60 | $("#container").addClass("sidebar-closed");
61 | } else {
62 | $('#main-content').css({
63 | 'margin-left': '210px'
64 | });
65 | $('#sidebar > ul').show();
66 | $('#sidebar').css({
67 | 'margin-left': '0'
68 | });
69 | $("#container").removeClass("sidebar-closed");
70 | }
71 | });
72 |
73 | // custom scrollbar
74 | $("#sidebar").niceScroll({styler:"fb",cursorcolor:"#4ECDC4", cursorwidth: '3', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: ''});
75 |
76 | $("html").niceScroll({styler:"fb",cursorcolor:"#4ECDC4", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: '', zindex: '1000'});
77 |
78 | // widget tools
79 |
80 | jQuery('.panel .tools .fa-chevron-down').click(function () {
81 | var el = jQuery(this).parents(".panel").children(".panel-body");
82 | if (jQuery(this).hasClass("fa-chevron-down")) {
83 | jQuery(this).removeClass("fa-chevron-down").addClass("fa-chevron-up");
84 | el.slideUp(200);
85 | } else {
86 | jQuery(this).removeClass("fa-chevron-up").addClass("fa-chevron-down");
87 | el.slideDown(200);
88 | }
89 | });
90 |
91 | jQuery('.panel .tools .fa-times').click(function () {
92 | jQuery(this).parents(".panel").parent().remove();
93 | });
94 |
95 |
96 | // tool tips
97 |
98 | $('.tooltips').tooltip();
99 |
100 | // popovers
101 |
102 | $('.popovers').popover();
103 |
104 |
105 |
106 | // custom bar chart
107 |
108 | if ($(".custom-bar-chart")) {
109 | $(".bar").each(function () {
110 | var i = $(this).find(".value").html();
111 | $(this).find(".value").html("");
112 | $(this).find(".value").animate({
113 | height: i
114 | }, 2000)
115 | })
116 | }
117 |
118 |
119 | }();
--------------------------------------------------------------------------------
/public/css/theme/assets/js/jquery.backstretch.min.js:
--------------------------------------------------------------------------------
1 | /*! Backstretch - v2.0.3 - 2012-11-30
2 | * http://srobbin.com/jquery-plugins/backstretch/
3 | * Copyright (c) 2012 Scott Robbin; Licensed MIT */
4 | (function(e,t,n){"use strict";e.fn.backstretch=function(r,s){return(r===n||r.length===0)&&e.error("No images were supplied for Backstretch"),e(t).scrollTop()===0&&t.scrollTo(0,0),this.each(function(){var t=e(this),n=t.data("backstretch");n&&(s=e.extend(n.options,s),n.destroy(!0)),n=new i(this,r,s),t.data("backstretch",n)})},e.backstretch=function(t,n){return e("body").backstretch(t,n).data("backstretch")},e.expr[":"].backstretch=function(t){return e(t).data("backstretch")!==n},e.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var r={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},img:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxWidth:"none",zIndex:-999999}},i=function(n,i,o){this.options=e.extend({},e.fn.backstretch.defaults,o||{}),this.images=e.isArray(i)?i:[i],e.each(this.images,function(){e("
")[0].src=this}),this.isBody=n===document.body,this.$container=e(n),this.$wrap=e('').css(r.wrap).appendTo(this.$container),this.$root=this.isBody?s?e(t):e(document):this.$container;if(!this.isBody){var u=this.$container.css("position"),a=this.$container.css("zIndex");this.$container.css({position:u==="static"?"relative":u,zIndex:a==="auto"?0:a,background:"none"}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&s?"fixed":"absolute"}),this.index=0,this.show(this.index),e(t).on("resize.backstretch",e.proxy(this.resize,this)).on("orientationchange.backstretch",e.proxy(function(){this.isBody&&t.pageYOffset===0&&(t.scrollTo(0,1),this.resize())},this))};i.prototype={resize:function(){try{var e={left:0,top:0},n=this.isBody?this.$root.width():this.$root.innerWidth(),r=n,i=this.isBody?t.innerHeight?t.innerHeight:this.$root.height():this.$root.innerHeight(),s=r/this.$img.data("ratio"),o;s>=i?(o=(s-i)/2,this.options.centeredY&&(e.top="-"+o+"px")):(s=i,r=s*this.$img.data("ratio"),o=(r-n)/2,this.options.centeredX&&(e.left="-"+o+"px")),this.$wrap.css({width:n,height:i}).find("img:not(.deleteable)").css({width:r,height:s}).css(e)}catch(u){}return this},show:function(t){if(Math.abs(t)>this.images.length-1)return;this.index=t;var n=this,i=n.$wrap.find("img").addClass("deleteable"),s=e.Event("backstretch.show",{relatedTarget:n.$container[0]});return clearInterval(n.interval),n.$img=e("
").css(r.img).bind("load",function(t){var r=this.width||e(t.target).width(),o=this.height||e(t.target).height();e(this).data("ratio",r/o),e(this).fadeIn(n.options.speed||n.options.fade,function(){i.remove(),n.paused||n.cycle(),n.$container.trigger(s,n)}),n.resize()}).appendTo(n.$wrap),n.$img.attr("src",n.images[t]),n},next:function(){return this.show(this.index1&&(clearInterval(this.interval),this.interval=setInterval(e.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(n){e(t).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),n||this.$wrap.remove(),this.$container.removeData("backstretch")}};var s=function(){var e=navigator.userAgent,n=navigator.platform,r=e.match(/AppleWebKit\/([0-9]+)/),i=!!r&&r[1],s=e.match(/Fennec\/([0-9]+)/),o=!!s&&s[1],u=e.match(/Opera Mobi\/([0-9]+)/),a=!!u&&u[1],f=e.match(/MSIE ([0-9]+)/),l=!!f&&f[1];return!((n.indexOf("iPhone")>-1||n.indexOf("iPad")>-1||n.indexOf("iPod")>-1)&&i&&i<534||t.operamini&&{}.toString.call(t.operamini)==="[object OperaMini]"||u&&a<7458||e.indexOf("Android")>-1&&i&&i<533||o&&o<6||"palmGetResource"in t&&i&&i<534||e.indexOf("MeeGo")>-1&&e.indexOf("NokiaBrowser/8.5.0")>-1||l&&l<=6)}()})(jQuery,window);
--------------------------------------------------------------------------------
/public/css/theme/assets/js/morris-conf.js:
--------------------------------------------------------------------------------
1 | var Script = function () {
2 |
3 | //morris chart
4 |
5 | $(function () {
6 | // data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type
7 | var tax_data = [
8 | {"period": "2011 Q3", "licensed": 3407, "sorned": 660},
9 | {"period": "2011 Q2", "licensed": 3351, "sorned": 629},
10 | {"period": "2011 Q1", "licensed": 3269, "sorned": 618},
11 | {"period": "2010 Q4", "licensed": 3246, "sorned": 661},
12 | {"period": "2009 Q4", "licensed": 3171, "sorned": 676},
13 | {"period": "2008 Q4", "licensed": 3155, "sorned": 681},
14 | {"period": "2007 Q4", "licensed": 3226, "sorned": 620},
15 | {"period": "2006 Q4", "licensed": 3245, "sorned": null},
16 | {"period": "2005 Q4", "licensed": 3289, "sorned": null}
17 | ];
18 | Morris.Line({
19 | element: 'hero-graph',
20 | data: tax_data,
21 | xkey: 'period',
22 | ykeys: ['licensed', 'sorned'],
23 | labels: ['Licensed', 'Off the road'],
24 | lineColors:['#4ECDC4','#ed5565']
25 | });
26 |
27 | Morris.Donut({
28 | element: 'hero-donut',
29 | data: [
30 | {label: 'Jam', value: 25 },
31 | {label: 'Frosted', value: 40 },
32 | {label: 'Custard', value: 25 },
33 | {label: 'Sugar', value: 10 }
34 | ],
35 | colors: ['#3498db', '#2980b9', '#34495e'],
36 | formatter: function (y) { return y + "%" }
37 | });
38 |
39 | Morris.Area({
40 | element: 'hero-area',
41 | data: [
42 | {period: '2010 Q1', iphone: 2666, ipad: null, itouch: 2647},
43 | {period: '2010 Q2', iphone: 2778, ipad: 2294, itouch: 2441},
44 | {period: '2010 Q3', iphone: 4912, ipad: 1969, itouch: 2501},
45 | {period: '2010 Q4', iphone: 3767, ipad: 3597, itouch: 5689},
46 | {period: '2011 Q1', iphone: 6810, ipad: 1914, itouch: 2293},
47 | {period: '2011 Q2', iphone: 5670, ipad: 4293, itouch: 1881},
48 | {period: '2011 Q3', iphone: 4820, ipad: 3795, itouch: 1588},
49 | {period: '2011 Q4', iphone: 15073, ipad: 5967, itouch: 5175},
50 | {period: '2012 Q1', iphone: 10687, ipad: 4460, itouch: 2028},
51 | {period: '2012 Q2', iphone: 8432, ipad: 5713, itouch: 1791}
52 | ],
53 |
54 | xkey: 'period',
55 | ykeys: ['iphone', 'ipad', 'itouch'],
56 | labels: ['iPhone', 'iPad', 'iPod Touch'],
57 | hideHover: 'auto',
58 | lineWidth: 1,
59 | pointSize: 5,
60 | lineColors: ['#4a8bc2', '#ff6c60', '#a9d86e'],
61 | fillOpacity: 0.5,
62 | smooth: true
63 | });
64 |
65 | Morris.Bar({
66 | element: 'hero-bar',
67 | data: [
68 | {device: 'iPhone', geekbench: 136},
69 | {device: 'iPhone 3G', geekbench: 137},
70 | {device: 'iPhone 3GS', geekbench: 275},
71 | {device: 'iPhone 4', geekbench: 380},
72 | {device: 'iPhone 4S', geekbench: 655},
73 | {device: 'iPhone 5', geekbench: 1571}
74 | ],
75 | xkey: 'device',
76 | ykeys: ['geekbench'],
77 | labels: ['Geekbench'],
78 | barRatio: 0.4,
79 | xLabelAngle: 35,
80 | hideHover: 'auto',
81 | barColors: ['#ac92ec']
82 | });
83 |
84 | new Morris.Line({
85 | element: 'examplefirst',
86 | xkey: 'year',
87 | ykeys: ['value'],
88 | labels: ['Value'],
89 | data: [
90 | {year: '2008', value: 20},
91 | {year: '2009', value: 10},
92 | {year: '2010', value: 5},
93 | {year: '2011', value: 5},
94 | {year: '2012', value: 20}
95 | ]
96 | });
97 |
98 | $('.code-example').each(function (index, el) {
99 | eval($(el).text());
100 | });
101 | });
102 |
103 | }();
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/public/css/theme/assets/js/chartjs-conf.js:
--------------------------------------------------------------------------------
1 | var Script = function () {
2 |
3 |
4 | var doughnutData = [
5 | {
6 | value: 30,
7 | color:"#1abc9c"
8 | },
9 | {
10 | value : 50,
11 | color : "#2ecc71"
12 | },
13 | {
14 | value : 100,
15 | color : "#3498db"
16 | },
17 | {
18 | value : 40,
19 | color : "#9b59b6"
20 | },
21 | {
22 | value : 120,
23 | color : "#34495e"
24 | }
25 |
26 | ];
27 | var lineChartData = {
28 | labels : ["","","","","","",""],
29 | datasets : [
30 | {
31 | fillColor : "rgba(220,220,220,0.5)",
32 | strokeColor : "rgba(220,220,220,1)",
33 | pointColor : "rgba(220,220,220,1)",
34 | pointStrokeColor : "#fff",
35 | data : [65,59,90,81,56,55,40]
36 | },
37 | {
38 | fillColor : "rgba(151,187,205,0.5)",
39 | strokeColor : "rgba(151,187,205,1)",
40 | pointColor : "rgba(151,187,205,1)",
41 | pointStrokeColor : "#fff",
42 | data : [28,48,40,19,96,27,100]
43 | }
44 | ]
45 |
46 | };
47 | var pieData = [
48 | {
49 | value: 30,
50 | color:"#1abc9c"
51 | },
52 | {
53 | value : 50,
54 | color : "#16a085"
55 | },
56 | {
57 | value : 100,
58 | color : "#27ae60"
59 | }
60 |
61 | ];
62 | var barChartData = {
63 | labels : ["January","February","March","April","May","June","July"],
64 | datasets : [
65 | {
66 | fillColor : "rgba(220,220,220,0.5)",
67 | strokeColor : "rgba(220,220,220,1)",
68 | data : [65,59,90,81,56,55,40]
69 | },
70 | {
71 | fillColor : "rgba(151,187,205,0.5)",
72 | strokeColor : "rgba(151,187,205,1)",
73 | data : [28,48,40,19,96,27,100]
74 | }
75 | ]
76 |
77 | };
78 | var chartData = [
79 | {
80 | value : Math.random(),
81 | color: "#D97041"
82 | },
83 | {
84 | value : Math.random(),
85 | color: "#C7604C"
86 | },
87 | {
88 | value : Math.random(),
89 | color: "#21323D"
90 | },
91 | {
92 | value : Math.random(),
93 | color: "#9D9B7F"
94 | },
95 | {
96 | value : Math.random(),
97 | color: "#7D4F6D"
98 | },
99 | {
100 | value : Math.random(),
101 | color: "#584A5E"
102 | }
103 | ];
104 | var radarChartData = {
105 | labels : ["","","","","","",""],
106 | datasets : [
107 | {
108 | fillColor : "rgba(220,220,220,0.5)",
109 | strokeColor : "rgba(220,220,220,1)",
110 | pointColor : "rgba(220,220,220,1)",
111 | pointStrokeColor : "#fff",
112 | data : [65,59,90,81,56,55,40]
113 | },
114 | {
115 | fillColor : "rgba(151,187,205,0.5)",
116 | strokeColor : "rgba(151,187,205,1)",
117 | pointColor : "rgba(151,187,205,1)",
118 | pointStrokeColor : "#fff",
119 | data : [28,48,40,19,96,27,100]
120 | }
121 | ]
122 |
123 | };
124 | new Chart(document.getElementById("doughnut").getContext("2d")).Doughnut(doughnutData);
125 | new Chart(document.getElementById("line").getContext("2d")).Line(lineChartData);
126 | new Chart(document.getElementById("radar").getContext("2d")).Radar(radarChartData);
127 | new Chart(document.getElementById("polarArea").getContext("2d")).PolarArea(chartData);
128 | new Chart(document.getElementById("bar").getContext("2d")).Bar(barChartData);
129 | new Chart(document.getElementById("pie").getContext("2d")).Pie(pieData);
130 |
131 |
132 | }();
--------------------------------------------------------------------------------
/app/Http/Controllers/AuthorsController.php:
--------------------------------------------------------------------------------
1 | ajax()) {
23 | $authors = Author::select(['id', 'name']);
24 | return Datatables::of($authors)
25 | ->addColumn('action', function($author){
26 | return view('datatable._action', [
27 | 'model' => $author,
28 | 'form_url' => route('authors.destroy', $author->id),
29 | 'edit_url' => route('authors.edit', $author->id),
30 | 'confirm_message' => 'Yakin mau menghapus ' . $author->name . '?'
31 | ]);
32 | })->make(true);
33 | }
34 |
35 | $html = $htmlBuilder
36 | ->addColumn(['data' => 'name', 'name'=>'name', 'title'=>'Nama'])
37 | ->addColumn(['data' => 'action', 'name'=>'action', 'title'=>'', 'orderable'=>false, 'searchable'=>false]);
38 |
39 | return view('authors.index')->with(compact('html'));
40 | }
41 |
42 | /**
43 | * Show the form for creating a new resource.
44 | *
45 | * @return \Illuminate\Http\Response
46 | */
47 | public function create()
48 | {
49 | return view('authors.create');
50 | }
51 |
52 | /**
53 | * Store a newly created resource in storage.
54 | *
55 | * @param \Illuminate\Http\Request $request
56 | * @return \Illuminate\Http\Response
57 | */
58 | public function store(Request $request)
59 | {
60 | $this->validate($request, ['name' => 'required|unique:authors']);
61 | $author = Author::create($request->all());
62 | Session::flash("flash_notification", [
63 | "level"=>"success",
64 | "message"=>"Berhasil menyimpan $author->name"
65 | ]);
66 | return redirect()->route('authors.index');
67 | }
68 |
69 | /**
70 | * Display the specified resource.
71 | *
72 | * @param int $id
73 | * @return \Illuminate\Http\Response
74 | */
75 | public function show($id)
76 | {
77 | //
78 | }
79 |
80 | /**
81 | * Show the form for editing the specified resource.
82 | *
83 | * @param int $id
84 | * @return \Illuminate\Http\Response
85 | */
86 | public function edit($id)
87 | {
88 | $author = Author::find($id);
89 | return view('authors.edit')->with(compact('author'));
90 | }
91 |
92 | /**
93 | * Update the specified resource in storage.
94 | *
95 | * @param \Illuminate\Http\Request $request
96 | * @param int $id
97 | * @return \Illuminate\Http\Response
98 | */
99 | public function update(Request $request, $id)
100 | {
101 | $this->validate($request, ['name' => 'required|unique:authors,name,'. $id]);
102 | $author = Author::find($id);
103 | $author->update($request->only('name'));
104 | Session::flash("flash_notification", [
105 | "level"=>"success",
106 | "message"=>"Berhasil menyimpan $author->name"
107 | ]);
108 |
109 | return redirect()->route('authors.index');
110 | }
111 |
112 | /**
113 | * Remove the specified resource from storage.
114 | *
115 | * @param int $id
116 | * @return \Illuminate\Http\Response
117 | */
118 | public function destroy($id)
119 | {
120 | if(!Author::destroy($id)) return redirect()->back();
121 |
122 | Session::flash("flash_notification", [
123 | "level"=>"success",
124 | "message"=>"Penulis berhasil dihapus"
125 | ]);
126 |
127 | return redirect()->route('authors.index');
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/config/laratrust.php:
--------------------------------------------------------------------------------
1 | 'App\Role',
23 |
24 | /*
25 | |--------------------------------------------------------------------------
26 | | Laratrust Roles Table
27 | |--------------------------------------------------------------------------
28 | |
29 | | This is the roles table used by Laratrust to save roles to the database.
30 | |
31 | */
32 | 'roles_table' => 'roles',
33 |
34 | /*
35 | |--------------------------------------------------------------------------
36 | | Laratrust Permission Model
37 | |--------------------------------------------------------------------------
38 | |
39 | | This is the Permission model used by Laratrust to create correct relations.
40 | | Update the permission if it is in a different namespace.
41 | |
42 | */
43 | 'permission' => 'App\Permission',
44 |
45 | /*
46 | |--------------------------------------------------------------------------
47 | | Laratrust Permissions Table
48 | |--------------------------------------------------------------------------
49 | |
50 | | This is the permissions table used by Laratrust to save permissions to the
51 | | database.
52 | |
53 | */
54 | 'permissions_table' => 'permissions',
55 |
56 | /*
57 | |--------------------------------------------------------------------------
58 | | Laratrust permission_role Table
59 | |--------------------------------------------------------------------------
60 | |
61 | | This is the permission_role table used by Laratrust to save relationship
62 | | between permissions and roles to the database.
63 | |
64 | */
65 | 'permission_role_table' => 'permission_role',
66 |
67 | /*
68 | |--------------------------------------------------------------------------
69 | | Laratrust role_user Table
70 | |--------------------------------------------------------------------------
71 | |
72 | | This is the role_user table used by Laratrust to save assigned roles to the
73 | | database.
74 | |
75 | */
76 | 'role_user_table' => 'role_user',
77 |
78 | /*
79 | |--------------------------------------------------------------------------
80 | | User Foreign key on Laratrust's role_user Table (Pivot)
81 | |--------------------------------------------------------------------------
82 | */
83 | 'user_foreign_key' => 'user_id',
84 |
85 | /*
86 | |--------------------------------------------------------------------------
87 | | Role Foreign key on Laratrust's role_user and permission_role Tables (Pivot)
88 | |--------------------------------------------------------------------------
89 | */
90 | 'role_foreign_key' => 'role_id',
91 |
92 | /*
93 | |--------------------------------------------------------------------------
94 | | Permission Foreign key on Laratrust's permission_role Table (Pivot)
95 | |--------------------------------------------------------------------------
96 | */
97 | 'permission_foreign_key' => 'permission_id',
98 |
99 | /*
100 | |--------------------------------------------------------------------------
101 | | Method to be called in the middleware return case
102 | | Available: abort|redirect
103 | |--------------------------------------------------------------------------
104 | */
105 | 'middleware_handling' => 'abort',
106 |
107 | /*
108 | |--------------------------------------------------------------------------
109 | | Parameter passed to the middleware_handling method
110 | |--------------------------------------------------------------------------
111 | */
112 | 'middleware_params' => '403',
113 | ];
114 |
--------------------------------------------------------------------------------
/public/css/theme/assets/js/calendar-conf-events.js:
--------------------------------------------------------------------------------
1 | var Script = function () {
2 |
3 |
4 | /* initialize the external events
5 | -----------------------------------------------------------------*/
6 |
7 | $('#external-events div.external-event').each(function() {
8 |
9 | // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
10 | // it doesn't need to have a start or end
11 | var eventObject = {
12 | title: $.trim($(this).text()) // use the element's text as the event title
13 | };
14 |
15 | // store the Event Object in the DOM element so we can get to it later
16 | $(this).data('eventObject', eventObject);
17 |
18 | // make the event draggable using jQuery UI
19 | $(this).draggable({
20 | zIndex: 999,
21 | revert: true, // will cause the event to go back to its
22 | revertDuration: 0 // original position after the drag
23 | });
24 |
25 | });
26 |
27 |
28 | /* initialize the calendar
29 | -----------------------------------------------------------------*/
30 |
31 | var date = new Date();
32 | var d = date.getDate();
33 | var m = date.getMonth();
34 | var y = date.getFullYear();
35 |
36 | $('#calendar').fullCalendar({
37 | header: {
38 | left: 'prev,next today',
39 | center: 'title',
40 | right: 'month,basicWeek,basicDay'
41 | },
42 | editable: true,
43 | droppable: true, // this allows things to be dropped onto the calendar !!!
44 | drop: function(date, allDay) { // this function is called when something is dropped
45 |
46 | // retrieve the dropped element's stored Event Object
47 | var originalEventObject = $(this).data('eventObject');
48 |
49 | // we need to copy it, so that multiple events don't have a reference to the same object
50 | var copiedEventObject = $.extend({}, originalEventObject);
51 |
52 | // assign it the date that was reported
53 | copiedEventObject.start = date;
54 | copiedEventObject.allDay = allDay;
55 |
56 | // render the event on the calendar
57 | // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
58 | $('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
59 |
60 | // is the "remove after drop" checkbox checked?
61 | if ($('#drop-remove').is(':checked')) {
62 | // if so, remove the element from the "Draggable Events" list
63 | $(this).remove();
64 | }
65 |
66 | },
67 | events: [
68 | {
69 | title: 'All Day Event',
70 | start: new Date(y, m, 1)
71 | },
72 | {
73 | title: 'Long Event',
74 | start: new Date(y, m, d-5),
75 | end: new Date(y, m, d-2)
76 | },
77 | {
78 | id: 999,
79 | title: 'Repeating Event',
80 | start: new Date(y, m, d-3, 16, 0),
81 | allDay: false
82 | },
83 | {
84 | id: 999,
85 | title: 'Repeating Event',
86 | start: new Date(y, m, d+4, 16, 0),
87 | allDay: false
88 | },
89 | {
90 | title: 'Meeting',
91 | start: new Date(y, m, d, 10, 30),
92 | allDay: false
93 | },
94 | {
95 | title: 'Lunch',
96 | start: new Date(y, m, d, 12, 0),
97 | end: new Date(y, m, d, 14, 0),
98 | allDay: false
99 | },
100 | {
101 | title: 'Birthday Party',
102 | start: new Date(y, m, d+1, 19, 0),
103 | end: new Date(y, m, d+1, 22, 30),
104 | allDay: false
105 | },
106 | {
107 | title: 'Click for Google',
108 | start: new Date(y, m, 28),
109 | end: new Date(y, m, 29),
110 | url: 'http://google.com/'
111 | }
112 | ]
113 | });
114 |
115 |
116 | }();
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 | PDO::FETCH_OBJ,
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Database Connection Name
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may specify which of the database connections below you wish
24 | | to use as your default connection for all database work. Of course
25 | | you may use many connections at once using the Database library.
26 | |
27 | */
28 |
29 | 'default' => env('DB_CONNECTION', 'mysql'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Database Connections
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here are each of the database connections setup for your application.
37 | | Of course, examples of configuring each database platform that is
38 | | supported by Laravel is shown below to make development simple.
39 | |
40 | |
41 | | All database work in Laravel is done through the PHP PDO facilities
42 | | so make sure you have the driver for your particular database of
43 | | choice installed on your machine before you begin development.
44 | |
45 | */
46 |
47 | 'connections' => [
48 |
49 | 'sqlite' => [
50 | 'driver' => 'sqlite',
51 | 'database' => env('DB_DATABASE', database_path('database.sqlite')),
52 | 'prefix' => '',
53 | ],
54 |
55 | 'mysql' => [
56 | 'driver' => 'mysql',
57 | 'host' => env('DB_HOST', 'localhost'),
58 | 'port' => env('DB_PORT', '3306'),
59 | 'database' => env('DB_DATABASE', 'ultra_perpus'),
60 | 'username' => env('DB_USERNAME', 'root'),
61 | 'password' => env('DB_PASSWORD', ''),
62 | 'charset' => 'utf8',
63 | 'collation' => 'utf8_unicode_ci',
64 | 'prefix' => '',
65 | 'strict' => true,
66 | 'engine' => null,
67 | ],
68 |
69 | 'pgsql' => [
70 | 'driver' => 'pgsql',
71 | 'host' => env('DB_HOST', 'localhost'),
72 | 'port' => env('DB_PORT', '5432'),
73 | 'database' => env('DB_DATABASE', 'forge'),
74 | 'username' => env('DB_USERNAME', 'forge'),
75 | 'password' => env('DB_PASSWORD', ''),
76 | 'charset' => 'utf8',
77 | 'prefix' => '',
78 | 'schema' => 'public',
79 | 'sslmode' => 'prefer',
80 | ],
81 |
82 | ],
83 |
84 | /*
85 | |--------------------------------------------------------------------------
86 | | Migration Repository Table
87 | |--------------------------------------------------------------------------
88 | |
89 | | This table keeps track of all the migrations that have already run for
90 | | your application. Using this information, we can determine which of
91 | | the migrations on disk haven't actually been run in the database.
92 | |
93 | */
94 |
95 | 'migrations' => 'migrations',
96 |
97 | /*
98 | |--------------------------------------------------------------------------
99 | | Redis Databases
100 | |--------------------------------------------------------------------------
101 | |
102 | | Redis is an open source, fast, and advanced key-value store that also
103 | | provides a richer set of commands than a typical key-value systems
104 | | such as APC or Memcached. Laravel makes it easy to dig right in.
105 | |
106 | */
107 |
108 | 'redis' => [
109 |
110 | 'cluster' => false,
111 |
112 | 'default' => [
113 | 'host' => env('REDIS_HOST', 'localhost'),
114 | 'password' => env('REDIS_PASSWORD', null),
115 | 'port' => env('REDIS_PORT', 6379),
116 | 'database' => 0,
117 | ],
118 |
119 | ],
120 |
121 | ];
122 |
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 | env('MAIL_DRIVER', 'smtp'),
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | SMTP Host Address
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may provide the host address of the SMTP server used by your
27 | | applications. A default option is provided that is compatible with
28 | | the Mailgun mail service which will provide reliable deliveries.
29 | |
30 | */
31 |
32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
33 |
34 | /*
35 | |--------------------------------------------------------------------------
36 | | SMTP Host Port
37 | |--------------------------------------------------------------------------
38 | |
39 | | This is the SMTP port used by your application to deliver e-mails to
40 | | users of the application. Like the host we have set this value to
41 | | stay compatible with the Mailgun e-mail application by default.
42 | |
43 | */
44 |
45 | 'port' => env('MAIL_PORT', 587),
46 |
47 | /*
48 | |--------------------------------------------------------------------------
49 | | Global "From" Address
50 | |--------------------------------------------------------------------------
51 | |
52 | | You may wish for all e-mails sent by your application to be sent from
53 | | the same address. Here, you may specify a name and address that is
54 | | used globally for all e-mails that are sent by your application.
55 | |
56 | */
57 |
58 | 'from' => [
59 | 'address' => 'admin@ultraperpus.com',
60 | 'name' => 'Admin UltraPerpus',
61 | ],
62 |
63 | /*
64 | |--------------------------------------------------------------------------
65 | | E-Mail Encryption Protocol
66 | |--------------------------------------------------------------------------
67 | |
68 | | Here you may specify the encryption protocol that should be used when
69 | | the application send e-mail messages. A sensible default using the
70 | | transport layer security protocol should provide great security.
71 | |
72 | */
73 |
74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
75 |
76 | /*
77 | |--------------------------------------------------------------------------
78 | | SMTP Server Username
79 | |--------------------------------------------------------------------------
80 | |
81 | | If your SMTP server requires a username for authentication, you should
82 | | set it here. This will get used to authenticate with your server on
83 | | connection. You may also set the "password" value below this one.
84 | |
85 | */
86 |
87 | 'username' => env('MAIL_USERNAME'),
88 |
89 | /*
90 | |--------------------------------------------------------------------------
91 | | SMTP Server Password
92 | |--------------------------------------------------------------------------
93 | |
94 | | Here you may set the password required by your SMTP server to send out
95 | | messages from your application. This will be given to the server on
96 | | connection so that the application will be able to send messages.
97 | |
98 | */
99 |
100 | 'password' => env('MAIL_PASSWORD'),
101 |
102 | /*
103 | |--------------------------------------------------------------------------
104 | | Sendmail System Path
105 | |--------------------------------------------------------------------------
106 | |
107 | | When using the "sendmail" driver to send e-mails, we will need to know
108 | | the path to where Sendmail lives on this server. A default path has
109 | | been provided here, which will work well on most of your systems.
110 | |
111 | */
112 |
113 | 'sendmail' => '/usr/sbin/sendmail -bs',
114 |
115 | ];
116 |
--------------------------------------------------------------------------------
/public/css/theme/assets/css/zabuto_calendar.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Zabuto Calendar
3 | */
4 |
5 | div.zabuto_calendar {
6 | margin: 0;
7 | padding: 10px;
8 | }
9 |
10 | .calendar-month-header {font-size:116%!important;}
11 | .calendar-month-header th {font-weight:600!important;}
12 |
13 | div.zabuto_calendar .table {
14 | width: 100%;
15 | margin: 0;
16 | padding: 0px;
17 | }
18 |
19 | div.zabuto_calendar .table th,
20 | div.zabuto_calendar .table td {
21 | padding: 11.9px 0px;
22 | text-align: center;
23 | }
24 |
25 | div.zabuto_calendar .table tr th,
26 | div.zabuto_calendar .table tr td {
27 | background-color:;
28 | }
29 |
30 | div.zabuto_calendar .table tr.calendar-month-header th {
31 | background-color:;
32 | }
33 |
34 | div.zabuto_calendar .table tr.calendar-month-header th span {
35 | cursor: pointer;
36 | display: inline-block;
37 | padding-bottom:0px;
38 |
39 | }
40 |
41 | div.zabuto_calendar .table tr.calendar-dow-header th {
42 | background-color:;
43 | }
44 |
45 | div.zabuto_calendar .table tr:last-child {
46 | border-bottom: 0px solid #dddddd;
47 | }
48 |
49 | div.zabuto_calendar .table tr.calendar-month-header th {
50 | padding:10px;
51 |
52 | }
53 |
54 | div.zabuto_calendar .table-bordered tr.calendar-month-header th {
55 | border-left: 0;
56 | border-right: 0;
57 | }
58 |
59 | div.zabuto_calendar .table-bordered tr.calendar-month-header th:first-child {
60 | border-left: 0px solid #dddddd;
61 | }
62 |
63 | div.zabuto_calendar div.calendar-month-navigation {
64 | cursor: pointer;
65 | margin: 0;
66 | padding: 0;
67 | padding-top:0px;
68 | }
69 |
70 | div.zabuto_calendar tr.calendar-dow-header th,
71 | div.zabuto_calendar tr.calendar-dow td {
72 | width: 14%;
73 | }
74 |
75 | div.zabuto_calendar .table tr td div.day {
76 | margin: 0px;
77 | padding-top: 0px;
78 | padding-bottom: 0px;
79 | }
80 |
81 | /* actions and events */
82 | div.zabuto_calendar .table tr td.event div.day,
83 | div.zabuto_calendar ul.legend li.event {
84 | background-color:;
85 | }
86 |
87 | div.zabuto_calendar .table tr td.dow-clickable,
88 | div.zabuto_calendar .table tr td.event-clickable {
89 | cursor: pointer;
90 | }
91 |
92 | /* badge */
93 | div.zabuto_calendar .badge-today,
94 | div.zabuto_calendar div.legend span.badge-today {
95 | background-color:;
96 | color: #ffffff;
97 | text-shadow: none;
98 | }
99 |
100 | div.zabuto_calendar .badge-event,
101 | div.zabuto_calendar div.legend span.badge-event {
102 | background-color:;
103 | color: #ffffff;
104 | text-shadow: none;
105 | }
106 |
107 | div.zabuto_calendar .badge-event {
108 | font-size: 0.95em;
109 | padding-left: 8px;
110 | padding-right: 8px;
111 | padding-bottom: 4px;
112 | }
113 |
114 | /* legend */
115 | div.zabuto_calendar div.legend {
116 | margin-top: 15px;
117 | text-align: right;
118 | padding-right:10px;
119 | padding-bottom:10px;
120 | }
121 |
122 | div.zabuto_calendar div.legend span {
123 | font-size: 10px;
124 | font-weight: normal;
125 | }
126 |
127 | div.zabuto_calendar div.legend span.legend-text:after,
128 | div.zabuto_calendar div.legend span.legend-block:after,
129 | div.zabuto_calendar div.legend span.legend-list:after,
130 | div.zabuto_calendar div.legend span.legend-spacer:after {
131 | content: ' ';
132 | }
133 |
134 | div.zabuto_calendar div.legend span.legend-spacer {
135 | padding-left: 25px;
136 | }
137 |
138 | div.zabuto_calendar ul.legend > span {
139 | padding-left: 2px;
140 | }
141 |
142 | div.zabuto_calendar ul.legend {
143 | display: inline-block;
144 | list-style: none outside none;
145 | margin: 0;
146 | padding: 0;
147 | }
148 |
149 | div.zabuto_calendar ul.legend li {
150 | display: inline-block;
151 | height: 8px;
152 | width: 8px;
153 | margin-left: 5px;
154 | }
155 |
156 | div.zabuto_calendar ul.legend
157 | div.zabuto_calendar ul.legend li:first-child {
158 | margin-left: 7px;
159 | }
160 |
161 | div.zabuto_calendar ul.legend li:last-child {
162 | margin-right: 5px;
163 | }
164 |
165 | div.zabuto_calendar div.legend span.badge {
166 | font-size: 0.9em;
167 | border-radius: 5px 5px 5px 5px;
168 | padding-left: 5px;
169 | padding-right: 5px;
170 | padding-top: 2px;
171 | padding-bottom: 3px;
172 | }
173 |
174 | /* responsive */
175 | @media (max-width: 979px) {
176 | div.zabuto_calendar .table th,
177 | div.zabuto_calendar .table td {
178 | padding: 2px 1px;
179 | }
180 | }
181 |
--------------------------------------------------------------------------------