Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use yii\helpers\Html;
- /* @var $this \yii\web\View */
- /* @var $content string */
- if (Yii::$app->controller->action->id === 'login') {
- /**
- * Do not use this code in your template. Remove it.
- * Instead, use the code $this->layout = '//main-login'; in your controller.
- */
- echo $this->render(
- 'main-login',
- ['content' => $content]
- );
- } else {
- if (class_exists('backend\assets\AppAsset')) {
- backend\assets\AppAsset::register($this);
- } else {
- app\assets\AppAsset::register($this);
- }
- dmstr\web\AdminLteAsset::register($this);
- $directoryAsset = Yii::$app->assetManager->getPublishedUrl('@vendor/almasaeed2010/adminlte/dist');
- ?>
- <?php $this->beginPage() ?>
- <!DOCTYPE html>
- <html lang="<?= Yii::$app->language ?>">
- <head>
- <meta charset="<?= Yii::$app->charset ?>"/>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <?= Html::csrfMetaTags() ?>
- <title><?= Html::encode($this->title) ?></title>
- <?php $this->head() ?>
- <script src="/my_antrian/web/assets/c53855e1/jquery.js"></script>
- <script src="/my_antrian/web/js/jquery.dataTables.min.js"></script>
- <script src="/my_antrian/web/js/dataTables.bootstrap.min.js"></script>
- <?php $this->endBody() ?>
- <body class="hold-transition skin-blue sidebar-mini">
- <?php $this->beginBody() ?>
- <div class="wrapper">
- <?= $this->render(
- 'header.php',
- ['directoryAsset' => $directoryAsset]
- ) ?>
- <?= $this->render(
- 'left.php',
- ['directoryAsset' => $directoryAsset]
- )
- ?>
- <?= $this->render(
- 'content.php',
- ['content' => $content, 'directoryAsset' => $directoryAsset]
- ) ?>
- </div>
- </body>
- <script type="text/javascript">
- $(".report_date").datepicker({
- format: 'dd/mm/yyyy'
- });
- </script>
- </html>
- <?php $this->endPage() ?>
- <script type="text/javascript">
- function getDataTables(url,id_table,coldef){
- //Tables
- var dTable;
- $.noConflict();
- dTable = $('#'+id_table).DataTable( {
- "bProcessing": true,
- "bServerSide": true,
- "bJQueryUI": false,
- "responsive": false,
- "sAjaxSource": url,
- "sServerMethod": "POST",
- "scrollX": true,
- "columnDefs": coldef
- });
- $('#'+id_table).removeClass( 'display' ).addClass('table table-striped table-bordered');
- var i = 0;
- $('.table').find( 'tfoot tr th' ).each( function () {
- //Agar kolom Action Tidak Ada Tombol Pencarian
- if( $(this).text() == "Tanggal" ){
- var width = $(".sorting_1").width();
- var title = $('.table thead th').eq( $(this).index() ).text();
- $(this).html( '<input type="text" placeholder="Search '+title+'" class="form-control datepicker" style="background-color:white;width:'+width+'" />' );
- }
- else if( $(this).text() != "Action" ){
- var width = $(".sorting_1").width();
- var title = $('.table thead th').eq( $(this).index() ).text();
- $(this).html( '<input type="text" placeholder="Search '+title+'" class="form-control" style="width:'+width+'" />' );
- }
- i++;
- } );
- dTable.columns().every( function () {
- var that = this;
- $( 'input', this.footer() ).on( 'keyup change', function () {
- that
- .search( this.value )
- .draw();
- } );
- } );
- }
- </script>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement