{% extends "layout-private.html" %} {% block title %} Materi - {{ parent() }} {% endblock %} {% block content %}

Materi

{{ get_flashdata('materi')|raw }}
{% if is_siswa() == false %}
{{ anchor('materi/add/tertulis', 'Tambah Materi Tertulis', {'class' : 'btn btn-primary'})|raw }} {{ anchor('materi/add/file', 'Tambah Materi File', {'class' : 'btn btn-primary'})|raw }}
{% endif %} PARAMETER PENCARIAN
{{ form_open('materi')|raw }} {% if is_admin() == true %} {% endif %}
Mapel
    {% for m in mapel %}
  • {% endfor %}
Kelas
    {% for k in kelas %}
  • {% endfor %}
Tipe
Judul
Konten
Pembuat
Status

{% 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 %} {% endfor %}
ID Informasi Materi
{{ m.id }}

{{ m.judul }}

{% if m.file is not empty %} {% set url_type = 'file' %} {% else %} {% set url_type = 'tertulis' %} {% endif %} {{ anchor('materi/detail/' ~ m.id, ' 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()), ' Edit', {'class' : 'btn btn-default btn-small'})|raw }} {% endif %} {% if action_delete == true %} {{ anchor('materi/delete/' ~ m.id ~ '/' ~ enurl_redirect(current_url()), ' Hapus', {'class' : 'btn btn-default btn-small', 'onclick' : "return confirm('Anda yakin ingin menghapus?')"})|raw }} {% endif %}

{{ pagination|raw }}
{% endblock %}