From ba79ded18e3eb51fd92d73ce17dbcb282eda6dc6 Mon Sep 17 00:00:00 2001
From: Cliff Jonathan <cliffsantoso@gmail.com>
Date: Fri, 6 May 2016 10:38:02 +0700
Subject: [PATCH] Front end penjadwalan

---
 iterasi1.sql                                |   3 -
 ppl2/app/Http/routes.php                    |   4 +
 ppl2/config/database.php                    |   2 +-
 ppl2/public/bdgwebkit/css/style.css         |  12 +-
 ppl2/resources/views/app_template.blade.php |   2 +
 ppl2/resources/views/penjadwalan.blade.php  | 240 ++++++++++++++++++++
 ppl2/resources/views/penjadwalan.php        | 107 +++++++++
 7 files changed, 365 insertions(+), 5 deletions(-)
 create mode 100644 ppl2/resources/views/penjadwalan.blade.php
 create mode 100644 ppl2/resources/views/penjadwalan.php

diff --git a/iterasi1.sql b/iterasi1.sql
index 86f3e6a..820d3e0 100644
--- a/iterasi1.sql
+++ b/iterasi1.sql
@@ -65,9 +65,6 @@ CREATE TABLE `institusi` (
 INSERT INTO `institusi` (`institusi_id`, `nama_institusi`, `alamat_institusi`, `email_institusi`, `notelp_institusi`) VALUES
 (1, 'Universitas Indonesia', 'Kampus Baru UI Depok, Depok', 'humas-ui@ui.ac.id', '+62217867222'),
 (4, 'Institut Teknologi Bandung', 'Jl. Ganesha No.10, Jawa Barat, Indonesia', 'itb@itb.ac.id', '+62222500935'),
-(5, 'Institut Teknologi Bandung', 'Jl. Ganesha No.10, Jawa Barat, Indonesia', 'itb@itb.ac.id', '+62222500935'),
-(1, 'Universitas Indonesia', 'Kampus Baru UI Depok, Depok', 'humas-ui@ui.ac.id', '+62217867222'),
-(4, 'Institut Teknologi Bandung', 'Jl. Ganesha No.10, Jawa Barat, Indonesia', 'itb@itb.ac.id', '+62222500935'),
 (5, 'Institut Teknologi Bandung', 'Jl. Ganesha No.10, Jawa Barat, Indonesia', 'itb@itb.ac.id', '+62222500935');
 
 -- --------------------------------------------------------
diff --git a/ppl2/app/Http/routes.php b/ppl2/app/Http/routes.php
index 77f65ba..5f63362 100644
--- a/ppl2/app/Http/routes.php
+++ b/ppl2/app/Http/routes.php
@@ -73,3 +73,7 @@ Route::get('daftarinstitusi/{id}','InstitusiController@show');
 Route::get('daftarinstitusi/search','InstitusiController@search');
 
 Route::resource('InstitusiController', 'InstitusiController');
+
+Route::get('/penjadwalan', function () {
+    return view('penjadwalan');
+});
diff --git a/ppl2/config/database.php b/ppl2/config/database.php
index 6f17b63..d02db4b 100644
--- a/ppl2/config/database.php
+++ b/ppl2/config/database.php
@@ -57,7 +57,7 @@ return [
             'driver' => 'mysql',
             'host' => 'localhost',
             'port' => '3306',
-            'database' => 'pendidikan',
+            'database' => 'ppl2',
             'username' => 'root',
             'password' => '',
             'charset' => 'utf8',
diff --git a/ppl2/public/bdgwebkit/css/style.css b/ppl2/public/bdgwebkit/css/style.css
index 44c5c33..093fcd0 100644
--- a/ppl2/public/bdgwebkit/css/style.css
+++ b/ppl2/public/bdgwebkit/css/style.css
@@ -6199,4 +6199,14 @@ span.circle{
 
 .list-status i.away {
   background-color: #fad733;
-}
\ No newline at end of file
+}
+
+.penjadwalan-table th, td {
+  text-align: center;
+  width: 100px;
+  height: 30px;
+}
+
+.penjadwalan-table td:hover {
+  background: #E5E5E5;
+}
diff --git a/ppl2/resources/views/app_template.blade.php b/ppl2/resources/views/app_template.blade.php
index ff5d0c7..47f8d59 100644
--- a/ppl2/resources/views/app_template.blade.php
+++ b/ppl2/resources/views/app_template.blade.php
@@ -316,5 +316,7 @@
 <script src="{{URL::asset('bdgwebkit/js/ui-toggle.js')}}"></script>
 <script src="{{URL::asset('bdgwebkit/js/ui-client.js')}}"></script>
 
+@yield('js')
+
 </body>
 </html>
\ No newline at end of file
diff --git a/ppl2/resources/views/penjadwalan.blade.php b/ppl2/resources/views/penjadwalan.blade.php
new file mode 100644
index 0000000..23f8b99
--- /dev/null
+++ b/ppl2/resources/views/penjadwalan.blade.php
@@ -0,0 +1,240 @@
+@extends('app_template')
+
+@section('title')
+  Penjadwalan
+@stop
+
+@section('page_title')
+  <h2>Penjadwalan</h2>
+@stop
+
+
+<!-- content -->
+@section('head_content')
+  @if (Session::has('message'))
+    <div class="alert alert-info fade in">{{ Session::get('message') }}
+      <a href="#" class="close" data-dismiss="alert" aria-label="close" title="close">×</a>
+    </div>
+  @endif
+@stop
+
+@section('content')
+<div class="panel panel-default">
+  <div class="panel-heading font-semibold">
+      <div style="display: inline-block;">Penjadwalan</div>
+      <div style="display: inline-block; width: 93%; text-align: right;">
+        <button class="btn btn-default">Prev</button>
+        <button class="btn btn-default">Next</button>
+      </div>
+  </div>
+  <div>
+    <table id="penjadwalan" class="table penjadwalan-table" ui-jq="footable">
+      <thead>
+        <tr>
+          <th data-breakpoints="xs">Waktu</th>
+          <th>Senin, 17/4</th>
+          <th>Selasa, 18/4</th>
+          <th>Rabu, 19/4</th>
+          <th>Kamis, 20/4</th>
+          <th>Jumat, 21/4</th>
+          <th>Sabtu, 22/4</th>
+          <th>Minggu, 23/4</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr data-expanded="true">
+          <td>07.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>08.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>09.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>10.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>11.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>12.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>13.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>14.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>15.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>16.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>17.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>18.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>19.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>20.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td>21.00</td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+      </tbody>
+    </table>
+  </div>
+
+  <!-- Modal -->
+  <div class="modal fade" id="myModal" role="dialog">
+    <div class="modal-dialog">
+    
+      <!-- Modal content-->
+      <div class="modal-content">
+        <div class="modal-header">
+          <button type="button" class="close" data-dismiss="modal">&times;</button>
+          <h4 class="modal-title">Input Jadwal</h4>
+        </div>
+        <div class="modal-body">
+          <form class="form-group">
+            <label for="judul">Judul kegiatan</label>
+            <input type="text" class="form-control" id="judul">
+            <label for="nama">Nama penyelenggara</label>
+            <input type="text" class="form-control" id="nama">
+            <label for="ruangan">Ruangan</label>
+            <select class="form-control" id="ruangan">
+              <option>Ruangan 1</option>
+              <option>Ruangan 2</option>
+            </select>
+          </form>
+        </div>
+        <div class="modal-footer">
+          <input type="submit" class="btn btn-primary" data-dismiss="modal" value="Submit"> 
+          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+        </div>
+      </div>
+      
+    </div>
+  </div>
+@stop
+
+@section('js')
+    <script>
+    $(function(){
+      $('#penjadwalan td').click(function () {
+        $('#myModal').modal('show');
+      });
+    });
+  </script>
+@stop
\ No newline at end of file
diff --git a/ppl2/resources/views/penjadwalan.php b/ppl2/resources/views/penjadwalan.php
new file mode 100644
index 0000000..f2cc187
--- /dev/null
+++ b/ppl2/resources/views/penjadwalan.php
@@ -0,0 +1,107 @@
+@extends('app_template')
+
+@section('title')
+  Penjadwalan
+@stop
+
+@section('page_title')
+  <h2>Penjadwalan</h2>
+@stop
+
+
+<!-- content -->
+@section('head_content')
+  @if (Session::has('message'))
+    <div class="alert alert-info fade in">{{ Session::get('message') }}
+      <a href="#" class="close" data-dismiss="alert" aria-label="close" title="close">×</a>
+    </div>
+  @endif
+  <div class="row">
+    <div class="col-md-3">
+      <button class="btn m-b-sm m-r-sm btn-success" onclick="location.href = '{{URL::to('/')}}/formInstitusi';"><i class="m-r-xs fa fa-plus"></i>Tambahkan Institusi</button>
+    </div>
+    <div class="col-md-6">
+      <form action = "{{URL::to('/')}}/daftarinstitusi/search" method="GET">
+      <div class="input-group">
+        <input type="text" class="form-control" placeholder="Cari Institusi" name="query" required> 
+        <span class="input-group-btn">
+          <button class="btn btn-default" type="submit">Go!</button>
+        </span>
+      </div>
+      </form>
+    </div>
+  </div>
+@stop
+
+@section('content')
+<div class="panel panel-default">
+  <div class="panel-heading font-semibold">
+      Penjadwalan
+  </div>
+  <div>
+    <table class="table" ui-jq="footable" ui-options='{
+      "paging": {
+        "enabled": true
+      }}'>
+      <thead>
+        <tr>
+          <th>Minggu ke-</th>
+          <th>Senin</th>
+          <th>Selasa</th>
+          <th>Rabu</th>
+          <th>Kamis</th>
+          <th>Jumat</th>
+          <th>Sabtu</th>
+          <th>Minggu</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr data-expanded="true">
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+        <tr data-expanded="true">
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td></td>
+        </tr>
+      </tbody>
+    </table>
+  </div>
+@stop
\ No newline at end of file
-- 
GitLab