-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating configs add and edit views and removing cache the cake way
- Loading branch information
1 parent
d92816f
commit fef51f7
Showing
4 changed files
with
112 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,58 @@ | ||
<?php | ||
/** | ||
* Management Config admin edit post. | ||
* | ||
* this page is for admin to manage the setup of the site | ||
* | ||
* 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://infinitas-cms.org | ||
* @package management | ||
* @subpackage management.views.configs.admin_edit | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
*/ | ||
|
||
echo $this->Core->adminOtherHead( $this ); | ||
echo $this->Form->create( 'Config', array( 'action' => 'edit' ) ); | ||
echo $this->Form->input( 'id' ); | ||
echo $this->Form->input( 'key', array( 'readonly' => true ) ); | ||
|
||
echo $this->Form->hidden( 'type' ); | ||
|
||
switch( $this->data['Config']['type'] ) | ||
{ | ||
case 'bool': | ||
$_label = explode( '.', $this->data['Config']['key'] ); | ||
$label = ( isset( $_label[1] ) ? $_label[1] : $_label[0] ); | ||
$this->data['Config']['value'] = ( $this->data['Config']['value'] == 'true' ) ? '1' : '0'; | ||
echo $this->Form->input( | ||
'value', | ||
array( | ||
'type' => 'checkbox', | ||
'label' => Inflector::humanize( $label ) | ||
) | ||
); | ||
break; | ||
|
||
case 'dropdown': | ||
$_options = explode( ',', $this->data['Config']['options'] ); | ||
foreach( $_options as $o ) | ||
{ | ||
$options[$o] = $o; | ||
} | ||
echo $this->Form->input( | ||
'value', | ||
array( | ||
'type' => 'select', | ||
'options' => $options, | ||
'selected' => $this->data['Config']['value'] | ||
) | ||
); | ||
break; | ||
|
||
case 'integer': | ||
case 'string': | ||
echo $this->Form->input( 'value' ); | ||
break; | ||
} // switch | ||
|
||
//echo $this->Form->input( 'options' ); | ||
echo $this->Form->input( 'core', array( 'disabled' => true ) ); | ||
echo $this->Core->wysiwyg( 'Config.description' ); | ||
echo $this->Form->end( 'Save Configuration' ); | ||
<?php | ||
/** | ||
* Management Modules admin edit post. | ||
* | ||
* this page is for admin to manage the menu items on the site | ||
* | ||
* 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://infinitas-cms.org | ||
* @package management | ||
* @subpackage management.views.menuItems.admin_add | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
*/ | ||
|
||
|
||
echo $this->Form->create( 'MenuItem' ); | ||
$massActions = $this->Core->massActionButtons( | ||
array( | ||
'save', | ||
) | ||
); | ||
echo $this->Core->adminOtherHead( $this, $massActions ); | ||
echo $this->Design->niceBox(); | ||
?> | ||
<div class="data"> | ||
<?php | ||
echo $this->Form->input( 'id' ); | ||
echo $this->Form->input( 'name' ); | ||
echo $this->Form->input( 'link', array('label' => __('External Link', true)) ); | ||
echo $this->Form->input( 'prefix' ); | ||
echo $this->Form->input( 'plugin' ); | ||
echo $this->Form->input( 'controller' ); | ||
echo $this->Form->input( 'action' ); | ||
echo $this->Form->input( 'params', array('type' => 'textarea') ); | ||
?> | ||
</div> | ||
<div class="config"> | ||
<?php | ||
echo $this->Design->niceBox(); | ||
echo $this->Form->input( 'active' ); | ||
echo $this->Form->input( 'group_id' ); | ||
echo $this->Form->input( 'menu_id' ); | ||
echo $this->Form->input( 'parent_id' ); | ||
echo $this->Form->input( 'force_backend' ); | ||
echo $this->Form->input( 'force_frontend' ); | ||
echo $this->Form->input( 'class', array('type' => 'textarea', 'style' => 'width:50%;') ); | ||
echo $this->Design->niceBoxEnd(); | ||
?> | ||
</div> | ||
<?php | ||
echo $this->Design->niceBoxEnd(); | ||
echo $this->Form->end(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters