summaryrefslogtreecommitdiffstats
path: root/templates/products.tpl
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-06-01 18:46:12 +0200
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-06-01 18:46:12 +0200
commitaf6dd5f8f9844596e85db25a8e97df9e08cb795c (patch)
tree8408e754dd335571635bcde041bbce69213af592 /templates/products.tpl
parentbe50d9ed4ba2b844bbc29686cee46b1dc149372a (diff)
downloadCatalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.tar.gz
Catalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.zip
Port alls sites to smarty and use the inheritance model
Diffstat (limited to 'templates/products.tpl')
-rw-r--r--templates/products.tpl36
1 files changed, 36 insertions, 0 deletions
diff --git a/templates/products.tpl b/templates/products.tpl
new file mode 100644
index 0000000..dac8f0e
--- /dev/null
+++ b/templates/products.tpl
@@ -0,0 +1,36 @@
+{extends file="layout.tpl"}
+{block name=title}{$category}{/block}
+{block name=navigation}
+<dl>
+ <dt><a href="contact.php">Contact us</a></dt>
+ <dt><a href=".">Home</a></dt>
+ <dt><a href="categories.php">Categories</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=$products item=product}
+ <tr>
+ <td><a href="productdetails.php?id={$product->getId()}&catid={$id}">{$product->getName()}</a></td>
+ <td>{$product->getDescription()}</td>
+ {if $loggedin}
+ <td><a href="productedit.php?modify={$product->getId()}&catid={$id}">Edit</a></td>
+ <td><a href="productedit.php?delete={$product->getId()}&catid={$id}" onClick="return confirm('Confirm deletion.')">Delete</a></td>
+ {/if}
+ </tr>
+ {/foreach}
+ {if $loggedin}
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td><a href="productedit.php?add&catid={$id}">Add</a></td>
+ </tr>
+ {/if}
+</table>
+{/block} \ No newline at end of file