diff --git a/app/Cms.php b/app/Cms.php index 9ee46c2..e15bf91 100644 --- a/app/Cms.php +++ b/app/Cms.php @@ -8,4 +8,19 @@ use Illuminate\Database\Eloquent\Model; class Cms extends Model { use HasFactory; + + + protected $table = "cms"; + + protected $fillable = ['id','judul','konten']; + + public function katartikel() + { + return $this->belongsTo('App\Katartikel'); + } + + public function user() + { + return $this->belongsTo('App\User'); + } } diff --git a/app/Http/Controllers/Backend/artikelCmsController.php b/app/Http/Controllers/Backend/artikelCmsController.php new file mode 100644 index 0000000..c197b6e --- /dev/null +++ b/app/Http/Controllers/Backend/artikelCmsController.php @@ -0,0 +1,55 @@ +request->add(['user_id' => auth()->user()->id]); + return view('backend.art-cms.tambah'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + + 'judul' => 'required', + 'konten' => 'required', + + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Cms::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } +} diff --git a/app/Http/Controllers/Backend/artikelEofficeController.php b/app/Http/Controllers/Backend/artikelEofficeController.php index 3e697d1..38ca93c 100644 --- a/app/Http/Controllers/Backend/artikelEofficeController.php +++ b/app/Http/Controllers/Backend/artikelEofficeController.php @@ -7,7 +7,7 @@ use Illuminate\Http\Request; use Illuminate\Database\Eloquent\Collection; use App\Eoffice; use App\User; -use Validator; +use Illuminate\Support\Facades\Validator; class artikelEofficeController extends Controller diff --git a/app/Http/Controllers/Backend/artikelFwController.php b/app/Http/Controllers/Backend/artikelFwController.php new file mode 100644 index 0000000..8a5648d --- /dev/null +++ b/app/Http/Controllers/Backend/artikelFwController.php @@ -0,0 +1,54 @@ +request->add(['user_id' => auth()->user()->id]); + return view('backend.art-fw.tambah'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + + 'judul' => 'required', + 'konten' => 'required', + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Framework::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + +} diff --git a/app/Http/Controllers/Backend/artikelJsController.php b/app/Http/Controllers/Backend/artikelJsController.php new file mode 100644 index 0000000..c6f0c28 --- /dev/null +++ b/app/Http/Controllers/Backend/artikelJsController.php @@ -0,0 +1,56 @@ +request->add(['user_id' => auth()->user()->id]); + return view('backend.art-js.tambah'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + + 'judul' => 'required', + 'konten' => 'required', + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Javascript::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + + + +} diff --git a/app/Http/Controllers/Backend/artikelOsController.php b/app/Http/Controllers/Backend/artikelOsController.php new file mode 100644 index 0000000..60d7bfb --- /dev/null +++ b/app/Http/Controllers/Backend/artikelOsController.php @@ -0,0 +1,54 @@ +request->add(['user_id' => auth()->user()->id]); + return view('backend.art-os.tambah'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + + 'judul' => 'required', + 'konten' => 'required', + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Os::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + +} diff --git a/app/Http/Controllers/Backend/artikelSopController.php b/app/Http/Controllers/Backend/artikelSopController.php new file mode 100644 index 0000000..06e8a21 --- /dev/null +++ b/app/Http/Controllers/Backend/artikelSopController.php @@ -0,0 +1,57 @@ +request->add(['user_id' => auth()->user()->id]); + return view('backend.art-sop.tambah'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + + 'judul' => 'required', + 'konten' => 'required', + + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Sop::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + +} diff --git a/app/Http/Controllers/Backend/cmsController.php b/app/Http/Controllers/Backend/cmsController.php index 59cdced..2e91bc3 100644 --- a/app/Http/Controllers/Backend/cmsController.php +++ b/app/Http/Controllers/Backend/cmsController.php @@ -4,8 +4,151 @@ namespace App\Http\Controllers\Backend; use App\Http\Controllers\Controller; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Validator; +use App\Cms; +use App\User; +use Yajra\DataTables\Facades\DataTables; class cmsController extends Controller { - // + public function index() + { + $cms = Cms::all(); + return view('backend.cms.index', compact('cms')); + } + + public function data(Request $request) + { + if ($request->ajax()) { + $cms = Cms::orderBy('id', 'desc'); + return Datatables::of($cms) + ->addIndexColumn() + // ->addColumn('lampiran', function($cms){ + // return 'Download'; + // }) + ->addColumn( + 'action', + '
+ + +     + +
' + ) + ->rawColumns(['action', 'lampiran'])->make(true); + } else { + exit("Not an AJAX request -_-"); + } + } + + public function data_detail(Request $request, $id) + { + if ($request->ajax()) { + $users = Cms::find($id)->user; + return Datatables::of($users) + ->addIndexColumn()->make(true); + } else { + exit("Not an AJAX request -_-"); + } + } + + public function create(Request $request) + { + $request->request->add(['user_id' => auth()->user()->id]); + + return view('backend.cms.tambah'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + // 'katartikel_id' => 'required', + 'judul' => 'required', + 'konten' => 'required', + + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Cms::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + + + public function edit($id) + { + $cms = Cms::find($id); + return view('backend.cms.ubah', ['cms' => $cms]); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $validator = Validator::make($request->all(), [ + + 'judul' => 'required', + 'konten' => 'required', + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (cms::find($id)->update($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil diubah']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal diubah']); + } + } + return response()->json($respon); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + + public function hapus($id) + { + $cms = Cms::find($id); + return view('backend.cms.hapus', ['cms' => $cms]); + } + + public function destroy($id) + { + $cms = Cms::find($id); + if ($cms->delete()) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil dihapus']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal dihapus']); + } + return response()->json($respon); + } + + } diff --git a/app/Http/Controllers/Backend/frameworkController.php b/app/Http/Controllers/Backend/frameworkController.php index 8804a30..641f36e 100644 --- a/app/Http/Controllers/Backend/frameworkController.php +++ b/app/Http/Controllers/Backend/frameworkController.php @@ -4,8 +4,151 @@ namespace App\Http\Controllers\Backend; use App\Http\Controllers\Controller; use Illuminate\Http\Request; +use App\Framework; +use App\User; +use Yajra\DataTables\Facades\DataTables; +use Illuminate\Support\Facades\Validator; class frameworkController extends Controller { - // + public function index() + { + $framework = Framework::all(); + return view('backend.framework.index', compact('framework')); + } + + public function data(Request $request) + { + if ($request->ajax()) { + $framework = framework::orderBy('id', 'desc'); + return Datatables::of($framework) + ->addIndexColumn() + // ->addColumn('lampiran', function($framework){ + // return 'Download'; + // }) + ->addColumn( + 'action', + '
+ + +     + +
' + ) + ->rawColumns(['action', 'lampiran'])->make(true); + } else { + exit("Not an AJAX request -_-"); + } + } + + public function data_detail(Request $request, $id) + { + if ($request->ajax()) { + $users = Framework::find($id)->user; + return Datatables::of($users) + ->addIndexColumn()->make(true); + } else { + exit("Not an AJAX request -_-"); + } + } + + public function create(Request $request) + { + $request->request->add(['user_id' => auth()->user()->id]); + + return view('backend.framework.tambah'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + // 'katartikel_id' => 'required', + 'judul' => 'required', + 'konten' => 'required', + + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Framework::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + + public function edit($id) + { + $framework = framework::find($id); + return view('backend.framework.ubah', ['framework' => $framework]); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $validator = Validator::make($request->all(), [ + + 'judul' => 'required', + 'konten' => 'required', + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Framework::find($id)->update($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil diubah']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal diubah']); + } + } + return response()->json($respon); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + + public function hapus($id) + { + $framework = Framework::find($id); + return view('backend.framework.hapus', ['framework' => $framework]); + } + + public function destroy($id) + { + $framework = Framework::find($id); + if ($framework->delete()) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil dihapus']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal dihapus']); + } + return response()->json($respon); + } + + + } diff --git a/app/Http/Controllers/Backend/frontendpController.php b/app/Http/Controllers/Backend/frontendpController.php index 15e3f35..ca266de 100644 --- a/app/Http/Controllers/Backend/frontendpController.php +++ b/app/Http/Controllers/Backend/frontendpController.php @@ -5,7 +5,7 @@ namespace App\Http\Controllers\Backend; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Yajra\DataTables\Facades\DataTables; -use Validator; +use Illuminate\Support\Facades\Validator; use App\Frontendp; use App\Katartikel; use App\User; @@ -14,7 +14,7 @@ class frontendpController extends Controller { public function index() { - return view('backend.feprog.index'); + return view('backend.frontendp.index'); } public function data(Request $request) @@ -23,16 +23,16 @@ class frontendpController extends Controller $frontendp = Frontendp::orderBy('id', 'desc'); return Datatables::of($frontendp) ->addIndexColumn() - // ->addColumn('lampiran', function($eoffice){ - // return 'Download'; + // ->addColumn('lampiran', function($frontendp){ + // return 'Download'; // }) ->addColumn( 'action', '
- +     -
' @@ -54,5 +54,103 @@ class frontendpController extends Controller } } + public function create(Request $request) + { + + return view('backend.frontendp.tambah'); + + + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + + 'judul' => 'required', + 'konten' => 'required', + + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Frontendp::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + + public function edit($id) + { + $frontendp = frontendp::find($id); + + return view('backend.frontendp.ubah', compact('frontendp')); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $validator = Validator::make($request->all(), [ + + 'judul' => 'required', + 'konten' => 'required', + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Frontendp::find($id)->update($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil diubah']); + } else { + $respon = array('statuss'=>false, 'pesan' => ['msg' => 'Data gagal diubah']); + } + } + return response()->json($respon); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + + public function hapus($id) + { + $frontendp = Frontendp::find($id); + return view('backend.frontendp.hapus', ['frontendp' => $frontendp]); + } + + public function destroy($id) + { + $frontendp = Frontendp::find($id); + if ($frontendp->delete()) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil dihapus']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal dihapus']); + } + return response()->json($respon); + } + + } diff --git a/app/Http/Controllers/Backend/javascriptController.php b/app/Http/Controllers/Backend/javascriptController.php index 54e4357..cf3c3d2 100644 --- a/app/Http/Controllers/Backend/javascriptController.php +++ b/app/Http/Controllers/Backend/javascriptController.php @@ -4,8 +4,149 @@ namespace App\Http\Controllers\Backend; use App\Http\Controllers\Controller; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Validator; +use Yajra\DataTables\Facades\DataTables; +use App\Javascript; +use App\User; class javascriptController extends Controller { - // + public function index() + { + $javascript = Javascript::all(); + return view('backend.javascript.index', compact('javascript')); + } + + public function data(Request $request) + { + if ($request->ajax()) { + $javascript = javascript::orderBy('id', 'desc'); + return Datatables::of($javascript) + ->addIndexColumn() + // ->addColumn('lampiran', function($javascript){ + // return 'Download'; + // }) + ->addColumn( + 'action', + '
+ + +     + +
' + ) + ->rawColumns(['action', 'lampiran'])->make(true); + } else { + exit("Not an AJAX request -_-"); + } + } + + public function data_detail(Request $request, $id) + { + if ($request->ajax()) { + $users = javascript::find($id)->user; + return Datatables::of($users) + ->addIndexColumn()->make(true); + } else { + exit("Not an AJAX request -_-"); + } + } + + public function create(Request $request) +{ + $request->request->add(['user_id' => auth()->user()->id]); + + return view('backend.javascript.tambah'); +} + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + // 'katartikel_id' => 'required', + 'judul' => 'required', + 'konten' => 'required', + + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (javascript::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + + + public function edit($id) + { + $javascript = Javascript::find($id); + return view('backend.javascript.ubah', ['javascript' => $javascript]); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $validator = Validator::make($request->all(), [ + + 'judul' => 'required', + 'konten' => 'required', + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Javascript::find($id)->update($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil diubah']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal diubah']); + } + } + return response()->json($respon); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + + public function hapus($id) + { + $javascript = Javascript::find($id); + return view('backend.javascript.hapus', ['javascript' => $javascript]); + } + + public function destroy($id) + { + $javascript = Javascript::find($id); + if ($javascript->delete()) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil dihapus']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal dihapus']); + } + return response()->json($respon); + } } diff --git a/app/Http/Controllers/Backend/laravelController.php b/app/Http/Controllers/Backend/laravelController.php index 8454080..5946cc3 100644 --- a/app/Http/Controllers/Backend/laravelController.php +++ b/app/Http/Controllers/Backend/laravelController.php @@ -60,7 +60,7 @@ class laravelController extends Controller { // $laravel = Laravel::create(); //$katartikel_id = Katartikel::pluck('katartikel_id'); - $katartikel_id = array('katartikel_id' => 333); + // $katartikel_id = array('katartikel_id' => 333); // dd($katartikel_id); // $laravel = Laravel::whith('katartikel')->where // dd($laravel); diff --git a/app/Http/Controllers/Backend/osController.php b/app/Http/Controllers/Backend/osController.php index dfaff35..37466a3 100644 --- a/app/Http/Controllers/Backend/osController.php +++ b/app/Http/Controllers/Backend/osController.php @@ -4,8 +4,149 @@ namespace App\Http\Controllers\Backend; use App\Http\Controllers\Controller; use Illuminate\Http\Request; +use App\Os; +use App\User; +use Yajra\DataTables\Facades\DataTables; +use Illuminate\Support\Facades\Validator; class osController extends Controller { - // + public function index() + { + $os = Os::all(); + return view('backend.os.index', compact('os')); + } + + public function data(Request $request) + { + if ($request->ajax()) { + $os = Os::orderBy('id', 'desc'); + return Datatables::of($os) + ->addIndexColumn() + // ->addColumn('lampiran', function($os){ + // return 'Download'; + // }) + ->addColumn( + 'action', + '
+ + +     + +
' + ) + ->rawColumns(['action', 'lampiran'])->make(true); + } else { + exit("Not an AJAX request -_-"); + } + } + + public function data_detail(Request $request, $id) + { + if ($request->ajax()) { + $users = Os::find($id)->user; + return Datatables::of($users) + ->addIndexColumn()->make(true); + } else { + exit("Not an AJAX request -_-"); + } + } + + public function create(Request $request) + { + $request->request->add(['user_id' => auth()->user()->id]); + + return view('backend.os.tambah'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + // 'katartikel_id' => 'required', + 'judul' => 'required', + 'konten' => 'required', + + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Os::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + + + public function edit($id) + { + $os = Os::find($id); + return view('backend.os.ubah', ['os' => $os]); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $validator = Validator::make($request->all(), [ + + 'judul' => 'required', + 'konten' => 'required', + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Os::find($id)->update($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil diubah']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal diubah']); + } + } + return response()->json($respon); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + + public function hapus($id) + { + $os = Os::find($id); + return view('backend.os.hapus', ['os' => $os]); + } + + public function destroy($id) + { + $os = Os::find($id); + if ($os->delete()) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil dihapus']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal dihapus']); + } + return response()->json($respon); + } } diff --git a/app/Http/Controllers/Backend/sopController.php b/app/Http/Controllers/Backend/sopController.php index 5cbe207..3f5cd35 100644 --- a/app/Http/Controllers/Backend/sopController.php +++ b/app/Http/Controllers/Backend/sopController.php @@ -4,8 +4,150 @@ namespace App\Http\Controllers\Backend; use App\Http\Controllers\Controller; use Illuminate\Http\Request; +use Yajra\DataTables\Facades\DataTables; +use App\Sop; +use App\User; +use Illuminate\Support\Facades\Validator; class sopController extends Controller { - // + public function index() + { + $sop = Sop::all(); + return view('backend.sop.index'); + } + + public function data(Request $request) + { + if ($request->ajax()) { + $sop = Sop::orderBy('id', 'desc'); + return Datatables::of($sop) + ->addIndexColumn() + // ->addColumn('lampiran', function($sop){ + // return 'Download'; + // }) + ->addColumn( + 'action', + '
+ + +     + +
' + ) + ->rawColumns(['action', 'lampiran'])->make(true); + } else { + exit("Not an AJAX request -_-"); + } + } + + public function data_detail(Request $request, $id) + { + if ($request->ajax()) { + $users = Sop::find($id)->user; + return Datatables::of($users) + ->addIndexColumn()->make(true); + } else { + exit("Not an AJAX request -_-"); + } +} + +public function create(Request $request) +{ + $request->request->add(['user_id' => auth()->user()->id]); + + return view('backend.sop.tambah'); } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + + public function store(Request $request) + { + $validator = Validator::make($request->all(), [ + + // 'katartikel_id' => 'required', + 'judul' => 'required', + 'konten' => 'required', + + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Sop::create($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil disimpan']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal disimpan']); + } + } + return response()->json($respon); + } + + + public function edit($id) + { + $sop = Sop::find($id); + return view('backend.sop.ubah', ['sop' => $sop]); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $validator = Validator::make($request->all(), [ + + 'judul' => 'required', + 'konten' => 'required', + + + ]); + if ($validator->fails()) { + $respon = array('status'=>false, 'pesan' => $validator->messages()); + } else { + if (Sop::find($id)->update($request->all())) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil diubah']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal diubah']); + } + } + return response()->json($respon); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + + public function hapus($id) + { + $sop = Sop::find($id); + return view('backend.sop.hapus', ['sop' => $sop]); + } + + public function destroy($id) + { + $sop = Sop::find($id); + if ($sop->delete()) { + $respon = array('status'=>true, 'pesan' => ['msg' => 'Data berhasil dihapus']); + } else { + $respon = array('status'=>false, 'pesan' => ['msg' => 'Data gagal dihapus']); + } + return response()->json($respon); + } + +} \ No newline at end of file diff --git a/app/Os.php b/app/Os.php index 194d0c9..4fddb0c 100644 --- a/app/Os.php +++ b/app/Os.php @@ -8,4 +8,19 @@ use Illuminate\Database\Eloquent\Model; class Os extends Model { use HasFactory; + + protected $fillable = ['id','judul','konten']; + + protected $table = "os"; + + public function artikel() + { + return $this->belongsTo('App\Katartikel'); + } + + public function user() + { + return $this->belongsTo('App\User'); + } + } diff --git a/resources/views/backend/art-cms/datatables.blade.php b/resources/views/backend/art-cms/datatables.blade.php new file mode 100644 index 0000000..98c9437 --- /dev/null +++ b/resources/views/backend/art-cms/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1,2,3] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/art-eoffice/data') }}", + columns: [ + + { data: 'judul'}, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false }, + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/art-cms/index.blade.php b/resources/views/backend/art-cms/index.blade.php new file mode 100644 index 0000000..34e4d47 --- /dev/null +++ b/resources/views/backend/art-cms/index.blade.php @@ -0,0 +1,240 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+ +
+ + +
+
+ + + + + + +
+
+ @foreach($content as $cmsall) +
+
+
+
+
Content Management System {!! $cmsall->created_at !!}
+
+

{!! $cmsall->judul !!}

+

{!! Str::limit($cmsall->konten, 100,'') !!} + + @if (strlen($cmsall->konten) > 100) + ... + {!! substr($cmsall->konten, 100)!!} + @endif +

+ + +
+
+
+
+ @endforeach +
+
+ + + + + + + + + + +@endsection + +@push('js') +@include('backend.home.datatable-js') + + + + +@endpush +@push('css') +@include('backend.home.datatable-css') + +@endpush + + + diff --git a/resources/views/backend/art-cms/jquery.blade.php b/resources/views/backend/art-cms/jquery.blade.php new file mode 100644 index 0000000..fbb8777 --- /dev/null +++ b/resources/views/backend/art-cms/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/art-cms/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-eoffiice-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-cms') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-eoffiice-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-cms') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/art-cms/tambah.blade copy.php b/resources/views/backend/art-cms/tambah.blade copy.php new file mode 100644 index 0000000..32345cf --- /dev/null +++ b/resources/views/backend/art-cms/tambah.blade copy.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['artikelEoffice.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/art-cms/tambah.blade.php b/resources/views/backend/art-cms/tambah.blade.php new file mode 100644 index 0000000..3015703 --- /dev/null +++ b/resources/views/backend/art-cms/tambah.blade.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['art-cms.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/art-fw/datatables.blade.php b/resources/views/backend/art-fw/datatables.blade.php new file mode 100644 index 0000000..98c9437 --- /dev/null +++ b/resources/views/backend/art-fw/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1,2,3] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/art-eoffice/data') }}", + columns: [ + + { data: 'judul'}, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false }, + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/art-fw/index.blade.php b/resources/views/backend/art-fw/index.blade.php new file mode 100644 index 0000000..a90314f --- /dev/null +++ b/resources/views/backend/art-fw/index.blade.php @@ -0,0 +1,240 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+ +
+ + +
+
+ + + + + + +
+
+ @foreach($framework as $fwall) +
+
+
+
+
Framework {!! $fwall->created_at !!}
+
+

{!! $fwall->judul !!}

+

{!! Str::limit($fwall->konten, 100,'') !!} + + @if (strlen($fwall->konten) > 100) + ... + {!! substr($fwall->konten, 100)!!} + @endif +

+ + +
+
+
+
+ @endforeach +
+
+ + + + + +
+
+ + + +@endsection + +@push('js') +@include('backend.home.datatable-js') + + + + +@endpush +@push('css') +@include('backend.home.datatable-css') + +@endpush + + + diff --git a/resources/views/backend/art-fw/jquery.blade.php b/resources/views/backend/art-fw/jquery.blade.php new file mode 100644 index 0000000..bf3edf3 --- /dev/null +++ b/resources/views/backend/art-fw/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/art-fw/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-fw-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-fw') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-fw-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-fw') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/art-fw/tambah.blade copy.php b/resources/views/backend/art-fw/tambah.blade copy.php new file mode 100644 index 0000000..32345cf --- /dev/null +++ b/resources/views/backend/art-fw/tambah.blade copy.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['artikelEoffice.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/art-fw/tambah.blade.php b/resources/views/backend/art-fw/tambah.blade.php new file mode 100644 index 0000000..9ea2f29 --- /dev/null +++ b/resources/views/backend/art-fw/tambah.blade.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['art-fw.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/art-js/datatables.blade.php b/resources/views/backend/art-js/datatables.blade.php new file mode 100644 index 0000000..98c9437 --- /dev/null +++ b/resources/views/backend/art-js/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1,2,3] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/art-eoffice/data') }}", + columns: [ + + { data: 'judul'}, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false }, + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/art-js/index.blade.php b/resources/views/backend/art-js/index.blade.php new file mode 100644 index 0000000..dc6e65b --- /dev/null +++ b/resources/views/backend/art-js/index.blade.php @@ -0,0 +1,240 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+ +
+ + +
+
+ + + + + + +
+
+ @foreach($javascript as $jsall) +
+
+
+
+
Javascript {!! $jsall->created_at !!}
+
+

{!! $jsall->judul !!}

+

{!! Str::limit($jsall->konten, 100,'') !!} + + @if (strlen($jsall->konten) > 100) + ... + {!! substr($jsfall->konten, 100)!!} + @endif +

+ + +
+
+
+
+ @endforeach +
+
+ + + + + +
+
+ + + +@endsection + +@push('js') +@include('backend.home.datatable-js') + + + + +@endpush +@push('css') +@include('backend.home.datatable-css') + +@endpush + + + diff --git a/resources/views/backend/art-js/jquery.blade.php b/resources/views/backend/art-js/jquery.blade.php new file mode 100644 index 0000000..bf3edf3 --- /dev/null +++ b/resources/views/backend/art-js/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/art-fw/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-fw-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-fw') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-fw-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-fw') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/art-js/tambah.blade copy.php b/resources/views/backend/art-js/tambah.blade copy.php new file mode 100644 index 0000000..32345cf --- /dev/null +++ b/resources/views/backend/art-js/tambah.blade copy.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['artikelEoffice.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/art-js/tambah.blade.php b/resources/views/backend/art-js/tambah.blade.php new file mode 100644 index 0000000..9ea2f29 --- /dev/null +++ b/resources/views/backend/art-js/tambah.blade.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['art-fw.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/art-os/datatables.blade.php b/resources/views/backend/art-os/datatables.blade.php new file mode 100644 index 0000000..c83c105 --- /dev/null +++ b/resources/views/backend/art-os/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1,2,3] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/art-os/data') }}", + columns: [ + + { data: 'judul'}, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false }, + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/art-os/index.blade.php b/resources/views/backend/art-os/index.blade.php new file mode 100644 index 0000000..adb667f --- /dev/null +++ b/resources/views/backend/art-os/index.blade.php @@ -0,0 +1,240 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+ +
+ + +
+
+ + + + + + +
+
+ @foreach($operating as $osall) +
+
+
+
+
Operating System {!! $osall->created_at !!}
+
+

{!! $osall->judul !!}

+

{!! Str::limit($osall->konten, 100,'') !!} + + @if (strlen($osall->konten) > 100) + ... + {!! substr($osall->konten, 100)!!} + @endif +

+ + +
+
+
+
+ @endforeach +
+
+ + + + + +
+
+ + + +@endsection + +@push('js') +@include('backend.home.datatable-js') + + + + +@endpush +@push('css') +@include('backend.home.datatable-css') + +@endpush + + + diff --git a/resources/views/backend/art-os/jquery.blade.php b/resources/views/backend/art-os/jquery.blade.php new file mode 100644 index 0000000..1db4ba7 --- /dev/null +++ b/resources/views/backend/art-os/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/art-os/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-os-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-os') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-os-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-os') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/art-os/tambah.blade copy.php b/resources/views/backend/art-os/tambah.blade copy.php new file mode 100644 index 0000000..32345cf --- /dev/null +++ b/resources/views/backend/art-os/tambah.blade copy.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['artikelEoffice.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/art-os/tambah.blade.php b/resources/views/backend/art-os/tambah.blade.php new file mode 100644 index 0000000..49eba88 --- /dev/null +++ b/resources/views/backend/art-os/tambah.blade.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['art-os.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/art-sop/datatables.blade.php b/resources/views/backend/art-sop/datatables.blade.php new file mode 100644 index 0000000..1db9326 --- /dev/null +++ b/resources/views/backend/art-sop/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1,2,3] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/art-sop/data') }}", + columns: [ + + { data: 'judul'}, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false }, + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/art-sop/index.blade.php b/resources/views/backend/art-sop/index.blade.php new file mode 100644 index 0000000..cb6e6ad --- /dev/null +++ b/resources/views/backend/art-sop/index.blade.php @@ -0,0 +1,240 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+ +
+ + +
+
+ + + + + + +
+
+ @foreach($standar as $sopall) +
+
+
+
+
Standard Operation Procedure {!! $sopall->created_at !!}
+
+

{!! $sopall->judul !!}

+

{!! Str::limit($sopall->konten, 100,'') !!} + + @if (strlen($sopall->konten) > 100) + ... + {!! substr($sopall->konten, 100)!!} + @endif +

+ + +
+
+
+
+ @endforeach +
+
+ + + + + +
+
+ + + +@endsection + +@push('js') +@include('backend.home.datatable-js') + + + + +@endpush +@push('css') +@include('backend.home.datatable-css') + +@endpush + + + diff --git a/resources/views/backend/art-sop/jquery.blade.php b/resources/views/backend/art-sop/jquery.blade.php new file mode 100644 index 0000000..28d5da9 --- /dev/null +++ b/resources/views/backend/art-sop/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/art-sop/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-sop-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-sop') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('art-sop-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/art-sop') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/art-sop/tambah.blade copy.php b/resources/views/backend/art-sop/tambah.blade copy.php new file mode 100644 index 0000000..32345cf --- /dev/null +++ b/resources/views/backend/art-sop/tambah.blade copy.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['artikelEoffice.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/art-sop/tambah.blade.php b/resources/views/backend/art-sop/tambah.blade.php new file mode 100644 index 0000000..815ba2f --- /dev/null +++ b/resources/views/backend/art-sop/tambah.blade.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['art-sop.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/cms/ajax.blade.php b/resources/views/backend/cms/ajax.blade.php new file mode 100644 index 0000000..452b0e7 --- /dev/null +++ b/resources/views/backend/cms/ajax.blade.php @@ -0,0 +1,76 @@ +var nextUrl=$("#url").val(); +function errorMsg(pesan){ + $(".pesan").html(''); + $("input").prop('disabled', false); + $(".loading").hide(); + $(".modal-footer").show(); +} + +function successMsg(data){ + if(data.status == true){ + if (typeof data.url !== 'undefined') { + location.href= data.url; + } else { + $('#datatable').DataTable().ajax.reload(); + $('.modal').modal('hide'); + Swal.fire({ + title: 'Okay...', + text: 'Berhasil proses data', + type: 'success', + timer: 1500 + }); + } + }else{ + $("button").prop("disabled", false); + $("input").prop('disabled', false); + $.each(data.pesan, function(i, item) { + $('#'+i).closest('.form-group').addClass('has-error'); + $('#'+i).focus(); + $(".pesan").html(''); + return false; + }); + } + $(".loading").hide(); + {{-- $(".pesan").html(''); --}} + $(".modal-footer").show(); + +} +function sebelumKirim(){ + $(".pesan").html(''); + $("input").prop('disabled', true); + $(".loading").show(); + $(".modal-footer").hide(); +} + +function goAjax(targetUrl, dataString, methodType = 'POST'){ + $.ajax({ + type: methodType, + url: targetUrl, + data: dataString, + enctype: 'multipart/form-data', + dataType: 'json', + cache: false, + beforeSend: function(){ + sebelumKirim(); + }, + success: function(data){ + successMsg(data); + }, + error: function(x, e){ + // errorMsg(x.status); + } + }); +} + +function addCommas(nStr) +{ + nStr += ''; + x = nStr.split('.'); + x1 = x[0]; + x2 = x.length > 1 ? '.' + x[1] : ''; + var rgx = /(\d+)(\d{3})/; + while (rgx.test(x1)) { + x1 = x1.replace(rgx, '$1' + ',' + '$2'); + } + return x1 + x2; +} diff --git a/resources/views/backend/cms/datatables.blade.php b/resources/views/backend/cms/datatables.blade.php new file mode 100644 index 0000000..e0a4fb4 --- /dev/null +++ b/resources/views/backend/cms/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/cms/data') }}", + columns: [ + + { data: 'judul' }, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/cms/datatables_detail.blade.php b/resources/views/backend/cms/datatables_detail.blade.php new file mode 100644 index 0000000..d3783ed --- /dev/null +++ b/resources/views/backend/cms/datatables_detail.blade.php @@ -0,0 +1,49 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/unor/detail/data/'.$id) }}", + columns: [ + { data: 'nama' }, + { data: 'email' }, + { data: 'username' } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/cms/detail.blade.php b/resources/views/backend/cms/detail.blade.php new file mode 100644 index 0000000..7bde327 --- /dev/null +++ b/resources/views/backend/cms/detail.blade.php @@ -0,0 +1,33 @@ +@extends('backend.home.index') +@push('title', 'Detail '. $halaman->nama . ' '. $aksesgrup->nama) +@push('header', 'Detail '. $halaman->nama . ' '.$aksesgrup->nama) +@push('tombol') + +@endpush +@section('content') +
+
+ + + + + + + + +
NamaEmailUsername
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush \ No newline at end of file diff --git a/resources/views/backend/cms/hapus.blade.php b/resources/views/backend/cms/hapus.blade.php new file mode 100644 index 0000000..87ff45c --- /dev/null +++ b/resources/views/backend/cms/hapus.blade.php @@ -0,0 +1,24 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['cms.destroy', $cms->id], 'class' => 'form account-form', 'method' => 'DELETE')) !!} +
+
+ +

+ +

+
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + diff --git a/resources/views/backend/cms/index.blade.php b/resources/views/backend/cms/index.blade.php new file mode 100644 index 0000000..d1abf72 --- /dev/null +++ b/resources/views/backend/cms/index.blade.php @@ -0,0 +1,34 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+
+ + + + + + + + + + +
JudulKontenAksi
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush diff --git a/resources/views/backend/cms/jquery.blade.php b/resources/views/backend/cms/jquery.blade.php new file mode 100644 index 0000000..1b5cebe --- /dev/null +++ b/resources/views/backend/cms/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/cms/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('cms-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/cms') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('cms-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/cms') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/cms/tambah.blade.php b/resources/views/backend/cms/tambah.blade.php new file mode 100644 index 0000000..cb9187d --- /dev/null +++ b/resources/views/backend/cms/tambah.blade.php @@ -0,0 +1,46 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['cms.store'], 'class' => 'form account-form', 'method' => 'pcmst' )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/cms/ubah.blade.php b/resources/views/backend/cms/ubah.blade.php new file mode 100644 index 0000000..7b0e0f9 --- /dev/null +++ b/resources/views/backend/cms/ubah.blade.php @@ -0,0 +1,45 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['cms.update', $cms->id], 'class' => 'form account-form', 'method' => 'PUT', 'files' => TRUE )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-6 control-label')) !!} + {!! Form::text('judul', $cms->judul, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-6 control-label')) !!} + {!! Form::textarea('konten', $cms->konten, array('id' => 'konten', 'class' => 'form-control', 'placeholder' => 'Tulis')) !!} +

+ +
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + diff --git a/resources/views/backend/feprog/ajax.blade.php b/resources/views/backend/feprog/ajax.blade.php deleted file mode 100644 index 452b0e7..0000000 --- a/resources/views/backend/feprog/ajax.blade.php +++ /dev/null @@ -1,76 +0,0 @@ -var nextUrl=$("#url").val(); -function errorMsg(pesan){ - $(".pesan").html(''); - $("input").prop('disabled', false); - $(".loading").hide(); - $(".modal-footer").show(); -} - -function successMsg(data){ - if(data.status == true){ - if (typeof data.url !== 'undefined') { - location.href= data.url; - } else { - $('#datatable').DataTable().ajax.reload(); - $('.modal').modal('hide'); - Swal.fire({ - title: 'Okay...', - text: 'Berhasil proses data', - type: 'success', - timer: 1500 - }); - } - }else{ - $("button").prop("disabled", false); - $("input").prop('disabled', false); - $.each(data.pesan, function(i, item) { - $('#'+i).closest('.form-group').addClass('has-error'); - $('#'+i).focus(); - $(".pesan").html(''); - return false; - }); - } - $(".loading").hide(); - {{-- $(".pesan").html(''); --}} - $(".modal-footer").show(); - -} -function sebelumKirim(){ - $(".pesan").html(''); - $("input").prop('disabled', true); - $(".loading").show(); - $(".modal-footer").hide(); -} - -function goAjax(targetUrl, dataString, methodType = 'POST'){ - $.ajax({ - type: methodType, - url: targetUrl, - data: dataString, - enctype: 'multipart/form-data', - dataType: 'json', - cache: false, - beforeSend: function(){ - sebelumKirim(); - }, - success: function(data){ - successMsg(data); - }, - error: function(x, e){ - // errorMsg(x.status); - } - }); -} - -function addCommas(nStr) -{ - nStr += ''; - x = nStr.split('.'); - x1 = x[0]; - x2 = x.length > 1 ? '.' + x[1] : ''; - var rgx = /(\d+)(\d{3})/; - while (rgx.test(x1)) { - x1 = x1.replace(rgx, '$1' + ',' + '$2'); - } - return x1 + x2; -} diff --git a/resources/views/backend/feprog/datatables.blade.php b/resources/views/backend/feprog/datatables.blade.php deleted file mode 100644 index f51db42..0000000 --- a/resources/views/backend/feprog/datatables.blade.php +++ /dev/null @@ -1,51 +0,0 @@ -$(document).ready(function () { - $('#datatable').DataTable({ - responsive: true, - lengthChange: false, - language: { - url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" - }, - dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", - buttons: [ - { - extend: 'pdfHtml5', - text: 'PDF', - titleAttr: 'Generate PDF', - className: 'btn-outline-danger btn-sm mr-1', - exportOptions: { - columns: [0, 1,2,3] - } - }, - { - extend: 'excelHtml5', - text: 'Excel', - titleAttr: 'Generate Excel', - className: 'btn-outline-success btn-sm mr-1', - exportOptions: { - columns: [0, 1,2,3] - } - }, - { - extend: 'print', - text: 'Print', - titleAttr: 'Print Table', - className: 'btn-outline-primary btn-sm', - exportOptions: { - columns: [0, 1,2,3] - } - } - ], - processing: true, - serverSide: true, - ajax: "{{ url($url_admin.'/feprog/data') }}", - columns: [ - - { data: 'judul'}, - { data: 'konten'}, - - { data: 'action', orderable: false, searchable: false }, - ] - }); -}); \ No newline at end of file diff --git a/resources/views/backend/feprog/datatables_detail.blade.php b/resources/views/backend/feprog/datatables_detail.blade.php deleted file mode 100644 index d3783ed..0000000 --- a/resources/views/backend/feprog/datatables_detail.blade.php +++ /dev/null @@ -1,49 +0,0 @@ -$(document).ready(function () { - $('#datatable').DataTable({ - responsive: true, - lengthChange: false, - language: { - url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" - }, - dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + - "<'row'<'col-sm-12'tr>>" + - "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", - buttons: [ - { - extend: 'pdfHtml5', - text: 'PDF', - titleAttr: 'Generate PDF', - className: 'btn-outline-danger btn-sm mr-1', - exportOptions: { - columns: [0, 1, 2, 3, 4] - } - }, - { - extend: 'excelHtml5', - text: 'Excel', - titleAttr: 'Generate Excel', - className: 'btn-outline-success btn-sm mr-1', - exportOptions: { - columns: [0, 1, 2, 3, 4] - } - }, - { - extend: 'print', - text: 'Print', - titleAttr: 'Print Table', - className: 'btn-outline-primary btn-sm', - exportOptions: { - columns: [0, 1, 2, 3, 4] - } - } - ], - processing: true, - serverSide: true, - ajax: "{{ url($url_admin.'/unor/detail/data/'.$id) }}", - columns: [ - { data: 'nama' }, - { data: 'email' }, - { data: 'username' } - ] - }); -}); \ No newline at end of file diff --git a/resources/views/backend/feprog/detail.blade.php b/resources/views/backend/feprog/detail.blade.php deleted file mode 100644 index 7bde327..0000000 --- a/resources/views/backend/feprog/detail.blade.php +++ /dev/null @@ -1,33 +0,0 @@ -@extends('backend.home.index') -@push('title', 'Detail '. $halaman->nama . ' '. $aksesgrup->nama) -@push('header', 'Detail '. $halaman->nama . ' '.$aksesgrup->nama) -@push('tombol') - -@endpush -@section('content') -
-
- - - - - - - - -
NamaEmailUsername
-
-
-@endsection -@push('js') -@include('backend.home.datatable-js') - - -@endpush -@push('css') -@include('backend.home.datatable-css') -@endpush \ No newline at end of file diff --git a/resources/views/backend/feprog/hapus.blade.php b/resources/views/backend/feprog/hapus.blade.php deleted file mode 100644 index 4cd36b6..0000000 --- a/resources/views/backend/feprog/hapus.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -{!! Form::open(array('id' => 'frmOji', 'route' => ['eoffice.destroy', $eoffice->id], 'class' => 'form account-form', 'method' => 'DELETE')) !!} -
-
- -

- -

-
- {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} -
-
-
- -
-
-
-
0%
-
-
-
-
-{!! Form::close() !!} - - diff --git a/resources/views/backend/feprog/index.blade.php b/resources/views/backend/feprog/index.blade.php deleted file mode 100644 index ad9bdca..0000000 --- a/resources/views/backend/feprog/index.blade.php +++ /dev/null @@ -1,39 +0,0 @@ -@extends('backend.home.index') -@push('title', $halaman->nama) -@push('header', $halaman->nama) -@push('tombol') - - Tambah - -@endpush -@section('content') -
- -
- - - - - - - - - - - -
JudulKontenAksi
- -
- -
-@endsection -@push('js') -@include('backend.home.datatable-js') - - - - -@endpush -@push('css') -@include('backend.home.datatable-css') -@endpush diff --git a/resources/views/backend/feprog/jquery.blade.php b/resources/views/backend/feprog/jquery.blade.php deleted file mode 100644 index 5f65744..0000000 --- a/resources/views/backend/feprog/jquery.blade.php +++ /dev/null @@ -1,75 +0,0 @@ -$(document).ready(function(){ - $('.tambah').click(function(){ - ojisatrianiLoadingFadeIn(); - $.loadmodal({ - url: "{{ url($url_admin.'/feprog/create') }}", - id: 'responsive', - dlgClass: 'fade', - bgClass: 'primary', - title: 'Tambah', - width: 'whatever', - modal: { - keyboard: true, - // any other options from the regular $().modal call (see Bootstrap docs) - }, - ajax: { - dataType: 'html', - method: 'GET', - success: function(data, status, xhr){ - ojisatrianiLoadingFadeOut(); - }, - - }, - }); - }); - - $(document).on("click",".ubah",function() { - ojisatrianiLoadingFadeIn(); - var id = $(this).attr('feprog-id'); - $.loadmodal({ - url: "{{ url($url_admin.'/feprog') }}/"+ id +"/edit", - id: 'responsive', - dlgClass: 'fade', - bgClass: 'warning', - title: 'Ubah', - width: 'whatever', - modal: { - keyboard: true, - // any other options from the regular $().modal call (see Bootstrap docs) - }, - ajax: { - dataType: 'html', - method: 'GET', - success: function(data, status, xhr){ - ojisatrianiLoadingFadeOut(); - }, - }, - }); - }); - - $(document).on("click",".hapus",function() { - ojisatrianiLoadingFadeIn(); - var id = $(this).attr('feprog-id'); - $.loadmodal({ - url: "{{ url($url_admin.'/feprog') }}/hapus/"+ id, - id: 'responsive', - dlgClass: 'fade', - bgClass: 'danger', - title: 'Hapus', - width: 'whatever', - modal: { - keyboard: true, - // any other options from the regular $().modal call (see Bootstrap docs) - //$('#uraian').val(id), - }, - ajax: { - dataType: 'html', - method: 'GET', - success: function(data, status, xhr){ - ojisatrianiLoadingFadeOut(); - }, - }, - }); - }); - -}); diff --git a/resources/views/backend/feprog/tambah.blade.php b/resources/views/backend/feprog/tambah.blade.php deleted file mode 100644 index 9ee2c1f..0000000 --- a/resources/views/backend/feprog/tambah.blade.php +++ /dev/null @@ -1,55 +0,0 @@ -{!! Form::open(array('id' => 'frmOji', 'route' => ['eoffice.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} -
-
- - - - -

- {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} - {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} -

-

- {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} - {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} -

- - - {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} -
-
-
- -
-
-
-
0%
-
-
-
-
-{!! Form::close() !!} - - - - - - - - - diff --git a/resources/views/backend/feprog/ubah.blade.php b/resources/views/backend/feprog/ubah.blade.php deleted file mode 100644 index a442f71..0000000 --- a/resources/views/backend/feprog/ubah.blade.php +++ /dev/null @@ -1,58 +0,0 @@ -{!! Form::open(array('id' => 'frmOji', 'route' => ['eoffice.update', $eoffice->id], 'class' => 'form account-form', 'method' => 'PUT', 'files' => TRUE )) !!} -
-
- -

- {!! Form::label('Kategori', 'Kategori', array('class' => 'col-md-6 control-label')) !!} - {!! Form::text('katartikel_id', $eoffice->katartikel_id, array('id' => 'katartikel_id', 'class' => 'form-control')) !!} -

-

- {!! Form::label('Judul', 'Judul', array('class' => 'col-md-6 control-label')) !!} - {!! Form::text('judul', $eoffice->judul, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul')) !!} -

-

- {!! Form::label('Konten', 'Konten', array('class' => 'col-md-6 control-label')) !!} - {!! Form::textarea('konten', $eoffice->konten, array('id' => 'konten', 'class' => 'form-control', 'placeholder' => 'Konten')) !!} -

- - -
- {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} -
-
-
- -
-
-
-
0%
-
-
-
-
-{!! Form::close() !!} - - - - - - - - - diff --git a/resources/views/backend/framework/ajax.blade.php b/resources/views/backend/framework/ajax.blade.php new file mode 100644 index 0000000..452b0e7 --- /dev/null +++ b/resources/views/backend/framework/ajax.blade.php @@ -0,0 +1,76 @@ +var nextUrl=$("#url").val(); +function errorMsg(pesan){ + $(".pesan").html(''); + $("input").prop('disabled', false); + $(".loading").hide(); + $(".modal-footer").show(); +} + +function successMsg(data){ + if(data.status == true){ + if (typeof data.url !== 'undefined') { + location.href= data.url; + } else { + $('#datatable').DataTable().ajax.reload(); + $('.modal').modal('hide'); + Swal.fire({ + title: 'Okay...', + text: 'Berhasil proses data', + type: 'success', + timer: 1500 + }); + } + }else{ + $("button").prop("disabled", false); + $("input").prop('disabled', false); + $.each(data.pesan, function(i, item) { + $('#'+i).closest('.form-group').addClass('has-error'); + $('#'+i).focus(); + $(".pesan").html(''); + return false; + }); + } + $(".loading").hide(); + {{-- $(".pesan").html(''); --}} + $(".modal-footer").show(); + +} +function sebelumKirim(){ + $(".pesan").html(''); + $("input").prop('disabled', true); + $(".loading").show(); + $(".modal-footer").hide(); +} + +function goAjax(targetUrl, dataString, methodType = 'POST'){ + $.ajax({ + type: methodType, + url: targetUrl, + data: dataString, + enctype: 'multipart/form-data', + dataType: 'json', + cache: false, + beforeSend: function(){ + sebelumKirim(); + }, + success: function(data){ + successMsg(data); + }, + error: function(x, e){ + // errorMsg(x.status); + } + }); +} + +function addCommas(nStr) +{ + nStr += ''; + x = nStr.split('.'); + x1 = x[0]; + x2 = x.length > 1 ? '.' + x[1] : ''; + var rgx = /(\d+)(\d{3})/; + while (rgx.test(x1)) { + x1 = x1.replace(rgx, '$1' + ',' + '$2'); + } + return x1 + x2; +} diff --git a/resources/views/backend/framework/datatables.blade.php b/resources/views/backend/framework/datatables.blade.php new file mode 100644 index 0000000..e73a6f2 --- /dev/null +++ b/resources/views/backend/framework/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/framework/data') }}", + columns: [ + + { data: 'judul' }, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/framework/datatables_detail.blade.php b/resources/views/backend/framework/datatables_detail.blade.php new file mode 100644 index 0000000..d3783ed --- /dev/null +++ b/resources/views/backend/framework/datatables_detail.blade.php @@ -0,0 +1,49 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/unor/detail/data/'.$id) }}", + columns: [ + { data: 'nama' }, + { data: 'email' }, + { data: 'username' } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/framework/detail.blade.php b/resources/views/backend/framework/detail.blade.php new file mode 100644 index 0000000..7bde327 --- /dev/null +++ b/resources/views/backend/framework/detail.blade.php @@ -0,0 +1,33 @@ +@extends('backend.home.index') +@push('title', 'Detail '. $halaman->nama . ' '. $aksesgrup->nama) +@push('header', 'Detail '. $halaman->nama . ' '.$aksesgrup->nama) +@push('tombol') + +@endpush +@section('content') +
+
+ + + + + + + + +
NamaEmailUsername
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush \ No newline at end of file diff --git a/resources/views/backend/framework/hapus.blade.php b/resources/views/backend/framework/hapus.blade.php new file mode 100644 index 0000000..54e0ca1 --- /dev/null +++ b/resources/views/backend/framework/hapus.blade.php @@ -0,0 +1,24 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['framework.destroy', $framework->id], 'class' => 'form account-form', 'method' => 'DELETE')) !!} +
+
+ +

+ +

+
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + diff --git a/resources/views/backend/framework/index.blade.php b/resources/views/backend/framework/index.blade.php new file mode 100644 index 0000000..d1abf72 --- /dev/null +++ b/resources/views/backend/framework/index.blade.php @@ -0,0 +1,34 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+
+ + + + + + + + + + +
JudulKontenAksi
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush diff --git a/resources/views/backend/framework/jquery.blade.php b/resources/views/backend/framework/jquery.blade.php new file mode 100644 index 0000000..b2ca3ed --- /dev/null +++ b/resources/views/backend/framework/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/framework/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('framework-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/framework') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('framework-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/framework') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/framework/tambah.blade.php b/resources/views/backend/framework/tambah.blade.php new file mode 100644 index 0000000..139800c --- /dev/null +++ b/resources/views/backend/framework/tambah.blade.php @@ -0,0 +1,46 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['framework.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/framework/ubah.blade.php b/resources/views/backend/framework/ubah.blade.php new file mode 100644 index 0000000..08a4d2f --- /dev/null +++ b/resources/views/backend/framework/ubah.blade.php @@ -0,0 +1,45 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['framework.update', $framework->id], 'class' => 'form account-form', 'method' => 'PUT', 'files' => TRUE )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-6 control-label')) !!} + {!! Form::text('judul', $framework->judul, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-6 control-label')) !!} + {!! Form::textarea('konten', $framework->konten, array('id' => 'konten', 'class' => 'form-control', 'placeholder' => 'Tulis')) !!} +

+ +
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + diff --git a/resources/views/backend/frontendp/ajax.blade.php b/resources/views/backend/frontendp/ajax.blade.php new file mode 100644 index 0000000..452b0e7 --- /dev/null +++ b/resources/views/backend/frontendp/ajax.blade.php @@ -0,0 +1,76 @@ +var nextUrl=$("#url").val(); +function errorMsg(pesan){ + $(".pesan").html(''); + $("input").prop('disabled', false); + $(".loading").hide(); + $(".modal-footer").show(); +} + +function successMsg(data){ + if(data.status == true){ + if (typeof data.url !== 'undefined') { + location.href= data.url; + } else { + $('#datatable').DataTable().ajax.reload(); + $('.modal').modal('hide'); + Swal.fire({ + title: 'Okay...', + text: 'Berhasil proses data', + type: 'success', + timer: 1500 + }); + } + }else{ + $("button").prop("disabled", false); + $("input").prop('disabled', false); + $.each(data.pesan, function(i, item) { + $('#'+i).closest('.form-group').addClass('has-error'); + $('#'+i).focus(); + $(".pesan").html(''); + return false; + }); + } + $(".loading").hide(); + {{-- $(".pesan").html(''); --}} + $(".modal-footer").show(); + +} +function sebelumKirim(){ + $(".pesan").html(''); + $("input").prop('disabled', true); + $(".loading").show(); + $(".modal-footer").hide(); +} + +function goAjax(targetUrl, dataString, methodType = 'POST'){ + $.ajax({ + type: methodType, + url: targetUrl, + data: dataString, + enctype: 'multipart/form-data', + dataType: 'json', + cache: false, + beforeSend: function(){ + sebelumKirim(); + }, + success: function(data){ + successMsg(data); + }, + error: function(x, e){ + // errorMsg(x.status); + } + }); +} + +function addCommas(nStr) +{ + nStr += ''; + x = nStr.split('.'); + x1 = x[0]; + x2 = x.length > 1 ? '.' + x[1] : ''; + var rgx = /(\d+)(\d{3})/; + while (rgx.test(x1)) { + x1 = x1.replace(rgx, '$1' + ',' + '$2'); + } + return x1 + x2; +} diff --git a/resources/views/backend/frontendp/datatables.blade.php b/resources/views/backend/frontendp/datatables.blade.php new file mode 100644 index 0000000..0a50f04 --- /dev/null +++ b/resources/views/backend/frontendp/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1,2,3] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1,2,3] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/frontendp/data') }}", + columns: [ + + { data: 'judul'}, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false }, + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/frontendp/datatables_detail.blade.php b/resources/views/backend/frontendp/datatables_detail.blade.php new file mode 100644 index 0000000..d3783ed --- /dev/null +++ b/resources/views/backend/frontendp/datatables_detail.blade.php @@ -0,0 +1,49 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/unor/detail/data/'.$id) }}", + columns: [ + { data: 'nama' }, + { data: 'email' }, + { data: 'username' } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/frontendp/detail.blade.php b/resources/views/backend/frontendp/detail.blade.php new file mode 100644 index 0000000..7bde327 --- /dev/null +++ b/resources/views/backend/frontendp/detail.blade.php @@ -0,0 +1,33 @@ +@extends('backend.home.index') +@push('title', 'Detail '. $halaman->nama . ' '. $aksesgrup->nama) +@push('header', 'Detail '. $halaman->nama . ' '.$aksesgrup->nama) +@push('tombol') + +@endpush +@section('content') +
+
+ + + + + + + + +
NamaEmailUsername
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush \ No newline at end of file diff --git a/resources/views/backend/frontendp/hapus.blade.php b/resources/views/backend/frontendp/hapus.blade.php new file mode 100644 index 0000000..2d99256 --- /dev/null +++ b/resources/views/backend/frontendp/hapus.blade.php @@ -0,0 +1,24 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['frontendp.destroy', $frontendp->id], 'class' => 'form account-form', 'method' => 'DELETE')) !!} +
+
+ +

+ +

+
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + diff --git a/resources/views/backend/frontendp/index.blade.php b/resources/views/backend/frontendp/index.blade.php new file mode 100644 index 0000000..ad9bdca --- /dev/null +++ b/resources/views/backend/frontendp/index.blade.php @@ -0,0 +1,39 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+ +
+ + + + + + + + + + + +
JudulKontenAksi
+ +
+ +
+@endsection +@push('js') +@include('backend.home.datatable-js') + + + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush diff --git a/resources/views/backend/frontendp/jquery.blade.php b/resources/views/backend/frontendp/jquery.blade.php new file mode 100644 index 0000000..473cf72 --- /dev/null +++ b/resources/views/backend/frontendp/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/frontendp/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('frontendp-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/frontendp') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('frontendp-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/frontendp') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/frontendp/tambah.blade.php b/resources/views/backend/frontendp/tambah.blade.php new file mode 100644 index 0000000..78b8167 --- /dev/null +++ b/resources/views/backend/frontendp/tambah.blade.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['frontendp.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + + + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/frontendp/ubah.blade.php b/resources/views/backend/frontendp/ubah.blade.php new file mode 100644 index 0000000..e429863 --- /dev/null +++ b/resources/views/backend/frontendp/ubah.blade.php @@ -0,0 +1,55 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['frontendp.update', $frontendp->id], 'class' => 'form account-form', 'method' => 'PUT', 'files' => TRUE )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-6 control-label')) !!} + {!! Form::text('judul', $frontendp->judul, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-6 control-label')) !!} + {!! Form::textarea('konten', $frontendp->konten, array('id' => 'konten', 'class' => 'form-control', 'placeholder' => 'Konten')) !!} +

+ + +
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/javascript/ajax.blade.php b/resources/views/backend/javascript/ajax.blade.php new file mode 100644 index 0000000..452b0e7 --- /dev/null +++ b/resources/views/backend/javascript/ajax.blade.php @@ -0,0 +1,76 @@ +var nextUrl=$("#url").val(); +function errorMsg(pesan){ + $(".pesan").html(''); + $("input").prop('disabled', false); + $(".loading").hide(); + $(".modal-footer").show(); +} + +function successMsg(data){ + if(data.status == true){ + if (typeof data.url !== 'undefined') { + location.href= data.url; + } else { + $('#datatable').DataTable().ajax.reload(); + $('.modal').modal('hide'); + Swal.fire({ + title: 'Okay...', + text: 'Berhasil proses data', + type: 'success', + timer: 1500 + }); + } + }else{ + $("button").prop("disabled", false); + $("input").prop('disabled', false); + $.each(data.pesan, function(i, item) { + $('#'+i).closest('.form-group').addClass('has-error'); + $('#'+i).focus(); + $(".pesan").html(''); + return false; + }); + } + $(".loading").hide(); + {{-- $(".pesan").html(''); --}} + $(".modal-footer").show(); + +} +function sebelumKirim(){ + $(".pesan").html(''); + $("input").prop('disabled', true); + $(".loading").show(); + $(".modal-footer").hide(); +} + +function goAjax(targetUrl, dataString, methodType = 'POST'){ + $.ajax({ + type: methodType, + url: targetUrl, + data: dataString, + enctype: 'multipart/form-data', + dataType: 'json', + cache: false, + beforeSend: function(){ + sebelumKirim(); + }, + success: function(data){ + successMsg(data); + }, + error: function(x, e){ + // errorMsg(x.status); + } + }); +} + +function addCommas(nStr) +{ + nStr += ''; + x = nStr.split('.'); + x1 = x[0]; + x2 = x.length > 1 ? '.' + x[1] : ''; + var rgx = /(\d+)(\d{3})/; + while (rgx.test(x1)) { + x1 = x1.replace(rgx, '$1' + ',' + '$2'); + } + return x1 + x2; +} diff --git a/resources/views/backend/javascript/datatables.blade.php b/resources/views/backend/javascript/datatables.blade.php new file mode 100644 index 0000000..c88f074 --- /dev/null +++ b/resources/views/backend/javascript/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/javascript/data') }}", + columns: [ + + { data: 'judul' }, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/javascript/datatables_detail.blade.php b/resources/views/backend/javascript/datatables_detail.blade.php new file mode 100644 index 0000000..d3783ed --- /dev/null +++ b/resources/views/backend/javascript/datatables_detail.blade.php @@ -0,0 +1,49 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/unor/detail/data/'.$id) }}", + columns: [ + { data: 'nama' }, + { data: 'email' }, + { data: 'username' } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/javascript/detail.blade.php b/resources/views/backend/javascript/detail.blade.php new file mode 100644 index 0000000..7bde327 --- /dev/null +++ b/resources/views/backend/javascript/detail.blade.php @@ -0,0 +1,33 @@ +@extends('backend.home.index') +@push('title', 'Detail '. $halaman->nama . ' '. $aksesgrup->nama) +@push('header', 'Detail '. $halaman->nama . ' '.$aksesgrup->nama) +@push('tombol') + +@endpush +@section('content') +
+
+ + + + + + + + +
NamaEmailUsername
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush \ No newline at end of file diff --git a/resources/views/backend/javascript/hapus.blade.php b/resources/views/backend/javascript/hapus.blade.php new file mode 100644 index 0000000..f5ae262 --- /dev/null +++ b/resources/views/backend/javascript/hapus.blade.php @@ -0,0 +1,24 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['javascript.destroy', $javascript->id], 'class' => 'form account-form', 'method' => 'DELETE')) !!} +
+
+ +

+ +

+
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + diff --git a/resources/views/backend/javascript/index.blade.php b/resources/views/backend/javascript/index.blade.php new file mode 100644 index 0000000..5b02711 --- /dev/null +++ b/resources/views/backend/javascript/index.blade.php @@ -0,0 +1,34 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+
+ + + + + + + + + + +
JudulKontenAksi
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush diff --git a/resources/views/backend/javascript/jquery.blade.php b/resources/views/backend/javascript/jquery.blade.php new file mode 100644 index 0000000..cac1510 --- /dev/null +++ b/resources/views/backend/javascript/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/javascript/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('javascript-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/javascript') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('javascript-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/javascript') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/javascript/tambah.blade.php b/resources/views/backend/javascript/tambah.blade.php new file mode 100644 index 0000000..eef4b17 --- /dev/null +++ b/resources/views/backend/javascript/tambah.blade.php @@ -0,0 +1,46 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['javascript.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/javascript/ubah.blade.php b/resources/views/backend/javascript/ubah.blade.php new file mode 100644 index 0000000..d064deb --- /dev/null +++ b/resources/views/backend/javascript/ubah.blade.php @@ -0,0 +1,45 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['javascript.update', $javascript->id], 'class' => 'form account-form', 'method' => 'PUT', 'files' => TRUE )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-6 control-label')) !!} + {!! Form::text('judul', $javascript->judul, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-6 control-label')) !!} + {!! Form::textarea('konten', $javascript->konten, array('id' => 'konten', 'class' => 'form-control', 'placeholder' => 'Tulis')) !!} +

+ +
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + diff --git a/resources/views/backend/laravel/ubah.blade.php b/resources/views/backend/laravel/ubah.blade.php index 8220aa0..8c50fd2 100644 --- a/resources/views/backend/laravel/ubah.blade.php +++ b/resources/views/backend/laravel/ubah.blade.php @@ -2,10 +2,7 @@
-

- {!! Form::label('Kategori Id', 'Kategori Id', array('class' => 'col-md-6 control-label')) !!} - {!! Form::text('kategori_id', $laravel->katartikel_id, array('id' => 'kategori_id', 'class' => 'form-control', 'placeholder' => 'Kategori Artikel')) !!} -

+

{!! Form::label('Judul', 'Judul', array('class' => 'col-md-6 control-label')) !!} {!! Form::text('judul', $laravel->judul, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul')) !!} @@ -14,10 +11,7 @@ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-6 control-label')) !!} {!! Form::textarea('konten', $laravel->konten, array('id' => 'konten', 'class' => 'form-control', 'placeholder' => 'Tulis')) !!}

- +
{!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!}
diff --git a/resources/views/backend/os/ajax.blade.php b/resources/views/backend/os/ajax.blade.php new file mode 100644 index 0000000..452b0e7 --- /dev/null +++ b/resources/views/backend/os/ajax.blade.php @@ -0,0 +1,76 @@ +var nextUrl=$("#url").val(); +function errorMsg(pesan){ + $(".pesan").html(''); + $("input").prop('disabled', false); + $(".loading").hide(); + $(".modal-footer").show(); +} + +function successMsg(data){ + if(data.status == true){ + if (typeof data.url !== 'undefined') { + location.href= data.url; + } else { + $('#datatable').DataTable().ajax.reload(); + $('.modal').modal('hide'); + Swal.fire({ + title: 'Okay...', + text: 'Berhasil proses data', + type: 'success', + timer: 1500 + }); + } + }else{ + $("button").prop("disabled", false); + $("input").prop('disabled', false); + $.each(data.pesan, function(i, item) { + $('#'+i).closest('.form-group').addClass('has-error'); + $('#'+i).focus(); + $(".pesan").html(''); + return false; + }); + } + $(".loading").hide(); + {{-- $(".pesan").html(''); --}} + $(".modal-footer").show(); + +} +function sebelumKirim(){ + $(".pesan").html(''); + $("input").prop('disabled', true); + $(".loading").show(); + $(".modal-footer").hide(); +} + +function goAjax(targetUrl, dataString, methodType = 'POST'){ + $.ajax({ + type: methodType, + url: targetUrl, + data: dataString, + enctype: 'multipart/form-data', + dataType: 'json', + cache: false, + beforeSend: function(){ + sebelumKirim(); + }, + success: function(data){ + successMsg(data); + }, + error: function(x, e){ + // errorMsg(x.status); + } + }); +} + +function addCommas(nStr) +{ + nStr += ''; + x = nStr.split('.'); + x1 = x[0]; + x2 = x.length > 1 ? '.' + x[1] : ''; + var rgx = /(\d+)(\d{3})/; + while (rgx.test(x1)) { + x1 = x1.replace(rgx, '$1' + ',' + '$2'); + } + return x1 + x2; +} diff --git a/resources/views/backend/os/datatables.blade.php b/resources/views/backend/os/datatables.blade.php new file mode 100644 index 0000000..4b7a97f --- /dev/null +++ b/resources/views/backend/os/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/os/data') }}", + columns: [ + + { data: 'judul' }, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/os/datatables_detail.blade.php b/resources/views/backend/os/datatables_detail.blade.php new file mode 100644 index 0000000..d3783ed --- /dev/null +++ b/resources/views/backend/os/datatables_detail.blade.php @@ -0,0 +1,49 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/unor/detail/data/'.$id) }}", + columns: [ + { data: 'nama' }, + { data: 'email' }, + { data: 'username' } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/os/detail.blade.php b/resources/views/backend/os/detail.blade.php new file mode 100644 index 0000000..7bde327 --- /dev/null +++ b/resources/views/backend/os/detail.blade.php @@ -0,0 +1,33 @@ +@extends('backend.home.index') +@push('title', 'Detail '. $halaman->nama . ' '. $aksesgrup->nama) +@push('header', 'Detail '. $halaman->nama . ' '.$aksesgrup->nama) +@push('tombol') + +@endpush +@section('content') +
+
+ + + + + + + + +
NamaEmailUsername
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush \ No newline at end of file diff --git a/resources/views/backend/os/hapus.blade.php b/resources/views/backend/os/hapus.blade.php new file mode 100644 index 0000000..79e1644 --- /dev/null +++ b/resources/views/backend/os/hapus.blade.php @@ -0,0 +1,24 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['os.destroy', $os->id], 'class' => 'form account-form', 'method' => 'DELETE')) !!} +
+
+ +

+ +

+
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + diff --git a/resources/views/backend/os/index.blade.php b/resources/views/backend/os/index.blade.php new file mode 100644 index 0000000..d1abf72 --- /dev/null +++ b/resources/views/backend/os/index.blade.php @@ -0,0 +1,34 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+
+ + + + + + + + + + +
JudulKontenAksi
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush diff --git a/resources/views/backend/os/jquery.blade.php b/resources/views/backend/os/jquery.blade.php new file mode 100644 index 0000000..df90c0d --- /dev/null +++ b/resources/views/backend/os/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/os/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('os-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/os') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('os-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/os') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/os/tambah.blade.php b/resources/views/backend/os/tambah.blade.php new file mode 100644 index 0000000..45791ab --- /dev/null +++ b/resources/views/backend/os/tambah.blade.php @@ -0,0 +1,46 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['os.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/os/ubah.blade.php b/resources/views/backend/os/ubah.blade.php new file mode 100644 index 0000000..0086fc0 --- /dev/null +++ b/resources/views/backend/os/ubah.blade.php @@ -0,0 +1,45 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['os.update', $os->id], 'class' => 'form account-form', 'method' => 'PUT', 'files' => TRUE )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-6 control-label')) !!} + {!! Form::text('judul', $os->judul, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-6 control-label')) !!} + {!! Form::textarea('konten', $os->konten, array('id' => 'konten', 'class' => 'form-control', 'placeholder' => 'Tulis')) !!} +

+ +
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + diff --git a/resources/views/backend/sop/ajax.blade.php b/resources/views/backend/sop/ajax.blade.php new file mode 100644 index 0000000..452b0e7 --- /dev/null +++ b/resources/views/backend/sop/ajax.blade.php @@ -0,0 +1,76 @@ +var nextUrl=$("#url").val(); +function errorMsg(pesan){ + $(".pesan").html(''); + $("input").prop('disabled', false); + $(".loading").hide(); + $(".modal-footer").show(); +} + +function successMsg(data){ + if(data.status == true){ + if (typeof data.url !== 'undefined') { + location.href= data.url; + } else { + $('#datatable').DataTable().ajax.reload(); + $('.modal').modal('hide'); + Swal.fire({ + title: 'Okay...', + text: 'Berhasil proses data', + type: 'success', + timer: 1500 + }); + } + }else{ + $("button").prop("disabled", false); + $("input").prop('disabled', false); + $.each(data.pesan, function(i, item) { + $('#'+i).closest('.form-group').addClass('has-error'); + $('#'+i).focus(); + $(".pesan").html(''); + return false; + }); + } + $(".loading").hide(); + {{-- $(".pesan").html(''); --}} + $(".modal-footer").show(); + +} +function sebelumKirim(){ + $(".pesan").html(''); + $("input").prop('disabled', true); + $(".loading").show(); + $(".modal-footer").hide(); +} + +function goAjax(targetUrl, dataString, methodType = 'POST'){ + $.ajax({ + type: methodType, + url: targetUrl, + data: dataString, + enctype: 'multipart/form-data', + dataType: 'json', + cache: false, + beforeSend: function(){ + sebelumKirim(); + }, + success: function(data){ + successMsg(data); + }, + error: function(x, e){ + // errorMsg(x.status); + } + }); +} + +function addCommas(nStr) +{ + nStr += ''; + x = nStr.split('.'); + x1 = x[0]; + x2 = x.length > 1 ? '.' + x[1] : ''; + var rgx = /(\d+)(\d{3})/; + while (rgx.test(x1)) { + x1 = x1.replace(rgx, '$1' + ',' + '$2'); + } + return x1 + x2; +} diff --git a/resources/views/backend/sop/datatables.blade.php b/resources/views/backend/sop/datatables.blade.php new file mode 100644 index 0000000..41f0a4f --- /dev/null +++ b/resources/views/backend/sop/datatables.blade.php @@ -0,0 +1,51 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/sop/data') }}", + columns: [ + + { data: 'judul' }, + { data: 'konten'}, + + { data: 'action', orderable: false, searchable: false } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/sop/datatables_detail.blade.php b/resources/views/backend/sop/datatables_detail.blade.php new file mode 100644 index 0000000..d3783ed --- /dev/null +++ b/resources/views/backend/sop/datatables_detail.blade.php @@ -0,0 +1,49 @@ +$(document).ready(function () { + $('#datatable').DataTable({ + responsive: true, + lengthChange: false, + language: { + url: "{{ asset('resources/vendor/datatables/js/indonesian.json') }}" + }, + dom: "<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'lB>>" + + "<'row'<'col-sm-12'tr>>" + + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", + buttons: [ + { + extend: 'pdfHtml5', + text: 'PDF', + titleAttr: 'Generate PDF', + className: 'btn-outline-danger btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'excelHtml5', + text: 'Excel', + titleAttr: 'Generate Excel', + className: 'btn-outline-success btn-sm mr-1', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + }, + { + extend: 'print', + text: 'Print', + titleAttr: 'Print Table', + className: 'btn-outline-primary btn-sm', + exportOptions: { + columns: [0, 1, 2, 3, 4] + } + } + ], + processing: true, + serverSide: true, + ajax: "{{ url($url_admin.'/unor/detail/data/'.$id) }}", + columns: [ + { data: 'nama' }, + { data: 'email' }, + { data: 'username' } + ] + }); +}); \ No newline at end of file diff --git a/resources/views/backend/sop/detail.blade.php b/resources/views/backend/sop/detail.blade.php new file mode 100644 index 0000000..7bde327 --- /dev/null +++ b/resources/views/backend/sop/detail.blade.php @@ -0,0 +1,33 @@ +@extends('backend.home.index') +@push('title', 'Detail '. $halaman->nama . ' '. $aksesgrup->nama) +@push('header', 'Detail '. $halaman->nama . ' '.$aksesgrup->nama) +@push('tombol') + +@endpush +@section('content') +
+
+ + + + + + + + +
NamaEmailUsername
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush \ No newline at end of file diff --git a/resources/views/backend/sop/hapus.blade.php b/resources/views/backend/sop/hapus.blade.php new file mode 100644 index 0000000..bffd23d --- /dev/null +++ b/resources/views/backend/sop/hapus.blade.php @@ -0,0 +1,24 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['sop.destroy', $sop->id], 'class' => 'form account-form', 'method' => 'DELETE')) !!} +
+
+ +

+ +

+
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + diff --git a/resources/views/backend/sop/index.blade.php b/resources/views/backend/sop/index.blade.php new file mode 100644 index 0000000..5b02711 --- /dev/null +++ b/resources/views/backend/sop/index.blade.php @@ -0,0 +1,34 @@ +@extends('backend.home.index') +@push('title', $halaman->nama) +@push('header', $halaman->nama) +@push('tombol') + + Tambah + +@endpush +@section('content') +
+
+ + + + + + + + + + +
JudulKontenAksi
+
+
+@endsection +@push('js') +@include('backend.home.datatable-js') + + + +@endpush +@push('css') +@include('backend.home.datatable-css') +@endpush diff --git a/resources/views/backend/sop/jquery.blade.php b/resources/views/backend/sop/jquery.blade.php new file mode 100644 index 0000000..7fdfc8c --- /dev/null +++ b/resources/views/backend/sop/jquery.blade.php @@ -0,0 +1,75 @@ +$(document).ready(function(){ + $('.tambah').click(function(){ + ojisatrianiLoadingFadeIn(); + $.loadmodal({ + url: "{{ url($url_admin.'/sop/create') }}", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'primary', + title: 'Tambah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + + }, + }); + }); + + $(document).on("click",".ubah",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('sop-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/sop') }}/"+ id +"/edit", + id: 'responsive', + dlgClass: 'fade', + bgClass: 'warning', + title: 'Ubah', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + + $(document).on("click",".hapus",function() { + ojisatrianiLoadingFadeIn(); + var id = $(this).attr('sop-id'); + $.loadmodal({ + url: "{{ url($url_admin.'/sop') }}/hapus/"+ id, + id: 'responsive', + dlgClass: 'fade', + bgClass: 'danger', + title: 'Hapus', + width: 'whatever', + modal: { + keyboard: true, + // any other options from the regular $().modal call (see Bootstrap docs) + //$('#uraian').val(id), + }, + ajax: { + dataType: 'html', + method: 'GET', + success: function(data, status, xhr){ + ojisatrianiLoadingFadeOut(); + }, + }, + }); + }); + +}); diff --git a/resources/views/backend/sop/tambah.blade.php b/resources/views/backend/sop/tambah.blade.php new file mode 100644 index 0000000..435d8ff --- /dev/null +++ b/resources/views/backend/sop/tambah.blade.php @@ -0,0 +1,46 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['sop.store'], 'class' => 'form account-form', 'method' => 'post' )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-12 control-label')) !!} + {!! Form::text('judul', NULL, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul Artikel')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-12 control-label')) !!} + {!! Form::textarea('konten', NULL, array('id' => 'konten', 'class' => 'form-control', 'rows' => '30' , 'placeholder' => 'Konten')) !!} +

+ + + {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + + + + + diff --git a/resources/views/backend/sop/ubah.blade.php b/resources/views/backend/sop/ubah.blade.php new file mode 100644 index 0000000..5707621 --- /dev/null +++ b/resources/views/backend/sop/ubah.blade.php @@ -0,0 +1,48 @@ +{!! Form::open(array('id' => 'frmOji', 'route' => ['sop.update', $sop->id], 'class' => 'form account-form', 'method' => 'PUT', 'files' => TRUE )) !!} +
+
+ + +

+ {!! Form::label('Judul', 'Judul', array('class' => 'col-md-6 control-label')) !!} + {!! Form::text('judul', $sop->judul, array('id' => 'judul', 'class' => 'form-control', 'placeholder' => 'Judul')) !!} +

+

+ {!! Form::label('Konten', 'Konten', array('class' => 'col-md-6 control-label')) !!} + {!! Form::textarea('konten', $sop->konten, array('id' => 'konten', 'class' => 'form-control', 'placeholder' => 'Tulis')) !!} +

+ +
+ {!! Form::hidden('table-list', 'datatable', array('id' => 'table-list')) !!} +
+
+
+ +
+
+
+
0%
+
+
+
+
+{!! Form::close() !!} + + + + + diff --git a/routes/backend.php b/routes/backend.php index 387f4c1..e0510cc 100644 --- a/routes/backend.php +++ b/routes/backend.php @@ -178,6 +178,36 @@ Route::group(['prefix' => config('master.url.admin')], function () { Route::get('laravel/hapus/{id}', 'laravelController@hapus')->name('laravel.hapus'); // Route::get('laravel/create/{id}', 'laravelController@create')->name('laravel.create_id'); Route::resource('laravel', 'laravelController'); + + // SOP Management Artikel + Route::get('sop/data', 'sopController@data')->name('sop.data'); + Route::get('sop/hapus/{id}', 'sopController@hapus')->name('sop.hapus'); + Route::get('sop/create/{id}', 'sopController@create')->name('sop.create_id'); + Route::resource('sop', 'sopController'); + + // Javascript Management Artikel + Route::get('javascript/data', 'javascriptController@data')->name('javascript.data'); + Route::get('javascript/hapus/{id}', 'javascriptController@hapus')->name('javascript.hapus'); + Route::get('javascript/create/{id}', 'javascriptController@create')->name('javascript.create_id'); + Route::resource('javascript', 'javascriptController'); + + // Framework Management Artikel + Route::get('framework/data', 'frameworkController@data')->name('framework.data'); + Route::get('framework/hapus/{id}', 'frameworkController@hapus')->name('framework.hapus'); + Route::get('framework/create/{id}', 'frameworkController@create')->name('framework.create_id'); + Route::resource('framework', 'frameworkController'); + + // Operating System Management Artikel + Route::get('os/data', 'osController@data')->name('os.data'); + Route::get('os/hapus/{id}', 'osController@hapus')->name('os.hapus'); + Route::get('os/create/{id}', 'osController@create')->name('os.create_id'); + Route::resource('os', 'osController'); + + // Content Management System Management Artikel + Route::get('cms/data', 'cmsController@data')->name('cms.data'); + Route::get('cms/hapus/{id}', 'cmsController@hapus')->name('cms.hapus'); + Route::get('cms/create/{id}', 'cmsController@create')->name('cms.create_id'); + Route::resource('cms', 'cmsController'); // Backend Programming Artikel // Route::get('beprog/data', 'backendpController@data')->name('laravel.data'); @@ -186,10 +216,10 @@ Route::group(['prefix' => config('master.url.admin')], function () { // Route::resource('beprog', 'beackendpController'); // Frontend Programming Artikel - Route::get('feprog/data', 'frontendpController@data')->name('feprog.data'); - Route::get('feprog/hapus/{id}', 'frontendpController@hapus')->name('feprog.hapus'); + Route::get('frontendp/data', 'frontendpController@data')->name('frontendp.data'); + Route::get('frontendp/hapus/{id}', 'frontendpController@hapus')->name('frontendp.hapus'); // Route::get('laravel/create/{id}', 'laravelController@create')->name('laravel.create_id'); - Route::resource('feprog', 'frontendpController'); + Route::resource('frontendp', 'frontendpController'); // Eoffice Artikel Route::get('eoffice/data', 'eofficeController@data')->name('eoffice.data'); @@ -242,8 +272,23 @@ Route::group(['prefix' => config('master.url.admin')], function () { // Artikel Frontend Route::resource('art-frontend', 'artikelFrontendController'); - // Artikel Frontend + // Artikel Backend Route::resource('art-backend', 'artikelBackendController'); + + // Artikel CMS + Route::resource('art-cms', 'artikelCmsController'); + + // Artikel JS + Route::resource('art-js', 'artikelJsController'); + + // Artikel Framework + Route::resource('art-fw', 'artikelFwController'); + + // Artikel Framework + Route::resource('art-sop', 'artikelSopController'); + + // Artikel Framework + Route::resource('art-os', 'artikelOsController');