fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8225] bkbooking: nsf update


From: Kjell Arne Espedal
Subject: [Fmsystem-commits] [8225] bkbooking: nsf update
Date: Wed, 30 Nov 2011 14:25:13 +0000

Revision: 8225
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8225
Author:   kjell
Date:     2011-11-30 14:25:10 +0000 (Wed, 30 Nov 2011)
Log Message:
-----------
bkbooking: nsf update

Modified Paths:
--------------
    branches/dev-thomasez/booking/templates/base/css/base.css
    branches/dev-thomasez/booking/templates/base/resource.xsl
    branches/dev-thomasez/booking/templates/base/settings.xsl
    branches/dev-thomasez/bookingfrontend/inc/class.bosearch.inc.php
    branches/dev-thomasez/bookingfrontend/inc/class.uibuilding.inc.php
    branches/dev-thomasez/bookingfrontend/inc/class.uisearch.inc.php
    branches/dev-thomasez/bookingfrontend/templates/base/building.xsl
    branches/dev-thomasez/bookingfrontend/templates/base/resource.xsl
    branches/dev-thomasez/bookingfrontend/templates/base/search.xsl

Modified: branches/dev-thomasez/booking/templates/base/css/base.css
===================================================================
--- branches/dev-thomasez/booking/templates/base/css/base.css   2011-11-30 
13:24:13 UTC (rev 8224)
+++ branches/dev-thomasez/booking/templates/base/css/base.css   2011-11-30 
14:25:10 UTC (rev 8225)
@@ -301,3 +301,6 @@
 span.space {
        padding-right: 8px;
 }
+.image_container {
+       margin-top: 8px;
+}

Modified: branches/dev-thomasez/booking/templates/base/resource.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/resource.xsl   2011-11-30 
13:24:13 UTC (rev 8224)
+++ branches/dev-thomasez/booking/templates/base/resource.xsl   2011-11-30 
14:25:10 UTC (rev 8225)
@@ -15,13 +15,12 @@
             </li>
             <li><xsl:value-of select="php:function('lang', 'Resources')" 
/></li>
             <li>
-                <a href="">
                     <xsl:value-of select="resource/name"/>
-                </a>
             </li>
         </ul>
         <xsl:call-template name="msgbox"/>
                <xsl:call-template name="yui_booking_i18n"/>
+       
 
                <h4><xsl:value-of select="php:function('lang', 'Description')" 
/></h4>
         <div class="description"><xsl:value-of select="resource/description" 
disable-output-escaping="yes"/></div>

Modified: branches/dev-thomasez/booking/templates/base/settings.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/settings.xsl   2011-11-30 
13:24:13 UTC (rev 8224)
+++ branches/dev-thomasez/booking/templates/base/settings.xsl   2011-11-30 
14:25:10 UTC (rev 8225)
@@ -11,20 +11,20 @@
     <form action="" method="POST">
 
        <dl class="form-col">
-            <dt><label for="field_user_can_delete"><xsl:value-of 
select="php:function('lang', 'NSF site setup')"/></label></dt>
+            <dt><label for="field_layout_settings"><xsl:value-of 
select="php:function('lang', 'Layout')"/></label></dt>
                        <dd>
-                               <select id="field_nsf_setup" name="nsf_setup">
-                    <option value="no">
-                        <xsl:if test="config_data/nsf_setup='no'">
+                               <select id="field_layout_settings" 
name="layout_settings">
+                    <option value="bergen">
+                        <xsl:if test="config_data/layout_settings='bergen'">
                             <xsl:attribute 
name="selected">checked</xsl:attribute>
                         </xsl:if>
-                        <xsl:value-of select="php:function('lang', 'No')" />
+                                               Bergen Kommune
                     </option>
-                    <option value="yes">
-                        <xsl:if test="config_data/nsf_setup='yes'">
+                    <option value="nsf">
+                        <xsl:if test="config_data/layout_settings='nsf'">
                             <xsl:attribute 
name="selected">checked</xsl:attribute>
                         </xsl:if>
-                        <xsl:value-of select="php:function('lang', 'Yes')" />
+                                               Norsk Speider forbund
                           </option>
                        </select>
                        </dd>

Modified: branches/dev-thomasez/bookingfrontend/inc/class.bosearch.inc.php
===================================================================
--- branches/dev-thomasez/bookingfrontend/inc/class.bosearch.inc.php    
2011-11-30 13:24:13 UTC (rev 8224)
+++ branches/dev-thomasez/bookingfrontend/inc/class.bosearch.inc.php    
2011-11-30 14:25:10 UTC (rev 8225)
@@ -23,7 +23,7 @@
                     $bui['type'] = "building";
                     $bui['link'] = 
$GLOBALS['phpgw']->link('/bookingfrontend/', array('menuaction' => 
'bookingfrontend.uibuilding.show', 'id' => $bui['id']));
                     $bui['img_container'] = "building-" . $bui['id'];
-                    $bui['img_url'] = 
$GLOBALS['phpgw']->link('/bookingfrontend/', array('menuaction' => 
'bookingfrontend.uidocument_building.index_images', 'filter_owner_id' => 
$bui['id'], 'phpgw_return_as' => 'json', 'results' => '1'));
+                    $bui['img_url'] = 
$GLOBALS['phpgw']->link('/bookingfrontend/', array('menuaction' => 
'bookingfrontend.uidocument_building.index_images', 'filter_owner_id' => 
$bui['id'], 'phpgw_return_as' => 'json', 'results' => '3'));
                                        if ( trim($bui['homepage']) != '' && 
!preg_match("/^http|https:\/\//", trim($bui['homepage'])) )
                                        {
                                                $bui['homepage'] = 
'http://'.$bui['homepage'];

Modified: branches/dev-thomasez/bookingfrontend/inc/class.uibuilding.inc.php
===================================================================
--- branches/dev-thomasez/bookingfrontend/inc/class.uibuilding.inc.php  
2011-11-30 13:24:13 UTC (rev 8224)
+++ branches/dev-thomasez/bookingfrontend/inc/class.uibuilding.inc.php  
2011-11-30 14:25:10 UTC (rev 8225)
@@ -43,6 +43,9 @@
                public function show()
                {
                        $this->check_active('booking.uibuilding.show');
+                       $config = CreateObject('phpgwapi.config','booking');
+                       $config->read();
+                       $layout = $config->config_data['layout_settings'];
                        $building                  = 
$this->bo->read_single(phpgw::get_var('id', 'GET'));
                        $building['schedule_link'] = 
self::link(array('menuaction' => 'bookingfrontend.uibuilding.schedule', 'id' => 
$building['id']));
                        $building['message_link']  = 
self::link(array('menuaction' => 'bookingfrontend.uisystem_message.edit', 
'building_id' => $building['id'],'building_name' => $building['name']));
@@ -51,7 +54,7 @@
                        {
                                $building['homepage'] = 
'http://'.$building['homepage'];
                        }
-                       self::render_template('building', array("building" => 
$building));
+                       self::render_template('building', array("building" => 
$building,'layout' => $check));
                }
                
        }

Modified: branches/dev-thomasez/bookingfrontend/inc/class.uisearch.inc.php
===================================================================
--- branches/dev-thomasez/bookingfrontend/inc/class.uisearch.inc.php    
2011-11-30 13:24:13 UTC (rev 8224)
+++ branches/dev-thomasez/bookingfrontend/inc/class.uisearch.inc.php    
2011-11-30 14:25:10 UTC (rev 8225)
@@ -18,6 +18,9 @@
                
                function index()
                {
+                       $config = CreateObject('phpgwapi.config','booking');
+                       $config->read();
+                       $layout = $config->config_data['layout_settings'];
                        $searchterm = trim(phpgw::get_var('searchterm', 
'string', null));
                        $type = phpgw::get_var('type', 'GET', null);
                        $search = null;
@@ -33,7 +36,7 @@
       // Should of course be replaced with some config option for the image
       // or using the tmpl_search_path. Need to work a little mor on this 
system
       // to find the right option. - thomasez
-                       $params = is_null($search) ? array('frontimage' => 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/templates/{$GLOBALS['phpgw_info']['server']['template_set']}/images/nsf/forsidebilde.png")
 : array('search' => $search);
+                       $params = is_null($search) ? array('frontimage' => 
"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/templates/{$GLOBALS['phpgw_info']['server']['template_set']}/images/nsf/forsidebilde.png")
 : array('search' => $search,'layout' => $layout);
 
                        self::render_template('search', $params);
                }

Modified: branches/dev-thomasez/bookingfrontend/templates/base/building.xsl
===================================================================
--- branches/dev-thomasez/bookingfrontend/templates/base/building.xsl   
2011-11-30 13:24:13 UTC (rev 8224)
+++ branches/dev-thomasez/bookingfrontend/templates/base/building.xsl   
2011-11-30 14:25:10 UTC (rev 8225)
@@ -16,7 +16,7 @@
                        <xsl:if test="deactivate_calendar=0">
                        <div>
                        <button 
onclick="window.location.href='{schedule_link}'"><xsl:value-of 
select="php:function('lang', 'Building schedule')" /></button>
--                              Søk ledig tid/informasjon om hva som skjer
+-                              Søk ledig tid / gå til booking
                        </div>
                        </xsl:if>
 
@@ -34,7 +34,7 @@
 
                        <div>
                        <button 
onclick="window.location.href='{message_link}'"><xsl:value-of 
select="php:function('lang', 'Send message')" /></button>
--                              Meldig til saksbehandler for bygg
+-                              Meldig til saksbehandler for sted/utstyr
                        </div>
                        </xsl:if>
 
@@ -85,8 +85,10 @@
                                <h3><xsl:value-of select="php:function('lang', 
'Bookable resources')" /></h3>
                                <div id="resources_container"/>
 
-                               <h3><xsl:value-of select="php:function('lang', 
'Building users')" /></h3>
-                               <div id="building_users_container"/>
+                               <xsl:if test="layout='bergen'">
+                                       <h3><xsl:value-of 
select="php:function('lang', 'Building users')" /></h3>
+                                       <div id="building_users_container"/>
+                               </xsl:if>
 
                                <h3><xsl:value-of select="php:function('lang', 
'Documents')" /></h3>
                                <div id="documents_container"/>

Modified: branches/dev-thomasez/bookingfrontend/templates/base/resource.xsl
===================================================================
--- branches/dev-thomasez/bookingfrontend/templates/base/resource.xsl   
2011-11-30 13:24:13 UTC (rev 8224)
+++ branches/dev-thomasez/bookingfrontend/templates/base/resource.xsl   
2011-11-30 14:25:10 UTC (rev 8225)
@@ -16,7 +16,7 @@
 
                <div>
                <button 
onclick="window.location.href='{resource/schedule_link}'"><xsl:value-of 
select="php:function('lang', 'Resource schedule')" /></button>
--                              Søk ledig tid/informasjon om hva som skjer
+-                              Søk ledig tid / gå til booking
                </div>
 
                <dl class="proplist-col main">
@@ -34,14 +34,18 @@
                        <dt><xsl:value-of select="php:function('lang', 
'Resource Type')" /></dt>
                        <dd><xsl:value-of select="php:function('lang', 
string(resource/type))"/></dd>
 
-                       <dt><xsl:value-of select="php:function('lang', 
'Internal cost')"/></dt>
-                       <dd><span class="space"><xsl:value-of 
select="resource/internal_cost"/></span>
-                               <xsl:value-of select="php:function('lang', 
string(resource/cost_type))"/></dd>
-
-                       <dt><xsl:value-of select="php:function('lang', 
'External cost')"/></dt>
-                       <dd><span class="space"><xsl:value-of 
select="resource/external_cost"/></span>
-                               <xsl:value-of select="php:function('lang', 
string(resource/cost_type))"/></dd>
                        
+                       <xsl:if test="not (resource/internal_cost='')">
+                               <dt><xsl:value-of select="php:function('lang', 
'Internal cost')"/></dt>
+                               <dd><span class="space"><xsl:value-of 
select="resource/internal_cost"/></span>
+                                       <xsl:value-of 
select="php:function('lang', string(resource/cost_type))"/></dd>
+                       </xsl:if>
+                       <xsl:if test="not (resource/external_cost='')">
+                               <dt><xsl:value-of select="php:function('lang', 
'External cost')"/></dt>
+                               <dd><span class="space"><xsl:value-of 
select="resource/external_cost"/></span>
+                                       <xsl:value-of 
select="php:function('lang', string(resource/cost_type))"/></dd>
+                       </xsl:if>
+                       
                        <h3><xsl:value-of select="php:function('lang', 
'Documents')" /></h3>
                        <div id="documents_container"/>
                </dl>

Modified: branches/dev-thomasez/bookingfrontend/templates/base/search.xsl
===================================================================
--- branches/dev-thomasez/bookingfrontend/templates/base/search.xsl     
2011-11-30 13:24:13 UTC (rev 8224)
+++ branches/dev-thomasez/bookingfrontend/templates/base/search.xsl     
2011-11-30 14:25:10 UTC (rev 8225)
@@ -45,7 +45,7 @@
                        </img>
                </div>  
        </xsl:if>
-       
+       <xsl:variable name="layout"><xsl:value-of select="layout" 
/></xsl:variable>
        <xsl:if test="search">  
           <div id="result">
              <h5>
@@ -59,12 +59,16 @@
                    <li>
                      <div class="header">
                        <a class="bui_single_view_link"><xsl:attribute 
name="href"><xsl:value-of select="link"/></xsl:attribute><xsl:value-of 
select="name"/></a>
-                       (<xsl:value-of select="php:function('lang', 
string(type))"/>)
+                                       <xsl:if test="$layout='bergen'">
+                               (<xsl:value-of select="php:function('lang', 
string(type))"/>)
+                                       </xsl:if>
                      </div>
                      <div class="details">
                        <div>
                          <dl>
-                           <dt><h4><xsl:value-of select="php:function('lang', 
'Description')" /></h4></dt>
+                                               <xsl:if test="$layout='bergen'">
+                                   <dt><h4><xsl:value-of 
select="php:function('lang', 'Description')" /></h4></dt>
+                                               </xsl:if>
                            <dd class="description">
                                                        <xsl:variable 
name="tag_stripped_description">
                                                                
<xsl:call-template name="strip-tags">
@@ -75,9 +79,12 @@
                              <xsl:choose>
                                <xsl:when 
test="string-length($tag_stripped_description) &gt; 1">
                                  <xsl:choose>
-                                   <xsl:when 
test="string-length($tag_stripped_description) &gt; 100">
+                                   <xsl:when 
test="string-length($tag_stripped_description) &gt; 100 and $layout='bergen'">
                                                                  <xsl:value-of 
select="substring($tag_stripped_description, 0, 97)"/>...
                                    </xsl:when>
+                                   <xsl:when 
test="string-length($tag_stripped_description) &gt; 280 and $layout='nsf'">
+                                                                 <xsl:value-of 
select="substring($tag_stripped_description, 0, 277)"/>...
+                                   </xsl:when>
                                    <xsl:otherwise>
                                      <xsl:value-of 
select="$tag_stripped_description"/>
                                    </xsl:otherwise>
@@ -87,7 +94,8 @@
                                  <xsl:value-of select="php:function('lang', 
'No description yet')" />
                                </xsl:otherwise>
                              </xsl:choose>
-                                               <div id="{img_container}"/>
+
+                                               <div class="image_container" 
id="{img_container}"/>
                                                <script type="text/javascript">
                                                
YAHOO.util.Event.addListener(window, "load", function() {
                                                        
YAHOO.booking.inlineImages('<xsl:value-of select="img_container"/>', 
'<xsl:value-of select="img_url"/>');
@@ -95,7 +103,7 @@
                                                </script>
 
                            </dd>
-                           <xsl:if test="string-length(homepage) &gt; 1">
+                           <xsl:if test="string-length(homepage) &gt; 1 and 
$layout='bergen'">
                              <dt><h4><xsl:value-of 
select="php:function('lang', 'Homepage')" /></h4></dt>
                              <dd class="description">
                                <a><xsl:attribute name="href"><xsl:value-of 
select="homepage"/></xsl:attribute><xsl:value-of select="homepage"/></a>




reply via email to

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