root/trunk/app/views/glossaries/admin_listing.ctp

Revision 644, 1.5 kB (checked in by aarkerio, 4 months ago)

Update FAQS

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('control-panel-title', __('Glossaries', true));
7
8if ( count($data) > 0):
9    echo '<h1>' . $data[0]["Catglossary"]["title"] . '</h1>';
10
11else:
12
13    echo '<p><b>No items yet</b></p>';
14endif;
15
16 echo '<div id="loading" style="display: none;">';
17                  echo $html->image("static/loading.gif", array("alt"=>"Loading"));
18 echo '</div>';
19   
20 echo  $ajax->link($html->image('actions/new.png', array("alt"=>"Add new category", "title"=>"Add new category")), '/admin/glossaries/new/'.$catglossary_id,
21     array("update" => "updater",
22        "loading"=>"Element.show('loading');Element.hide('updater');",
23        "complete"=>"Element.hide('loading');Effect.Appear('updater')"),
24                null,
25        false);
26
27echo $ajax->div('updater') . $ajax->divEnd('updater');
28
29foreach ($data as $val):
30
31   echo '<div style="padding:6px;margin:5px;border:1px dotted gray;">';
32   
33   echo $gags->sendEdit($val['Glossary']['id'], 'glossaries');
34   
35   echo '<p style="font-weight:bold;">' . $val['Glossary']['item'] . '</p>';
36    echo '<p style="margin-left:15px;">'. $val['Glossary']['definition']  . '</p>';
37   
38    echo $html->formTag('/admin/glossaries/delete/'.$val['Glossary']['id'].'/'.$catglossary_id, 'post', array("onsubmit"=>"return confirm('Are you sure to delete this item?')")) . $html->submit('Delete') . '</form>';
39   
40   echo '</div>';
41endforeach;
42?>
Note: See TracBrowser for help on using the browser.