mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Templates/Listviews
* removed most templates by sensibly restructuring lvTab-data. Util::toJSON() does the rest. * taught Util::toJSON() to recognize values prefixed with $ as js-code * use Util::toJSON whenever possible * misc - mail attachments are displyed again - always show all currency rewards on Quest-LVs - suppress an error, when encountering unused ItemMods
This commit is contained in:
@@ -52,19 +52,16 @@ class EventsPage extends GenericPage
|
||||
if ($d = $events->getField('requires'))
|
||||
$this->deps[$events->id] = $d;
|
||||
|
||||
$this->lvTabs[] = array(
|
||||
'file' => 'event',
|
||||
'data' => $events->getListviewData(),
|
||||
'params' => []
|
||||
);
|
||||
$data = array_values($events->getListviewData());
|
||||
|
||||
if ($_ = array_filter($events->getListviewData(), function($x) {return $x['id'] > 0;}))
|
||||
$this->lvTabs[] = ['event', ['data' => $data]];
|
||||
|
||||
if ($_ = array_filter($data, function($x) {return $x['id'] > 0;}))
|
||||
{
|
||||
$this->lvTabs[] = array(
|
||||
'file' => 'calendar',
|
||||
'data' => $_,
|
||||
'params' => ['hideCount' => 1]
|
||||
);
|
||||
$this->lvTabs[] = ['calendar', array(
|
||||
'data' => $_,
|
||||
'hideCount' => 1
|
||||
)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +83,7 @@ class EventsPage extends GenericPage
|
||||
// recalculate dates with now()
|
||||
foreach ($this->lvTabs as &$views)
|
||||
{
|
||||
foreach ($views['data'] as &$data)
|
||||
foreach ($views[1]['data'] as &$data)
|
||||
{
|
||||
// is a followUp-event
|
||||
if (!empty($this->deps[$data['id']]))
|
||||
|
||||
Reference in New Issue
Block a user