Template/Update (Part 41)
* split 'profiler' into separate endpoints * implement profile=avatar endpoint (though it doesn't do a whole lot and isn't referenced (see comments))
This commit is contained in:
parent
fef27c58e6
commit
69df20af63
30 changed files with 1703 additions and 1336 deletions
|
|
@ -1,7 +1,8 @@
|
|||
<?php namespace Aowow; ?>
|
||||
|
||||
<?php $this->brick('header'); ?>
|
||||
<?php
|
||||
namespace Aowow\Template;
|
||||
|
||||
$this->brick('header');
|
||||
?>
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
|
@ -15,7 +16,7 @@
|
|||
<div id="profilah-generic"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var profilah = new Profiler();
|
||||
profilah.initialize('profilah-generic', { id: <?=$this->subjectGUID; ?> });
|
||||
profilah.initialize('profilah-generic', { id: <?=$this->typeId; ?> });
|
||||
pr_setRegionRealm($WH.gE($WH.ge('topbar'), 'form')[0], '<?=$this->region; ?>', '<?=$this->realm; ?>');
|
||||
//]]></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<?php namespace Aowow; ?>
|
||||
<?php
|
||||
namespace Aowow\Template;
|
||||
|
||||
<?php $this->brick('header'); ?>
|
||||
use \Aowow\Lang;
|
||||
|
||||
$this->brick('header');
|
||||
?>
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
|
@ -23,17 +26,19 @@
|
|||
|
||||
<div class="profiler-home">
|
||||
<div>
|
||||
<h2><?=Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></h2>
|
||||
<h2><?=$this->ucFirst(Lang::main('name')).Lang::main('colon'); ?></h2>
|
||||
<input type="text" name="na" value="" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2><?=Lang::profiler('region').Lang::main('colon'); ?></h2>
|
||||
<?php
|
||||
foreach (Util::$regions as $idx => $n):
|
||||
echo ' <input type="radio" name="rg" value="'.$n.'" id="rg-'.($idx+1).'" '.(!$idx ? 'checked="checked" ' : '').'/><label for="rg-'.($idx+1).'" class="profiler-button profiler-option-left'.(!$idx ? ' selected' : '').'"><em><i>'.Lang::profiler('regions', $n).'</i></em></label>';
|
||||
endforeach;
|
||||
?>
|
||||
<?=$this->makeRadiosList('rg', $this->regions, $this->rg, 24, function (&$v, $k, &$attribs) {
|
||||
$attribs = ['class' => 'profiler-button profiler-option-left'];
|
||||
$v = '<em><i>'.$v.'</i></em>';
|
||||
if ($k == $this->rg)
|
||||
$attribs['class'] .= ' selected';
|
||||
return true;
|
||||
}); ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
<?php namespace Aowow; ?>
|
||||
|
||||
<?php
|
||||
$this->brick('header');
|
||||
$f = $this->filterObj->values // shorthand
|
||||
?>
|
||||
namespace Aowow\Template;
|
||||
|
||||
use \Aowow\Lang;
|
||||
|
||||
$this->brick('header');
|
||||
$f = $this->filter->values; // shorthand
|
||||
?>
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
|
@ -12,74 +13,64 @@ $f = $this->filterObj->values // shorthand
|
|||
<?php
|
||||
$this->brick('announcement');
|
||||
|
||||
$this->brick('pageTemplate', ['fiQuery' => $this->filterObj->query, 'fiMenuItem' => [2]]);
|
||||
$this->brick('pageTemplate', ['fiQuery' => $this->filter->query, 'fiMenuItem' => array_slice($this->pageTemplate['breadcrumb'], 0, 3)]);
|
||||
|
||||
# for some arcane reason a newline (\n) means, the first childNode is a text instead of the form for the following div
|
||||
# pr_setRegionRealm($WH.ge('fi').firstChild, realm, region) - never have \n\s before <form>, it will become firstChild (a text node)
|
||||
?>
|
||||
<div id="fi" style="display: <?=($this->filterObj->query ? 'block' : 'none'); ?>;"><form
|
||||
<div id="fi" style="display: <?=($this->filter->query ? 'block' : 'none'); ?>;"><form
|
||||
action="?filter=profiles<?=$this->subCat; ?>" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||
<div class="text">
|
||||
<?php
|
||||
$this->brick('headIcons');
|
||||
|
||||
$this->brick('redButtons');
|
||||
?>
|
||||
<h1><?=$this->h1; ?></h1>
|
||||
</div>
|
||||
<div class="rightpanel">
|
||||
<div style="float: left"><?=Util::ucFirst(Lang::game('class')).Lang::main('colon'); ?></div>
|
||||
<div style="float: left"><?=$this->ucFirst(Lang::game('class')).Lang::main('colon'); ?></div>
|
||||
<small><a href="javascript:;" onclick="document.forms['fi'].elements['cl[]'].selectedIndex = -1; return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small>
|
||||
<div class="clear"></div>
|
||||
<select name="cl[]" size="7" multiple="multiple" class="rightselect" style="background-color: #181818">
|
||||
<?php
|
||||
foreach (Lang::game('cl') as $k => $str):
|
||||
if ($str):
|
||||
echo ' <option class="c'.$k.'" value="'.$k.'"'.(isset($f['cl']) && in_array($k, (array)$f['cl']) ? ' selected' : null).'>'.$str."</option>\n";
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
<?=$this->makeOptionsList(Lang::game('cl') , $f['cl'], 28, fn($v, $k, &$e) => $v && ($e = ['class' => 'c'.$k])); ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="rightpanel2">
|
||||
<div style="float: left"><?=Util::ucFirst(Lang::game('race')).Lang::main('colon'); ?></div>
|
||||
<div style="float: left"><?=$this->ucFirst(Lang::game('race')).Lang::main('colon'); ?></div>
|
||||
<small><a href="javascript:;" onclick="document.forms['fi'].elements['ra[]'].selectedIndex = -1; pr_onChangeRace(); return false" onmousedown="return false"><?=Lang::main('clear'); ?></a></small>
|
||||
<div class="clear"></div>
|
||||
<select name="ra[]" size="7" multiple="multiple" class="rightselect" onchange="pr_onChangeRace()">
|
||||
<?php
|
||||
foreach (Lang::game('ra') as $k => $str):
|
||||
if ($str && $k > 0):
|
||||
echo ' <option value="'.$k.'"'.(isset($f['ra']) && in_array($k, (array)$f['ra']) ? ' selected' : null).'>'.$str."</option>\n";
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
<?=$this->makeOptionsList(Lang::game('ra') , $f['ra'], 28, fn($v, $k) => $v && $k > 0); ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><?=Util::ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
|
||||
<td><?=$this->ucFirst(Lang::main('name')).Lang::main('colon'); ?></td>
|
||||
<td colspan="3">
|
||||
<table><tr>
|
||||
<td> <input type="text" name="na" size="30" <?=(isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null); ?>/></td>
|
||||
<td> <input type="checkbox" name="ex" value="on" id="profile-ex" <?=(isset($f['ex']) ? 'checked="checked"' : null); ?>/></td>
|
||||
<td> <input type="text" name="na" size="30" <?=($f['na'] ? 'value="'.$this->escHTML($f['na']).'" ' : ''); ?>/></td>
|
||||
<td> <input type="checkbox" name="ex" value="on" id="profile-ex" <?=($f['ex'] ? 'checked="checked"' : ''); ?>/></td>
|
||||
<td><label for="profile-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_exactprofilesearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?=Lang::main('exactMatch'); ?></span></label></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td class="padded"><?=Lang::profiler('region').Lang::main('colon'); ?></td>
|
||||
<td class="padded"> <select name="rg" onchange="pr_onChangeRegion(this.form, null, null)">
|
||||
<option></option>
|
||||
<?php
|
||||
foreach (array_unique(array_column(Profiler::getRealms(), 'region')) as $rg):
|
||||
echo " <option value=\"".$rg."\">".Lang::profiler('regions', $rg)."</option>\n";
|
||||
endforeach;
|
||||
?>
|
||||
<option></option>
|
||||
<?=$this->makeOptionsList($this->regions, $f['rg'], 32); ?>
|
||||
</select> </td>
|
||||
<td style="width:50px;" class="padded"> <?=Lang::profiler('realm').Lang::main('colon'); ?></td>
|
||||
<td class="padded"> <select name="sv"><option></option></select><input type="hidden" name="bg" value="<?=(isset($f['bg']) ? Util::htmlEscape($f['bg']) : null); ?>" /></td>
|
||||
<td class="padded"> <select name="sv"><option></option></select><input type="hidden" name="bg" value="<?=($f['bg'] ? $this->escHTML($f['bg']) : ''); ?>" /></td>
|
||||
</tr><tr>
|
||||
<td class="padded"><?=Lang::main('side').Lang::main('colon'); ?></td>
|
||||
<td class="padded" style="width:80px;"> <select name="si">
|
||||
<option></option>
|
||||
<option value="1"<?=(!empty($f['si']) && $f['si'] == 1 ? ' selected' : null);?>><?=Lang::game('si', 1); ?></option>
|
||||
<option value="2"<?=(!empty($f['si']) && $f['si'] == 2 ? ' selected' : null);?>><?=Lang::game('si', 2); ?></option>
|
||||
<?=$this->makeOptionsList(Lang::game('si'), $f['si'], 32, fn($v, $k) => in_array($k, [SIDE_ALLIANCE, SIDE_HORDE])); ?>
|
||||
</select></td>
|
||||
<td class="padded"> <?=Lang::game('level').Lang::main('colon'); ?></td>
|
||||
<td class="padded"> <input type="text" name="minle" maxlength="3" class="smalltextbox" <?=(isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null); ?>/> - <input type="text" name="maxle" maxlength="3" class="smalltextbox" <?=(isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null); ?>/></td>
|
||||
<td class="padded"> <input type="text" name="minle" maxlength="3" class="smalltextbox" <?=($f['minle'] ? 'value="'.$f['minle'].'" ' : ''); ?>/> - <input type="text" name="maxle" maxlength="3" class="smalltextbox" <?=($f['maxle'] ? 'value="'.$f['maxle'].'" ' : ''); ?>/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
@ -87,7 +78,7 @@ endforeach;
|
|||
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?=Lang::main('addFilter'); ?></a></div>
|
||||
|
||||
<div class="padded2">
|
||||
<?=Lang::main('match').Lang::main('colon'); ?><input type="radio" name="ma" value="" id="ma-0" <?=(!isset($f['ma']) ? 'checked="checked" ' : null); ?>/><label for="ma-0"><?=Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?=(isset($f['ma']) ? 'checked="checked" ' : null); ?>/><label for="ma-1"><?=Lang::main('oneFilter'); ?></label>
|
||||
<?=Lang::main('match'); ?><input type="radio" name="ma" value="" id="ma-0" <?=(!$f['ma'] ? 'checked="checked" ' : ''); ?>/><label for="ma-0"><?=Lang::main('allFilter'); ?></label><input type="radio" name="ma" value="1" id="ma-1" <?=($f['ma'] ? 'checked="checked" ' : ''); ?>/><label for="ma-1"><?=Lang::main('oneFilter'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
|
@ -112,7 +103,7 @@ endforeach;
|
|||
?>
|
||||
</div>
|
||||
|
||||
<?php $this->brick('filter'); ?>
|
||||
<?=$this->renderFilter(12); ?>
|
||||
|
||||
<?php $this->brick('lvTabs'); ?>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue