summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/layouts/main.phtml1
-rw-r--r--application/models/ConfigMapper.php13
-rw-r--r--application/models/GroupMapper.php13
-rw-r--r--application/models/MembershipMapper.php13
-rw-r--r--application/models/PersonMapper.php13
-rw-r--r--application/views/scripts/bootmenu/index.phtml9
-rw-r--r--public/media/img/play.gifbin0 -> 113 bytes
7 files changed, 48 insertions, 14 deletions
diff --git a/application/layouts/main.phtml b/application/layouts/main.phtml
index 57d09c7..ca09e42 100644
--- a/application/layouts/main.phtml
+++ b/application/layouts/main.phtml
@@ -25,6 +25,7 @@ echo $this->headScript()."\n";
<li><a href='/bootmenu'>BootMenu</a></li>
<li><a href='/config'>Config</a></li>
<li><a href='/bootos'>BootOs</a></li>
+ <li><a href='/resource'>Resource</a></li>
<li><a href='/client'>Client</a></li>
<li><a href='/filter'>Filter</a></li>
<li><a href='/pool'>Pool</a></li>
diff --git a/application/models/ConfigMapper.php b/application/models/ConfigMapper.php
index da7a073..d8a23c4 100644
--- a/application/models/ConfigMapper.php
+++ b/application/models/ConfigMapper.php
@@ -66,9 +66,14 @@ class Application_Model_ConfigMapper
}
}
- public function find($id)
+ public function find($id, Application_Model_Config $config = null)
{
- $config = new Application_Model_Config();
+ if($config == null){
+ $return = true;
+ }
+ if($return){
+ $config = new Application_Model_Config();
+ }
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
@@ -77,7 +82,9 @@ class Application_Model_ConfigMapper
$row = $result->current();
$config->setID($row->configID)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->setCreated($row->created)->setShellscript($row->shellscript)->setTitle($row->title);
- return $config;
+ if($return){
+ return $config;
+ }
}
public function fetchAll()
diff --git a/application/models/GroupMapper.php b/application/models/GroupMapper.php
index d43b3f1..463f3d1 100644
--- a/application/models/GroupMapper.php
+++ b/application/models/GroupMapper.php
@@ -66,9 +66,14 @@ class Application_Model_GroupMapper
}
}
- public function find($id)
+ public function find($id,Application_Model_Group $group = null)
{
- $group = new Application_Model_Group();
+ if($group == null){
+ $return = true;
+ }
+ if($return){
+ $group = new Application_Model_Group();
+ }
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
@@ -77,7 +82,9 @@ class Application_Model_GroupMapper
$row = $result->current();
$group->setID($row->groupID)->setTitle($row->title)->setDescription($row->description);
- return $group;
+ if($return){
+ return $group;
+ }
}
public function fetchAll()
diff --git a/application/models/MembershipMapper.php b/application/models/MembershipMapper.php
index 2a6e57d..313248c 100644
--- a/application/models/MembershipMapper.php
+++ b/application/models/MembershipMapper.php
@@ -66,9 +66,14 @@ class Application_Model_MembershipMapper
}
}
- public function find($id)
+ public function find($id, Application_Model_Membership $membership = null)
{
- $membership = new Application_Model_Membership();
+ if($membership == null){
+ $return = true;
+ }
+ if($return){
+ $membership = new Application_Model_Membership();
+ }
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
@@ -77,7 +82,9 @@ class Application_Model_MembershipMapper
$row = $result->current();
$membership->setID($row->membershipID)->setGroupID($row->groupID)->setRoleID($row->roleID)->setPersonID($row->personID);
- return $membership;
+ if($return){
+ return $membership;
+ }
}
public function fetchAll()
diff --git a/application/models/PersonMapper.php b/application/models/PersonMapper.php
index 038670d..b2cbf39 100644
--- a/application/models/PersonMapper.php
+++ b/application/models/PersonMapper.php
@@ -66,9 +66,14 @@ class Application_Model_PersonMapper
}
}
- public function find($id)
+ public function find($id,Application_Model_Person $person = null)
{
- $person = new Application_Model_Person();
+ if($person == null){
+ $return = true;
+ }
+ if($return){
+ $person = new Application_Model_Person();
+ }
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
@@ -77,7 +82,9 @@ class Application_Model_PersonMapper
$row = $result->current();
$person->setID($row->personID)->setTitle($row->title)->setName($row->name)->setFirstname($row->firstname)->setStreet($row->street)->setHousenumber($row->housenumber)->setCity($row->city)->setPostalcode($row->postalcode)->setLogindate($row->logindate)->setRegisterdate($row->registerdate)->setEmail($row->email)->setLogin($row->login)->setPassword($row->password)->setPasswordSalt($row->password_salt);
- return $person;
+ if($return){
+ return $person;
+ }
}
public function fetchAll()
diff --git a/application/views/scripts/bootmenu/index.phtml b/application/views/scripts/bootmenu/index.phtml
index 6fb55e4..fa722e4 100644
--- a/application/views/scripts/bootmenu/index.phtml
+++ b/application/views/scripts/bootmenu/index.phtml
@@ -55,7 +55,7 @@
<td colspan=7>
<table>
<tr>
-
+ <th></th>
<th>ID</th>
<th>Title</th>
<!-- <th>BootmenuID</th>-->
@@ -70,7 +70,12 @@
<?php foreach ($this->bootmenuentrylist[$bootmenu->getID()] as $bootmenuentry): ?>
<?php $bootos = $this->bootosmapper->find($bootmenuentry->getBootosID());?>
<?php $config = $this->configmapper->find($bootmenuentry->getConfigID());?>
- <tr>
+ <tr>
+ <td class='action'>
+ <a href='/resource/getbootmenuentry/bootmenuentryID/<?php echo $bootmenuentry->getID();?>'>
+ <img src='/media/img/play.gif'>
+ </a>
+ </td>
<td><?php echo $this->escape($bootmenuentry->getID()); ?></td>
<td><?php echo $this->escape($bootmenuentry->getTitle()); ?></td>
<!--<td><?php echo $this->escape($bootmenuentry->getBootmenuID()); ?></td>
diff --git a/public/media/img/play.gif b/public/media/img/play.gif
new file mode 100644
index 0000000..b3045c9
--- /dev/null
+++ b/public/media/img/play.gif
Binary files differ