[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
Backup
/
14082024
/
Data
/
htdocs
/
htdocs
/
e-learning
/
application
/
views
/
default
/
[
Home
]
File: list-materi.html
{% extends "layout-private.html" %} {% block title %} Materi - {{ parent() }} {% endblock %} {% block content %} <div class="module"> <div class="module-head"> <h3>Materi</h3> </div> <div class="module-body"> {{ get_flashdata('materi')|raw }} <div class="bs-callout bs-callout-info"> {% if is_siswa() == false %} <div class="btn-group pull-right" style="margin-top:-5px;"> {{ anchor('materi/add/tertulis', 'Tambah Materi Tertulis', {'class' : 'btn btn-primary'})|raw }} {{ anchor('materi/add/file', 'Tambah Materi File', {'class' : 'btn btn-primary'})|raw }} </div> {% endif %} <b><a class="as-link" data-toggle="collapse" data-target="#form-filter"><i class="icon-search" style="line-height: 0px;"></i> PARAMETER PENCARIAN</a></b> <div id="form-filter" class="collapse" style="margin-top: 5px;"> {{ form_open('materi')|raw }} <table class="table table-condensed"> <tr> <th style="border-top: none;">Mapel</th> <td style="border-top: none;"> <ul class="unstyled inline" style="margin-left: -5px;"> {% for m in mapel %} <li> <label class="checkbox inline"> <input type="checkbox" name="mapel_id[]" value="{{ m.id }}" {{ set_checkbox('mapel_id[]', m.id, (filter.mapel_id is not empty and in_array(m.id, filter.mapel_id)) ? true) }}> {{ m.nama }} </label> </li> {% endfor %} </ul> </td> </tr> <tr> <th>Kelas</th> <td> <ul class="unstyled inline" style="margin-left: -5px;"> {% for k in kelas %} <li> <label class="checkbox inline"> <input type="checkbox" name="kelas_id[]" value="{{ k.id }}" {{ set_checkbox('kelas_id[]', k.id, (filter.kelas_id is not empty and in_array(k.id, filter.kelas_id)) ? true) }}> {{ k.nama }} </label> </li> {% endfor %} </ul> </td> </tr> <tr> <th>Tipe</th> <td> <ul class="unstyled inline" style="margin-left: -5px;"> <li> <label class="checkbox inline"> <input type="checkbox" name="type[]" value="tertulis" {{ set_checkbox('type[]', 'tertulis', (filter.type is not empty and in_array('tertulis', filter.type)) ? true) }}> Tertulis </label> </li> <li> <label class="checkbox inline"> <input type="checkbox" name="type[]" value="file" {{ set_checkbox('type[]', 'file', (filter.type is not empty and in_array('file', filter.type)) ? true) }}> File </label> </li> </ul> </td> </tr> <tr> <th width="15%">Judul</th> <td> <input type="text" name="judul" class="span4" value="{{ set_value('judul', filter.judul) }}"> </td> </tr> <tr> <th>Konten</th> <td> <input type="text" name="konten" class="span5" value="{{ set_value('konten', filter.konten) }}"> </td> </tr> {% if is_admin() == true %} <tr> <th>Pembuat</th> <td> <input type="text" name="pembuat" class="span4" value="{{ set_value('pembuat', filter.pembuat) }}"> </td> </tr> {% endif %} <tr> <th>Status</th> <td> <ul class="unstyled inline" style="margin-left: -5px;"> <li> <label class="checkbox inline"> <input type="checkbox" name="publish[]" value="1" {{ set_checkbox('publish[]', '1', (filter.publish is not empty and in_array('1', filter.publish)) ? true) }}> Terbit </label> </li> <li> <label class="checkbox inline"> <input type="checkbox" name="publish[]" value="0" {{ set_checkbox('publish[]', '0', (filter.publish is not empty and in_array('0', filter.publish)) ? true) }}> Konsep </label> </li> </ul> </td> </tr> <tr> <td></td> <td> <button type="submit" class="btn btn-primary">Filter</button> </td> </tr> </table> </form> </div> </div> <br> <table class="table table-striped"> <thead> <tr> <th width="7%">ID</th> <th>Informasi Materi</th> <th width="15%"></th> </tr> </thead> <tbody> {% for no, m in materi %} {% if is_admin() == true %} {% set action_edit = true %} {% set action_delete = true %} {% elseif is_pengajar() == true %} {% if m.pengajar_id == get_sess_data('user', 'id') %} {% set action_edit = true %} {% set action_delete = true %} {% else %} {% set action_edit = false %} {% set action_delete = false %} {% endif %} {% elseif is_siswa() == true %} {% if m.siswa_id == get_sess_data('user', 'id') %} {% set action_edit = true %} {% set action_delete = true %} {% else %} {% set action_edit = false %} {% set action_delete = false %} {% endif %} {% endif %} <tr> <td><b>{{ m.id }}</b></td> <td> <p><strong class="text-warning"> {{ m.judul }} </strong></p> <ul class="breadcrumb" style="padding: 0px;background: none;"> <li> {{ (m.publish == 1) ? '<span class="label label-success">Terbit</span>' : '<span class="label label-warning">Konsep</span>' }} <span class="divider">/</span> </li> <li> {{ (m.file is not empty) ? '<span class="label label-success">File</span>' : '<span class="label label-info">Tertulis</span>' }} <span class="divider">/</span> </li> <li> {{ m.mapel.nama }} <span class="divider">/</span> </li> <li> {% for mk in m.materi_kelas %} {{ mk.nama }} {% endfor %} <span class="divider">/</span> </li> <li> {% if is_pengajar() == false %} Pembuat <a href="{{ m.pembuat.link_profil }}">{{ m.pembuat.nama }}</a> , {{ tgl_jam_indo(m.tgl_posting) }} {% else %} Dibuat {{ tgl_jam_indo(m.tgl_posting) }} {% endif %} <span class="divider">/</span> </li> <li> {{ (m.file is empty) ? 'Dibaca' : 'Diunduh' }} {{ m.views }} kali <span class="divider">/</span> </li> <li> {{ m.jml_komentar }} Komentar </li> </ul> </td> <td> <div class="btn-group"> {% if m.file is not empty %} {% set url_type = 'file' %} {% else %} {% set url_type = 'tertulis' %} {% endif %} {{ anchor('materi/detail/' ~ m.id, '<i class="icon-zoom-in"></i> Detail', {'class' : 'btn btn-default btn-small', 'target' : '_tab'})|raw }} {% if action_edit == true %} {{ anchor('materi/edit/' ~ url_type ~ '/' ~ m.id ~ '/' ~ enurl_redirect(current_url()), '<i class="icon-edit"></i> Edit', {'class' : 'btn btn-default btn-small'})|raw }} {% endif %} {% if action_delete == true %} {{ anchor('materi/delete/' ~ m.id ~ '/' ~ enurl_redirect(current_url()), '<i class="icon-trash"></i> Hapus', {'class' : 'btn btn-default btn-small', 'onclick' : "return confirm('Anda yakin ingin menghapus?')"})|raw }} {% endif %} </div> </td> </tr> {% endfor %} </tbody> </table> <br> {{ pagination|raw }} </div> </div> {% endblock %}