mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
removing smarty - part VI
- rewrote currencies, achievements, events, factions - GenericPage: * moved more checks from Util * structured and commented GenericPage to be easier to comprehend * added GenericPage::postCache() to modify cached data before display (e.g. update time for events) - fixed: * parsing events from markdown (e.g. articles) * huge padding of minibox headings (css) * Loot passing jsGlobals to template * ItemList::getExtendedCost passing jsGlobals to template * categories for factions * conflicting GenericPage::$subject when displaying 'notFound' * load of typos
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
<?php
|
||||
foreach ($this->headIcons as $k => $v):
|
||||
echo '<div id="h1-icon-'.$k."\" class=\"h1-icon\"></div>\n";
|
||||
endforeach;
|
||||
if (!empty($this->headIcons)):
|
||||
foreach ($this->headIcons as $k => $v):
|
||||
echo '<div id="h1-icon-'.$k."\" class=\"h1-icon\"></div>\n";
|
||||
endforeach;
|
||||
?>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
foreach ($this->headIcons as $k => $v):
|
||||
echo "\$WH.ge('h1-icon-".$k."').appendChild(Icon.create('".Util::jsEscape($v)."', 1));\n";
|
||||
endforeach;
|
||||
foreach ($this->headIcons as $k => $v):
|
||||
echo "\$WH.ge('h1-icon-".$k."').appendChild(Icon.create('".Util::jsEscape($v)."', 1));\n";
|
||||
endforeach;
|
||||
?>
|
||||
//]]></script>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -10,7 +10,7 @@ endif;
|
||||
|
||||
// ingame-links/markdown/ect
|
||||
if (isset($this->redButtons[BUTTON_LINKS])):
|
||||
if ($b = $this->redButtons[BUTTON_WOWHEAD]):
|
||||
if ($b = $this->redButtons[BUTTON_LINKS]):
|
||||
echo '<a href="javascript:;" id="open-links-button" class="button-red" onclick="this.blur(); Links.show({' .
|
||||
(isset($b['color']) ? "linkColor: '".$b['color']."', " : null) . (isset($b['linkId']) ? "linkId: '".$b['linkId']."', " : null) .
|
||||
"linkName: '".Util::jsEscape(isset($b['name']) ? $b['name'] : $this->name)."', type: ".$this->type.', typeId: '.$this->typeId.' });"><em><b><i>'.Lang::$main['links'].'</i></b><span>'.Lang::$main['links'].'</span></em></a>';
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
<?php
|
||||
if ($this->rewards['title']):
|
||||
echo $this->rewards['title'].Lang::$main['colon'].(isset($this->rewards['extra']) ? $this->rewards['extra'] : null);
|
||||
|
||||
if (!isset($offset)) // in case we have multiple icons on the page (prominently quest-rewards)
|
||||
$offset = 0;
|
||||
|
||||
if ($rewards['title']):
|
||||
echo $rewards['title'].Lang::$main['colon'].(isset($rewards['extra']) ? $rewards['extra'] : null);
|
||||
endif;
|
||||
if ($this->rewards['data']):
|
||||
if ($rewards['data']):
|
||||
?>
|
||||
<div class="pad"></div>
|
||||
<table class="icontab icontab-box">
|
||||
<tr>
|
||||
<?php
|
||||
foreach ($this->rewards['data'] as $k => $i):
|
||||
foreach ($rewards['data'] as $k => $i):
|
||||
echo '<th id="icontab-icon'.($k + 1 + $offset).'"></th><td><span class="q'.(isset($i['quality']) ? $i['quality'] : null).'"><a href="?'.$i['typeStr'].'='.$i['id'].'">'.$i['name']."</a></span></td>\n";
|
||||
echo $k % 2 ? '</tr><tr>' : null;
|
||||
endforeach;
|
||||
|
||||
if (count($this->rewards['data']) % 2):
|
||||
if (count($rewards['data']) % 2):
|
||||
echo '<th style="display: none"></th><td style="display: none"></td>';
|
||||
endif;
|
||||
?>
|
||||
@@ -22,10 +26,8 @@ if ($this->rewards['data']):
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
foreach ($this->rewards['data'] as $k => $i):
|
||||
if (isset()):
|
||||
echo "\$WH.ge('icontab-icon".($k + 1 + $offset)."').appendChild(".$i['globalStr'].".createIcon(".$i['id'].", 1, ".(@$i['qty'] ?: 0)."));\n";
|
||||
endif;
|
||||
foreach ($rewards['data'] as $k => $i):
|
||||
echo ' $WH.ge(\'icontab-icon'.($k + 1 + $offset).'\').appendChild('.$i['globalStr'].'.createIcon('.$i['id'].', 1, '.(@$i['qty'] ?: 0)."));\n";
|
||||
endforeach;
|
||||
?>
|
||||
//]]></script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<tr><th id="infobox-series"><?php echo $listTitle ?: Lang::$main['series']; ?></th></tr>
|
||||
<tr><th id="infobox-series"><?php echo $listTitle ?: Lang::$achievement['series']; ?></th></tr>
|
||||
<tr><td>
|
||||
<div class="infobox-spacer"></div>
|
||||
<table class="series">
|
||||
|
||||
@@ -5,6 +5,6 @@ foreach ($vars as $id => $data):
|
||||
if (isset($data['namefemale'])):
|
||||
echo ', namefemale_'.User::$localeString.':\''.Util::jsEscape($data['namefemale']).'\'';
|
||||
endif;
|
||||
echo '};'
|
||||
echo '};';
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" 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}
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{include file='bricks/community.tpl'}
|
||||
var g_pageInfo = {ldelim}type: {$type}, typeId: {$typeId}, name: '{$name|escape:"quotes"}'{rdelim}; // username:XXX in profiles
|
||||
g_initPath({$path});
|
||||
//]]></script>
|
||||
|
||||
{include file='bricks/infobox.tpl' info=$infobox series=$series}
|
||||
|
||||
<div class="text">
|
||||
{include file='bricks/headIcons.tpl'}
|
||||
|
||||
{include file='bricks/redButtons.tpl'}
|
||||
|
||||
<h1{if isset($expansion)} class="h1-icon"><span class="icon-{$expansion}-right">{$name}</span>{else}>{$name}{/if}</h1>
|
||||
|
||||
{$description}
|
||||
|
||||
{if !empty($criteria)}<h3>{$lang.criteria}{if $count} – <small><b>{$lang.reqNumCrt} {$count} {$lang.outOf} {$nCriteria}</b></small>{/if}</h3>{/if}
|
||||
|
||||
<div style="float: left; margin-right: 25px">
|
||||
<table class="iconlist">
|
||||
{strip}
|
||||
{foreach from=$criteria item=cr name=criteria}
|
||||
<tr>
|
||||
<th{if isset($cr.icon)} align="right" id="iconlist-icon{$cr.icon}"{/if}>
|
||||
{* for reference and standard entries *}
|
||||
{if !isset($cr.icon) && (isset($cr.link) || isset($cr.standard))}
|
||||
<ul><li><var> </var></li></ul>
|
||||
{/if}
|
||||
</th>
|
||||
<td>
|
||||
{if isset($cr.link)}<a href="{$cr.link.href}"{if isset($cr.link.quality)} class="q{$cr.link.quality}"{/if}>{$cr.link.text|escape:"html"}</a>{if isset($cr.link.count) && $cr.link.count > 1} ({$cr.link.count}){/if}{/if}
|
||||
|
||||
{* STANDARD TEXT *}
|
||||
{if isset($cr.extra_text)} {$cr.extra_text}{/if}
|
||||
{if $user.roles > 0} <small title="{$lang.criteriaType} {$cr.type}" class="q0">[{$cr.id}]</small>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{* If the first column is over (it may be a greater element) *}
|
||||
{if $smarty.foreach.criteria.index+1 == round(count($criteria) / 2)}
|
||||
</table>
|
||||
</div>
|
||||
<div style="float: left">
|
||||
<table class="iconlist">
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/strip}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{foreach from=$icons key=k item=ic}
|
||||
$WH.ge('iconlist-icon{$ic.itr}').appendChild({$ic.type}.createIcon({$ic.id}, 0, {if isset($ic.count) && $ic.count > 0}{$ic.count}{else}0{/if}));
|
||||
{/foreach}
|
||||
//]]></script>
|
||||
|
||||
<div style="clear: left"></div>
|
||||
|
||||
{if $itemReward} {* for items *}
|
||||
<h3>{$lang.rewards}</h3>
|
||||
{include file='bricks/rewards.tpl' rewTitle=$lang.itemReward rewData=$itemReward offset=0}
|
||||
{/if}
|
||||
|
||||
{if $titleReward} {* for titles *}
|
||||
<h3>{$lang.gains}</h3>
|
||||
<ul>
|
||||
{foreach from=$titleReward item=i}
|
||||
<li><div>{$i}</div></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{if !$titleReward && !$itemReward && $reward}
|
||||
<h3>{$lang.rewards}</h3>
|
||||
<ul>
|
||||
<li><div>{$reward}</div></li>
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
<h2 class="clear">{$lang.related}</h2>
|
||||
</div>
|
||||
|
||||
{include file='bricks/tabsRelated.tpl' tabs=$lvData}
|
||||
|
||||
{include file='bricks/contribute.tpl'}
|
||||
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
{include file='footer.tpl'}
|
||||
117
template/pages/achievement.tpl.php
Normal file
117
template/pages/achievement.tpl.php
Normal file
@@ -0,0 +1,117 @@
|
||||
<?php $this->brick('header'); ?>
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
<?php $this->brick('announcement'); ?>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
$this->brick('community');
|
||||
echo "var g_pageInfo = ".json_encode($this->gPageInfo, JSON_NUMERIC_CHECK).";\n" .
|
||||
"g_initPath(".json_encode($this->path, JSON_NUMERIC_CHECK).");\n";
|
||||
?>
|
||||
//]]></script>
|
||||
|
||||
<?php $this->brick('infobox', ['series' => $this->series]); ?>
|
||||
|
||||
<div class="text">
|
||||
<?php
|
||||
$this->brick('headIcons');
|
||||
|
||||
$this->brick('redButtons');
|
||||
?>
|
||||
<h1><?php echo $this->name; ?></h1>
|
||||
|
||||
<?php
|
||||
echo $this->description;
|
||||
|
||||
echo '<h3>'.Lang::$achievement['criteria'].($this->criteria['reqQty'] ? ' – <small><b>'.Lang::$achievement['reqNumCrt'].' '.$this->criteria['reqQty'].' '.Lang::$achievement['outOf'].' '.count($this->criteria['data']).'</b></small>' : null)."</h3>\n";
|
||||
?>
|
||||
|
||||
|
||||
<div style="float: left; margin-right: 25px">
|
||||
<table class="iconlist">
|
||||
<?php
|
||||
foreach ($this->criteria['data'] as $i => $cr):
|
||||
echo '<tr><th'.(isset($cr['icon']) ? ' align="right" id="iconlist-icon'.$cr['icon'].'"' : null).'>';
|
||||
|
||||
if (!isset($cr['icon'])):
|
||||
echo '<ul><li><var> </var></li></ul>';
|
||||
endif;
|
||||
|
||||
echo '</th><td>';
|
||||
|
||||
if ($l = @$cr['link']):
|
||||
echo '<a href="'.$l['href'].'"'.(isset($l['quality']) ? ' class="q'.$l['quality'].'"' : null).'>'.Util::htmlEscape($l['text']).'</a>';
|
||||
endif;
|
||||
|
||||
if (!empty($l['count']) && $l['count'] > 1):
|
||||
echo ' ('.$l['count'].')';
|
||||
endif;
|
||||
|
||||
if (isset($cr['extraText'])):
|
||||
echo ' '.$cr['extraText'];
|
||||
endif;
|
||||
|
||||
if (User::isInGroup(U_GROUP_STAFF)):
|
||||
echo ' <small title="'.Lang::$achievement['criteriaType'].' '.$cr['type'].'" class="q0">['.$cr['id'].']</small>';
|
||||
endif;
|
||||
|
||||
echo '</td></tr>';
|
||||
|
||||
// every odd number of elements
|
||||
if ($i + 1 == round(count($this->criteria['data']) / 2)):
|
||||
echo '</table></div><div style="float: left"><table class="iconlist">';
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
foreach ($this->criteria['icons'] as $k => $ic):
|
||||
echo ' $WH.ge(\'iconlist-icon'.$ic['itr'].'\').appendChild('.$ic['type'].'.createIcon('.$ic['id'].', 0, '.(@$ic['count'] ?: 0)."));\n";
|
||||
endforeach;
|
||||
?>
|
||||
//]]></script>
|
||||
|
||||
<div style="clear: left"></div>
|
||||
|
||||
<?php
|
||||
if ($r = $this->rewards):
|
||||
if (!empty($r['item'])):
|
||||
echo '<h3>'.Lang::$main['rewards']."</h3>\n";
|
||||
$this->brick('rewards', ['rewards' => $this->rewards['item']]);
|
||||
endif;
|
||||
|
||||
if (!empty($r['title'])):
|
||||
echo '<h3>'.Lang::$main['gains']."</h3>\n<ul>";
|
||||
foreach ($r['title'] as $i):
|
||||
echo ' <li><div>'.$i."</div></li>\n";
|
||||
endforeach;
|
||||
echo "</ul>\n";
|
||||
endif;
|
||||
|
||||
if (empty($r['title']) && empty($r['item']) && $r['text']):
|
||||
echo '<h3>'.Lang::$main['rewards']."</h3>\n" .
|
||||
'<ul><li><div><'.$r['text']."</div></li></ul>\n";
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->brick('tabsRelated');
|
||||
|
||||
$this->brick('contribute');
|
||||
?>
|
||||
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
<?php $this->brick('footer'); ?>
|
||||
@@ -1,83 +0,0 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" 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}
|
||||
|
||||
<script type="text/javascript">
|
||||
g_initPath({$path}, {if empty($filter.query)}0{else}1{/if});
|
||||
{if isset($filter.query)}
|
||||
Menu.modifyUrl(Menu.findItem(mn_database, [9]), {ldelim} filter: '+={$filter.query|escape:'quotes'}' {rdelim}, {ldelim} onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [9])) {rdelim});
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
<div id="fi" style="display: {if empty($filter.query)}none{else}block{/if};">
|
||||
<form action="?achievements{$subCat}&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||
<table>
|
||||
<tr>
|
||||
<td>{$lang.name|ucFirst}{$lang.colon}</td>
|
||||
<td colspan="3">
|
||||
<table><tr>
|
||||
<td> <input type="text" name="na" size="30" {if isset($filter.na)}value="{$filter.na}"{/if}/></td>
|
||||
<td> <input type="checkbox" name="ex" value="on" id="achievement-ex" {if isset($filter.ex)}checked="checked"{/if}/></td>
|
||||
<td><label for="achievement-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedachievementsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">{$lang.extSearch}</span></label></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td class="padded">{$lang.side}{$lang.colon}</td>
|
||||
<td class="padded"> <select name="si">
|
||||
<option></option>
|
||||
{foreach from=$lang.si key=i item=str}{if $str}
|
||||
<option value="{$i}" {if isset($filter.si) && $filter.si == $i}selected{/if}>{$str}</option>
|
||||
{/if}{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
<td class="padded"><table><tr>
|
||||
<td> {$lang.points}{$lang.colon}</td>
|
||||
<td> <input type="text" name="minpt" maxlength="2" class="smalltextbox" {if isset($filter.minpt)}value="{$filter.minpt}"{/if}/> - <input type="text" name="maxpt" maxlength="2" class="smalltextbox" {if isset($filter.maxpt)}value="{$filter.maxpt}"{/if}/></td>
|
||||
</tr></table></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="fi_criteria" class="padded criteria"><div></div></div>
|
||||
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false">{$lang.addFilter}</a></div>
|
||||
|
||||
<div class="padded2">
|
||||
<div style="float: right">{$lang.refineSearch}</div>
|
||||
{$lang.match}{$lang.colon}<input type="radio" name="ma" value="" id="ma-0" {if !isset($filter.ma)}checked="checked"{/if} /><label for="ma-0">{$lang.allFilter}</label><input type="radio" name="ma" value="1" id="ma-1" {if isset($filter.ma)}checked="checked"{/if} /><label for="ma-1">{$lang.oneFilter}</label>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="padded">
|
||||
<input type="submit" value="{$lang.applyFilter}" />
|
||||
<input type="reset" value="{$lang.resetForm}" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="pad"></div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
fi_init('achievements');
|
||||
{foreach from=$filter.fi item=str}
|
||||
{$str}
|
||||
{/foreach}
|
||||
//]]></script>
|
||||
|
||||
<div id="lv-generic" class="listview"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{include file='listviews/achievement.tpl' data=$lvData.data params=$lvData.params}
|
||||
//]]></script>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
{include file='footer.tpl'}
|
||||
90
template/pages/achievements.tpl.php
Normal file
90
template/pages/achievements.tpl.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
$this->brick('header');
|
||||
$f = $this->filter; // shorthand
|
||||
?>
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
<?php $this->brick('announcement'); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($f['query']) ? 0 : 1) ?>);
|
||||
<?php
|
||||
if (!empty($f['query'])):
|
||||
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [9]), { filter: '+={$f['query']|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [9])) });
|
||||
endif;
|
||||
?>
|
||||
</script>
|
||||
|
||||
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block'; ?>;">
|
||||
<form action="?achievements<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||
<table>
|
||||
<tr>
|
||||
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td>
|
||||
<td colspan="3">
|
||||
<table><tr>
|
||||
<td> <input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.$f['na'].'"' : null; ?>/></td>
|
||||
<td> <input type="checkbox" name="ex" value="on" id="achievement-ex" <?php echo isset($f['ex']) ? 'checked="checked"' : null; ?>/></td>
|
||||
<td><label for="achievement-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedachievementsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::$main['extSearch']; ?></span></label></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td class="padded"><?php echo Lang::$main['side'].Lang::$main['colon']; ?></td>
|
||||
<td class="padded"> <select name="si">
|
||||
<option></option>
|
||||
<?php
|
||||
foreach (Lang::$game['si'] as $i => $str):
|
||||
if ($str):
|
||||
echo ' <option value="'.$i.'" '.((isset($f['si']) && $f['si'] == $i) ? 'selected' : null).'>'.$str."</option>\n";
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="padded"><table><tr>
|
||||
<td> <?php echo Lang::$achievement['points'].Lang::$main['colon']; ?></td>
|
||||
<td> <input type="text" name="minpt" maxlength="2" class="smalltextbox" <?php echo isset($f['minpt']) ? 'value="'.$f['minpt'].'"' : null; ?>/> - <input type="text" name="maxpt" maxlength="2" class="smalltextbox" <?php echo isset($f['maxpt']) ? 'value="'.$f['maxpt'].'"' : null; ?>/></td>
|
||||
</tr></table></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="fi_criteria" class="padded criteria"><div></div></div>
|
||||
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div>
|
||||
|
||||
<div class="padded2">
|
||||
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div>
|
||||
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="padded">
|
||||
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
|
||||
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="pad"></div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
fi_init('achievements');
|
||||
<?php
|
||||
foreach ($f['fi'] as $str):
|
||||
echo ' '.$str."\n";
|
||||
endforeach;
|
||||
?>
|
||||
//]]></script>
|
||||
|
||||
<div id="lv-generic" class="listview"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php $this->lvBrick('achievement', ['data' => $this->lvData['data'], 'params' => $this->lvData['params']] ); ?>
|
||||
//]]></script>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
<?php $this->brick('footer'); ?>
|
||||
@@ -31,7 +31,7 @@ if (!empty($this->lvData)):
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
if (count($this->lvData) > 1):
|
||||
echo 'var myTabs = new Tabs({parent: $WH.ge(\'tabs-generic\')})';
|
||||
echo 'var myTabs = new Tabs({parent: $WH.ge(\'tabs-generic\')});';
|
||||
endif;
|
||||
|
||||
foreach ($this->lvData as $lv):
|
||||
|
||||
@@ -83,9 +83,11 @@ $this->brick('book');
|
||||
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
|
||||
</div>
|
||||
|
||||
<?php $this->brick('tabsRelated'); ?>
|
||||
<?php
|
||||
$this->brick('tabsRelated');
|
||||
|
||||
<?php $this->brick('contribute'); ?>
|
||||
$this->brick('contribute');
|
||||
?>
|
||||
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php $this->brick('header'); ?>
|
||||
<?php
|
||||
$this->brick('header');
|
||||
$f = $this->filter; // shorthand
|
||||
?>
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
@@ -7,18 +10,18 @@
|
||||
<?php $this->brick('announcement'); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($this->filter['query']) ? 0 : 1) ?>);
|
||||
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($f['query']) ? 0 : 1) ?>);
|
||||
<?php
|
||||
if (!empty($this->filter['query'])):
|
||||
if (!empty($f['query'])):
|
||||
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [5]), { filter: '+={$filter.query|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [5])) });
|
||||
endif;
|
||||
?>
|
||||
</script>
|
||||
|
||||
<div id="fi" style="display: <?php echo empty($this->filter['query']) ? 'none' : 'block' ?>;">
|
||||
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
|
||||
<form action="?objects<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||
<table>
|
||||
<tr><td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td><td> <input type="text" name="na" size="30" <?php echo isset($this->filter['na']) ? 'value="'.Util::htmlEscape($this->filter['na']).'" ' : null; ?>/></td></tr>
|
||||
<tr><td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td><td> <input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td></tr>
|
||||
</table>
|
||||
|
||||
<div id="fi_criteria" class="padded criteria"><div></div></div>
|
||||
@@ -26,7 +29,7 @@ endif;
|
||||
|
||||
<div class="padded2 clear">
|
||||
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div>
|
||||
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($this->filter['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($this->filter['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label>
|
||||
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
@@ -43,7 +46,7 @@ endif;
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
fi_init('objects');
|
||||
<?php
|
||||
foreach ($this->filter['fi'] as $str):
|
||||
foreach ($f['fi'] as $str):
|
||||
echo ' '.$str."\n";
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
<?php
|
||||
$this->brick('announcements');
|
||||
$this->brick('announcement');
|
||||
|
||||
if (isset($this->subject)):
|
||||
if (isset($this->typeStr)):
|
||||
?>
|
||||
<div class="pad3"></div>
|
||||
|
||||
<div class="inputbox">
|
||||
<h1><?php echo Util::ucFirst($this->subject).' #'.$this->typeId; ?></h1>
|
||||
<div id="inputbox-error"><?php echo sprintf(Lang::$main['pageNotFound'], $this->subject); ?></div>
|
||||
<h1><?php echo Util::ucFirst($this->typeStr).' #'.$this->typeId; ?></h1>
|
||||
<div id="inputbox-error"><?php echo sprintf(Lang::$main['pageNotFound'], $this->typeStr); ?></div>
|
||||
<?php
|
||||
else:
|
||||
?>
|
||||
@@ -28,7 +28,7 @@ else:
|
||||
<?php
|
||||
$this->brick('article');
|
||||
|
||||
if (isset($this->extraText)):
|
||||
if (isset($this->extraText)):
|
||||
?>
|
||||
<div id="text-generic" class="left"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
|
||||
Reference in New Issue
Block a user