fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [15991] choose custom themes


From: sigurdne
Subject: [Fmsystem-commits] [15991] choose custom themes
Date: Fri, 11 Nov 2016 13:26:21 +0000 (UTC)

Revision: 15991
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15991
Author:   sigurdne
Date:     2016-11-11 13:26:20 +0000 (Fri, 11 Nov 2016)
Log Message:
-----------
choose custom themes

Modified Paths:
--------------
    trunk/booking/inc/class.uicommon.inc.php
    trunk/bookingfrontend/templates/base/config.tpl
    trunk/phpgwapi/inc/class.common.inc.php
    trunk/phpgwapi/templates/bookingfrontend/head.tpl
    trunk/preferences/inc/hook_settings.inc.php

Added Paths:
-----------
    trunk/phpgwapi/templates/bookingfrontend/images/favicon.ico
    trunk/phpgwapi/templates/bookingfrontend/themes/fjell_kommune.css

Modified: trunk/booking/inc/class.uicommon.inc.php
===================================================================
--- trunk/booking/inc/class.uicommon.inc.php    2016-11-11 02:37:52 UTC (rev 
15990)
+++ trunk/booking/inc/class.uicommon.inc.php    2016-11-11 13:26:20 UTC (rev 
15991)
@@ -153,13 +153,6 @@
                        $this->config = CreateObject('phpgwapi.config', 
'bookingfrontend');
                        $this->config->read();
 
-                       // 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']);
-                       }
-
                        if ($this->current_app() == 'bookingfrontend')
                        {
                                
$GLOBALS['phpgw']->translation->add_app('booking');

Modified: trunk/bookingfrontend/templates/base/config.tpl
===================================================================
--- trunk/bookingfrontend/templates/base/config.tpl     2016-11-11 02:37:52 UTC 
(rev 15990)
+++ trunk/bookingfrontend/templates/base/config.tpl     2016-11-11 13:26:20 UTC 
(rev 15991)
@@ -113,12 +113,6 @@
                        </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 -->

Modified: trunk/phpgwapi/inc/class.common.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.common.inc.php     2016-11-11 02:37:52 UTC (rev 
15990)
+++ trunk/phpgwapi/inc/class.common.inc.php     2016-11-11 13:26:20 UTC (rev 
15991)
@@ -586,9 +586,9 @@
                * Themes are CSS files stored under the template directory
                * @return array List with available themes
                */
-               public static function list_themes()
+               public static function list_themes($layout = '')
                {
-                       $tpl_dir = self::get_tpl_dir('phpgwapi');
+                       $tpl_dir = self::get_tpl_dir('phpgwapi', $layout);
 
                        $css_dir = "$tpl_dir/themes";
 

Modified: trunk/phpgwapi/templates/bookingfrontend/head.tpl
===================================================================
--- trunk/phpgwapi/templates/bookingfrontend/head.tpl   2016-11-11 02:37:52 UTC 
(rev 15990)
+++ trunk/phpgwapi/templates/bookingfrontend/head.tpl   2016-11-11 13:26:20 UTC 
(rev 15991)
@@ -13,8 +13,8 @@
 
 
 
-               <link rel="icon" href="{img_icon}" type="image/x-ico">
-               <link rel="shortcut icon" href="{img_icon}">
+               <link href="{img_icon}" type="image/x-ico" rel="icon">
+               <link href="{img_icon}" rel="shortcut icon">
                <!-- BEGIN stylesheet -->
                <link href="{stylesheet_uri}" type="text/css" rel="StyleSheet">
         <!-- END stylesheet -->

Added: trunk/phpgwapi/templates/bookingfrontend/images/favicon.ico
===================================================================
(Binary files differ)


Property changes on: trunk/phpgwapi/templates/bookingfrontend/images/favicon.ico
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/phpgwapi/templates/bookingfrontend/themes/fjell_kommune.css
===================================================================
--- trunk/phpgwapi/templates/bookingfrontend/themes/fjell_kommune.css           
                (rev 0)
+++ trunk/phpgwapi/templates/bookingfrontend/themes/fjell_kommune.css   
2016-11-11 13:26:20 UTC (rev 15991)
@@ -0,0 +1,5 @@
+/*
+ *
+ * Theme
+ */
+

Modified: trunk/preferences/inc/hook_settings.inc.php
===================================================================
--- trunk/preferences/inc/hook_settings.inc.php 2016-11-11 02:37:52 UTC (rev 
15990)
+++ trunk/preferences/inc/hook_settings.inc.php 2016-11-11 13:26:20 UTC (rev 
15991)
@@ -17,8 +17,18 @@
                $_templates[$key] = $value['title'];
        }
 
+       $template_set = '';
+
+       $account_id = phpgw::get_var('account_id', 'int');
+
+       if($account_id)
+       {
+               $user_pref = createObject('phpgwapi.preferences', 
$account_id)->read();
+               $template_set = $user_pref['common']['template_set'];
+       }
+
        $_themes = array();
-       foreach ( phpgwapi_common::list_themes() as $theme )
+       foreach ( phpgwapi_common::list_themes($template_set) as $theme )
        {
                $_themes[$theme] = $theme;
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]