Commit 2416b949 authored by Julia Santos's avatar Julia Santos

All pages now follow the correct CSS, users can now also edit items and product types

parent 24496d71
body {
width: 100%;
height: 100%;
margin: 0px;
}
.addProductHeader {
background-color: rgba(40, 40, 40, 1);
width: 100vw;
color: white;
text-align: left;
}
.breadcrumbsHead {
font-family: "Roboto Bold";
font-size: 46px;
margin-left: 50px;
}
.lowerPage {
width: 100vw;
display: grid;
grid-template-columns: repeat(6, 16.67vw);
text-align: left;
background-color: white;
}
.sidebar {
height: 200vh;
background-color: rgba(196, 196, 196, 1);
display: grid;
grid-template-rows: repeat(16, 6.25vh);
grid-template-columns: repeat(2, 8.33vw);
grid-column: 1/2;
z-index:1;
left:0;
}
.sideItem {
display: grid;
background-color: rgba(104, 104, 104, 0.7);
transform: none;
}
.sideText {
font-family: "Roboto";
font-size: 24px;
color: white;
grid-column: 2/3;
margin-right: 5px;
text-align: right;
}
#fridgeIcon {
background-color: white;
clip-path: circle();
height: 15vh;
grid-row: 1/6;
grid-column: 1/2;
margin: 10px;
}
#statsIcon {
background-color: white;
clip-path: circle();
height: 15vh;
grid-row: 4/9;
grid-column: 1/2;
margin: 10px;
}
#toBuyIcon {
background-color: white;
clip-path: circle();
height: 15vh;
grid-row: 7/12;
grid-column: 1/2;
margin: 10px;
}
.fridge {
grid-row: 3/4;
grid-column: 1/3;
}
.stats {
grid-row: 6/7;
grid-column: 1/3;
}
.toBuy {
grid-row: 9/10;
grid-column: 1/3;
}
.pageSubhead {
grid-column: 2/7;
background-color: white;
display: grid;
grid-template-columns: 3vw repeat(6, 15.67vw) 3vw;
grid-template-rows: repeat(3, 6.25vh);
}
.subheader {
font-family: "Roboto Medium";
font-size: 10vh;
grid-column: 2/3;
text-align: center;
}
.addItem {
grid-column: 3/4;
grid-row: 2/3
}
.addItemButton {
margin-left: 20px;
margin-right: 20px;
background-color: rgba(175, 175, 175, 0.7);
border-radius: 100px;
transform: none;
}
.addItemText {
font-family: "Roboto Medium";
font-size: 18px;
color: white;
text-align: center;
}
.changeView {
grid-column: 5/6;
grid-row: 2/3;
}
.changeViewDropdown {
background-color: rgba(228, 228, 228, 0.7);
transform: none;
}
.changeViewText {
text-align: center;
font-family: "Roboto Medium";
font-size: 14px;
}
.month {
display: grid;
grid-column: 2/3;
margin-left: 1vw;
font-family: Roboto;
font-style: normal;
font-size: 24px;
align-items: center;
}
.addProduct {
display: grid;
grid-column: 2/3;
margin-top: 50px;
margin-left: 1vw;
align-items: center;
font-family: "Roboto Medium";
font-style: normal;
font-size: 24px;
}
@font-face {
font-family: Roboto Bold;
src: url(Roboto-Bold.ttf);
}
@font-face {
font-family: Roboto Black;
src: url(Roboto-Black.ttf);
}
@font-face {
font-family: Roboto Medium;
src: url(Roboto-Medium.ttf);
}
@font-face {
font-family: Roboto;
src: url(Roboto-Regular.ttf);
}
.sideItem:hover {
background-color: rgba(104, 104, 104, 1);
transition: background-color .5s;
}
.listItem:hover {
background-color: rgba(237, 237, 237, 1);
transition: background-color .5s;
}
.addItemButton:hover {
background-color: rgba(175, 175, 175, 1);
transition: background-color .5s;
}
.changeViewDropdown:hover {
background-color: rgba(240, 240, 240, 1);
transition: background-color .5s;
}
a {
color: rgba(0,0,0,0);
}
.main{
margin-left: 23%;
}
.black{
color:black;
}
\ No newline at end of file
body {
width: 100%;
height: 100%;
margin: 0px;
}
.editItemHeader {
background-color: rgba(40, 40, 40, 1);
width: 100vw;
color: white;
text-align: left;
}
.breadcrumbsHead {
font-family: "Roboto Bold";
font-size: 46px;
margin-left: 50px;
}
.lowerPage {
width: 100vw;
display: grid;
grid-template-columns: repeat(6, 16.67vw);
text-align: left;
background-color: white;
}
.sidebar {
height: 200vh;
background-color: rgba(196, 196, 196, 1);
display: grid;
grid-template-rows: repeat(16, 6.25vh);
grid-template-columns: repeat(2, 8.33vw);
grid-column: 1/2;
z-index:1;
left:0;
}
.sideItem {
display: grid;
background-color: rgba(104, 104, 104, 0.7);
transform: none;
}
.sideText {
font-family: "Roboto";
font-size: 24px;
color: white;
grid-column: 2/3;
margin-right: 5px;
text-align: right;
}
#fridgeIcon {
background-color: white;
clip-path: circle();
height: 15vh;
grid-row: 1/6;
grid-column: 1/2;
margin: 10px;
}
#statsIcon {
background-color: white;
clip-path: circle();
height: 15vh;
grid-row: 4/9;
grid-column: 1/2;
margin: 10px;
}
#toBuyIcon {
background-color: white;
clip-path: circle();
height: 15vh;
grid-row: 7/12;
grid-column: 1/2;
margin: 10px;
}
.fridge {
grid-row: 3/4;
grid-column: 1/3;
}
.stats {
grid-row: 6/7;
grid-column: 1/3;
}
.toBuy {
grid-row: 9/10;
grid-column: 1/3;
}
.pageSubhead {
grid-column: 2/7;
background-color: white;
display: grid;
grid-template-columns: 3vw repeat(6, 15.67vw) 3vw;
grid-template-rows: repeat(3, 6.25vh);
}
.subheader {
font-family: "Roboto Medium";
font-size: 10vh;
grid-column: 2/3;
text-align: center;
}
.addItem {
grid-column: 3/4;
grid-row: 2/3
}
.addItemButton {
margin-left: 20px;
margin-right: 20px;
background-color: rgba(175, 175, 175, 0.7);
border-radius: 100px;
transform: none;
}
.addItemText {
font-family: "Roboto Medium";
font-size: 18px;
color: white;
text-align: center;
}
.changeView {
grid-column: 5/6;
grid-row: 2/3;
}
.changeViewDropdown {
background-color: rgba(228, 228, 228, 0.7);
transform: none;
}
.changeViewText {
text-align: center;
font-family: "Roboto Medium";
font-size: 14px;
}
.month {
display: grid;
grid-column: 2/3;
margin-left: 1vw;
font-family: Roboto;
font-style: normal;
font-size: 24px;
align-items: center;
}
.editItem {
display: grid;
grid-column: 2/3;
margin-top: 50px;
margin-left: 1vw;
align-items: center;
font-family: "Roboto Medium";
font-style: normal;
font-size: 24px;
}
@font-face {
font-family: Roboto Bold;
src: url(Roboto-Bold.ttf);
}
@font-face {
font-family: Roboto Black;
src: url(Roboto-Black.ttf);
}
@font-face {
font-family: Roboto Medium;
src: url(Roboto-Medium.ttf);
}
@font-face {
font-family: Roboto;
src: url(Roboto-Regular.ttf);
}
.sideItem:hover {
background-color: rgba(104, 104, 104, 1);
transition: background-color .5s;
}
.listItem:hover {
background-color: rgba(237, 237, 237, 1);
transition: background-color .5s;
}
.addItemButton:hover {
background-color: rgba(175, 175, 175, 1);
transition: background-color .5s;
}
.changeViewDropdown:hover {
background-color: rgba(240, 240, 240, 1);
transition: background-color .5s;
}
a {
color: rgba(0,0,0,0);
}
.main{
margin-left: 23%;
}
.black{
color:black;
}
\ No newline at end of file
body {
width: 100%;
height: 100%;
margin: 0px;
}
.detailedViewHeader {
background-color: rgba(40, 40, 40, 1);
width: 100vw;
color: white;
text-align: left;
}
.breadcrumbsHead {
font-family: "Roboto Bold";
font-size: 46px;
margin-left: 50px;
}
.lowerPage {
width: 100vw;
display: grid;
grid-template-columns: repeat(6, 16.67vw);
text-align: left;
background-color: white;
}
.sidebar {
height: 200vh;
background-color: rgba(196, 196, 196, 1);
display: grid;
grid-template-rows: repeat(16, 6.25vh);
grid-template-columns: repeat(2, 8.33vw);
grid-column: 1/2;
z-index:1;
left:0;
}
.sideItem {
display: grid;
background-color: rgba(104, 104, 104, 0.7);
transform: none;
}
.sideText {
font-family: "Roboto";
font-size: 24px;
color: white;
grid-column: 2/3;
margin-right: 5px;
text-align: right;
}
#fridgeIcon {
background-color: white;
clip-path: circle();
height: 15vh;
grid-row: 1/6;
grid-column: 1/2;
margin: 10px;
}
#statsIcon {
background-color: white;
clip-path: circle();
height: 15vh;
grid-row: 4/9;
grid-column: 1/2;
margin: 10px;
}
#toBuyIcon {
background-color: white;
clip-path: circle();
height: 15vh;
grid-row: 7/12;
grid-column: 1/2;
margin: 10px;
}
.fridge {
grid-row: 3/4;
grid-column: 1/3;
}
.stats {
grid-row: 6/7;
grid-column: 1/3;
}
.toBuy {
grid-row: 9/10;
grid-column: 1/3;
}
.pageSubhead {
grid-column: 2/7;
background-color: white;
display: grid;
grid-template-columns: 3vw repeat(6, 15.67vw) 3vw;
grid-template-rows: repeat(3, 6.25vh);
}
.subheader {
font-family: "Roboto Medium";
font-size: 10vh;
grid-column: 2/3;
text-align: center;
}
.addItem {
grid-column: 3/4;
grid-row: 2/3
}
.addItemButton {
margin-left: 20px;
margin-right: 20px;
background-color: rgba(175, 175, 175, 0.7);
border-radius: 100px;
transform: none;
}
.addItemText {
font-family: "Roboto Medium";
font-size: 18px;
color: white;
text-align: center;
}
.changeView {
grid-column: 5/6;
grid-row: 2/3;
}
.changeViewDropdown {
background-color: rgba(228, 228, 228, 0.7);
transform: none;
}
.changeViewText {
text-align: center;
font-family: "Roboto Medium";
font-size: 14px;
}
.detailedView {
grid-column: 2/7;
background-color: rgba(196, 196, 196, 1);
display: grid;
grid-template-columns: repeat (6, 13.89vw);
grid-row-gap: 10px;
}
.productHeader {
grid-column: 1/8;
background-color: white;
font-family: "Roboto Medium";
font-size: 36px;
text-align: center;
}
.tableHeader {
grid-column: 1/7;
display: grid;
background-color: rgba(40, 40, 40, 1);
}
.header {
background-color: rgba(40, 40, 40, 1);
color: white;
text-align: center;
font-family: "Roboto Medium";
font-size: 20px;
}
.itemRow {
grid-column: 1/7;
display: grid;
background-color: rgba(104, 104, 104, 1);
}
.item {
background-color: rgba(104, 104, 104, 1);
color: white;
text-align: center;
font-family: "Roboto";
font-size: 20px;
}
.name {
grid-column: 1/2;
}
.description {
grid-column: 2/3;
}
.quantity {
grid-column: 3/4;
}
.expiration {
grid-column: 4/5;
}
.purchase {
grid-column: 5/6;
}
.status {
grid-column: 6/7;
}
.options {
grid-column: 7/8;
}
.white{
color:white;
}
@font-face {
font-family: Roboto Bold;
src: url(Roboto-Bold.ttf);
}
@font-face {
font-family: Roboto Black;
src: url(Roboto-Black.ttf);
}
@font-face {
font-family: Roboto Medium;
src: url(Roboto-Medium.ttf);
}
@font-face {
font-family: Roboto;
src: url(Roboto-Regular.ttf);
}
.sideItem:hover {
background-color: rgba(104, 104, 104, 1);
transition: background-color .5s;
}
.listItem:hover {
background-color: rgba(237, 237, 237, 1);
transition: background-color .5s;
}
.addItemButton:hover {
background-color: rgba(175, 175, 175, 1);
transition: background-color .5s;
}
.changeViewDropdown:hover {
background-color: rgba(240, 240, 240, 1);
transition: background-color .5s;
}
a {
color: rgba(0,0,0,0);
}
.main{
margin-left: 23%;
}
......@@ -4,7 +4,7 @@ from django.conf.urls.static import static
from django.views.generic import TemplateView
from django.urls import include, path
from Breadcrumbs import views
from .views import ProductListViewName, ProductListViewCategory, add_product_type, delete_product_type, ItemViewPDate, add_item, delete_item, ToBuyViewName, UnmarkToBuy, editProductType
from .views import ProductListViewName, ProductListViewCategory, add_product_type, delete_product_type, ItemViewPDate, add_item, delete_item, ToBuyViewName, UnmarkToBuy, editProductType,editItem
urlpatterns = [
url(r'^fridge/list/', ProductListViewName.as_view(), name='fridgeLN'),
......@@ -18,6 +18,7 @@ urlpatterns = [
url(r'^to-buy/', ToBuyViewName.as_view(), name = 'to-buyLN'),
path('fridge/<int:pk>/update', UnmarkToBuy.as_view(), name = 'to-buy-unmark'),
path('fridge/<int:pk>/edit', editProductType.as_view(), name = 'edit-product-type'),
path('fridge/<id>/<int:pk>/edit', editItem.as_view(), name = 'edit-item'),
]
if settings.DEBUG:
......
......@@ -105,7 +105,7 @@ def delete_product_type(request,id):
class ItemViewPDate(ListView):
model = Item
template_name = 'placeholder-items.html'
template_name = 'per-items.html'
context_object_name = 'item'
def get_queryset(self, **kwargs):
......@@ -170,5 +170,11 @@ class UnmarkToBuy(UpdateView):
class editProductType(UpdateView):
model = Product_Type
fields = ['Product_Name','Product_Category','Icon','To_Buy']
template_name = 'unmark.html'
template_name = 'edit-product-type.html'
success_url = 'http://127.0.0.1:8000/fridge/list'
class editItem(UpdateView):
model = Item
fields = ['Item_Quantity','Quantity_Unit', 'Item_Description','Purchase_Date','Expiration_Date', 'Is_Expired','Is_Consumed']
template_name = 'edit-item.html'
success_url = 'http://127.0.0.1:8000/fridge/list'
<html>
<head>
{% load static %}
<link rel="stylesheet" href="{%static "mainAddItem.css" %}">
<link rel="stylesheet" href="{%static "mainAddProduct.css" %}">
</head>
<body>
<div class = "listViewHeader">
<div class = "addProductHeader">
<div class = "breadcrumbsHead">
BREADCRUMBS
</div>
......@@ -17,9 +17,10 @@
<div class = " sideText"> FRIDGE </div>
</a>
</div>
<img id= "fridgeIcon" src= "{%static "fridge.png" %}" alt= "a flat icon of a refrigerator">
<img id= "fridgeIcon" src= "{%static "fridge.png" %}"" alt= "a flat icon of a refrigerator";>
<div class = "sideItem stats">
<a href = "">
<a href = "indexStatistics.html">
<div class = "sideText"> STATS </div>
</a>
</div>
......@@ -33,40 +34,39 @@
<img id= "toBuyIcon" src= "{%static "add-to-cart.png" %}" alt= "a flat icon of a shopping cart";>
</div>
<!-- sidebar end-->
<!-- sidebar end-->
<!-- subhead start-->
<div class = "pageSubhead">
<div class = "subheader"> Fridge </div>
<div class = "addItem">
<a href = "indexaddItem.html">
<div class = "addItemButton">
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/" class = "addItemText"> ADD ITEM +</a> </div>
</div>
</div>
<div class = "changeView">
<div class = "changeViewDropdown">
<div class = "changeViewText"> LIST VIEW </div>
</div>
<div class = "addItemText"> <a href="{{ request.path }}add" class = "addItemText"> ADD ITEM +</a> </div>
</div>
</a>
</div>
<!-- subhead end-->
<div class ="addProduct">
<form method="POST" enctype="multipart/form-data" div class="addItemForm">
{% csrf_token %}
{{ form.non_field_errors }}
Item Quantity:<div class="box firstName"> {{form.Item_Quantity}}</div>
Quantity Unity:<div class="box lastName">
Item Quantity:<div class="box itemQuantity"> {{form.Item_Quantity}}</div>
Quantity Unit:<div class="box quantityUnit">
{{form.Quantity_Unit}}</div>
Item Description:<div class="box email">
Item Description:<div class="box itemDescription">
{{form.Item_Description}} </div>
Purchase Date:<div class="box password">
Purchase Date:<div class="box purchaseDate">
{{form.Purchase_Date}} </div>
Expiration Date:<div class="box passwordConfirm">
Expiration Date:<div class="box expDate">
{{form.Expiration_Date}}</div>
<div class="deleteItemBox">
{{form.Is_Consumed}} Is this Item Consumed?
</div>
<input type="submit" value = "SUBMIT"></input>
<a href="http://127.0.0.1:8000/fridge/list"><div class = "back">Back</div></a>
</form>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
{% load static %}
<link rel="stylesheet" href="{%static "sidebar.css" %}">
<link rel="stylesheet" href="{%static "mainAddProduct.css" %}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Add Product Type</title>
</head>
<body>
<div class = "listViewHeader">
<div class = "addProductHeader">
<div class = "breadcrumbsHead">
BREADCRUMBS
</div>
......@@ -21,9 +21,10 @@
<div class = " sideText"> FRIDGE </div>
</a>
</div>
<img id= "fridgeIcon" src= "{%static "fridge.png" %}" alt= "a flat icon of a refrigerator">
<img id= "fridgeIcon" src= "{%static "fridge.png" %}"" alt= "a flat icon of a refrigerator";>
<div class = "sideItem stats">
<a href = "">
<a href = "indexStatistics.html">
<div class = "sideText"> STATS </div>
</a>
</div>
......@@ -40,24 +41,30 @@
<!-- subhead start-->
<div class = "pageSubhead">
<div class = "subheader"> Fridge </div>
<div class = "addItem">
<div class = "addItemButton">
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/" class = "addItemText"> ADD ITEM +</a> </div>
</div>
</div>
<div class = "changeView">
<div class = "changeViewDropdown">
<div class = "changeViewText"> LIST VIEW </div>
</div>
</div>
</div>
<!-- subhead end-->
<div class = "addProdType">Add Product Type</div>
Product name:
{{ form.Product_Name }}
<form method="POST" enctype="multipart/form-data" div class="main">
<form method="POST" enctype="multipart/form-data" class = "addProduct">
{% csrf_token %}
{{ form.non_field_errors }}
{{form.Icon.errors}}
Product Name:<div class="box productName"> {{ form.Product_Name }} </div>
Product Category:<div class="box productCategory">{{form.Product_Category}}</div>
Product Description:<div class="box productDecription">{{form.Product_Description}}</div>
<div class="toBuyBox">
{{form.To_Buy}}
To Buy?
</label>
<br>
<div> Icon:
{{form.Icon}}
</div>
</br>
<input type="submit" value="Submit">
<a href="http://127.0.0.1:8000/fridge/list/"><div class = "
black">Back</div></a>
</form>
</div>
</body>
</html>
\ No newline at end of file
<html>
<head>
{% load static %}
<link rel="stylesheet" href="{%static "mainEditItem.css" %}">
</head>
<body>
<div class = "editItemHeader">
<div class = "breadcrumbsHead">
BREADCRUMBS
</div>
</div>
<div class = "lowerPage">
<div class = "sidebar">
<div class = "sideItem fridge">
<a href="http://127.0.0.1:8000/fridge/list/">
<div class = " sideText"> FRIDGE </div>
</a>
</div>
<img id= "fridgeIcon" src= "{%static "fridge.png" %}"" alt= "a flat icon of a refrigerator";>
<div class = "sideItem stats">
<a href = "indexStatistics.html">
<div class = "sideText"> STATS </div>
</a>
</div>
<img id= "statsIcon" src= "{%static "stats.png" %}" alt= "a flat icon of a graph";>
<div class = "sideItem toBuy">
<a href = "http://127.0.0.1:8000/to-buy/">
<div class = "sideText"> TO BUY </div>
</a>
</div>
<img id= "toBuyIcon" src= "{%static "add-to-cart.png" %}" alt= "a flat icon of a shopping cart";>
</div>
<div class = "pageSubhead">
<div class = "subheader"> Fridge </div>
<form method="POST" enctype="multipart/form-data" class = "editItem">
{% csrf_token %}
Quantity: {{form.Item_Quantity}}
Unit: {{form.Quantity_Unit}}
Description: {{form.Item_Description}}
Purchase date: {{form.Purchase_Date}}
Expiration date: {{form.Expiration_Date}}
<div class="deleteItemBox">
{{form.Is_Expired}}
Expired?
</div>
<div class="deleteItemBox">
{{form.Is_Consumed}}
Consumed?
</div>
<input type="submit" value="Submit">
<a href="http://127.0.0.1:8000/fridge/list/"><div class = "
black">Back</div></a>
</form>
</div>
</div>
</body>
</html>
\ No newline at end of file
<html>
<head>
{% load static %}
<link rel="stylesheet" href="{%static "mainEditItem.css" %}">
</head>
<body>
<div class = "editItemHeader">
<div class = "breadcrumbsHead">
BREADCRUMBS
</div>
</div>
<div class = "lowerPage">
<div class = "sidebar">
<div class = "sideItem fridge">
<a href="http://127.0.0.1:8000/fridge/list/">
<div class = " sideText"> FRIDGE </div>
</a>
</div>
<img id= "fridgeIcon" src= "{%static "fridge.png" %}"" alt= "a flat icon of a refrigerator";>
<div class = "sideItem stats">
<a href = "indexStatistics.html">
<div class = "sideText"> STATS </div>
</a>
</div>
<img id= "statsIcon" src= "{%static "stats.png" %}" alt= "a flat icon of a graph";>
<div class = "sideItem toBuy">
<a href = "http://127.0.0.1:8000/to-buy/">
<div class = "sideText"> TO BUY </div>
</a>
</div>
<img id= "toBuyIcon" src= "{%static "add-to-cart.png" %}" alt= "a flat icon of a shopping cart";>
</div>
<div class = "pageSubhead">
<div class = "subheader"> Fridge </div>
<form method="POST" enctype="multipart/form-data" class = "editItem">
{% csrf_token %}
{{ form.non_field_errors }}
{{form.Icon.errors}}
Product Name: {{form.Product_Name}}
Category: {{form.Product_Category}}
Description: {{form.Product_Description}}
<div class="deleteItemBox">
{{form.To_Buy}}
To Buy?
</div>
<div class="deleteItemBox black">
Icon: {{form.Icon}}<br>
</div>
<input type="submit" value="Submit">
<a href="http://127.0.0.1:8000/fridge/list/"><div class = "
black">Back</div></a>
</form>
</div>
</div>
</body>
</html>
\ No newline at end of file
......@@ -42,13 +42,15 @@
<div class = "subheader"> Fridge </div>
<div class = "addItem">
<div class = "addItemButton">
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/" class = "addItemText"> ADD ITEM +</a> </div>
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/" class = "addItemText"> ADD +</a> </div>
</div>
</div>
<div class = "changeView">
<div class = "changeViewDropdown">
<div class = "changeViewText"> LIST VIEW </div>
</div>
<select name="changeViewDropdown">
<option value="listView">List View</option>
<option value="detailedView">Calendar View</option>
</select>
</div>
</div>
<!-- subhead end-->
......
<html>
<title>Fridge</title>
{% load static %}
<link rel="stylesheet" href="{%static "mainFridgeDetailed.css" %}">
{% block content %}
<body>
<div class = "detailedViewHeader">
<div class = "breadcrumbsHead">
BREADCRUMBS
</div>
</div>
<div class = "lowerPage">
<!-- sidebar start-->
<div class = "sidebar">
<div class = "sideItem fridge">
<a href="http://127.0.0.1:8000/fridge/list/">
<div class = " sideText"> FRIDGE </div>
</a>
</div>
<img id= "fridgeIcon" src= "{%static "fridge.png" %}"" alt= "a flat icon of a refrigerator";>
<div class = "sideItem stats">
<a href = "indexStatistics.html">
<div class = "sideText"> STATS </div>
</a>
</div>
<img id= "statsIcon" src= "{%static "stats.png" %}" alt= "a flat icon of a graph";>
<div class = "sideItem toBuy">
<a href = "http://127.0.0.1:8000/to-buy/">
<div class = "sideText"> TO BUY </div>
</a>
</div>
<img id= "toBuyIcon" src= "{%static "add-to-cart.png" %}" alt= "a flat icon of a shopping cart";>
</div>
<!-- sidebar end-->
<!-- subhead start-->
<div class = "pageSubhead">
<div class = "subheader"> Fridge </div>
<div class = "addItem">
<a href = "indexaddItem.html">
<div class = "addItemButton">
<div class = "addItemText"> <a href="{{ request.path }}add" class = "addItemText"> ADD ITEM +</a> </div>
</div>
</a>
</div>
<!-- subhead end-->
<div class = "detailedView">
<div class = "productHeader"> PRODUCT </div>
<div class = "header name"> Name </div>
<div class = "header description"> Description </div>
<div class = "header quantity"> Quantity </div>
<div class = "header expiration"> Expiration Date </div>
<div class = "header purchase"> Purchase Date </div>
<div class = "header status"> Expired? </div>
<div class = "header"> </div>
{%for item in object_list%}
<div class = "item name"> {{item.Product_ID.Product_Name}} </div>
<div class = "item description"> {{item.Item_Description}}</div>
<div class = "item quantity"> {{item.Item_Quantity}} {{item.Quantity_Unit}} </div>
<div class = "item expiration"> {{item.Expiration_Date}} </div>
<div class = "item purchase"> {{item.Purchase_Date}} </div>
<div class = "item status"> {{item.Is_Expired}} </div>
<div class = "item options"> <a href = "http://127.0.0.1:8000/fridge/{{item.Product_ID}}/{{item.Item_ID}}/edit"><div class = "white">Edit</div></a>
<a href = "http://127.0.0.1:8000/fridge/{{item.Product_ID}}/{{item.Item_ID}}/delete"><div class = "white">Remove</div></a> </div>
{%endfor%}
</div>
</div>
</div>
</body>
{% endblock %}
</html>
<html>
<title>Fridge</title>
{% load static %}
<link rel="stylesheet" href="{%static "sidebar.css" %}">
{% block content %}
<style>
table, th, td {
border: 1px solid black;
}
</style>
<div class = "listViewHeader">
<div class = "breadcrumbsHead">
BREADCRUMBS
</div>
</div>
<div class = "lowerPage">
<div class = "sidebar">
<div class = "sideItem text fridge">
FRIDGE
</div>
<div class = "sideItem icon fridge">
<div class = "circle"> :3 </div>
</div>
<div class = "sideItem text recipes">
RECIPES
</div>
<div class = "sideItem icon recipes">
<div class = "circle"> :3 </div>
</div>
<div class = "sideItem text stats">
STATS
</div>
<div class = "sideItem icon stats">
<div class = "circle"> :3 </div>
</div>
<div class = "sideItem text toBuy">
TO BUY
</div>
<div class = "sideItem icon toBuy">
<div class = "circle"> :3 </div>
</div>
</div>
</div>
<h2>Fridge</h2>
<table style="width:70%" div class="main">
<tr><th colspan="5"><a href="{{request.path}}add"> Add</a></th></tr>
<tr>
<th><a href="http://127.0.0.1:8000/fridge/{{object_list.Product_ID}}">Name</a></th>
<th><a href="http://127.0.0.1:8000/fridge/{{object_list.Product_ID}}">Description</a></th>
<th>Quantity</th>
<th>Expiration Date</th>
<th>Purchase Date</th>
<th>Status</th>
</tr>
{% for item in object_list %}
<tr>
<th>
{{item.Product_ID.Product_Name}}
</th>
<th>
{{item.Item_Description}}
</th>
<th>
{{item.Item_Quantity}} {{item.Quantity_Unit}}
</th>
<th>
{{item.Expiration_Date}}
</th>
<th>
{{item.Purchase_Date}}
</th>
<th>
{{item.Is_Expired}}
</th>
<th>
<a href='http://127.0.0.1:8000/fridge/{{item.Product_ID}}/{{item.Item_ID}}/delete'>Delete?</a>
</th>
</tr>
{% endfor %}
</table>
{% endblock %}
</html>
......@@ -36,16 +36,7 @@
<!-- subhead start-->
<div class = "pageSubhead">
<div class = "subheader"> Fridge </div>
<div class = "addItem">
<div class = "addItemButton">
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/" class = "addItemText"> ADD ITEM +</a> </div>
</div>
</div>
<div class = "changeView">
<div class = "changeViewDropdown">
<div class = "changeViewText"> LIST VIEW </div>
</div>
</div>
</div>
<!-- subhead end-->
......@@ -55,10 +46,13 @@
<div class = "listText">
<br/>
<form method="post">{% csrf_token %}
Are you sure you want to delete this item? <br/> <br/>
<div class ="product">Are you sure you want to delete this item?</div> <br/> <br/>
<input type="submit" value = "Confirm"></form></div>
</div>
</div>
</div>
{% endblock %}
</body>
......
......@@ -56,7 +56,7 @@
<a href= "http://127.0.0.1:8000/accounts/login">
<div class = "alreadyHaveAccountText">I already have an account</div>
</a>
<input type="submit" name="SignUp" class = "submitButton">
<input type="submit" name="SignUp" class = "submitButton" value = "Create Account">
</div>
</form>
......
......@@ -42,10 +42,17 @@
<div class = "subheader"> To Buy </div>
</div>
<!-- subhead end-->
<h3>Remove from To-Buy?</h3>
<form method="POST" div class="main">
{% csrf_token %}
{{ form.as_p }}
<div class = "listView">
<div class = "listItem one">
<div class = "listText">
<br/>
<form method="post">{% csrf_token %}
<div class ="product">To Buy status:
{{ form.To_Buy }}</div> <br/> <br/>
<input type="submit" value = "Confirm"></form></div>
</div>
</div>
</div>
<input type="submit" value="Update">
</form>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment