[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14399] mor on frontpage
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14399] mor on frontpage |
Date: |
Wed, 18 Nov 2015 08:12:25 +0000 |
Revision: 14399
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14399
Author: sigurdne
Date: 2015-11-18 08:12:24 +0000 (Wed, 18 Nov 2015)
Log Message:
-----------
mor on frontpage
Modified Paths:
--------------
branches/dev-syncromind/bookingfrontend/inc/class.bosearch.inc.php
branches/dev-syncromind/bookingfrontend/inc/class.uisearch.inc.php
branches/dev-syncromind/bookingfrontend/templates/base/search.xsl
Modified: branches/dev-syncromind/bookingfrontend/inc/class.bosearch.inc.php
===================================================================
--- branches/dev-syncromind/bookingfrontend/inc/class.bosearch.inc.php
2015-11-17 23:03:36 UTC (rev 14398)
+++ branches/dev-syncromind/bookingfrontend/inc/class.bosearch.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
@@ -14,7 +14,7 @@
function search($searchterm, $activity_top_level, $building_id)
{
- if($activity_top_level)
+ if($activity_top_level && !$building_id)
{
$types = array('resource');
}
@@ -31,7 +31,7 @@
if(in_array('building', $types))
{
- $bui_result =
$this->sobuilding->read(array("query"=>$searchterm, "sort" => "name", "dir" =>
"asc", "filters" => array("active" => "1")));
+ $bui_result =
$this->sobuilding->read(array("query"=>$searchterm, "sort" => "name", "dir" =>
"asc", "filters" => array("active" => "1", 'id' => $building_id)));
foreach($bui_result['results'] as &$bui)
{
$bui['type'] = "building";
Modified: branches/dev-syncromind/bookingfrontend/inc/class.uisearch.inc.php
===================================================================
--- branches/dev-syncromind/bookingfrontend/inc/class.uisearch.inc.php
2015-11-17 23:03:36 UTC (rev 14398)
+++ branches/dev-syncromind/bookingfrontend/inc/class.uisearch.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
@@ -40,7 +40,7 @@
$frontpagetext = 'Velkommen til AktivBy.<br
/>Her finner du informasjon om idrettsanlegg som leies ut<br />av
idrettsavdelingen.';
}
- if (strlen($searchterm) || $type || $activity_top_level)
+ if ($building_id || $type || $activity_top_level)
{
$search = array(
'results' =>
$this->bo->search($searchterm, $activity_top_level, $building_id),
Modified: branches/dev-syncromind/bookingfrontend/templates/base/search.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/search.xsl
2015-11-17 23:03:36 UTC (rev 14398)
+++ branches/dev-syncromind/bookingfrontend/templates/base/search.xsl
2015-11-18 08:12:24 UTC (rev 14399)
@@ -14,19 +14,10 @@
</xsl:template>
<xsl:template match="data" xmlns:php="http://php.net/xsl">
- <!--xsl:call-template name="yui_booking_i18n"/-->
<div id="content">
<form action="" method="GET" id="search">
<input type="hidden" id="menuaction" name="menuaction"
value="bookingfrontend.uisearch.index" />
<input type="hidden" id="activity_top_level"
name="activity_top_level" value="{activity_top_level}" />
- <xsl:choose>
- <xsl:when test="search and string-length(search/searchterm)
> 0">
- <input id="search" type="text" name="searchterm"
value="{search/searchterm}"/>
- </xsl:when>
- <xsl:otherwise>
- <input id="search" type="text" name="searchterm"
value="Søk hall, klubb eller aktivitet" onclick="value=''" />
- </xsl:otherwise>
- </xsl:choose>
<div id="building_container">
<input id="field_building_id" name="building_id" type="hidden">
<xsl:attribute name="value">
@@ -37,6 +28,10 @@
<xsl:attribute name="value">
<xsl:value-of select="building_name"/>
</xsl:attribute>
+ <xsl:attribute name="placeholder">
+ <xsl:text> Søk
bygning</xsl:text>
+ </xsl:attribute>
+
</input>
</div>
<!--xsl:text> </xsl:text><input type="submit"
value="{php:function('lang', 'Search')}"/-->
@@ -64,7 +59,7 @@
</ul>
<xsl:if test="not(search)">
<div id="cloud">
- <div class="frontpagetext"><xsl:value-of
select="frontpagetext"/></div>
+ <div class="frontpagetext"><xsl:value-of
disable-output-escaping="yes" select="frontpagetext"/></div>
</div>
<div style="text-align:center;">
<img alt="" >
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14399] mor on frontpage,
Sigurd Nes <=