PHP Classes

File: Template/timetable/index.php

Recommend this page to a friend!
  Classes of kiran   Kanboard Timetable plugin   Template/timetable/index.php   Download  
File: Template/timetable/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Kanboard Timetable plugin
Plugin to present of timetable of pending tasks
Author: By
Last change:
Date: 2 years ago
Size: 1,837 bytes


Class file image Download
<div class="page-header">
    <h2><?= t('Timetable') ?></h2>
        <li><?= $this->url->link(t('Day timetable'), 'timetableday', 'index', array('plugin' => 'timetable', 'user_id' => $user['id'])) ?></li>
        <li><?= $this->url->link(t('Week timetable'), 'timetableweek', 'index', array('plugin' => 'timetable', 'user_id' => $user['id'])) ?></li>
        <li><?= $this->url->link(t('Time off timetable'), 'timetableoff', 'index', array('plugin' => 'timetable', 'user_id' => $user['id'])) ?></li>
        <li><?= $this->url->link(t('Overtime timetable'), 'timetableextra', 'index', array('plugin' => 'timetable', 'user_id' => $user['id'])) ?></li>

<form method="get" action="?" autocomplete="off" class="form-inline">

    <?= $this->form->hidden('plugin', $values) ?>
<?= $this->form->hidden('controller', $values) ?>
<?= $this->form->hidden('action', $values) ?>
<?= $this->form->hidden('user_id', $values) ?>

    <?= $this->form->label(t('From'), 'from') ?>
<?= $this->form->text('from', $values, array(), array(), 'form-date') ?>

    <?= $this->form->label(t('To'), 'to') ?>
<?= $this->form->text('to', $values, array(), array(), 'form-date') ?>

    <input type="submit" value="<?= t('Execute') ?>" class="btn btn-blue"/>

<?php if (! empty($timetable)): ?>
<h3><?= t('Work timetable') ?></h3>
<table class="table-fixed table-stripped">
        <th><?= t('Day') ?></th>
        <th><?= t('Start') ?></th>
        <th><?= t('End') ?></th>
    <?php foreach ($timetable as $slot): ?>
        <td><?= $this->dt->date($slot[0]->getTimestamp()) ?></td>
        <td><?= $this->dt->time($slot[0]->getTimestamp()) ?></td>
        <td><?= $this->dt->time($slot[1]->getTimestamp()) ?></td>
    <?php endforeach ?>

<?php endif ?>