Skip to content

Commit

Permalink
Reconstructed current files
Browse files Browse the repository at this point in the history
  • Loading branch information
linzongshu committed Jul 22, 2013
1 parent 2e7b9c1 commit f37e742
Show file tree
Hide file tree
Showing 25 changed files with 272 additions and 189 deletions.
Binary file added asset/image/default-author.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 95 additions & 95 deletions config/block.php

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions config/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@
return array(
'meta' => array(
'cms' => array(
'title' => __('Article site navigation'),
'title' => _t('Article site navigation'),
'section' => 'front',
),
),
'item' => array(
// Default front navigation
'front' => array(
'article-homepage' => array(
'label' => __('Article Homepage'),
'label' => _t('Article Homepage'),
'route' => 'default',
'controller' => 'index',
'action' => 'index',
),
'topic-homepage' => array(
'label' => __('Topic Homepage'),
'label' => _t('Topic Homepage'),
'route' => 'default',
'controller' => 'topic',
'action' => 'index',
),
'my' => array(
'label' => __('My Article'),
'label' => _t('My Article'),
'route' => 'default',
'controller' => 'my',
'action' => 'index',
Expand All @@ -49,7 +49,7 @@
// Default admin navigation
'admin' => array(
'article' => array(
'label' => __('All Articles'),
'label' => _t('All Articles'),
'route' => 'admin',
'controller' => 'article',
'resource' => array(
Expand All @@ -58,7 +58,7 @@
),

'topic' => array(
'label' => __('Topic'),
'label' => _t('Topic'),
'route' => 'admin',
'controller' => 'topic',
'resource' => array(
Expand All @@ -67,7 +67,7 @@
),

'media' => array(
'label' => __('Media'),
'label' => _t('Media'),
'route' => 'admin',
'controller' => 'media',
'resource' => array(
Expand All @@ -76,7 +76,7 @@
),

'author' => array(
'label' => __('Author'),
'label' => _t('Author'),
'route' => 'admin',
'controller' => 'author',
'resource' => array(
Expand All @@ -85,7 +85,7 @@
),

'category' => array(
'label' => __('Category'),
'label' => _t('Category'),
'route' => 'admin',
'controller' => 'category',
'resource' => array(
Expand All @@ -94,7 +94,7 @@
),

'permission' => array(
'label' => __('Permission'),
'label' => _t('Permission'),
'route' => 'admin',
'controller' => 'permission',
'resource' => array(
Expand All @@ -103,7 +103,7 @@
),

'analysis' => array(
'label' => __('Statistics'),
'label' => _t('Statistics'),
'route' => 'admin',
'controller' => 'statistics',
'resource' => array(
Expand All @@ -115,17 +115,17 @@
// Custom front navigation, need setup at backend
'cms' => array(
'article-homepage' => array(
'label' => __('Article Homepage'),
'label' => _t('Article Homepage'),
'route' => 'default',
'controller' => 'index',
),
'topic-homepage' => array(
'label' => __('Topic Homepage'),
'label' => _t('Topic Homepage'),
'route' => 'default',
'controller' => 'topic',
),
'my' => array(
'label' => __('My Article'),
'label' => _t('My Article'),
'route' => 'default',
'controller' => 'my',
),
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Front/AuthorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Zongshu Lin <[email protected]>
* @since 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Front/CategoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Zongshu Lin <[email protected]>
* @since 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Front/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Zongshu Lin <[email protected]>
* @since 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/Form/AuthorEditFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Lijun Dong <[email protected]>
* @author Zongshu Lin <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion src/Form/AuthorEditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Lijun Dong <[email protected]>
* @author Zongshu Lin <[email protected]>
Expand Down
8 changes: 7 additions & 1 deletion src/Form/CategoryEditFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Lijun Dong <[email protected]>
* @author Zongshu Lin <[email protected]>
Expand All @@ -22,8 +22,14 @@
use Pi;
use Zend\InputFilter\InputFilter;

/**
* Class for verfying and filter form
*/
class CategoryEditFilter extends InputFilter
{
/**
* Initializing validator and filter
*/
public function __construct()
{
$this->add(array(
Expand Down
8 changes: 7 additions & 1 deletion src/Form/CategoryEditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Lijun Dong <[email protected]>
* @author Zongshu Lin <[email protected]>
Expand All @@ -22,8 +22,14 @@
use Pi;
use Pi\Form\Form as BaseForm;

/**
* Initializing category form
*/
class CategoryEditForm extends BaseForm
{
/**
* Initializing form
*/
public function init()
{
$this->add(array(
Expand Down
8 changes: 7 additions & 1 deletion src/Form/CategoryMergeFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Lijun Dong <[email protected]>
* @author Zongshu Lin <[email protected]>
Expand All @@ -22,8 +22,14 @@
use Pi;
use Zend\InputFilter\InputFilter;

/**
* Class for verifying and filtering form
*/
class CategoryMergeFilter extends InputFilter
{
/**
* Initializing validator and filter
*/
public function __construct()
{
$this->add(array(
Expand Down
8 changes: 7 additions & 1 deletion src/Form/CategoryMergeForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Lijun Dong <[email protected]>
* @author Zongshu Lin <[email protected]>
Expand All @@ -22,8 +22,14 @@
use Pi;
use Pi\Form\Form as BaseForm;

/**
* Class for initializing form
*/
class CategoryMergeForm extends BaseForm
{
/**
* Initializing form
*/
public function init()
{
$this->add(array(
Expand Down
8 changes: 7 additions & 1 deletion src/Form/CategoryMoveFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Lijun Dong <[email protected]>
* @author Zongshu Lin <[email protected]>
Expand All @@ -22,8 +22,14 @@
use Pi;
use Zend\InputFilter\InputFilter;

/**
* Class for verfying and filtering form
*/
class CategoryMoveFilter extends InputFilter
{
/**
* Initializing validator and filter
*/
public function __construct()
{
$this->add(array(
Expand Down
6 changes: 6 additions & 0 deletions src/Form/CategoryMoveForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@
use Pi;
use Pi\Form\Form as BaseForm;

/**
* Class for initializing form
*/
class CategoryMoveForm extends BaseForm
{
/**
* Initializing form element
*/
public function init()
{
$this->add(array(
Expand Down
10 changes: 9 additions & 1 deletion src/Form/Element/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Lijun Dong <[email protected]>
* @author Zongshu Lin <[email protected]>
Expand All @@ -22,8 +22,16 @@
use Pi;
use Zend\Form\Element\Select;

/**
* Class for creating select of all category
*/
class Category extends Select
{
/**
* Reading added category from database
*
* @return array
*/
public function getValueOptions()
{
if (empty($this->valueOptions)) {
Expand Down
10 changes: 9 additions & 1 deletion src/Form/Element/CategoryWithRoot.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Copyright (c) http://www.eefocus.com
* @copyright Copyright (c) Pi Engine http://www.xoopsengine.org
* @license http://www.xoopsengine.org/license New BSD License
* @author Lijun Dong <[email protected]>
* @author Zongshu Lin <[email protected]>
Expand All @@ -22,8 +22,16 @@
use Pi;
use Zend\Form\Element\Select;

/**
* Class for creating category select with root
*/
class CategoryWithRoot extends Select
{
/**
* Reading category from database
*
* @return array
*/
public function getValueOptions()
{
if (empty($this->valueOptions)) {
Expand Down
13 changes: 13 additions & 0 deletions src/Model/Author.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,26 @@
use Pi;
use Pi\Application\Model\Model;

/**
* Model class for operating author table
*/
class Author extends Model
{
/**
* Getting available fields
*
* @return array
*/
public static function getAvailableFields()
{
return array('id', 'name', 'photo', 'description');
}

/**
* Getting author name
*
* @return array
*/
public function getSelectOptions()
{
$result = array('0' => '');
Expand Down
Loading

0 comments on commit f37e742

Please sign in to comment.