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
...@@ -10,13 +10,13 @@ body { ...@@ -10,13 +10,13 @@ body {
color: white; color: white;
text-align: left; text-align: left;
} }
.breadcrumbsHead { .breadcrumbsHead {
font-family: "Roboto Bold"; font-family: "Roboto Bold";
font-size: 46px; font-size: 46px;
margin-left: 50px; margin-left: 50px;
} }
.lowerPage { .lowerPage {
width: 100vw; width: 100vw;
display: grid; display: grid;
...@@ -33,16 +33,15 @@ body { ...@@ -33,16 +33,15 @@ body {
grid-template-rows: repeat(16, 6.25vh); grid-template-rows: repeat(16, 6.25vh);
grid-template-columns: repeat(2, 8.33vw); grid-template-columns: repeat(2, 8.33vw);
grid-column: 1/2; grid-column: 1/2;
z-index: 1;
left: 0;
}
z-index:1;
left:0;
}
.sideItem { .sideItem {
display: grid; display: grid;
background-color: rgba(104, 104, 104, 0.7); background-color: rgba(104, 104, 104, 0.7);
transform: none; transform: none;
} }
.sideText { .sideText {
font-family: "Roboto"; font-family: "Roboto";
font-size: 24px; font-size: 24px;
...@@ -51,7 +50,6 @@ body { ...@@ -51,7 +50,6 @@ body {
margin-right: 5px; margin-right: 5px;
text-align: right; text-align: right;
} }
#fridgeIcon { #fridgeIcon {
background-color: white; background-color: white;
clip-path: circle(); clip-path: circle();
...@@ -69,7 +67,6 @@ body { ...@@ -69,7 +67,6 @@ body {
grid-column: 1/2; grid-column: 1/2;
margin: 10px; margin: 10px;
} }
#toBuyIcon { #toBuyIcon {
background-color: white; background-color: white;
clip-path: circle(); clip-path: circle();
...@@ -78,7 +75,6 @@ body { ...@@ -78,7 +75,6 @@ body {
grid-column: 1/2; grid-column: 1/2;
margin: 10px; margin: 10px;
} }
.fridge { .fridge {
grid-row: 3/4; grid-row: 3/4;
grid-column: 1/3; grid-column: 1/3;
...@@ -88,7 +84,6 @@ body { ...@@ -88,7 +84,6 @@ body {
grid-row: 6/7; grid-row: 6/7;
grid-column: 1/3; grid-column: 1/3;
} }
.toBuy { .toBuy {
grid-row: 9/10; grid-row: 9/10;
grid-column: 1/3; grid-column: 1/3;
...@@ -102,19 +97,16 @@ body { ...@@ -102,19 +97,16 @@ body {
grid-template-columns: 3vw repeat(6, 15.67vw) 3vw; grid-template-columns: 3vw repeat(6, 15.67vw) 3vw;
grid-template-rows: repeat(3, 6.25vh); grid-template-rows: repeat(3, 6.25vh);
} }
.subheader { .subheader {
font-family: "Roboto Medium"; font-family: "Roboto Medium";
font-size: 10vh; font-size: 10vh;
grid-column: 2/3; grid-column: 2/3;
text-align: center; text-align: center;
} }
.addItem { .addItem {
grid-column: 3/4; grid-column: 3/4;
grid-row: 2/3 grid-row: 2/3
} }
.addItemButton { .addItemButton {
margin-left: 20px; margin-left: 20px;
margin-right: 20px; margin-right: 20px;
...@@ -122,24 +114,20 @@ body { ...@@ -122,24 +114,20 @@ body {
border-radius: 100px; border-radius: 100px;
transform: none; transform: none;
} }
.addItemText { .addItemText {
font-family: "Roboto Medium"; font-family: "Roboto Medium";
font-size: 18px; font-size: 18px;
color: white; color: white;
text-align: center; text-align: center;
} }
.changeView { .changeView {
grid-column: 5/6; grid-column: 5/6;
grid-row: 2/3; grid-row: 2/3;
} }
.changeViewDropdown { .changeViewDropdown {
background-color: rgba(228, 228, 228, 0.7); background-color: rgba(228, 228, 228, 0.7);
transform: none; transform: none;
} }
.changeViewText { .changeViewText {
text-align: center; text-align: center;
font-family: "Roboto Medium"; font-family: "Roboto Medium";
...@@ -155,7 +143,7 @@ body { ...@@ -155,7 +143,7 @@ body {
font-size: 24px; font-size: 24px;
align-items: center; align-items: center;
} }
.addItem { .addItemForm {
display: grid; display: grid;
grid-column: 2/3; grid-column: 2/3;
margin-left: 1vw; margin-left: 1vw;
...@@ -164,3 +152,27 @@ body { ...@@ -164,3 +152,27 @@ body {
font-style: normal; font-style: normal;
font-size: 24px; font-size: 24px;
} }
.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 { ...@@ -142,13 +142,13 @@ body {
height: 150px*/ height: 150px*/
background-color: rgba(196, 196, 196, 1); background-color: rgba(196, 196, 196, 1);
margin: 5px; margin: 5px;
margin-left:130px; margin-left:120px;
} }
.listText { .listText {
grid-column: 2/3; grid-column: 2/3;
text-align: left; text-align: left;
margin: 10px; margin: 10px;
margin-left: 100px; margin-left: 130px;
} }
.product { .product {
font-family: "Roboto Black"; font-family: "Roboto Black";
...@@ -161,20 +161,37 @@ body { ...@@ -161,20 +161,37 @@ body {
.listRemove { .listRemove {
grid-column: 3/4; grid-column: 3/4;
grid-row: 2/4; grid-row: 2/3;
background-color: rgba(175, 175, 175); background-color: rgba(175, 175, 175);
font-size: 15px;
text-align: center;
font-family: "Roboto Medium";
margin: 5px;
} }
.removeText { .removeText {
font-size: 20px;
text-align: center; text-align: center;
margin: 15px; margin: 15px;
font-family: "Roboto Medium"; font-family: "Roboto Medium";
color:black;
} }
.one { .one {
grid-column: 2/5; grid-column: 2/5;
grid-row: 1/2; 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-face {
font-family: Roboto Bold; font-family: Roboto Bold;
......
...@@ -16,6 +16,7 @@ body { ...@@ -16,6 +16,7 @@ body {
margin-left: 50px; margin-left: 50px;
} }
.lowerPage { .lowerPage {
width: 100vw; width: 100vw;
display: grid; display: grid;
...@@ -159,17 +160,18 @@ body { ...@@ -159,17 +160,18 @@ body {
height: 150px*/ height: 150px*/
background-color: rgba(196, 196, 196, 1); background-color: rgba(196, 196, 196, 1);
margin: 5px; margin: 5px;
margin-left:130px; margin-left:120px;
} }
.listText { .listText {
grid-column: 2/3; grid-column: 2/3;
text-align: left; text-align: left;
margin: 10px; margin: 10px;
margin-left:100px; margin-left:130px;
} }
.daysLeft { .daysLeft {
font-family: "Roboto Black"; font-family: "Roboto Black";
font-size: 24px; font-size: 24px;
color:black;
} }
.product { .product {
font-family: "Roboto"; font-family: "Roboto";
...@@ -196,6 +198,37 @@ body { ...@@ -196,6 +198,37 @@ body {
grid-row: 1/2; 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 { a {
color: rgba(0,0,0,0); color: rgba(0,0,0,0);
} }
...@@ -239,3 +272,15 @@ a { ...@@ -239,3 +272,15 @@ a {
.main{ .main{
margin-left: 23%; 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 ...@@ -4,7 +4,7 @@ from django.conf.urls.static import static
from django.views.generic import TemplateView from django.views.generic import TemplateView
from django.urls import include, path from django.urls import include, path
from Breadcrumbs import views 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 = [ urlpatterns = [
url(r'^fridge/list/', ProductListViewName.as_view(), name='fridgeLN'), url(r'^fridge/list/', ProductListViewName.as_view(), name='fridgeLN'),
...@@ -15,7 +15,8 @@ urlpatterns = [ ...@@ -15,7 +15,8 @@ urlpatterns = [
url(r'^fridge/(?P<Product_ID>\d+)/$', ItemViewPDate.as_view(), name='item-purchase-date-view'), 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>/add', add_item, name = 'add-item'),
path('fridge/<id>/<id2>/delete', delete_item, name = 'delete-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: if settings.DEBUG:
......
from django.views.generic import ListView from django.views.generic import ListView, UpdateView
from django.db.models import Q from django.db.models import Q
from .forms import LoginForm, ProductTypeForm, AddItemForm from .forms import LoginForm, ProductTypeForm, AddItemForm
from django.http import HttpResponseRedirect from django.http import HttpResponseRedirect
...@@ -27,7 +27,7 @@ def login(request): ...@@ -27,7 +27,7 @@ def login(request):
class ProductListViewName(ListView): class ProductListViewName(ListView):
model = Product_Type model = Product_Type
template_name = 'placeholder-list.html' template_name = 'fridge-list.html'
context_object_name = 'product' context_object_name = 'product'
def get_queryset(self): def get_queryset(self):
...@@ -35,7 +35,7 @@ class ProductListViewName(ListView): ...@@ -35,7 +35,7 @@ class ProductListViewName(ListView):
class ProductListViewCategory(ListView): class ProductListViewCategory(ListView):
model = Product_Type model = Product_Type
template_name = 'placeholder-list.html' template_name = 'fridge-list.html'
context_object_name = 'product' context_object_name = 'product'
def get_queryset(self): def get_queryset(self):
...@@ -160,3 +160,9 @@ def delete_item(request,id,id2): ...@@ -160,3 +160,9 @@ def delete_item(request,id,id2):
return HttpResponseRedirect("/fridge/" + str(prod_type)) return HttpResponseRedirect("/fridge/" + str(prod_type))
return render(request, 'product-type-confirm-delete.html', context) 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 @@ ...@@ -10,28 +10,35 @@
</div> </div>
</div> </div>
<div class = "lowerPage"> <div class = "lowerPage">
<!-- sidebar start-->
<div class = "sidebar"> <div class = "sidebar">
<div class = "sideItem fridge"> <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> </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 = "sideItem stats">
<a href = "">
<div class = "sideText"> STATS </div> <div class = "sideText"> STATS </div>
</a>
</div> </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 = "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> </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> </div>
<!-- sidebar end-->
<!-- sidebar end-->
<div class = "pageSubhead"> <div class = "pageSubhead">
<div class = "subheader"> Fridge </div> <div class = "subheader"> Fridge </div>
<div class = "addItem"> <div class = "addItem">
<div class = "addItemButton"> <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> </div>
<div class = "changeView"> <div class = "changeView">
...@@ -40,20 +47,26 @@ ...@@ -40,20 +47,26 @@
</div> </div>
</div> </div>
</div> </div>
<div class="addItem"> <!-- subhead end-->
Item Quantity:<input class="box firstName" type="text" placeholder="">
Quantity Unity:<input class="box lastName" type="text" placeholder=""> <form method="POST" enctype="multipart/form-data" div class="addItemForm">
Item Description:<input class="box email" type="email" placeholder=""> {% csrf_token %}
Purchase Date:<input class="box password" type="password" placeholder=""> {{ form.non_field_errors }}
Expiration Date:<input class="box passwordConfirm" type="password" placeholder=""> Item Quantity:<div class="box firstName"> {{form.Item_Quantity}}</div>
<label class="deleteItemBox"> Quantity Unity:<div class="box lastName">
<input type="checkbox" checked="checked"> {{form.Quantity_Unit}}</div>
<span class="checkmark"></span> Item Description:<div class="box email">
Is this Item Consumed? {{form.Item_Description}} </div>
</label> Purchase Date:<div class="box password">
<button type="button">SUBMIT</button> {{form.Purchase_Date}} </div>
<a href="url">Back</a> Expiration Date:<div class="box passwordConfirm">
{{form.Expiration_Date}}</div>
<div class="deleteItemBox">
{{form.Is_Consumed}} Is this Item Consumed?
</div> </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> </body>
</html> </html>
\ No newline at end of file
...@@ -14,43 +14,50 @@ ...@@ -14,43 +14,50 @@
</div> </div>
</div> </div>
<div class = "lowerPage"> <div class = "lowerPage">
<!-- sidebar start-->
<div class = "sidebar"> <div class = "sidebar">
<div class = "sideItem text fridge"> <div class = "sideItem fridge">
FRIDGE <a href="http://127.0.0.1:8000/fridge/list/">
</div> <div class = " sideText"> FRIDGE </div>
<div class = "sideItem icon fridge"> </a>
<div class = "circle"> :3 </div> </div>
</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 recipes"> <div class = "sideItem toBuy">
RECIPES <a href = "http://127.0.0.1:8000/to-buy/">
<div class = "sideText"> TO BUY </div>
</a>
</div> </div>
<div class = "sideItem icon recipes"> <img id= "toBuyIcon" src= "{%static "add-to-cart.png" %}" alt= "a flat icon of a shopping cart";>
<div class = "circle"> :3 </div>
</div> </div>
<!-- sidebar end-->
<div class = "sideItem text stats"> <!-- subhead start-->
STATS <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 = "sideItem icon stats">
<div class = "circle"> :3 </div>
</div> </div>
<div class = "changeView">
<div class = "sideItem text toBuy"> <div class = "changeViewDropdown">
TO BUY <div class = "changeViewText"> LIST VIEW </div>
</div> </div>
<div class = "sideItem icon toBuy">
<div class = "circle"> :3 </div>
</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"> <form method="POST" enctype="multipart/form-data" div class="main">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit">
</form> </form>
<a href="http://127.0.0.1:8000/fridge/list" div class="main">Back</a> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -14,34 +14,35 @@ ...@@ -14,34 +14,35 @@
</div> </div>
</div> </div>
<div class = "lowerPage"> <div class = "lowerPage">
<!-- sidebar start-->
<div class = "sidebar"> <div class = "sidebar">
<div class = "sideItem fridge"> <div class = "sideItem fridge">
<a href="http://127.0.0.1:8000/fridge/list/"> <a href="http://127.0.0.1:8000/fridge/list/">
<div class = " sideText"> FRIDGE </div> <div class = " sideText"> FRIDGE </div>
</a> </a>
</div> </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 = "sideItem stats">
<a href = ""> <a href = "">
<div class = "sideText"> STATS </div> <div class = "sideText"> STATS </div>
</a> </a>
</div> </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 = "sideItem toBuy">
<a href = "http://127.0.0.1:8000/to-buy/"> <a href = "http://127.0.0.1:8000/to-buy/">
<div class = "sideText"> TO BUY </div> <div class = "sideText"> TO BUY </div>
</a> </a>
</div> </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> </div>
<!-- sidebar end-->
<!-- subhead start-->
<div class = "pageSubhead"> <div class = "pageSubhead">
<div class = "subheader"> Fridge </div> <div class = "subheader"> Fridge </div>
<div class = "addItem"> <div class = "addItem">
<div class = "addItemButton"> <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> </div>
<div class = "changeView"> <div class = "changeView">
...@@ -50,16 +51,26 @@ ...@@ -50,16 +51,26 @@
</div> </div>
</div> </div>
</div> </div>
<!-- subhead end-->
{% for product in object_list %} {% for product in object_list %}
<div class = "listView"> <div class = "listView">
<div class = "listItem one"> <div class = "listItem one">
<img id= "listIcon" src= "{{product.Icon.url}}" width = "185" height = "185" 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 = "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 = "product"> {{product.Product_Category}} </div>
<div class = "category"> To buy: {{product.To_Buy}} </div> <div class = "category"> To buy: {{product.To_Buy}} </div>
</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> </div>
{% endfor %} {% endfor %}
</table> </table>
......
...@@ -10,28 +10,35 @@ ...@@ -10,28 +10,35 @@
</div> </div>
</div> </div>
<div class = "lowerPage"> <div class = "lowerPage">
<!-- sidebar start-->
<div class = "sidebar"> <div class = "sidebar">
<div class = "sideItem fridge"> <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> </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 = "sideItem stats">
<a href = "">
<div class = "sideText"> STATS </div> <div class = "sideText"> STATS </div>
</a>
</div> </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 = "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> </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> </div>
<!-- sidebar end-->
<!-- subhead start-->
<div class = "pageSubhead"> <div class = "pageSubhead">
<div class = "subheader"> Fridge </div> <div class = "subheader"> Fridge </div>
<div class = "addItem"> <div class = "addItem">
<div class = "addItemButton"> <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> </div>
<div class = "changeView"> <div class = "changeView">
...@@ -40,6 +47,7 @@ ...@@ -40,6 +47,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- subhead end-->
{% block content %} {% block content %}
<div class = "listView"> <div class = "listView">
......
...@@ -10,28 +10,29 @@ ...@@ -10,28 +10,29 @@
</div> </div>
</div> </div>
<div class = "lowerPage"> <div class = "lowerPage">
<!-- sidebar start-->
<div class = "sidebar"> <div class = "sidebar">
<div class = "sideItem fridge"> <div class = "sideItem fridge">
<a href="http://127.0.0.1:8000/fridge/list/"> <a href="http://127.0.0.1:8000/fridge/list/">
<div class = " sideText"> FRIDGE </div> <div class = " sideText"> FRIDGE </div>
</a> </a>
</div> </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 = "sideItem stats">
<a href = ""> <a href = "">
<div class = "sideText"> STATS </div> <div class = "sideText"> STATS </div>
</a> </a>
</div> </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 = "sideItem toBuy">
<a href = "http://127.0.0.1:8000/to-buy/"> <a href = "http://127.0.0.1:8000/to-buy/">
<div class = "sideText"> TO BUY </div> <div class = "sideText"> TO BUY </div>
</a> </a>
</div> </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> </div>
<!-- sidebar end-->
<div class = "pageSubhead"> <div class = "pageSubhead">
<div class = "subheader"> To Buy </div> <div class = "subheader"> To Buy </div>
...@@ -44,16 +45,19 @@ ...@@ -44,16 +45,19 @@
{% for product in object_list %} {% for product in object_list %}
<div class = "listView"> <div class = "listView">
<div class = "listItem one"> <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 = "listText">
<div class = "product"> {{product.Product_Name}} </div> <div class = "product"> {{product.Product_Name}} </div>
<div class = "category"> {{product.Product_Category}} </div> <div class = "category"> {{product.Product_Category}} </div>
</div> </div>
<div class = "listRemove"> <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>
<div class = "listAdd">
{% endfor %} <a href = "http://127.0.0.1:8000/fridge/{{product.Product_ID}}/add"><div class = "black">ADD ITEM</div></a>
</div> </div>
</div>
{% endfor %}
</body> </body>
</html> </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