Commit 821c1f2d authored by Julia Santos's avatar Julia Santos

Users can now remove items from the To Buy list, various html pages have also been updated

parent 00c6ebe6
body {
width: 100%;
height: 100%;
margin: 0px;
}
.listViewHeader {
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);
grid-template-rows: 12.5vh 87.5vh;
text-align: left;
background-color: rgba(196, 196, 196, 1);
}
.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;
grid-row: 1/2;
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;
}
.addItem {
display: grid;
grid-column: 2/3;
margin-left: 1vw;
align-items: center;
font-family: Roboto;
font-style: normal;
font-size: 24px;
}
a {
color: rgba(0,0,0,0);
}
\ No newline at end of file
body {
width: 100%;
height: 100%;
margin: 0px;
width: 100%;
height: 100%;
margin: 0px;
}
.listViewHeader {
background-color: rgba(40, 40, 40, 1);
width: 100vw;
color: white;
text-align: left;
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;
font-family: "Roboto Bold";
font-size: 46px;
margin-left: 50px;
}
.lowerPage {
width: 100vw;
display: grid;
grid-template-columns: repeat(6, 16.67vw);
grid-template-rows: 12.5vh 87.5vh;
text-align: left;
background-color: rgba(196, 196, 196, 1);
}
width: 100vw;
display: grid;
grid-template-columns: repeat(6, 16.67vw);
grid-template-rows: 12.5vh 87.5vh;
text-align: left;
background-color: rgba(196, 196, 196, 1);
}
.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;
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;
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;
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;
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;
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;
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;
grid-row: 3/4;
grid-column: 1/3;
}
.stats {
grid-row: 6/7;
grid-column: 1/3;
grid-row: 6/7;
grid-column: 1/3;
}
.toBuy {
grid-row: 9/10;
grid-column: 1/3;
grid-row: 9/10;
grid-column: 1/3;
}
.pageSubhead {
grid-column: 2/7;
grid-row: 1/2;
background-color: white;
display: grid;
grid-template-columns: 3vw repeat(6, 15.67vw) 3vw;
grid-template-rows: repeat(3, 6.25vh);
grid-column: 2/7;
grid-row: 1/2;
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;
font-family: "Roboto Medium";
font-size: 10vh;
grid-column: 2/3;
text-align: center;
}
.addItem {
grid-column: 3/4;
grid-row: 2/3
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;
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;
font-family: "Roboto Medium";
font-size: 18px;
color: white;
text-align: center;
}
.changeView {
grid-column: 5/6;
grid-row: 2/3;
grid-column: 5/6;
grid-row: 2/3;
}
.changeViewDropdown {
background-color: rgba(228, 228, 228, 0.7);
transform: none;
background-color: rgba(228, 228, 228, 0.7);
transform: none;
}
.changeViewText {
text-align: center;
font-family: "Roboto Medium";
font-size: 14px;
text-align: center;
font-family: "Roboto Medium";
font-size: 14px;
}
.month {
......@@ -155,7 +143,7 @@ body {
font-size: 24px;
align-items: center;
}
.addItem {
.addItemForm {
display: grid;
grid-column: 2/3;
margin-left: 1vw;
......@@ -163,4 +151,28 @@ body {
font-family: Roboto;
font-style: normal;
font-size: 24px;
}
\ No newline at end of file
}
.back{
color:black;
font-family: "Roboto Bold";
}
a {
color: rgba(0,0,0,0);
}
@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);
}
......@@ -142,13 +142,13 @@ body {
height: 150px*/
background-color: rgba(196, 196, 196, 1);
margin: 5px;
margin-left:130px;
margin-left:120px;
}
.listText {
grid-column: 2/3;
text-align: left;
margin: 10px;
margin-left: 100px;
margin-left: 130px;
}
.product {
font-family: "Roboto Black";
......@@ -161,20 +161,37 @@ body {
.listRemove {
grid-column: 3/4;
grid-row: 2/4;
grid-row: 2/3;
background-color: rgba(175, 175, 175);
font-size: 15px;
text-align: center;
font-family: "Roboto Medium";
margin: 5px;
}
.removeText {
font-size: 20px;
text-align: center;
margin: 15px;
font-family: "Roboto Medium";
color:black;
}
.one {
grid-column: 2/5;
grid-row: 1/2;
}
.listAdd {
grid-column: 3/4;
grid-row: 3/4;
background-color: rgba(175, 175, 175);
font-size: 15px;
text-align: center;
margin: 15px;
font-family: "Roboto Medium";
margin: 5px;
}
.black{
color:black;
}
@font-face {
font-family: Roboto Bold;
......
......@@ -16,6 +16,7 @@ body {
margin-left: 50px;
}
.lowerPage {
width: 100vw;
display: grid;
......@@ -159,17 +160,18 @@ body {
height: 150px*/
background-color: rgba(196, 196, 196, 1);
margin: 5px;
margin-left:130px;
margin-left:120px;
}
.listText {
grid-column: 2/3;
text-align: left;
margin: 10px;
margin-left:100px;
margin-left:130px;
}
.daysLeft {
font-family: "Roboto Black";
font-size: 24px;
color:black;
}
.product {
font-family: "Roboto";
......@@ -196,6 +198,37 @@ body {
grid-row: 1/2;
}
.addProdType {
grid-column: 2/4;
margin-top:20px;
margin-left: 4vw;
align-items: center;
font-family: Roboto;
font-style: normal;
font-size: 24px;
}
.addProdfield {
font-family: Roboto;
font-style: normal;
font-size: 20px;
}
.listEdit {
grid-column: 3/4;
grid-row: 3/4;
background-color: rgba(175, 175, 175);
font-size: 15px;
text-align: center;
margin: 15px;
font-family: "Roboto Medium";
margin: 5px;
}
.black{
color:black;
}
a {
color: rgba(0,0,0,0);
}
......@@ -239,3 +272,15 @@ a {
.main{
margin-left: 23%;
}
.listRemove {
grid-column: 3/4;
grid-row: 2/4;
background-color: rgba(175, 175, 175);
}
.removeText {
font-size: 20px;
text-align: center;
margin: 15px;
font-family: "Roboto Medium";
color:black;
}
\ No newline at end of file
......@@ -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
from .views import ProductListViewName, ProductListViewCategory, add_product_type, delete_product_type, ItemViewPDate, add_item, delete_item, ToBuyViewName, UnmarkToBuy
urlpatterns = [
url(r'^fridge/list/', ProductListViewName.as_view(), name='fridgeLN'),
......@@ -15,7 +15,8 @@ urlpatterns = [
url(r'^fridge/(?P<Product_ID>\d+)/$', ItemViewPDate.as_view(), name='item-purchase-date-view'),
path('fridge/<id>/add', add_item, name = 'add-item'),
path('fridge/<id>/<id2>/delete', delete_item, name = 'delete-item'),
url(r'^to-buy/', ToBuyViewName.as_view(), name = 'to-buyLN')
url(r'^to-buy/', ToBuyViewName.as_view(), name = 'to-buyLN'),
path('fridge/<int:pk>/update', UnmarkToBuy.as_view(), name = 'to-buy-unmark'),
]
if settings.DEBUG:
......
from django.views.generic import ListView
from django.views.generic import ListView, UpdateView
from django.db.models import Q
from .forms import LoginForm, ProductTypeForm, AddItemForm
from django.http import HttpResponseRedirect
......@@ -27,7 +27,7 @@ def login(request):
class ProductListViewName(ListView):
model = Product_Type
template_name = 'placeholder-list.html'
template_name = 'fridge-list.html'
context_object_name = 'product'
def get_queryset(self):
......@@ -35,7 +35,7 @@ class ProductListViewName(ListView):
class ProductListViewCategory(ListView):
model = Product_Type
template_name = 'placeholder-list.html'
template_name = 'fridge-list.html'
context_object_name = 'product'
def get_queryset(self):
......@@ -159,4 +159,10 @@ def delete_item(request,id,id2):
item.delete()
return HttpResponseRedirect("/fridge/" + str(prod_type))
return render(request, 'product-type-confirm-delete.html', context)
\ No newline at end of file
return render(request, 'product-type-confirm-delete.html', context)
class UnmarkToBuy(UpdateView):
model = Product_Type
fields = ['To_Buy']
template_name = 'unmark.html'
success_url = 'http://127.0.0.1:8000/to-buy/'
\ No newline at end of file
......@@ -10,28 +10,35 @@
</div>
</div>
<div class = "lowerPage">
<!-- sidebar start-->
<div class = "sidebar">
<div class = "sideItem fridge">
<div class = " sideText"><a href="http://127.0.0.1:8000/fridge/list/"> FRIDGE</a> </div>
<a href="http://127.0.0.1:8000/fridge/list/">
<div class = " sideText"> FRIDGE </div>
</a>
</div>
<img id= "fridgeIcon" src= "" 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">
<div class = "sideText"> STATS </div>
<a href = "">
<div class = "sideText"> STATS </div>
</a>
</div>
<img id= "statsIcon" src= "" alt= "a flat icon of a graph";>
<img id= "statsIcon" src= "{%static "stats.png" %}" alt= "a flat icon of a graph";>
<div class = "sideItem toBuy">
<div class = "sideText"> <a href = "http://127.0.0.1:8000/to-buy/">TO BUY</a> </div>
<a href = "http://127.0.0.1:8000/to-buy/">
<div class = "sideText"> TO BUY </div>
</a>
</div>
<img id= "toBuyIcon" src= "" alt= "a flat icon of a shopping cart";>
<img id= "toBuyIcon" src= "{%static "add-to-cart.png" %}" alt= "a flat icon of a shopping cart";>
</div>
<!-- sidebar end-->
<!-- sidebar end-->
<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/"> ADD ITEM +</a> </div>
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/" class = "addItemText"> ADD ITEM +</a> </div>
</div>
</div>
<div class = "changeView">
......@@ -40,20 +47,26 @@
</div>
</div>
</div>
<div class="addItem">
Item Quantity:<input class="box firstName" type="text" placeholder="">
Quantity Unity:<input class="box lastName" type="text" placeholder="">
Item Description:<input class="box email" type="email" placeholder="">
Purchase Date:<input class="box password" type="password" placeholder="">
Expiration Date:<input class="box passwordConfirm" type="password" placeholder="">
<label class="deleteItemBox">
<input type="checkbox" checked="checked">
<span class="checkmark"></span>
Is this Item Consumed?
</label>
<button type="button">SUBMIT</button>
<a href="url">Back</a>
</div>
<!-- subhead end-->
<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">
{{form.Quantity_Unit}}</div>
Item Description:<div class="box email">
{{form.Item_Description}} </div>
Purchase Date:<div class="box password">
{{form.Purchase_Date}} </div>
Expiration Date:<div class="box passwordConfirm">
{{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>
</body>
</html>
\ No newline at end of file
......@@ -14,43 +14,50 @@
</div>
</div>
<div class = "lowerPage">
<!-- sidebar start-->
<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 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 = "">
<div class = "sideText"> STATS </div>
</a>
</div>
<img id= "statsIcon" src= "{%static "stats.png" %}" alt= "a flat icon of a graph";>
<div class = "sideItem text stats">
STATS
</div>
<div class = "sideItem icon stats">
<div class = "circle"> :3 </div>
<div class = "sideItem toBuy">
<a href = "http://127.0.0.1:8000/to-buy/">
<div class = "sideText"> TO BUY </div>
</a>
</div>
<div class = "sideItem text toBuy">
TO BUY
</div>
<div class = "sideItem icon toBuy">
<div class = "circle"> :3 </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">
<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>
</div>
<h3>Add Product Type</h3>
<!-- subhead end-->
<div class = "addProdType">Add Product Type</div>
Product name:
{{ form.Product_Name }}
<form method="POST" enctype="multipart/form-data" div class="main">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit">
</form>
<a href="http://127.0.0.1:8000/fridge/list" div class="main">Back</a>
</div>
</body>
</html>
\ No newline at end of file
......@@ -14,34 +14,35 @@
</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= "" 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 = "">
<div class = "sideText"> STATS </div>
</a>
</div>
<img id= "statsIcon" src= "" alt= "a flat icon of a graph";>
<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= "" alt= "a flat icon of a shopping cart";>
<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">
<div class = "addItemButton">
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/"> ADD ITEM +</a> </div>
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/" class = "addItemText"> ADD ITEM +</a> </div>
</div>
</div>
<div class = "changeView">
......@@ -50,16 +51,26 @@
</div>
</div>
</div>
<!-- subhead end-->
{% for product in object_list %}
<div class = "listView">
<div class = "listItem one">
<img id= "listIcon" src= "{{product.Icon.url}}" width = "185" height = "185" alt= "a flat icon the product";>
<div class = "listText">
<div class = "daysLeft"><a href='http://127.0.0.1:8000/fridge/{{product.Product_ID}}'> {{product.Product_Name}} </a></div>
<a href='http://127.0.0.1:8000/fridge/{{product.Product_ID}}' class = "daysLeft"> {{product.Product_Name}} </a>
<div class = "product"> {{product.Product_Category}} </div>
<div class = "category"> To buy: {{product.To_Buy}} </div>
</div>
<div class = "listRemove">
<a href = "http://127.0.0.1:8000/fridge/{{product.Product_ID}}/delete"><div class= "removeText">DELETE</div></a>
</div>
<div class = "listEdit">
<a href = "http://127.0.0.1:8000/fridge/{{product.Product_ID}}/update">
<div class = "black">EDIT</div></a>
</div>
</div>
{% endfor %}
</table>
......
......@@ -10,28 +10,35 @@
</div>
</div>
<div class = "lowerPage">
<!-- sidebar start-->
<div class = "sidebar">
<div class = "sideItem fridge">
<div class = " sideText"><a href="http://127.0.0.1:8000/fridge/list/"> FRIDGE</a> </div>
<a href="http://127.0.0.1:8000/fridge/list/">
<div class = " sideText"> FRIDGE </div>
</a>
</div>
<img id= "fridgeIcon" src= "" 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">
<div class = "sideText"> STATS </div>
<a href = "">
<div class = "sideText"> STATS </div>
</a>
</div>
<img id= "statsIcon" src= "" alt= "a flat icon of a graph";>
<img id= "statsIcon" src= "{%static "stats.png" %}" alt= "a flat icon of a graph";>
<div class = "sideItem toBuy">
<div class = "sideText"> <a href = "http://127.0.0.1:8000/to-buy/">TO BUY</a> </div>
<a href = "http://127.0.0.1:8000/to-buy/">
<div class = "sideText"> TO BUY </div>
</a>
</div>
<img id= "toBuyIcon" src= "" alt= "a flat icon of a shopping cart";>
<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">
<div class = "addItemButton">
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/"> ADD ITEM +</a> </div>
<div class = "addItemText"><a href="http://127.0.0.1:8000/fridge/add/" class = "addItemText"> ADD ITEM +</a> </div>
</div>
</div>
<div class = "changeView">
......@@ -40,6 +47,7 @@
</div>
</div>
</div>
<!-- subhead end-->
{% block content %}
<div class = "listView">
......
......@@ -10,28 +10,29 @@
</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= "" 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 = "">
<div class = "sideText"> STATS </div>
</a>
</div>
<img id= "statsIcon" src= "" alt= "a flat icon of a graph";>
<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= "" alt= "a flat icon of a shopping cart";>
<img id= "toBuyIcon" src= "{%static "add-to-cart.png" %}" alt= "a flat icon of a shopping cart";>
</div>
<!-- sidebar end-->
<div class = "pageSubhead">
<div class = "subheader"> To Buy </div>
......@@ -44,16 +45,19 @@
{% for product in object_list %}
<div class = "listView">
<div class = "listItem one">
<img id= "listIcon" src= "" alt= "a flat icon the product";>
<img id= "listIcon" src= "{{product.Icon.url}}" width = "185" height = "185" alt= "a flat icon the product";>
<div class = "listText">
<div class = "product"> {{product.Product_Name}} </div>
<div class = "category"> {{product.Product_Category}} </div>
</div>
<div class = "listRemove">
<div class= "removeText"> REMOVE </div>
<a href = "http://127.0.0.1:8000/fridge/{{product.Product_ID}}/update"><div class= "removeText"> REMOVE </div></a>
</div>
<div class = "listAdd">
<a href = "http://127.0.0.1:8000/fridge/{{product.Product_ID}}/add"><div class = "black">ADD ITEM</div></a>
</div>
</div>
{% endfor %}
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
{% load static %}
<link rel="stylesheet" href="{%static "sidebar.css" %}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Add Item</title>
</head>
<body>
<div class = "listViewHeader">
<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 = "">
<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"> To Buy </div>
</div>
<!-- subhead end-->
<h3>Remove from To-Buy?</h3>
<form method="POST" div class="main">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Update">
</form>
</body>
</html>
\ No newline at end of file
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