mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Guides/Editor
* fix language selector * fix changelog
This commit is contained in:
@@ -147,7 +147,6 @@ class GuidePage extends GenericPage
|
||||
|
||||
protected function generateContent() : void
|
||||
{
|
||||
/*
|
||||
match ($this->show)
|
||||
{
|
||||
self::SHOW_NEW => $this->displayNew(),
|
||||
@@ -156,24 +155,6 @@ class GuidePage extends GenericPage
|
||||
self::SHOW_CHANGELOG => $this->displayChangelog(),
|
||||
default => trigger_error('GuidePage::generateContent - what content!?')
|
||||
};
|
||||
*/
|
||||
switch ($this->show)
|
||||
{
|
||||
case self::SHOW_NEW:
|
||||
$this->displayNew();
|
||||
break;
|
||||
case self::SHOW_EDITOR:
|
||||
$this->displayEditor();
|
||||
break;
|
||||
case self::SHOW_GUIDE:
|
||||
$this->displayGuide();
|
||||
break;
|
||||
case self::SHOW_CHANGELOG:
|
||||
$this->displayChangelog();
|
||||
break;
|
||||
default:
|
||||
trigger_error('GuidePage::generateContent - what content!?');
|
||||
}
|
||||
}
|
||||
|
||||
private function displayNew() : void
|
||||
|
||||
@@ -53,9 +53,10 @@ $this->brick('pageTemplate');
|
||||
<th><label for="locale"><?=Lang::main('language');?></label></th>
|
||||
<td><select name="locale" id="locale" required="required" size="1">
|
||||
<?php
|
||||
foreach (Lang::locales() as $i => $l):
|
||||
if (Cfg::get('LOCALES') & (1 << $i))
|
||||
echo ' <option value="'.$i.'"'.($this->editorFields('locale', true) == $i ? ' selected="selected"' : '').'>'.$l."</option>\n";
|
||||
foreach (Locale::cases() as $l):
|
||||
if ($l->validate()):
|
||||
echo ' <option value="'.$l->value.'"'.($this->editorFields('locale', true) == $l->value ? ' selected="selected"' : '').'>'.$l->title()."</option>\n";
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</select></td>
|
||||
@@ -68,8 +69,9 @@ endforeach;
|
||||
<select id="category" name="category" required="required"><option></option>
|
||||
<?php
|
||||
foreach (Lang::guide('category') as $i => $c):
|
||||
if ($c)
|
||||
if ($c):
|
||||
echo ' <option value="'.$i.'"'.($this->editorFields('category', true) == $i ? ' selected="selected"' : '').'>'.$c."</option>\n";
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -9,7 +9,7 @@ $this->brick('announcement');
|
||||
|
||||
$this->brick('pageTemplate');
|
||||
|
||||
if (isset($this->notFound)):
|
||||
if ($this->notFound):
|
||||
?>
|
||||
<?php
|
||||
if (!empty($this->doResync)):
|
||||
|
||||
Reference in New Issue
Block a user