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
|
protected function generateContent() : void
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
match ($this->show)
|
match ($this->show)
|
||||||
{
|
{
|
||||||
self::SHOW_NEW => $this->displayNew(),
|
self::SHOW_NEW => $this->displayNew(),
|
||||||
@@ -156,24 +155,6 @@ class GuidePage extends GenericPage
|
|||||||
self::SHOW_CHANGELOG => $this->displayChangelog(),
|
self::SHOW_CHANGELOG => $this->displayChangelog(),
|
||||||
default => trigger_error('GuidePage::generateContent - what content!?')
|
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
|
private function displayNew() : void
|
||||||
|
|||||||
@@ -53,9 +53,10 @@ $this->brick('pageTemplate');
|
|||||||
<th><label for="locale"><?=Lang::main('language');?></label></th>
|
<th><label for="locale"><?=Lang::main('language');?></label></th>
|
||||||
<td><select name="locale" id="locale" required="required" size="1">
|
<td><select name="locale" id="locale" required="required" size="1">
|
||||||
<?php
|
<?php
|
||||||
foreach (Lang::locales() as $i => $l):
|
foreach (Locale::cases() as $l):
|
||||||
if (Cfg::get('LOCALES') & (1 << $i))
|
if ($l->validate()):
|
||||||
echo ' <option value="'.$i.'"'.($this->editorFields('locale', true) == $i ? ' selected="selected"' : '').'>'.$l."</option>\n";
|
echo ' <option value="'.$l->value.'"'.($this->editorFields('locale', true) == $l->value ? ' selected="selected"' : '').'>'.$l->title()."</option>\n";
|
||||||
|
endif;
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select></td>
|
</select></td>
|
||||||
@@ -68,8 +69,9 @@ endforeach;
|
|||||||
<select id="category" name="category" required="required"><option></option>
|
<select id="category" name="category" required="required"><option></option>
|
||||||
<?php
|
<?php
|
||||||
foreach (Lang::guide('category') as $i => $c):
|
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";
|
echo ' <option value="'.$i.'"'.($this->editorFields('category', true) == $i ? ' selected="selected"' : '').'>'.$c."</option>\n";
|
||||||
|
endif;
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ $this->brick('announcement');
|
|||||||
|
|
||||||
$this->brick('pageTemplate');
|
$this->brick('pageTemplate');
|
||||||
|
|
||||||
if (isset($this->notFound)):
|
if ($this->notFound):
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($this->doResync)):
|
if (!empty($this->doResync)):
|
||||||
|
|||||||
Reference in New Issue
Block a user