mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
removing smarty - part IX
- readded search - moved custom displayers (tooltip, xml) to subclasses - added more info to footer
This commit is contained in:
@@ -1,8 +1,22 @@
|
||||
<div id="footer">
|
||||
<?php
|
||||
if (isset($this->mysql)):
|
||||
echo Lang::$main['numSQL'] . Lang::$main['colon']. $this->mysql['count']."<br>\n";
|
||||
echo Lang::$main['timeSQL']. Lang::$main['colon']. Util::formatTime($this->mysql['time'] * 1000)."\n";
|
||||
if ($this->time || isset($this->mysql) || $this->isCached):
|
||||
echo "<table style=\"margin:auto;\">\n";
|
||||
|
||||
if (isset($this->mysql)):
|
||||
echo '<tr><td style="text-align:left;">'.Lang::$main['numSQL'] .'</td><td>'.$this->mysql['count']."</td></tr>\n";
|
||||
echo '<tr><td style="text-align:left;">'.Lang::$main['timeSQL'].'</td><td>'.Util::formatTime($this->mysql['time'] * 1000, true)."</td></tr>\n";
|
||||
endif;
|
||||
|
||||
if ($this->time):
|
||||
echo '<tr><td style="text-align:left;">Page generated in</td><td>'.Util::formatTime($this->time * 1000, true)."</td></tr>\n";
|
||||
endif;
|
||||
|
||||
if ($this->isCached):
|
||||
echo "<tr><td style=\"text-align:left;\">(rebuild from cache)</td><td></td></tr>\n";
|
||||
endif;
|
||||
|
||||
echo "</table>\n";
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@ foreach ($vars as $id => $data):
|
||||
'};';
|
||||
endforeach;
|
||||
|
||||
if (isset($extra[$this->typeId])):
|
||||
if (isset($this->typeId) && !empty($extra[$this->typeId])):
|
||||
echo '_['.$extra[$this->typeId]['id'].'].tooltip_'.User::$localeString.' = \''.Util::jsEscape($extra[$this->typeId]['tooltip']).'\';';
|
||||
echo '_['.$extra[$this->typeId]['id'].'].spells_'.User::$localeString.' = '.json_encode($extra[$this->typeId]['spells'], JSON_NUMERIC_CHECK).';';
|
||||
endif;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div id="layers"></div>
|
||||
<div id="home">
|
||||
|
||||
<?php $this->brick('announcements'); ?>
|
||||
<?php $this->brick('announcement'); ?>
|
||||
|
||||
<span id="menu_buttons-generic" class="menu-buttons"></span>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<body>
|
||||
<div class="maintenance">
|
||||
<div>The website is currently closed for maintenance.</div>
|
||||
<p>It will take a few minutes...</p>
|
||||
<p>This will take a few minutes...</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div id="main">
|
||||
<div id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
{if !empty($announcements)}
|
||||
{foreach from=$announcements item=item}
|
||||
{include file='bricks/announcement.tpl' an=$item}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<div class="text">
|
||||
<a href="{$wowhead}" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
|
||||
{if !empty($found)}
|
||||
<h1>{$lang.foundResult} <i>{$search|escape:"html"}</i>{if $ignored}<span class="sub">{$lang.ignoredTerms|sprintf:$ignored}</span>{/if}</h1>
|
||||
</div>
|
||||
<div id="tabs-generic"></div>
|
||||
<div id="lv-generic" class="listview"></div>
|
||||
<script type="text/javascript">
|
||||
var myTabs = new Tabs({ldelim}parent: $WH.ge('tabs-generic'){rdelim});
|
||||
{foreach from=$found item="f"}
|
||||
{include file="listviews/`$f.file`.tpl" data=$f.data params=$f.params}
|
||||
{/foreach}
|
||||
myTabs.flush();
|
||||
</script>
|
||||
{else}
|
||||
<h1>{$lang.noResult} <i>{$search|escape:"html"}</i>{if $ignored}<span class="sub">{$lang.ignoredTerms|sprintf:$ignored}</span>{/if}</h1>
|
||||
<div class="search-noresults"/></div>
|
||||
|
||||
{$lang.tryAgain}
|
||||
{/if}
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{include file='footer.tpl'}
|
||||
51
template/pages/search.tpl.php
Normal file
51
template/pages/search.tpl.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php $this->brick('header'); ?>
|
||||
|
||||
<div id="main">
|
||||
<div id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
<?php $this->brick('announcement'); ?>
|
||||
|
||||
<div class="text">
|
||||
<a href="<?php echo Util::$wowheadLink; ?>" class="button-red"><em><b><i>Wowhead</i></b><span>Wowhead</span></em></a>
|
||||
<?php
|
||||
if ($this->lvData):
|
||||
echo ' <h1>'.Lang::$search['foundResult'].' <i>'.Util::htmlEscape($this->search).'</i>';
|
||||
if ($this->invalid):
|
||||
echo '<span class="sub">'.sprintf(Lang::$search['ignoredTerms'], implode(', ', $this->invalid)).'</span>';
|
||||
endif;
|
||||
echo "</h1>\n";
|
||||
?>
|
||||
</div>
|
||||
<div id="tabs-generic"></div>
|
||||
<div id="lv-generic" class="listview"></div>
|
||||
<script type="text/javascript">
|
||||
var myTabs = new Tabs({parent: $WH.ge('tabs-generic')});
|
||||
<?php
|
||||
foreach ($this->lvData as $lv):
|
||||
$this->lvBrick($lv['file'], ['data' => $lv['data'], 'params' => $lv['params']]);
|
||||
endforeach;
|
||||
?>
|
||||
myTabs.flush();
|
||||
</script>
|
||||
<?php
|
||||
else:
|
||||
echo ' <h1>'.Lang::$search['noResult'].' <i>'.Util::htmlEscape($this->search).'</i>';
|
||||
if ($this->invalid):
|
||||
echo '<span class="sub">'.sprintf(Lang::$search['ignoredTerms'], implode(', ', $this->invalid)).'</span>';
|
||||
endif;
|
||||
echo "</h1>\n";
|
||||
?>
|
||||
<div class="search-noresults"/></div>
|
||||
|
||||
<?php
|
||||
echo ' '.Lang::$search['tryAgain']."\n";
|
||||
endif;
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php $this->brick('footer'); ?>
|
||||
Reference in New Issue
Block a user