Skip to content

Commit

Permalink
getting the habtm to work
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Jan 18, 2010
1 parent f50aef8 commit 11c9406
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 14 deletions.
3 changes: 2 additions & 1 deletion infinitas/management/controllers/modules_controller.php
Expand Up @@ -26,7 +26,8 @@ function admin_add() {

$positions = $this->Module->Position->find('list');
$groups = $this->Module->Group->find('list');
$this->set(compact('positions', 'groups'));
$modulesRoute = $this->Module->ModulesRoute->find('all');
$this->set(compact('positions', 'groups', 'modulesRoute'));
}

function admin_edit($id = null) {
Expand Down
38 changes: 25 additions & 13 deletions infinitas/management/views/modules/admin_add.ctp
Expand Up @@ -19,19 +19,31 @@

echo $this->Core->adminOtherHead( $this );
echo $this->Form->create( 'Module' );
echo $this->Form->input( 'name' );
echo $this->Form->input( 'module' );
echo $this->Form->input( 'position_id' );
echo $this->Form->input( 'group_id' );
echo $this->Form->input( 'active' );
echo $this->Form->input( 'show_heading' );
echo $this->Form->input( 'core' );
echo $this->Form->input( 'author' );
echo $this->Form->input( 'url' );
echo $this->Form->input( 'update_url' );
echo $this->Form->input( 'licence' );
?>
<div style="width:50%; float:left;">
<?php
echo $this->Form->input( 'name' );
echo $this->Form->input( 'module' );
echo $this->Form->input( 'position_id' );
echo $this->Form->input( 'group_id' );
echo $this->Form->input( 'active' );
echo $this->Form->input( 'show_heading' );
echo $this->Form->input( 'core' );
echo $this->Form->input( 'author' );
echo $this->Form->input( 'url' );
echo $this->Form->input( 'update_url' );
echo $this->Form->input( 'licence' );

echo $this->Form->input( 'content', array('class' => 'title') );
echo $this->Form->input( 'config', array('class' => 'title') );
echo $this->Form->input( 'content', array('class' => 'title') );
echo $this->Form->input( 'config', array('class' => 'title') );
?>
</div>
<div style="width:50%; float:left;">
<?php
pr($modulesRoute);
echo $this->Form->input( 'ModulesRoute' );
?>
</div>
<?php
echo $this->Form->end( 'Save Module' );
?>

0 comments on commit 11c9406

Please sign in to comment.