| 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('control-panel-title', __('Glossaries', true)); |
|---|
| 7 | |
|---|
| 8 | if ( count($data) > 0): |
|---|
| 9 | echo '<h1>' . $data[0]["Catglossary"]["title"] . '</h1>'; |
|---|
| 10 | |
|---|
| 11 | else: |
|---|
| 12 | |
|---|
| 13 | echo '<p><b>No items yet</b></p>'; |
|---|
| 14 | endif; |
|---|
| 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 | |
|---|
| 27 | echo $ajax->div('updater') . $ajax->divEnd('updater'); |
|---|
| 28 | |
|---|
| 29 | foreach ($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>'; |
|---|
| 41 | endforeach; |
|---|
| 42 | ?> |
|---|