| 1 | <?php |
|---|
| 2 | echo $html->addCrumb('Control Panel', '/admin/entries/start'); |
|---|
| 3 | echo $html->addCrumb(__('Glossaries', true), '/admin/catglossaries/listing'); |
|---|
| 4 | echo $html->getCrumbs(' / '); |
|---|
| 5 | |
|---|
| 6 | echo $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 | |
|---|
| 22 | echo $ajax->div('updater') . $ajax->divEnd('updater'); |
|---|
| 23 | |
|---|
| 24 | foreach ($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>'; |
|---|
| 38 | endforeach; |
|---|
| 39 | ?> |
|---|