Sindbad~EG File Manager

Current Path : /var/www/html/votacao.camarasap.rs.gov.br/templates/Councilors/
Upload File :
Current File : /var/www/html/votacao.camarasap.rs.gov.br/templates/Councilors/index.php

<?php $this->assign('title', __('Councilors')); ?>
<?php $values['name'] = $this->request->getQuery('name'); ?>
<?php $values['political_party_id'] = $this->request->getQuery('political_party_id'); ?>

<div class="row">

  <div class="col-md-12">    

    <?= $this->Form->create(null, ['type' => 'get']) ?>

    <!-- general form elements -->
    <div class="card card-primary">
      <div class="card-header">
        <h3 class="card-title"><?= __('Search Councilors') ?></h3>
      </div><!-- /.card-header -->
      <!-- form start -->
      <form role="form">
        <div class="card-body">
          <div class="row">
            <div class="col-md-6 col-xs-12">
              <div class="form-group">
                <label for="name"><?= __('Name') ?></label>
                <?= $this->Form->control('name', ['label' => false, 'class' => 'form-control', 'value' => h($values['name'])]) ?>
              </div>
            </div>
            <div class="col-md-6 col-xs-12">
              <div class="form-group">
                <label for="name"><?= __('Political Party') ?></label>
                <?= $this->Form->control('political_party_id', ['label' => false, 'class' => 'form-control', 'options' => $politicalParties, 'empty' => __('All'), 'value' => h($values['political_party_id'])]) ?>
              </div>
            </div>            
          </div>
        </div><!-- /.card-body -->

        <div class="card-footer">
          <?= $this->Form->button(__('Search'), ['class' => 'btn btn-primary']) ?>
          <p class="float-right">
            <?= $this->Html->link(__('New Councilor'), ['action' => 'add'], ['class' => 'btn btn-primary']) ?>
          </p>
        </div>

      </form>
    </div><!-- /.card -->

    <?= $this->Form->end() ?>

    <div class="card">

        <!-- /.box-header -->
        <div class="card-body table-responsive">
          <table class="table table-bordered">
            <tbody><tr>
              <th style="width: 10px"><?= $this->Paginator->sort('id') ?></th>
              <th><?= $this->Paginator->sort('name') ?></th>
              <th><?= $this->Paginator->sort('PoliticalParties.name', __('Political Party')) ?></th>
              <th><?= $this->Paginator->sort('legislatura') ?></th>
              <th><?= $this->Paginator->sort('active') ?></th>
              <th><?= $this->Paginator->sort('created') ?></th>
              <th><?= $this->Paginator->sort('modified') ?></th>
              <th width="10%"><?= __('Actions') ?></th>
            </tr>
            <?php foreach ($councilors as $councilor): ?>
                <tr>
                    <td><?= $this->Number->format($councilor->id) ?></td>
                    <td><?= h($councilor->name) ?></td>
                    <td><?= $councilor->has('political_party') ? h($councilor->political_party->name) : '' ?></td>
                    <td><?= h($councilor->legislature->name) ?></td>
                    <td><?= ($councilor->active) ? __('Yes') : __('No') ?></td>
                    <td><?= h($councilor->created) ?></td>
                    <td><?= h($councilor->created) ?></td>
                    <td class="actions">
                        <?= $this->Html->link(__('<i class="fas fa-pencil-alt" aria-hidden="true"></i>'), ['action' => 'edit', $councilor->id], ['escape' => false, 'title' => __('Edit')]) ?>
                        <?= $this->Form->postLink(__('<i class="fas fa-trash" aria-hidden="true"></i>'), ['action' => 'delete', $councilor->id], ['confirm' => __('Are you sure you want to delete # {0}?', $councilor->id), 'escape' => false, 'title' => __('Delete')]) ?>
                    </td>
                </tr>
            <?php endforeach; ?>
          </tbody></table>
        </div>
        <!-- /.card-body -->
        <div class="card-footer clearfix">
          <?= $this->element('layout/pagination'); ?>
        </div>
    </div>

  </div>

</div>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists