[tags] fully separate tag_list and tag_categories, see #1103
This commit is contained in:
parent
cefd48e94f
commit
cc8e4ffd47
3 changed files with 10 additions and 6 deletions
|
@ -103,6 +103,9 @@ class TagCategoriesTheme extends Themelet
|
|||
';
|
||||
|
||||
// add html to stuffs
|
||||
$page->set_title("Tag Categories");
|
||||
$page->set_heading("Tag Categories");
|
||||
$page->add_block(new NavBlock());
|
||||
$page->add_block(new Block("Editing", $html, "main", 10));
|
||||
}
|
||||
|
||||
|
|
|
@ -53,21 +53,25 @@ class TagList extends Extension
|
|||
}
|
||||
|
||||
switch ($sub) {
|
||||
default:
|
||||
case 'map':
|
||||
$this->theme->set_heading("Tag Map");
|
||||
$this->theme->set_tag_list($this->build_tag_map($starts_with, $tags_min));
|
||||
$this->theme->display_page($page);
|
||||
break;
|
||||
case 'alphabetic':
|
||||
$this->theme->set_heading("Alphabetic Tag List");
|
||||
$this->theme->set_tag_list($this->build_tag_alphabetic($starts_with, $tags_min));
|
||||
$this->theme->display_page($page);
|
||||
break;
|
||||
case 'popularity':
|
||||
$this->theme->set_heading("Tag List by Popularity");
|
||||
$this->theme->set_tag_list($this->build_tag_popularity($tags_min));
|
||||
$this->theme->display_page($page);
|
||||
break;
|
||||
default:
|
||||
// don't display anything
|
||||
break;
|
||||
}
|
||||
$this->theme->display_page($page);
|
||||
} elseif ($event->page_matches("tags")) {
|
||||
$page->set_mode(PageMode::REDIRECT);
|
||||
$page->set_redirect(make_link("tags/map"));
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Shimmie2;
|
|||
class TagListTest extends ShimmiePHPUnitTestCase
|
||||
{
|
||||
/** @var string[] */
|
||||
private array $pages = ["map", "alphabetic", "popularity", "categories"];
|
||||
private array $pages = ["map", "alphabetic", "popularity"];
|
||||
|
||||
public function testTagList(): void
|
||||
{
|
||||
|
@ -20,9 +20,6 @@ class TagListTest extends ShimmiePHPUnitTestCase
|
|||
$this->get_page('tags/popularity');
|
||||
$this->assert_title('Tag List');
|
||||
|
||||
$this->get_page('tags/categories');
|
||||
$this->assert_title('Tag List');
|
||||
|
||||
# FIXME: test that these show the right stuff
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue