From 3cadcc8c20d0b6264516d9fa5f2633dfb046f757 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Fri, 16 Aug 2013 07:15:21 +0300 Subject: [PATCH] admin: object tools --- ipf/admin/model.php | 9 +++++++++ ipf/admin/templates/admin/change.html | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ipf/admin/model.php b/ipf/admin/model.php index d0440d0..62a0a6c 100644 --- a/ipf/admin/model.php +++ b/ipf/admin/model.php @@ -550,6 +550,11 @@ class IPF_Admin_Model { } + protected function objectTools($obj) + { + return array(); + } + // Views Function public function AddItem($request, $lapp, $lmodel) { @@ -596,6 +601,7 @@ class IPF_Admin_Model 'lmodel'=>$lmodel, 'admin_title' => IPF::get('admin_title'), 'indexpage_url'=>IPF::get('indexpage_url','/'), + 'objecttools' => array(), ); return $this->renderToResponse($this->_getAddTemplate(), $context, $request); } @@ -681,6 +687,8 @@ class IPF_Admin_Model $this->setInlines($o); } + $objecttools = $this->objectTools($o); + $context = array( 'mode'=>'change', 'page_title'=>$this->titleEdit(), @@ -695,6 +703,7 @@ class IPF_Admin_Model 'lmodel'=>$lmodel, 'admin_title' => IPF::get('admin_title'), 'indexpage_url'=>IPF::get('indexpage_url','/'), + 'objecttools' => $objecttools, ); return $this->renderToResponse($this->_getChangeTemplate(), $context, $request); } diff --git a/ipf/admin/templates/admin/change.html b/ipf/admin/templates/admin/change.html index 2984d46..fac373d 100644 --- a/ipf/admin/templates/admin/change.html +++ b/ipf/admin/templates/admin/change.html @@ -13,7 +13,13 @@

{$page_title}

-
    {block objecttools}{/block}
+
    + {block objecttools} + {foreach $objecttools as $ot_title => $ot_url} +
  • {$ot_title}
  • + {/foreach} + {/block} +
-- 2.49.0