moved search box directly to template

This commit is contained in:
Jan-Christoph Borchardt 2011-08-10 22:56:44 +02:00
parent fa102cd229
commit 05f3910718
3 changed files with 4 additions and 7 deletions

View File

@ -30,7 +30,9 @@
<body id="<?php echo $_['bodyid'];?>">
<header><div id="header">
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
<?php echo $_['searchbox']?>
<form class="searchbox" action="#" method="post">
<input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
</form>
<ul id="metanav">
<li><a href="<?php echo link_to('', 'index.php'); ?>?logout=true" title="<?php echo $l->t('Log out');?>"><img class='svg' src="<?php echo image_path('', 'actions/logout.svg'); ?>" /></a></li>
</ul>

View File

@ -1,3 +0,0 @@
<form class="searchbox" action="#" method="post">
<input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
</form>

View File

@ -230,9 +230,7 @@ class OC_Template{
// Decide which page we show
if( $this->renderas == "user" ){
$page = new OC_Template( "core", "layout.user" );
$search=new OC_Template( 'core', 'part.searchbox');
$search->assign('searchurl',OC_Helper::linkTo( 'search', 'index.php' ));
$page->assign('searchbox', $search->fetchPage());
$page->assign('searchurl',OC_Helper::linkTo( 'search', 'index.php' ));
if(array_search(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false){
$page->assign('bodyid','body-settings');
}else{