Assembla home | Assembla project page
 

Changeset 100

Show
Ignore:
Timestamp:
07/17/07 22:49:17 (1 year ago)
Author:
AD7six
Message:

View changes related to menu administration

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/views/elements/mainnav.ctp

    r72 r100  
    11<?php $menus = $this->requestAction('/menus/index/1');?> 
     2 
    23<div id="mainnav" class="primarynav"> 
    3         <?php e($treeMenu->generate($menus,true,'jd_menu jd_menu_slate'));?> 
     4        <?php 
     5echo $tree->generateRecursive($menus, array ( 
     6        'model' => 'Menu', 
     7        'alias' => 'name', 
     8        'urlIndex' => 'url', 
     9),4,'jd_menu jd_menu_slate'); 
     10//e($tree->generateRecursive($menus,true,'jd_menu jd_menu_slate'));?> 
    411</div> 
  • branch/views/menus/admin_index.ctp

    r67 r100  
    1 <div class="menus"> 
    2 <h2>List Menuses</h2> 
     1<h2>Menu Index</h2> 
     2<?php echo $html->link('view as a tree', array('action' => 'tree')); ?> 
     3<table cellpadding="0" cellspacing="0"> 
     4<?php 
     5$th = array( 
     6                $paginator->sort('id'), 
     7                $paginator->sort('name'), 
     8                $paginator->sort('url'), 
     9                $paginator->sort('modified'), 
     10                'status' 
     11                        ); 
     12echo $html->tableHeaders($th); 
    313 
    4 <table cellpadding="0" cellspacing="0"> 
    5         <tr> 
    6                 <th><?php echo $paginator->sort('id');?></th> 
    7                 <th><?php echo $paginator->sort('name');?></th> 
    8                 <th><?php echo $paginator->sort('url');?></th> 
    9                 <th><?php echo $paginator->sort('position');?></th> 
    10                 <th><?php echo $paginator->sort('icon');?></th> 
    11                 <th><?php echo $paginator->sort('parent_id');?></th> 
    12                 <th><?php echo $paginator->sort('section_id');?></th> 
    13                 <th><?php echo $paginator->sort('access_level');?></th> 
    14                 <th><?php echo $paginator->sort('published');?></th> 
    15                 <th>Actions</th> 
    16         </tr> 
    17 <?php foreach ($menus as $menu): ?> 
    18         <tr> 
    19                 <td><?php echo $menu['Menu']['id']; ?></td> 
    20                 <td><?php echo $menu['Menu']['name']; ?></td> 
    21                 <td><?php echo $menu['Menu']['url']; ?></td> 
    22                 <td><?php echo $menu['Menu']['position']; ?></td> 
    23                 <td><?php echo $menu['Menu']['icon']; ?></td> 
    24                 <td><?php echo $html->link($menu['Menu']['parent_id'], array('controller'=> 'menus', 'action'=>'view', $menu['Menu']['parent_id'])); ?></td> 
    25                 <td><?php echo $html->link($menu['Section']['name'], array('controller'=> 'sections', 'action'=>'view', $menu['Section']['id'])); ?></td> 
    26                 <td><?php echo $menu['Menu']['access_level']; ?></td> 
    27                 <td><?php echo $menu['Menu']['published']; ?></td> 
    28                 <td class="actions"> 
    29                         <?php echo $html->link('View', array('action'=>'view', $menu['Menu']['id'])); ?> 
    30                         <?php echo $html->link('Edit', array('action'=>'edit', $menu['Menu']['id'])); ?> 
    31                         <?php echo $html->link('Delete', array('action'=>'delete', $menu['Menu']['id']), null, 'Are you sure you want to delete #' . $menu['Menu']['id']); ?> 
    32                 </td> 
    33         </tr> 
    34 <?php endforeach; ?> 
     14foreach ($menus as $menu) { 
     15    $tr = array ( 
     16        $html->link($menu['Menu']['id'],array('action' => 'view', $menu['Menu']['id'])), 
     17        $menu['Menu']['name'], 
     18        $html->link($menu['Menu']['url']), 
     19        $time->nice($menu['Menu']['modified']), 
     20        ife($menu['Menu']['published'],'visible','hidden') 
     21        ); 
     22    echo $html->tableCells($tr); 
     23
     24?> 
    3525</table> 
    36  
    37 </div> 
    38 <div class="paging"> 
    39 <?php echo $paginator->prev('<< previous', array(), null, array('class'=>'disabled'));?> 
    40 
    41 <?php echo $paginator->next('next >>', array(), null, array('class'=>'disabled'));?> 
    42 </div> 
    43 <div class="actions"> 
    44         <ul> 
    45                 <li><?php echo $html->link('New Menu', array('action'=>'add')); ?></li> 
    46         </ul> 
    47 </div> 
     26<?php echo $this->renderElement('paging'); ?>