diff options
author | shivam kohli <kohlishivam5522@gmail.com> | 2018-07-23 04:29:14 +0530 |
---|---|---|
committer | shivam kohli <kohlishivam5522@gmail.com> | 2018-07-23 04:29:14 +0530 |
commit | c60f075634178d2212364c842552c256f22dae92 (patch) | |
tree | 3bd06f4bf0b6fe497902229fb9acf480e6520c9a /templates/inventory | |
parent | 94be0d7216ec3c5f253b895681b11e7b0678211a (diff) | |
download | codeless-c60f075634178d2212364c842552c256f22dae92.tar.gz codeless-c60f075634178d2212364c842552c256f22dae92.tar.bz2 codeless-c60f075634178d2212364c842552c256f22dae92.zip |
testcase added and improved user interface
Diffstat (limited to 'templates/inventory')
-rw-r--r-- | templates/inventory/digital_inventory.html | 52 | ||||
-rw-r--r-- | templates/inventory/fulfillment.html | 2 | ||||
-rw-r--r-- | templates/inventory/home.html | 9 | ||||
-rw-r--r-- | templates/inventory/login.html | 51 | ||||
-rw-r--r-- | templates/inventory/order.html | 1 | ||||
-rw-r--r-- | templates/inventory/product.html | 145 | ||||
-rw-r--r-- | templates/inventory/signup.html | 7 |
7 files changed, 259 insertions, 8 deletions
diff --git a/templates/inventory/digital_inventory.html b/templates/inventory/digital_inventory.html index da015a0..9eb462d 100644 --- a/templates/inventory/digital_inventory.html +++ b/templates/inventory/digital_inventory.html @@ -129,6 +129,45 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. #contact .container form .required { color:#b43838;} </style> + <style> + .tooltip { + position: relative; + display: inline-block; + } + + .tooltip .tooltiptext { + visibility: hidden; + width: 300px; + background-color: #555; + color: #fff; + text-align: center; + border-radius: 6px; + padding: 5px 0; + position: absolute; + z-index: 1; + bottom: 125%; + left: 50%; + margin-left: -60px; + opacity: 0; + transition: opacity 0.3s; + } + + .tooltip .tooltiptext::after { + content: ""; + position: absolute; + top: 100%; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: #555 transparent transparent transparent; + } + + .tooltip:hover .tooltiptext { + visibility: visible; + opacity: 1; + } + </style> </head> <body> @@ -149,7 +188,18 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. <form method="post" enctype="multipart/form-data"> <h1>FOR DIGITAL INVENTORY</h1> {% csrf_token %} - {{ form.as_p }} + <!-- {{ form.as_p }} --> + + {% for field in form %} + {% if field.label == 'Price'%} + <label class="tooltip">{{ field.label }}<font size="1"><span class="tooltiptext">Enter the price of the product. Remeber to write price in English texts. For Example 100 or 99.95</span></font></label> + {{ field }} + {% else %} + <label class="mylabel">{{ field.label }}</label> + {{ field }} + {% endif %} + {% endfor %} + <button name="add_product" type="submit" class="submit">Add Product</button> </form> </div> diff --git a/templates/inventory/fulfillment.html b/templates/inventory/fulfillment.html index 14d9e46..a108d58 100644 --- a/templates/inventory/fulfillment.html +++ b/templates/inventory/fulfillment.html @@ -113,6 +113,8 @@ Thank you for purchasing {{ name }} of price {{ price }}. The Product was succ <li class="progtrckr-todo">Delivered</li> {% endif %} + <a href="{{ website }}">Back to homepage</a> + </ol> </body> </html>
\ No newline at end of file diff --git a/templates/inventory/home.html b/templates/inventory/home.html index 14bcd47..a64be0d 100644 --- a/templates/inventory/home.html +++ b/templates/inventory/home.html @@ -155,8 +155,13 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. <div class="card"> <div class="card__content"> <div class="card__title"><a href="{{ item.url }}">{{ item.name }}</a></div> + {% if item.digital == 'True' %} + <p class="card__text">Digital Inventory</p> + {% endif %} <p class="card__text">{{ item.description }}</p><br> - <p class="card__text"><b>Inventory on hand: </b>{{ item.inventory_on_hand }}</p> + {% if item.digital == 'False' %} + <p class="card__text"><b>Inventory on hand: </b>{{ item.inventory_on_hand }}</p> + {% endif %} <!-- <button class="btn btnblock card__btn">Button</button> --> </div> </div> @@ -165,7 +170,7 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. </ul> - <center><a href="/new_product">ADD PRODUCT</a></center></br> + <center><a id='add_new_product' href="/new_product">ADD PRODUCT</a></center></br> <center><a href="/digital_inventory">ADD DIGITAL INVENTORY</a></center> </div> diff --git a/templates/inventory/login.html b/templates/inventory/login.html index ac447ea..e7e6120 100644 --- a/templates/inventory/login.html +++ b/templates/inventory/login.html @@ -138,6 +138,8 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. </div> <div class="main"> + + <center> <h1>LOGIN</h1> </center> @@ -147,11 +149,58 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. <form method="post" enctype="multipart/form-data"> {% csrf_token %} {{ form.as_p }} + {{ details_form.as_p }} + <center><p style="color:red; font-size:70%;">{{error_message}}</p></center> + <div> <button name="add_product" type="submit" class="submit">LOGIN</button> </form> </div> </section> -</div> + +<!-- <div> + <div> + <div> + <p>Login</p> + </div> + + <form method="post"> + {% csrf_token %} + + <fieldset> + {% for field in form %} + <div> + <p> + {{ field.label_tag }}<br> + {{ field }} + {% if field.help_text %} + <small style="color: grey">{{ field.help_text }}</small> + {% endif %} + </div> + + {% endfor %} + + </fieldset> + <fieldset> + {{error_message}} + <button type="submit">Log in</button> + <div> + <div> + <span>New User?</span> + <a href="/signup">Create Account</a> + </div> + <div> + <span>Forget Password?</span> + <a href="/password_reset">RESET</a> + </div> + + </fieldset> + </form> + + </div> + --> + + + </div> </body> </html>
\ No newline at end of file diff --git a/templates/inventory/order.html b/templates/inventory/order.html index 97ae43f..7cf6daf 100644 --- a/templates/inventory/order.html +++ b/templates/inventory/order.html @@ -154,6 +154,7 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. <div class="card__content"> <div class="card__title">{{ item.order_id }}</div> <p class="card__text">{{ item.summary }}</p><br> + <p class="card__text">Current order status:{{ item.status }}</p><br> <p class="card__text">PRODUCT IN THE ORDER</p><br> <ol> {% for i in item.array_product %} diff --git a/templates/inventory/product.html b/templates/inventory/product.html index 2081adb..4ac9a20 100644 --- a/templates/inventory/product.html +++ b/templates/inventory/product.html @@ -73,6 +73,120 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. .sidenav a {font-size: 18px;} } </style> + <style type="text/css"> + .table-fill { + background: white; + border-radius:3px; + border-collapse: collapse; + height: 320px; + margin: auto; + max-width: 600px; + padding:5px; + width: 100%; + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); + animation: float 5s infinite; + } + + th { + color:#D5DDE5;; + background:#1b1e24; + border-bottom:4px solid #9ea7af; + border-right: 1px solid #343a45; + font-size:23px; + font-weight: 100; + padding:24px; + text-align:left; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + vertical-align:middle; + } + + th:first-child { + border-top-left-radius:3px; + } + + th:last-child { + border-top-right-radius:3px; + border-right:none; + } + + tr { + border-top: 1px solid #C1C3D1; + border-bottom-: 1px solid #C1C3D1; + color:#45485a; + font-size:16px; + font-weight:normal; + text-shadow: 0 1px 1px rgba(256, 256, 256, 0.1); + } + + tr:hover td { + background:#4E5066; + color:#FFFFFF; + border-top: 1px solid #22262e; + } + + tr:first-child { + border-top:none; + } + + tr:last-child { + border-bottom:none; + } + + tr:nth-child(odd) td { + background:#EBEBEB; + } + + tr:nth-child(odd):hover td { + background:#4E5066; + } + + tr:last-child td:first-child { + border-bottom-left-radius:3px; + } + + tr:last-child td:last-child { + border-bottom-right-radius:3px; + } + + td { + background:#FFFFFF; + padding:20px; + text-align:left; + vertical-align:middle; + font-weight:300; + font-size:18px; + text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1); + border-right: 1px solid #C1C3D1; + } + + td:last-child { + border-right: 0px; + } + + th.text-left { + text-align: left; + } + + th.text-center { + text-align: center; + } + + th.text-right { + text-align: right; + } + + td.text-left { + text-align: left; + } + + td.text-center { + text-align: center; + } + + td.text-right { + text-align: right; + } + </style> </head> <body> @@ -85,6 +199,9 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. <div class="main"> <center> <h1 style="text-transform: uppercase;" id="name">{{ name }}</h1> + {% if digital == 'True' %} + <h5 color="black">Digital Inventory</h5> + {% endif %} </center> <h5 color="black">The code for the pay now button is:</h5> @@ -97,16 +214,36 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. <a href="{{ href }}" style="text-decoration: none;" onmouseover="this.style.textDecoration = 'underline'" onmouseout="this.style.textDecoration = 'none'">buy now</a> - <h5 color="black">Description:</h5><h6>{{ description }}</h6><br> - <h5 color="black">Price:</h5><h6>{{ price }}</h6><br> - <h5 color="black">The Cuurent Inventory on Hand is:- {{ inventory_on_hand }}</h5> + <table class="table-fill"> + <tbody class="table-hover"> + <tr> + <td class="text-left">Description</td> + <td class="text-left">{{ description }}</td> + </tr> + {% if digital == 'False' %} + <tr> + <td class="text-left">The Cuurent Inventory on Hand</td> + <td class="text-left">{{ inventory_on_hand }}</td> + </tr> + {% endif %} + <tr> + <td class="text-left">Price</td> + <td class="text-left">{{ price }}</td> + </tr> + <tr> + <td class="text-left">Total number of prducts sold</td> + <td class="text-left">{{ count }}</td> + </tr> + </tbody> + </table> + + <form name="update_stock" action="{{ url_update_inventory }}" method="post" enctype="multipart/form-data"> {% csrf_token %} <input type="number" name="stock_updated" id="stock_updated" placeholder="Update Stock" required> <button name="update_stock" type="submit" class="submit">Update</button> </form> - </div> </body> diff --git a/templates/inventory/signup.html b/templates/inventory/signup.html index 25f2811..098336f 100644 --- a/templates/inventory/signup.html +++ b/templates/inventory/signup.html @@ -128,6 +128,13 @@ with the Taler Codeless Merchant. If not, see <https://www.gnu.org/licenses/>. #contact .container form .required { color:#b43838;} + + ul { + color:red; + font-size:20px; + list-style-type: none; + margin: 0; + padding: 0;} </style> </head> <body> |