summaryrefslogtreecommitdiffstats
path: root/templates/categories.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/categories.tpl')
-rw-r--r--templates/categories.tpl35
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