summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/client
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/views/scripts/client')
-rw-r--r--application/modules/user/views/scripts/client/addclient.phtml3
-rw-r--r--application/modules/user/views/scripts/client/editclient.phtml3
-rw-r--r--application/modules/user/views/scripts/client/index.phtml43
-rw-r--r--application/modules/user/views/scripts/client/removeclient.phtml1
4 files changed, 49 insertions, 1 deletions
diff --git a/application/modules/user/views/scripts/client/addclient.phtml b/application/modules/user/views/scripts/client/addclient.phtml
new file mode 100644
index 0000000..13511fb
--- /dev/null
+++ b/application/modules/user/views/scripts/client/addclient.phtml
@@ -0,0 +1,3 @@
+<?php
+echo $this->addclient;
+?>
diff --git a/application/modules/user/views/scripts/client/editclient.phtml b/application/modules/user/views/scripts/client/editclient.phtml
new file mode 100644
index 0000000..2753a0f
--- /dev/null
+++ b/application/modules/user/views/scripts/client/editclient.phtml
@@ -0,0 +1,3 @@
+<?php
+echo $this->editclient;
+?>
diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml
index 4f0e6ec..dd791ad 100644
--- a/application/modules/user/views/scripts/client/index.phtml
+++ b/application/modules/user/views/scripts/client/index.phtml
@@ -1 +1,42 @@
-<br /><br /><center>View script for controller <b>Client</b> and script/action name <b>index</b></center> \ No newline at end of file
+<h1>Clients</h1>
+<?php if($this->notification != ''){echo $this->notification;} ?>
+<?php echo $this->formButton('createbootos', 'Create Client', array(
+ 'onclick' => 'self.location="/user/client/addclient"',
+ 'class' => 'addbutton'))?>
+
+<?php if ($this->clients): ?>
+ <table>
+ <tr>
+ <th>MAC</th>
+ <th>Hardwarehash</th>
+ <th colspan=2>Actions</th>
+ </tr>
+ <?php foreach ($this->clients as $client): ?>
+ <tr class=entry>
+ <td class='monospace'><?php echo $this->escape($client['macadress']) ?></td>
+ <td class='monospace'><?php echo $this->escape($client['hardwarehash']) ?></td>
+ <td class='action'><a href="<?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'client',
+ 'action' => 'editclient',
+ 'clientID' => $client['clientID']
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/edit.png' alt='Edit Client'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'client',
+ 'action' => 'removeclient',
+ 'clientID' => $client['clientID']
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Client'/></a></td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+
+<?php else: ?>
+ <p>There are no clients to display.</p>
+<?php endif;?>
diff --git a/application/modules/user/views/scripts/client/removeclient.phtml b/application/modules/user/views/scripts/client/removeclient.phtml
new file mode 100644
index 0000000..97254f6
--- /dev/null
+++ b/application/modules/user/views/scripts/client/removeclient.phtml
@@ -0,0 +1 @@
+<br /><br /><center>View script for controller <b>Client</b> and script/action name <b>removeclient</b></center> \ No newline at end of file