Merge branch 'release-2.140.115'
[feisty_meow.git] / production / example_apps / shared_calendar / src / Template / Users / index.ctp
diff --git a/production/example_apps/shared_calendar/src/Template/Users/index.ctp b/production/example_apps/shared_calendar/src/Template/Users/index.ctp
new file mode 100644 (file)
index 0000000..953e2ad
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+/**
+  * @var \App\View\AppView $this
+  * @var \App\Model\Entity\User[]|\Cake\Collection\CollectionInterface $users
+  */
+?>
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+    <ul class="side-nav">
+        <li class="heading"><?= __('Actions') ?></li>
+        <li><?= $this->Html->link(__('New User'), ['action' => 'add']) ?></li>
+    </ul>
+</nav>
+<div class="users index large-9 medium-8 columns content">
+    <h3><?= __('Users') ?></h3>
+    <table cellpadding="0" cellspacing="0">
+        <thead>
+            <tr>
+                <th scope="col"><?= $this->Paginator->sort('id') ?></th>
+                <th scope="col"><?= $this->Paginator->sort('name') ?></th>
+                <th scope="col"><?= $this->Paginator->sort('token') ?></th>
+                <th scope="col"><?= $this->Paginator->sort('created') ?></th>
+                <th scope="col"><?= $this->Paginator->sort('modified') ?></th>
+                <th scope="col" class="actions"><?= __('Actions') ?></th>
+            </tr>
+        </thead>
+        <tbody>
+            <?php foreach ($users as $user): ?>
+            <tr>
+                <td><?= $this->Number->format($user->id) ?></td>
+                <td><?= h($user->name) ?></td>
+                <td><?= h($user->token) ?></td>
+                <td><?= h($user->created) ?></td>
+                <td><?= h($user->modified) ?></td>
+                <td class="actions">
+                    <?= $this->Html->link(__('Calendar'), ['action' => 'showCalendar', $user->id]) ?>
+                                       <?= $this->Html->link(__('View'), ['action' => 'view', $user->id]) ?>                     
+<!--                      <?= $this->Html->link(__('Edit'), ['action' => 'edit', $user->id]) ?> -->
+                    <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $user->id], ['confirm' => __('Are you sure you want to delete # {0}?', $user->id)]) ?>
+                    <?= $this->Html->link(__('Revoke'), ['action' => 'revoke', $user->id], ['confirm' => __('Are you *SURE* you want to revoke authorization # {0}?  This will totally drop that authorization, which you cannot re-add unless you are the original user that stored it.', $user->id)]) ?>
+                </td>
+            </tr>
+            <?php endforeach; ?>
+        </tbody>
+    </table>
+    <div class="paginator">
+        <ul class="pagination">
+            <?= $this->Paginator->first('<< ' . __('first')) ?>
+            <?= $this->Paginator->prev('< ' . __('previous')) ?>
+            <?= $this->Paginator->numbers() ?>
+            <?= $this->Paginator->next(__('next') . ' >') ?>
+            <?= $this->Paginator->last(__('last') . ' >>') ?>
+        </ul>
+        <p><?= $this->Paginator->counter(['format' => __('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')]) ?></p>
+    </div>
+</div>