diff --git a/pages/itemset.php b/endpoints/itemset/itemset.php
similarity index 50%
rename from pages/itemset.php
rename to endpoints/itemset/itemset.php
index 4ff24124..0b017380 100644
--- a/pages/itemset.php
+++ b/endpoints/itemset/itemset.php
@@ -6,71 +6,76 @@ if (!defined('AOWOW_REVISION'))
die('illegal access');
-// menuId 2: Itemset g_initPath()
-// tabId 0: Database g_initHeader()
-class ItemsetPage extends GenericPage
+class ItemsetBaseResponse extends TemplateResponse implements ICache
{
- use TrDetailPage;
+ use TrDetailPage, TrCache;
- protected $summary = [];
- protected $bonusExt = '';
- protected $description = '';
- protected $unavailable = false;
- protected $pieces = [];
- protected $spells = [];
+ protected int $cacheType = CACHE_TYPE_PAGE;
- protected $type = Type::ITEMSET;
- protected $typeId = 0;
- protected $tpl = 'itemset';
- protected $path = [0, 2];
- protected $tabId = 0;
- protected $mode = CACHE_TYPE_PAGE;
- protected $scripts = [[SC_JS_FILE, 'js/swfobject.js'], [SC_JS_FILE, 'js/Summary.js']];
+ protected string $template = 'itemset';
+ protected string $pageName = 'itemset';
+ protected ?int $activeTab = parent::TAB_DATABASE;
+ protected array $breadcrumb = [0, 2];
- protected $_get = ['domain' => ['filter' => FILTER_CALLBACK, 'options' => 'Aowow\Locale::tryFromDomain']];
+ protected array $scripts = [[SC_JS_FILE, 'js/swfobject.js'], [SC_JS_FILE, 'js/Summary.js']];
- private $powerTpl = '$WowheadPower.registerItemSet(%d, %d, %s);';
+ public int $type = Type::ITEMSET;
+ public int $typeId = 0;
+ public string $bonusExt = '';
+ public string $description = '';
+ public bool $unavailable = false;
+ public array $pieces = [];
+ public array $spells = [];
+ public ?Summary $summary = null;
- public function __construct($pageCall, $id)
+ private ItemsetList $subject;
+
+ public function __construct(string $id)
{
- parent::__construct($pageCall, $id);
+ parent::__construct($id);
- // temp locale
- if ($this->mode == CACHE_TYPE_TOOLTIP && $this->_get['domain'])
- Lang::load($this->_get['domain']);
-
- $this->typeId = intVal($id);
+ $this->typeId = intVal($id);
+ $this->contribute = Type::getClassAttrib($this->type, 'contribute') ?? CONTRIBUTE_NONE;
+ }
+ protected function generate() : void
+ {
$this->subject = new ItemsetList(array(['id', $this->typeId]));
if ($this->subject->error)
- $this->notFound(Lang::game('itemset'), Lang::itemset('notFound'));
+ $this->generateNotFound(Lang::game('itemset'), Lang::itemset('notFound'));
- $this->name = $this->subject->getField('name', true);
$this->extendGlobalData($this->subject->getJSGlobals());
- }
- protected function generatePath()
- {
- if ($_ = $this->subject->getField('classMask'))
- {
- $bit = log($_, 2);
- if (intVal($bit) != $bit) // bit is float => multiple classes were set => skip out
- return;
+ $this->h1 = $this->subject->getField('name', true);
- $this->path[] = $bit + 1;
- }
- }
+ $this->gPageInfo += array(
+ 'type' => $this->type,
+ 'typeId' => $this->typeId,
+ 'name' => $this->h1
+ );
- protected function generateTitle()
- {
- array_unshift($this->title, $this->name, Util::ucFirst(Lang::game('itemset')));
- }
-
- protected function generateContent()
- {
$_ta = $this->subject->getField('contentGroup');
$_ty = $this->subject->getField('type');
+ $_sk = $this->subject->getField('skillId');
+ $_evt = $this->subject->getField('eventId');
$_cnt = count($this->subject->getField('pieces'));
+ $_cl = ChrClass::fromMask($this->subject->getField('classMask'));
+
+
+ /*************/
+ /* Menu Path */
+ /*************/
+
+ if (count($_cl) == 1)
+ $this->breadcrumb[] = $_cl[0];
+
+
+ /**************/
+ /* Page Title */
+ /**************/
+
+ array_unshift($this->title, $this->h1, Util::ucWords(Lang::game('itemset')));
+
/***********/
/* Infobox */
@@ -78,15 +83,14 @@ class ItemsetPage extends GenericPage
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
- // unavailable (todo (low): set data)
if ($this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE)
$infobox[] = Lang::main('unavailable');
// worldevent
- if ($e = $this->subject->getField('eventId'))
+ if ($_evt)
{
- $infobox[] = Lang::game('eventShort').Lang::main('colon').'[event='.$e.']';
- $this->extendGlobalIds(Type::WORLDEVENT, $e);
+ $infobox[] = Lang::game('eventShort', ['[event='.$_evt.']']);
+ $this->extendGlobalIds(Type::WORLDEVENT, $_evt);
}
// itemLevel
@@ -102,32 +106,34 @@ class ItemsetPage extends GenericPage
}
// class
- $jsg = [];
if ($cl = Lang::getClassString($this->subject->getField('classMask'), $jsg, Lang::FMT_MARKUP))
{
$this->extendGlobalIds(Type::CHR_CLASS, ...$jsg);
- $t = count($jsg)== 1 ? Lang::game('class') : Lang::game('classes');
+ $t = count($jsg) == 1 ? Lang::game('class') : Lang::game('classes');
$infobox[] = Util::ucFirst($t).Lang::main('colon').$cl;
}
// required level
if ($lvl = $this->subject->getField('reqLevel'))
- $infobox[] = sprintf(Lang::game('reqLevel'), $lvl);
+ $infobox[] = Lang::game('reqLevel', [$lvl]);
// type
if ($_ty)
- $infobox[] = Lang::game('type').Lang::main('colon').Lang::itemset('types', $_ty);
+ $infobox[] = Lang::game('type').Lang::itemset('types', $_ty);
// tag
if ($_ta)
- $infobox[] = Lang::itemset('_tag').Lang::main('colon').'[url=?itemsets&filter=ta='.$_ta.']'.Lang::itemset('notes', $_ta).'[/url]';
+ $infobox[] = Lang::itemset('_tag').'[url=?itemsets&filter=ta='.$_ta.']'.Lang::itemset('notes', $_ta).'[/url]';
+
+ if ($infobox)
+ $this->infobox = new InfoboxMarkup($infobox, ['allow' => Markup::CLASS_STAFF, 'dbpage' => true], 'infobox-contents0');
+
/****************/
/* Main Content */
/****************/
// pieces + Summary
- $pieces = [];
$eqList = [];
$compare = [];
@@ -136,8 +142,8 @@ class ItemsetPage extends GenericPage
else
$cnd = ['i.id', array_keys($this->subject->pieceToSet)];
- $iList = new ItemList(array($cnd));
- $data = $iList->getListviewData(ITEMINFO_SUBITEMS | ITEMINFO_JSON);
+ $iList = new ItemList(array($cnd));
+ $data = $iList->getListviewData(ITEMINFO_SUBITEMS | ITEMINFO_JSON);
foreach ($iList->iterate() as $itemId => $__)
{
if (empty($data[$itemId]))
@@ -150,26 +156,35 @@ class ItemsetPage extends GenericPage
$compare[] = $itemId;
- $pieces[$itemId] = array(
- 'name_'.Lang::getLocale()->json() => $iList->getField('name', true),
- 'quality' => $iList->getField('quality'),
- 'icon' => $iList->getField('iconString'),
- 'jsonequip' => $data[$itemId]
+ $this->pieces[$itemId] = array(
+ array(
+ 'name_'.Lang::getLocale()->json() => $iList->getField('name', true),
+ 'quality' => $iList->getField('quality'),
+ 'icon' => $iList->getField('iconString'),
+ 'jsonequip' => $data[$itemId]
+ ),
+ new IconElement(Type::ITEM, $itemId, $iList->getField('name', true), quality: $iList->getField('quality'), size: IconElement::SIZE_SMALL, align: 'right', element: 'iconlist-icon')
);
}
- $skill = '';
- if ($_sk = $this->subject->getField('skillId'))
+ if ($compare)
+ $this->summary = new Summary(array(
+ 'template' => 'itemset',
+ 'id' => 'itemset',
+ 'parent' => 'summary-generic',
+ 'groups' => array_map(fn ($x) => [[$x]], $compare),
+ 'level' => $this->subject->getField('reqLevel')
+ ));
+
+ // required skill
+ if ($_sk)
{
$spellLink = sprintf('%s (%s)', $_sk, Lang::spell('cat', 11, $_sk, 0), $this->subject->getField('skillLevel'));
- $skill = ' – '.sprintf(Lang::game('requires'), $spellLink).'';
+ $this->bonusExt = ' – '.Lang::game('requires', [$spellLink]).'';
}
- $this->bonusExt = $skill;
- $this->description = $_ta ? sprintf(Lang::itemset('_desc'), $this->name, Lang::itemset('notes', $_ta), $_cnt) : sprintf(Lang::itemset('_descTagless'), $this->name, $_cnt);
+ $this->description = $_ta ? Lang::itemset('_desc', [$this->h1, Lang::itemset('notes', $_ta), $_cnt]) : Lang::itemset('_descTagless', [$this->h1, $_cnt]);
$this->unavailable = !!($this->subject->getField('cuFlags') & CUSTOM_UNAVAILABLE);
- $this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null;
- $this->pieces = $pieces;
$this->spells = $this->subject->getBonuses();
// $this->expansion = $this->subject->getField('expansion'); NYI - todo: add col to table
$this->redButtons = array(
@@ -178,14 +193,7 @@ class ItemsetPage extends GenericPage
BUTTON_VIEW3D => ['type' => Type::ITEMSET, 'typeId' => $this->typeId, 'equipList' => $eqList],
BUTTON_COMPARE => $compare ? ['eqList' => implode(':', $compare), 'qty' => $_cnt] : false
);
- if ($compare)
- $this->summary = array(
- 'id' => 'itemset',
- 'template' => 'itemset',
- 'parent' => 'summary-generic',
- 'groups' => array_map(function ($v) { return [[$v]]; }, $compare),
- 'level' => $this->subject->getField('reqLevel'),
- );
+
/**************/
/* Extra Tabs */
@@ -194,18 +202,18 @@ class ItemsetPage extends GenericPage
// related sets (priority: 1: similar tag + class; 2: has event; 3: no tag + similar type, 4: similar type + profession)
$rel = [];
- if ($_ta && count($this->path) == 3)
+ if ($_ta && count($_cl) == 1)
{
$rel[] = ['id', $this->typeId, '!'];
- $rel[] = ['classMask', 1 << (end($this->path) - 1), '&'];
+ $rel[] = ['classMask', 1 << ($_cl[0] - 1), '&'];
$rel[] = ['contentGroup', (int)$_ta];
}
- else if ($this->subject->getField('eventId'))
+ else if ($_evt)
{
$rel[] = ['id', $this->typeId, '!'];
$rel[] = ['eventId', 0, '!'];
}
- else if ($this->subject->getField('skillId'))
+ else if ($_sk)
{
$rel[] = ['id', $this->typeId, '!'];
$rel[] = ['contentGroup', 0];
@@ -220,13 +228,15 @@ class ItemsetPage extends GenericPage
$rel[] = ['skillId', 0];
}
+ $this->lvTabs = new Tabs(['parent' => "\$\$WH.ge('tabs-generic')"], 'tabsRelated', true);
+
if ($rel)
{
$relSets = new ItemsetList($rel);
if (!$relSets->error)
{
$tabData = array(
- 'data' => array_values($relSets->getListviewData()),
+ 'data' => $relSets->getListviewData(),
'id' => 'see-also',
'name' => '$LANG.tab_seealso'
);
@@ -234,23 +244,13 @@ class ItemsetPage extends GenericPage
if (!$relSets->hasDiffFields('classMask'))
$tabData['hiddenCols'] = ['classes'];
- $this->lvTabs[] = [ItemsetList::$brickFile, $tabData];
+ $this->lvTabs->addListviewTab(new Listview($tabData, ItemsetList::$brickFile));
$this->extendGlobalData($relSets->getJSGlobals());
}
}
- }
- protected function generateTooltip()
- {
- $power = new \StdClass();
- if (!$this->subject->error)
- {
- $power->{'name_'.Lang::getLocale()->json()} = $this->subject->getField('name', true);
- $power->{'tooltip_'.Lang::getLocale()->json()} = $this->subject->renderTooltip();
- }
-
- return sprintf($this->powerTpl, $this->typeId, Lang::getLocale()->value, Util::toJSON($power, JSON_AOWOW_POWER));
+ parent::generate();
}
}
diff --git a/endpoints/itemset/itemset_power.php b/endpoints/itemset/itemset_power.php
new file mode 100644
index 00000000..042354ae
--- /dev/null
+++ b/endpoints/itemset/itemset_power.php
@@ -0,0 +1,49 @@
+ ['filter' => FILTER_CALLBACK, 'options' => [Locale::class, 'tryFromDomain']]
+ );
+
+ public function __construct(string $id)
+ {
+ parent::__construct($id);
+
+ // temp locale
+ if ($this->_get['domain'])
+ Lang::load($this->_get['domain']);
+
+ $this->typeId = intVal($id);
+ }
+
+ protected function generate() : void
+ {
+ $itemset = new ItemsetList(array(['id', $this->typeId]));
+ if ($itemset->error)
+ $this->cacheType = CACHE_TYPE_NONE;
+ else
+ $opts = array(
+ 'name' => $itemset->getField('name', true),
+ 'tooltip' => $itemset->renderTooltip(),
+ );
+
+ $this->result = new Tooltip(self::POWER_TEMPLATE, $this->typeId, $opts ?? []);
+ }
+}
+
+?>
diff --git a/endpoints/itemsets/itemsets.php b/endpoints/itemsets/itemsets.php
new file mode 100644
index 00000000..a0acd354
--- /dev/null
+++ b/endpoints/itemsets/itemsets.php
@@ -0,0 +1,112 @@
+ ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => Filter::PATTERN_PARAM]]
+ );
+
+ public function __construct(string $pageParam)
+ {
+ $this->getCategoryFromUrl($pageParam);
+
+ parent::__construct($pageParam);
+
+ $this->subCat = $pageParam !== '' ? '='.$pageParam : '';
+ $this->filter = new ItemsetListFilter($this->_get['filter'] ?? '', ['parentCats' => $this->category]);
+ $this->filterError = $this->filter->error;
+ }
+
+ protected function generate() : void
+ {
+ $this->h1 = Util::ucWords(Lang::game('itemsets'));
+
+ $conditions = [];
+ if (!User::isInGroup(U_GROUP_EMPLOYEE))
+ $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
+
+ $this->filter->evalCriteria();
+
+ if ($_ = $this->filter->getConditions())
+ $conditions[] = $_;
+
+ $this->filterError = $this->filter->error; // maybe the evalX() caused something
+
+
+ /*************/
+ /* Menu Path */
+ /*************/
+
+ if ($cl = $this->filter->values['cl'])
+ $this->breadcrumb[] = $cl;
+
+
+ /**************/
+ /* Page Title */
+ /**************/
+
+ array_unshift($this->title, $this->h1);
+
+ if ($cl = $this->filter->values['cl'])
+ array_unshift($this->title, Lang::game('cl', $cl));
+
+
+ /****************/
+ /* Main Content */
+ /****************/
+
+ $this->redButtons[BUTTON_WOWHEAD] = true;
+ if ($fiQuery = $this->filter->buildGETParam())
+ $this->wowheadLink .= '&filter='.$fiQuery;
+
+ $itemsets = new ItemsetList($conditions, ['calcTotal' => true]);
+ $this->extendGlobalData($itemsets->getJSGlobals());
+
+ $tabData = ['data' => $itemsets->getListviewData()];
+
+ if ($this->filter->fiExtraCols)
+ $tabData['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
+
+ // create note if search limit was exceeded
+ if ($itemsets->getMatches() > Cfg::get('SQL_LIMIT_DEFAULT'))
+ {
+ $tabData['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_itemsetsfound', $itemsets->getMatches(), Cfg::get('SQL_LIMIT_DEFAULT'));
+ $tabData['_truncated'] = 1;
+ }
+
+ $this->lvTabs = new Tabs(['parent' => "\$\$WH.ge('tabs-generic')"]);
+
+ $this->lvTabs->addListviewTab(new Listview($tabData, ItemsetList::$brickFile));
+
+ parent::generate();
+
+ $this->setOnCacheLoaded([self::class, 'onBeforeDisplay']);
+ }
+
+ public static function onBeforeDisplay() : void
+ {
+ // sort for dropdown-menus
+ Lang::sort('itemset', 'notes', SORT_NATURAL);
+ Lang::sort('game', 'cl');
+ }
+}
+
+?>
diff --git a/localization/locale_dede.php b/localization/locale_dede.php
index 8b6484f0..df489fdd 100644
--- a/localization/locale_dede.php
+++ b/localization/locale_dede.php
@@ -333,7 +333,7 @@ $lang = array(
'difficulty' => "Modus",
'dispelType' => "Bannart",
'duration' => "Dauer",
- 'eventShort' => "Ereignis",
+ 'eventShort' => "Ereignis: %s",
'flags' => "Flags",
'glyphType' => "Glyphenart",
'level' => "Stufe",
@@ -1449,7 +1449,7 @@ $lang = array(
'_conveyBonus' => "Das Tragen mehrerer Gegenstände aus diesem Set gewährt Eurem Charakter Boni.",
'_pieces' => "Teile",
'_unavailable' => "Dieses Ausrüstungsset ist nicht für Spieler verfügbar.",
- '_tag' => "Tag",
+ '_tag' => "Tag: ",
'summary' => "Zusammenfassung",
'notes' => array(
null, "Dungeon-Set 1", "Dungeon-Set 2", "Tier 1 Raid-Set",
diff --git a/localization/locale_enus.php b/localization/locale_enus.php
index 4943a7b6..0dbf5cfb 100644
--- a/localization/locale_enus.php
+++ b/localization/locale_enus.php
@@ -333,7 +333,7 @@ $lang = array(
'difficulty' => "Difficulty",
'dispelType' => "Dispel type",
'duration' => "Duration",
- 'eventShort' => "Event",
+ 'eventShort' => "Event: %s",
'flags' => "Flags",
'glyphType' => "Glyph type",
'level' => "Level",
@@ -1449,7 +1449,7 @@ $lang = array(
'_conveyBonus' => "Wearing more pieces of this set will convey bonuses to your character.",
'_pieces' => "pieces",
'_unavailable' => "This item set is not available to players.",
- '_tag' => "Tag",
+ '_tag' => "Tag: ",
'summary' => "Summary",
'notes' => array(
null, "Dungeon Set 1", "Dungeon Set 2", "Tier 1 Raid Set",
diff --git a/localization/locale_eses.php b/localization/locale_eses.php
index 6b433f51..80540f31 100644
--- a/localization/locale_eses.php
+++ b/localization/locale_eses.php
@@ -333,7 +333,7 @@ $lang = array(
'difficulty' => "Dificultad",
'dispelType' => "Tipo de disipación",
'duration' => "Duración",
- 'eventShort' => "Evento",
+ 'eventShort' => "Evento: %s",
'flags' => "Banderas",
'glyphType' => "Tipo de glifo",
'level' => "Nivel",
@@ -1449,7 +1449,7 @@ $lang = array(
'_conveyBonus' => "Tener puestos mas objetos de este conjunto le aplicará una bonificación a tu personaje.",
'_pieces' => "piezas",
'_unavailable' => "Este conjunto de objetos no está disponible para jugadores.",
- '_tag' => "Etiqueta",
+ '_tag' => "Etiqueta: ",
'summary' => "Resúmen",
'notes' => array(
null, "Set de mazmorra 1", "Set de mazmorra 2", "Set de banda tier 1",
diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php
index 0c98bea8..96eb30a4 100644
--- a/localization/locale_frfr.php
+++ b/localization/locale_frfr.php
@@ -333,7 +333,7 @@ $lang = array(
'difficulty' => "Difficulté",
'dispelType' => "Type de dissipation",
'duration' => "Durée",
- 'eventShort' => "Évènement",
+ 'eventShort' => "Évènement : %s",
'flags' => "Marqueurs",
'glyphType' => "Type de glyphe",
'level' => "Niveau",
@@ -1449,7 +1449,7 @@ $lang = array(
'_conveyBonus' => "Plus d'objets de cet ensemble sont équipés, plus votre personnage aura des bonus de caractéristiques.",
'_pieces' => "pièces",
'_unavailable' => "Cet objet n'est plus disponible aux joueurs.",
- '_tag' => "Étiquette",
+ '_tag' => "Étiquette : ",
'summary' => "Résumé",
'notes' => array(
null, "Ensemble de donjon 1", "Ensemble de donjon 2", "Ensemble de raid palier 1",
diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php
index d9fc189b..24c97f08 100644
--- a/localization/locale_ruru.php
+++ b/localization/locale_ruru.php
@@ -333,7 +333,7 @@ $lang = array(
'difficulty' => "Сложность",
'dispelType' => "Тип рассеивания",
'duration' => "Длительность",
- 'eventShort' => "Игровое событие",
+ 'eventShort' => "Игровое событие: %s",
'flags' => "Метки",
'glyphType' => "Тип символа",
'level' => "Уровень",
@@ -1449,7 +1449,7 @@ $lang = array(
'_conveyBonus' => "Ношение большего числа предметов из этого комплекта предоставит бонусы для вашего персонажа.",
'_pieces' => "частей",
'_unavailable' => "Этот набор предметов не доступен игрокам.",
- '_tag' => "Тэг",
+ '_tag' => "Тэг: ",
'summary' => "Сводка",
'notes' => array(
null, "Комплект подземелий 1", "Комплект подземелий 2", "Рейдовый комплект Tier 1",
diff --git a/localization/locale_zhcn.php b/localization/locale_zhcn.php
index fe0920a4..aec6c216 100644
--- a/localization/locale_zhcn.php
+++ b/localization/locale_zhcn.php
@@ -332,7 +332,7 @@ $lang = array(
'difficulty' => "难度",
'dispelType' => "驱散类型",
'duration' => "持续时间",
- 'eventShort' => "事件",
+ 'eventShort' => "事件:%s",
'flags' => "标记",
'glyphType' => "雕文类型",
'level' => "等级",
@@ -1448,7 +1448,7 @@ $lang = array(
'_conveyBonus' => "穿更多这个套装的部分将会提供给你角色奖励。",
'_pieces' => "件",
'_unavailable' => "这个物品套装对玩家不可用。",
- '_tag' => "标签",
+ '_tag' => "标签:",
'summary' => "摘要",
'notes' => array(
null, "地下城套装1", "地下城套装2", "T1副本套装",
diff --git a/pages/itemsets.php b/pages/itemsets.php
deleted file mode 100644
index 2b8a599c..00000000
--- a/pages/itemsets.php
+++ /dev/null
@@ -1,98 +0,0 @@
- ['filter' => FILTER_UNSAFE_RAW]];
-
- public function __construct($pageCall, $pageParam)
- {
- $this->getCategoryFromUrl($pageParam);
-
- parent::__construct($pageCall, $pageParam);
-
- $this->filterObj = new ItemsetListFilter($this->_get['filter'] ?? '', ['parentCats' => $this->category]);
-
- $this->name = Util::ucFirst(Lang::game('itemsets'));
- }
-
- protected function generateContent()
- {
- $this->addScript([SC_JS_FILE, '?data=weight-presets']);
-
- $conditions = [];
-
- if (!User::isInGroup(U_GROUP_EMPLOYEE))
- $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
-
- $this->filterObj->evalCriteria();
-
- if ($_ = $this->filterObj->getConditions())
- $conditions[] = $_;
-
- $itemsets = new ItemsetList($conditions, ['calcTotal' => true]);
- $this->extendGlobalData($itemsets->getJSGlobals());
-
- $xCols = $this->filterObj->fiExtraCols;
- if ($xCols)
- $this->filter['initData']['ec'] = $xCols;
-
- $tabData = ['data' => array_values($itemsets->getListviewData())];
-
- if ($xCols)
- $tabData['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
-
- // create note if search limit was exceeded
- if ($itemsets->getMatches() > Cfg::get('SQL_LIMIT_DEFAULT'))
- {
- $tabData['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_itemsetsfound', $itemsets->getMatches(), Cfg::get('SQL_LIMIT_DEFAULT'));
- $tabData['_truncated'] = 1;
- }
-
- if ($this->filterObj->error)
- $tabData['_errors'] = 1;
-
- $this->lvTabs[] = [ItemsetList::$brickFile, $tabData];
- }
-
- protected function postCache()
- {
- // sort for dropdown-menus
- Lang::sort('itemset', 'notes', SORT_NATURAL);
- Lang::sort('game', 'si');
- }
-
- protected function generateTitle()
- {
- array_unshift($this->title, $this->name);
-
- $form = $this->filterObj->values;
- if ($form['cl'])
- array_unshift($this->title, Lang::game('cl', $form['cl']));
- }
-
- protected function generatePath()
- {
- $form = $this->filterObj->values;
- if ($form['cl'])
- $this->path[] = $form['cl'];
- }
-}
-
-?>
diff --git a/template/pages/itemset.tpl.php b/template/pages/itemset.tpl.php
index a47d1f10..dff1c5db 100644
--- a/template/pages/itemset.tpl.php
+++ b/template/pages/itemset.tpl.php
@@ -1,7 +1,10 @@
-
+brick('header'); ?>
+ use \Aowow\Lang;
+ $this->brick('header');
+?>
@@ -19,9 +22,9 @@
$this->brick('redButtons');
if ($this->expansion):
- echo '
'.$this->name."
\n";
+ echo '
'.$this->h1."
\n";
else:
- echo '
'.$this->name."
\n";
+ echo '
'.$this->h1."
\n";
endif;
if ($this->unavailable):
?>
@@ -30,32 +33,31 @@ if ($this->unavailable):
brick('article');
+$this->brick('markup', ['markup' => $this->article]);
echo $this->description;
?>
@@ -78,7 +80,7 @@ if ($this->summary):
brick('lvTabs', ['relTabs' => true]);
+$this->brick('lvTabs');
$this->brick('contribute');
?>
diff --git a/template/pages/itemsets.tpl.php b/template/pages/itemsets.tpl.php
index 4371e603..23297b55 100644
--- a/template/pages/itemsets.tpl.php
+++ b/template/pages/itemsets.tpl.php
@@ -1,10 +1,11 @@
-
-
brick('header');
-$f = $this->filterObj->values // shorthand
-?>
+ namespace Aowow\Template;
+ use \Aowow\Lang;
+
+$this->brick('header');
+$f = $this->filter->values; // shorthand
+?>
@@ -12,76 +13,61 @@ $f = $this->filterObj->values // shorthand
brick('announcement');
-$this->brick('pageTemplate', ['fiQuery' => $this->filterObj->query, 'fiMenuItem' => [2]]);
+$this->brick('pageTemplate', ['fiQuery' => $this->filter->query, 'fiMenuItem' => [2]]);
?>
+