diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-06-01 18:46:12 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-06-01 18:46:12 +0200 |
| commit | af6dd5f8f9844596e85db25a8e97df9e08cb795c (patch) | |
| tree | 8408e754dd335571635bcde041bbce69213af592 /templates/categories.tpl | |
| parent | be50d9ed4ba2b844bbc29686cee46b1dc149372a (diff) | |
| download | Catalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.tar.gz Catalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.zip | |
Port alls sites to smarty and use the inheritance model
Diffstat (limited to 'templates/categories.tpl')
| -rw-r--r-- | templates/categories.tpl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/templates/categories.tpl b/templates/categories.tpl new file mode 100644 index 0000000..11162a6 --- /dev/null +++ b/templates/categories.tpl @@ -0,0 +1,35 @@ +{extends file="layout.tpl"} +{block name=title}Categories{/block} +{block name=navigation} +<dl> + <dt><a href="contact.php">Contact us</a></dt> + <dt><a href=".">Home</a></dt> + {if $loggedin} + <dt><a href="login.php?logout">Logout</a></dt> + {else} + <dt><a href="login.php">Login</a></dt> + {/if} +</dl> +{/block} +{block name=content} +<table> + {foreach from=$categories item=category} + <tr> + <td><a href="products.php?id={$category->getId()}">{$category->getName()}</a></td> + <td>{$category->getDescription()}</td> + {if $loggedin} + <td><a href="categoryedit.php?modify={$category->getId()}">Edit</a></td> + <td><a href="categoryedit.php?delete={$category->getId()}" onClick="return confirm('Confirm deletion.')">Delete</a></td> + {/if} + </tr> + {/foreach} + {if $loggedin} + <tr> + <td></td> + <td></td> + <td></td> + <td><a href="categoryedit.php?add">Add</a></td> + </tr> + {/if} +</table> +{/block}
\ No newline at end of file |
