add templates

This commit is contained in:
Kayn Ty 2018-03-15 17:14:57 +01:00
parent cbeab15fd6
commit 08aec6c5d7
4 changed files with 103 additions and 92 deletions

2
.gitignore vendored
View File

@ -15,3 +15,5 @@
.phpunit
/phpunit.xml
###< symfony/phpunit-bridge ###
/.idea/

View File

@ -2,16 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="77eba199-b6d3-40aa-8673-48ccff359364" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/php.xml" afterPath="$PROJECT_DIR$/.idea/php.xml" />
<change beforePath="$PROJECT_DIR$/.idea/sf4-test.iml" afterPath="$PROJECT_DIR$/.idea/sf4-test.iml" />
<change beforePath="$PROJECT_DIR$/.gitignore" afterPath="$PROJECT_DIR$/.gitignore" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/composer.json" afterPath="$PROJECT_DIR$/composer.json" />
<change beforePath="$PROJECT_DIR$/composer.lock" afterPath="$PROJECT_DIR$/composer.lock" />
<change beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
<change beforePath="$PROJECT_DIR$/symfony.lock" afterPath="$PROJECT_DIR$/symfony.lock" />
<change beforePath="$PROJECT_DIR$/templates/base.html.twig" afterPath="$PROJECT_DIR$/templates/base.html.twig" />
<change beforePath="$PROJECT_DIR$/assets/css/global.scss" afterPath="$PROJECT_DIR$/assets/css/global.scss" />
<change beforePath="$PROJECT_DIR$/templates/product/index.html.twig" afterPath="$PROJECT_DIR$/templates/product/index.html.twig" />
<change beforePath="$PROJECT_DIR$/webpack.config.js" afterPath="$PROJECT_DIR$/webpack.config.js" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
@ -50,8 +44,8 @@
<file leaf-file-name="index.html.twig" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/templates/product/index.html.twig">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="715">
<caret line="11" column="42" lean-forward="true" selection-start-line="11" selection-start-column="42" selection-end-line="11" selection-end-column="42" />
<state relative-caret-position="495">
<caret line="24" column="43" lean-forward="false" selection-start-line="24" selection-start-column="43" selection-end-line="24" selection-end-column="43" />
<folding>
<element signature="e#12#26#0#Twig" expanded="true" />
</folding>
@ -62,48 +56,18 @@
<file leaf-file-name="global.scss" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/assets/css/global.scss">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="3" column="55" lean-forward="false" selection-start-line="3" selection-start-column="55" selection-end-line="3" selection-end-column="55" />
<state relative-caret-position="455">
<caret line="7" column="17" lean-forward="false" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="webpack.config.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/webpack.config.js">
<file leaf-file-name=".gitignore" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="820">
<caret line="17" column="0" lean-forward="false" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="app.css" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/build/css/app.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2145">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="base.html.twig" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/templates/base.html.twig">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="950">
<caret line="16" column="36" lean-forward="false" selection-start-line="16" selection-start-column="36" selection-end-line="16" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="app.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/assets/js/app.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="130">
<caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<state relative-caret-position="585">
<caret line="18" column="7" lean-forward="false" selection-start-line="18" selection-start-column="7" selection-end-line="18" selection-end-column="7" />
<folding />
</state>
</provider>
@ -119,6 +83,16 @@
</provider>
</entry>
</file>
<file leaf-file-name="Product.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Entity/Product.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1233">
<caret line="31" column="45" lean-forward="false" selection-start-line="31" selection-start-column="45" selection-end-line="31" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
@ -141,11 +115,12 @@
<option value="$PROJECT_DIR$/src/Entity/ProductCategory.php" />
<option value="$PROJECT_DIR$/src/Entity/SellRecord.php" />
<option value="$PROJECT_DIR$/src/Controller/ProductController.php" />
<option value="$PROJECT_DIR$/assets/css/global.scss" />
<option value="$PROJECT_DIR$/assets/js/app.js" />
<option value="$PROJECT_DIR$/templates/product/index.html.twig" />
<option value="$PROJECT_DIR$/webpack.config.js" />
<option value="$PROJECT_DIR$/templates/base.html.twig" />
<option value="$PROJECT_DIR$/templates/product/index.html.twig" />
<option value="$PROJECT_DIR$/assets/css/global.scss" />
<option value="$PROJECT_DIR$/.gitignore" />
</list>
</option>
</component>
@ -290,6 +265,17 @@
<item name="sf4-test" type="b2602c69:ProjectViewProjectNode" />
<item name="sf4-test" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="sf4-test" type="b2602c69:ProjectViewProjectNode" />
<item name="sf4-test" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="assets" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="sf4-test" type="b2602c69:ProjectViewProjectNode" />
<item name="sf4-test" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="assets" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="css" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="sf4-test" type="b2602c69:ProjectViewProjectNode" />
<item name="sf4-test" type="2a2b976b:PhpTreeStructureProvider$1" />
@ -399,12 +385,12 @@
<updated>1520949897852</updated>
<workItem from="1520949899279" duration="654000" />
<workItem from="1521124630756" duration="815000" />
<workItem from="1521125457191" duration="3970000" />
<workItem from="1521125457191" duration="4881000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="5439000" />
<option name="totallyTimeSpent" value="6350000" />
</component>
<component name="ToolWindowManager">
<frame x="1046" y="436" width="3761" height="2166" extended-state="6" />
@ -674,14 +660,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Entity/Product.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="453">
<caret line="31" column="45" lean-forward="false" selection-start-line="31" selection-start-column="45" selection-end-line="31" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/bin/console">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1560">
@ -700,14 +678,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Entity/ProductCategory.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1098">
<caret line="28" column="20" lean-forward="false" selection-start-line="28" selection-start-column="20" selection-end-line="28" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Controller/ProductController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="715">
@ -718,14 +688,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/assets/css/global.scss">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="3" column="55" lean-forward="false" selection-start-line="3" selection-start-column="55" selection-end-line="3" selection-end-column="55" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/assets/js/app.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="130">
@ -742,16 +704,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/templates/product/index.html.twig">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="715">
<caret line="11" column="42" lean-forward="true" selection-start-line="11" selection-start-column="42" selection-end-line="11" selection-end-column="42" />
<folding>
<element signature="e#12#26#0#Twig" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/webpack.config.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="820">
@ -762,8 +714,50 @@
</entry>
<entry file="file://$PROJECT_DIR$/templates/base.html.twig">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="950">
<caret line="16" column="36" lean-forward="false" selection-start-line="16" selection-start-column="36" selection-end-line="16" selection-end-column="36" />
<state relative-caret-position="560">
<caret line="10" column="16" lean-forward="false" selection-start-line="10" selection-start-column="16" selection-end-line="10" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Entity/ProductCategory.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1098">
<caret line="28" column="20" lean-forward="false" selection-start-line="28" selection-start-column="20" selection-end-line="28" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Entity/Product.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1233">
<caret line="31" column="45" lean-forward="false" selection-start-line="31" selection-start-column="45" selection-end-line="31" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/templates/product/index.html.twig">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="495">
<caret line="24" column="43" lean-forward="false" selection-start-line="24" selection-start-column="43" selection-end-line="24" selection-end-column="43" />
<folding>
<element signature="e#12#26#0#Twig" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/assets/css/global.scss">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="455">
<caret line="7" column="17" lean-forward="false" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="585">
<caret line="18" column="7" lean-forward="false" selection-start-line="18" selection-start-column="7" selection-end-line="18" selection-end-column="7" />
<folding />
</state>
</provider>

View File

@ -2,3 +2,8 @@ $brand-primary: darken(#428bca, 20%);
// the ~ allows you to reference things in node_modules
@import '~bootstrap-sass/assets/stylesheets/bootstrap';
input {
width: auto;
min-width: 2em;
}

View File

@ -15,12 +15,22 @@
</h2>
{% for c in categories %}
<h3>{{ c.name }}</h3>
<div class="row-fluid">
{% for p in c.products %}
<button class="btn btn-default">
<div class="col-xs-6">
<button class="btn btn-default btn-block">
{{ p.name }}
<input type="number" value="{{ p.price }}">
€ x
<span class="badge badge-info">0</span>
</button>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
<div class="col-xs-6">