Skip to content

Commit

Permalink
Merge branch 'dev' of git://github.com/infinitas/infinitas into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Jan 5, 2010
2 parents bad99e7 + 90c41c1 commit 455ced0
Show file tree
Hide file tree
Showing 509 changed files with 186 additions and 2,658 deletions.
23 changes: 16 additions & 7 deletions app_helper.php
Expand Up @@ -207,11 +207,18 @@ function ordering( $id = null, $order = null )
{
$this->errors[] = 'The order was not passed';
}
$out = $order.' ';

$out = $this->Html->link( $order, array( '#' => $order ) );

$out .= $this->Html->link(
$this->Html->image(
'core/icons/actions/16/arrow-up-yes.png'
$this->Image->getRelativePath( 'actions', 'arrow-up' ),
array(
'alt' => __( 'Up', true ),
'title' => __( 'Move up', true ),
'width' => '16px',
'class' => 'arrow-up'
)
),
array(
'action' => 'reorder',
Expand All @@ -221,14 +228,18 @@ function ordering( $id = null, $order = null )
),
array(
'escape' => false,
'title' => __( 'Move up', true ),
'alt' => __( 'Up', true )
)
);

$out .= $this->Html->link(
$this->Html->image(
'core/icons/actions/16/arrow-down-yes.png'
$this->Image->getRelativePath( 'actions', 'arrow-down' ),
array(
'alt' => __( 'Down', true ),
'title' => __( 'Move down', true ),
'width' => '16px',
'class' => 'arrow-down'
)
),
array(
'action' => 'reorder',
Expand All @@ -238,8 +249,6 @@ function ordering( $id = null, $order = null )
),
array(
'escape' => false,
'title' => __( 'Move down', true ),
'alt' => __( 'Down', true )
)
);

Expand Down
10 changes: 1 addition & 9 deletions config/bootstrap.php
Expand Up @@ -48,13 +48,5 @@
* Inflector::rules('plural', array('rules' => array(), 'irregular' => array(), 'uninflected' => array()));
*
*/
App::build(
array(
'plugins' => array(
dirname( dirname( __FILE__ ) ).DS.'core'
)
)
);


App::build( array( 'plugins' => array( dirname( dirname( __FILE__ ) ).DS.'infinitas'.DS ) ) );
?>
13 changes: 12 additions & 1 deletion config/images.php
Expand Up @@ -19,7 +19,7 @@
'export' => 'zip.png',
'favourite' => 'favourite.png',
'featured' => 'featured.png',
'locked' => 'locked.png',
'-locked' => 'locked.png',
'move' => 'move.png',
'order-asc' => 'order-asc.png',
'order-desc' => 'order-desc.png',
Expand Down Expand Up @@ -148,6 +148,17 @@
'yahoo' => 'yahoo-messanger.png'
),

'status' => array(
'active' => 'active.png',
'inactive' => 'inactive.png',
'home' => 'home.png',
'not-home' => 'not-home.png',
'locked' => 'locked.png',
'not-locked' => 'not-locked.png',
'featured' => 'featured.png',
'not-featured' => 'not-featured.png',
),

'unknown' => array(
'unknown' => 'unknown.png',
'readme' => 'readme.png',
Expand Down
1 change: 1 addition & 0 deletions config/routes.php
Expand Up @@ -45,5 +45,6 @@
* cms routes
*/
Router::connect('/admin/cms', array( 'plugin' => 'cms', 'controller' => 'categories', 'action' => 'dashboard', 'prefix' => 'admin', 'admin' => true ) );
//Router::connect('/admin/cms/:controller/:action/*', array( 'plugin' => 'cms', 'admin' => true ) );
Router::connect('/cms', array( 'plugin' => 'cms', 'controller' => 'contentFrontpages' ) );
?>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -42,6 +42,7 @@ function admin_index()

$this->paginate = array(
'fields' => array(
'ContentFrontpage.id',
'ContentFrontpage.content_id',
'ContentFrontpage.ordering',
'ContentFrontpage.created',
Expand Down
Expand Up @@ -46,6 +46,8 @@ function view( $id = null )
$this->set( 'content', $this->Content->read( null, $id ) );
}



function admin_index()
{
$this->paginate = array(
Expand Down
Expand Up @@ -27,10 +27,10 @@ function admin_index()

$this->paginate = array(
'fields' => array(
'Feature.id',
'Feature.content_id',
'Feature.ordering',
'Feature.created',
'Feature.modified'
'Feature.created'
),
'contain' => array(
'Content' => array(
Expand Down
62 changes: 62 additions & 0 deletions infinitas/cms/models/category.php
@@ -0,0 +1,62 @@
<?php
/**
* Comment Template.
*
* @todo Implement .this needs to be sorted out.
*
* Copyright (c) 2009 Carl Sutton ( dogmatic69 )
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
* @filesource
* @copyright Copyright (c) 2009 Carl Sutton ( dogmatic69 )
* @link http://www.dogmatic.co.za
* @package sort
* @subpackage sort.comments
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @since 0.5a
*/

class Category extends CmsAppModel
{
var $name = 'Category';

var $actsAs = array(
'Core.Sluggable',
'Core.Viewable',
'Tree'
);

var $order = array(
'Category.lft' => 'ASC'
);

var $validate = array(
'title' => array(
'notempty' => array( 'rule' => array( 'notempty' ) ),
),
);

var $belongsTo = array(
'Parent' => array(
'className' => 'Cms.Category',
'counterCache' => true
),
'Core.Group',
'Locker' => array(
'className' => 'Core.User',
'foreignKey' => 'locked_by',
'conditions' => '',
'fields' => array(
'Locker.id',
'Locker.username'
),
'order' => ''
)
);

var $hasMany = array(
'Cms.Content'
);
}
?>
Expand Up @@ -35,23 +35,30 @@ class Content extends CmsAppModel

var $actsAs = array(
'Core.Sluggable',
'Core.Viewable',
'Core.Ordered' => array(
'foreign_key' => 'category_id'
)
'Core.Viewable'
);

var $belongsTo = array(
'Category' => array(
'className' => 'Cms.Category',
'counterCache' => true
),
'Core.Group'
'Core.Group',
'Locker' => array(
'className' => 'Core.User',
'foreignKey' => 'locked_by',
'conditions' => '',
'fields' => array(
'Locker.id',
'Locker.username'
),
'order' => ''
)
);

var $hasMany = array(
'Cms.ContentFrontpage'
'Cms.ContentFrontpage',
'Cms.Feature',
);

}
?>
Expand Up @@ -21,8 +21,6 @@
class ContentFrontpage extends CmsAppModel
{
var $name = 'ContentFrontpage';
var $primaryKey = 'content_id';
var $displayField = 'content_id';

var $actsAs = array(
'Core.Ordered'
Expand Down
Expand Up @@ -21,15 +21,15 @@
class Feature extends CmsAppModel
{
var $name = 'Feature';
var $primaryKey = 'content_id';
var $displayField = 'content_id';

var $order = array(
'Feature.ordering' => 'DESC'
);

var $actsAs = array(
'Core.Ordered'
'Core.Ordered' => array(
'foreign_key' => 'order_id'
)
);

var $belongsTo = array(
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -89,10 +89,7 @@
</td>
<td>
<?php
echo $this->Cms->ordering(
$category['Category']['id'],
$category['Category']['ordering']
);
// @todo -c Implement .add up and down for mptt
?>
</td>
<td>
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -60,7 +60,7 @@
{
?>
<tr class="<?php echo $this->Cms->rowClass( $i ); ?>">
<td><?php echo $this->Form->checkbox( $contentFrontpage['ContentFrontpage']['content_id'] ); ?>&nbsp;</td>
<td><?php echo $this->Form->checkbox( $contentFrontpage['ContentFrontpage']['id'] ); ?>&nbsp;</td>
<td>
<?php echo $this->Html->link( $contentFrontpage['Content']['title'], array('controller' => 'contents', 'action' => 'view', $contentFrontpage['Content']['id'])); ?>
</td>
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -56,7 +56,7 @@
'style' => 'width:50px;'
),
__( 'Status', true ) => array(
'style' => 'width:50px;'
'style' => 'width:100px;'
)
)
);
Expand Down Expand Up @@ -100,17 +100,15 @@
<td>
<?php echo $this->Time->niceShort( $content['Content']['modified'] ); ?>
</td>
<td>
<td class="status">
<?php
echo $this->Cms->ordering(
$content['Content']['id'],
$content['Content']['ordering']
);
echo $this->Cms->ordering( $content['Content']['id'], $content['Content']['ordering'] );
?>
</td>
<td>
<td class="status">
<?php
echo $this->Cms->homePageItem( $content ),
$this->Status->featured( $content ),
$this->Status->toggle( $content['Content']['active'], $content['Content']['id'] ),
$this->Status->locked( $content, 'Content' );
?>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -44,9 +44,6 @@
$this->Paginator->sort( 'created' ) => array(
'style' => 'width:100px;'
),
$this->Paginator->sort( 'modified' ) => array(
'style' => 'width:100px;'
),
$this->Paginator->sort( 'ordering' ) => array(
'style' => 'width:50px;'
),
Expand All @@ -61,7 +58,7 @@
{
?>
<tr class="<?php echo $this->Cms->rowClass( $i ); ?>">
<td><?php echo $this->Form->checkbox( $feature['Feature']['content_id'] ); ?>&nbsp;</td>
<td><?php echo $this->Form->checkbox( $feature['Feature']['id'] ); ?>&nbsp;</td>
<td>
<?php echo $this->Html->link( $feature['Content']['title'], array('controller' => 'features', 'action' => 'view', $feature['Content']['id'])); ?>
</td>
Expand All @@ -71,9 +68,6 @@
<td>
<?php echo $this->Time->niceShort( $feature['Feature']['created'] ); ?>
</td>
<td>
<?php echo $this->Time->niceShort( $feature['Feature']['modified'] ); ?>
</td>
<td>
<?php
echo $this->Cms->ordering(
Expand Down

0 comments on commit 455ced0

Please sign in to comment.