Added "random" tab

This commit is contained in:
Marcin Kurczewski 2013-10-21 13:13:10 +02:00
parent aab67f4b6c
commit f2947a2550
2 changed files with 16 additions and 0 deletions

View file

@ -178,6 +178,19 @@ class PostController
/**
* @route /random
* @route /random/{page}
* @validate page \d*
*/
public function randomAction($page = 1)
{
$this->listAction('order:random', $page);
$this->context->viewName = 'post-list';
}
/**
* @route /post/upload
*/

View file

@ -27,6 +27,9 @@
if (PrivilegesHelper::confirm(Privilege::ListPosts))
$nav []= ['Browse', \Chibi\UrlHelper::route('post', 'list')];
if (PrivilegesHelper::confirm(Privilege::ListPosts))
$nav []= ['Random', \Chibi\UrlHelper::route('post', 'random')];
if (PrivilegesHelper::confirm(Privilege::ListPosts))
$nav []= ['Favorites', \Chibi\UrlHelper::route('post', 'favorites')];