[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9610] Added support for custom templates on bookingf
From: |
Alexander Stevenson |
Subject: |
[Fmsystem-commits] [9610] Added support for custom templates on bookingfrontend |
Date: |
Mon, 18 Jun 2012 12:49:54 +0000 |
Revision: 9610
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9610
Author: andvare
Date: 2012-06-18 12:49:54 +0000 (Mon, 18 Jun 2012)
Log Message:
-----------
Added support for custom templates on bookingfrontend
Modified Paths:
--------------
branches/stavangerkommune/booking/inc/class.uicommon.inc.php
branches/stavangerkommune/bookingfrontend/templates/base/config.tpl
Modified: branches/stavangerkommune/booking/inc/class.uicommon.inc.php
===================================================================
--- branches/stavangerkommune/booking/inc/class.uicommon.inc.php
2012-06-18 12:44:16 UTC (rev 9609)
+++ branches/stavangerkommune/booking/inc/class.uicommon.inc.php
2012-06-18 12:49:54 UTC (rev 9610)
@@ -101,12 +101,15 @@
private
$ui_session_key,
- $flash_msgs;
+ $flash_msgs,
+ $config;
public function __construct()
{
$this->ui_session_key =
$this->current_app().'_uicommon';
$this->restore_flash_msgs();
+ $this->config = CreateObject( 'phpgwapi.config',
'bookingfrontend' );
+ $this->config->read();
$GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
self::set_active_menu('booking');
@@ -123,6 +126,13 @@
array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT .
'/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']);
array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT .
'/booking/templates/base');
array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT .
'/' . $GLOBALS['phpgw_info']['flags']['currentapp'] . '/templates/base');
+
+ // Add configurable bookingfrontend template search
path.
+ // This is being done here in booking because
ui-classes in bookingfrontend inherit either directly or indirectly from this
class.
+ if( strlen(
$this->config->config_data['customtemplate'] ) ) {
+ array_push($this->tmpl_search_path,
PHPGW_SERVER_ROOT . '/' . $GLOBALS['phpgw_info']['flags']['currentapp'] .
'/templates/' . $this->config->config_data['customtemplate'] );
+ }
+
phpgwapi_yui::load_widget('datatable');
phpgwapi_yui::load_widget('history');
phpgwapi_yui::load_widget('paginator');
Modified: branches/stavangerkommune/bookingfrontend/templates/base/config.tpl
===================================================================
--- branches/stavangerkommune/bookingfrontend/templates/base/config.tpl
2012-06-18 12:44:16 UTC (rev 9609)
+++ branches/stavangerkommune/bookingfrontend/templates/base/config.tpl
2012-06-18 12:49:54 UTC (rev 9610)
@@ -93,6 +93,12 @@
</td>
<td><input name="newsettings[bookingfrontend_host]"
value="{value_bookingfrontend_host}"></td>
</tr>
+ <tr class="row_off">
+ <td>{lang_customtemplate}:
+ <br/> Custom template for frontend
+ </td>
+ <td><input name="newsettings[customtemplate]"
value="{value_customtemplate}"/></td>
+ </tr>
<!-- END body -->
<!-- BEGIN footer -->
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9610] Added support for custom templates on bookingfrontend,
Alexander Stevenson <=