Add a dirty edit link.
authorGunnar Wrobel <p@rdus.de>
Mon, 6 Apr 2009 09:45:06 +0000 (11:45 +0200)
committerGunnar Wrobel <p@rdus.de>
Mon, 6 Apr 2009 10:34:58 +0000 (12:34 +0200)
koward/app/controllers/ObjectController.php
koward/app/views/Object/view.html.php

index 911b75d..3dff2fe 100644 (file)
@@ -119,6 +119,13 @@ class ObjectController extends Koward_ApplicationController
                 $this->vars = Variables::getDefaultVariables();
                 $this->form = new Koward_Form_Object($this->vars, $this->object,
                                                     array('title' => _("View object")));
+                $this->edit = Horde::link(
+                    $this->urlFor(array('controller' => 'object', 
+                                        'action' => 'edit',
+                                        'id' => $this->params->id)),
+                    _("Edit")) . Horde::img('edit.png', _("Edit"), '',
+                                            $GLOBALS['registry']->getImageDir('horde'))
+                    . '</a>';
             }
         } catch (Exception $e) {
             $this->koward->notification->push($e->getMessage(), 'horde.error');
index c9f219c..ecb5cd8 100644 (file)
@@ -3,4 +3,6 @@
 <?php
 if (isset($this->form)) {
     echo $this->form->renderInactive(new Horde_Form_Renderer(), $this->vars);
+
+    echo $this->edit;
 }
\ No newline at end of file