From af6dd5f8f9844596e85db25a8e97df9e08cb795c Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Mon, 1 Jun 2015 18:46:12 +0200 Subject: Port alls sites to smarty and use the inheritance model --- templates/categories.tpl | 35 +++++++++++++++++++++++ templates/categoryedit.tpl | 36 ++++++++++++++++++++++++ templates/contact.tpl | 16 +++++++++++ templates/index.tpl | 17 ++++++++++++ templates/layout.tpl | 19 +++++++++++++ templates/login.tpl | 32 +++++++++++++++++++++ templates/productdetails.tpl | 49 ++++++++++++++++++++++++++++++++ templates/productedit.tpl | 66 ++++++++++++++++++++++++++++++++++++++++++++ templates/products.tpl | 36 ++++++++++++++++++++++++ 9 files changed, 306 insertions(+) create mode 100644 templates/categories.tpl create mode 100644 templates/categoryedit.tpl create mode 100644 templates/contact.tpl create mode 100644 templates/index.tpl create mode 100644 templates/layout.tpl create mode 100644 templates/login.tpl create mode 100644 templates/productdetails.tpl create mode 100644 templates/productedit.tpl create mode 100644 templates/products.tpl (limited to 'templates') 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} +
+
Contact us
+
Home
+ {if $loggedin} +
Logout
+ {else} +
Login
+ {/if} +
+{/block} +{block name=content} + + {foreach from=$categories item=category} + + + + {if $loggedin} + + + {/if} + + {/foreach} + {if $loggedin} + + + + + + + {/if} +
{$category->getName()}{$category->getDescription()}EditDelete
Add
+{/block} \ No newline at end of file diff --git a/templates/categoryedit.tpl b/templates/categoryedit.tpl new file mode 100644 index 0000000..c02962d --- /dev/null +++ b/templates/categoryedit.tpl @@ -0,0 +1,36 @@ +{extends file="layout.tpl"} +{block name=title}{$category->getName()}{/block} +{block name=navigation} +
+
Contact us
+
Home
+
Back
+ {if $loggedin} +
Logout
+ {else} +
Login
+ {/if} +
+{/block} +{block name=content} +
+

Category

+
+ +
+
+ + +
+
 
+ + +
+{/block} \ No newline at end of file diff --git a/templates/contact.tpl b/templates/contact.tpl new file mode 100644 index 0000000..b8bf0d3 --- /dev/null +++ b/templates/contact.tpl @@ -0,0 +1,16 @@ +{extends file="layout.tpl"} +{block name=title}Contact us{/block} +{block name=navigation} +
+
Home
+
Categories
+ {if $loggedin} +
Logout
+ {else} +
Login
+ {/if} +
+{/block} +{block name=content} +

Name: SomeCompany Ltd.
Telephone: +1-555-6383
Address: SomeStreet in Alamo

+{/block} \ No newline at end of file diff --git a/templates/index.tpl b/templates/index.tpl new file mode 100644 index 0000000..d787033 --- /dev/null +++ b/templates/index.tpl @@ -0,0 +1,17 @@ +{extends file="layout.tpl"} +{block name=title}Home Page{/block} +{block name=navigation} +
+
Contact us
+
Categories
+ {if $loggedin} +
Logout
+ {else} +
Login
+ {/if} +
+{/block} +{block name=content} +

This site will rock your chair. The best products from all over the world. +Furniture the like you have never seen. Contact us a get our catalog or login a order direct from our categories.

+{/block} \ No newline at end of file diff --git a/templates/layout.tpl b/templates/layout.tpl new file mode 100644 index 0000000..bd623a1 --- /dev/null +++ b/templates/layout.tpl @@ -0,0 +1,19 @@ + + + + +{block name=title}Untitled Page{/block} + + + +

{block name=title}Untitled Page{/block}

+ +
+ {block name=content}Error loading{/block} +
+
+ + + \ No newline at end of file diff --git a/templates/login.tpl b/templates/login.tpl new file mode 100644 index 0000000..c2bb0a2 --- /dev/null +++ b/templates/login.tpl @@ -0,0 +1,32 @@ +{extends file="layout.tpl"} +{block name=title}Login{/block} +{block name=navigation} +
+
Contact us
+
Categories
+
Home
+
+{/block} +{block name=content} +
+

{block name=title}{/block}

+
+ + +
+
+ + +
+
 
+ + +
+{/block} \ No newline at end of file diff --git a/templates/productdetails.tpl b/templates/productdetails.tpl new file mode 100644 index 0000000..b850c7d --- /dev/null +++ b/templates/productdetails.tpl @@ -0,0 +1,49 @@ +{extends file="layout.tpl"} +{block name=title}{$product->getName()}{/block} +{block name=navigation} +
+
Contact us
+
Home
+
Categories
+
Back to Category
+ {if $loggedin} +
Logout
+ {else} +
Login
+ {/if} +
+{/block} +{block name=content} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
 
+
+{/block} \ No newline at end of file diff --git a/templates/productedit.tpl b/templates/productedit.tpl new file mode 100644 index 0000000..ccd8483 --- /dev/null +++ b/templates/productedit.tpl @@ -0,0 +1,66 @@ +{extends file="layout.tpl"} +{block name=title}{$product->getName()}{/block} +{block name=navigation} +
+
Contact us
+
Home
+
Categories
+
Back
+ {if $loggedin} +
Logout
+ {else} +
Login
+ {/if} +
+{/block} +{block name=content} +
+

{block name=title}{/block}

+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
 
+ + +
+{/block} \ No newline at end of file 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} +
+
Contact us
+
Home
+
Categories
+ {if $loggedin} +
Logout
+ {else} +
Login
+ {/if} +
+{/block} +{block name=content} + + {foreach from=$products item=product} + + + + {if $loggedin} + + + {/if} + + {/foreach} + {if $loggedin} + + + + + + + {/if} +
{$product->getName()}{$product->getDescription()}EditDelete
Add
+{/block} \ No newline at end of file -- cgit v1.2.3-70-g09d2