root/trunk/app/views/catglossaries/admin_items.ctp

Revision 698, 1.6 kB (checked in by aarkerio, 4 months ago)

Validate arrayas

Line 
1<?php
2echo $html->addCrumb('Control Panel', '/admin/entries/start');
3echo $html->addCrumb(__('Glossaries', true), '/admin/catglossaries/listing');
4echo $html->getCrumbs(' / ');
5
6echo $html->div('title_section', $data['Catglossary']['title']);
7
8 if ( count($data['Glossary']) < 1):
9    echo '<p><b>'.__('No items yet', true).'</b></p>';
10 endif;
11 
12 echo '<div id="loading" style="display: none;">'.$html->image("static/loading.gif", array("alt"=>"Loading")). '</div>';
13   
14 echo  $ajax->link($html->image('actions/new.png', array('alt'=>__('Add new', true), 'title'=>__('Add new', true))),
15          '/admin/glossaries/new/'.$data['Catglossary']['id'],
16      array("update" => "updater",
17        "loading"=>"Element.show('loading');Element.hide('updater');",
18        "complete"=>"Element.hide('loading');Effect.Appear('updater')"),
19                null,
20        false);
21
22echo $ajax->div('updater') . $ajax->divEnd('updater');
23
24foreach ($data['Glossary'] as $val):
25   echo '<div style="padding:6px;margin:5px;border:1px dotted gray;">';
26   
27   echo $gags->sendEdit($val['id'], 'Glossary');
28   
29   echo '<p style="font-weight:bold;">' . $val['item'] . '</p>';
30   echo '<p style="margin-left:15px;">'. $val['definition']  . '</p>';
31   
32   echo $form->create('Glossary', array('action'=>'delete', 'onsubmit'=>"return confirm('".__('Are you sure to want to delete this?', true)."')"));
33   echo $form->hidden('Glossary.id', array('value'=>$val['id']));
34   echo $form->hidden('Glossary.catglossary_id', array('value'=>$data['Catglossary']['id']));
35   echo $form->end(__('Delete', true));
36   
37   echo '</div>';
38endforeach;
39?>
Note: See TracBrowser for help on using the browser.