Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Boodle
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martina Therese R. Reyes
Boodle
Commits
1eeb586e
Commit
1eeb586e
authored
May 19, 2022
by
Christine Dela Rosa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix profile and store templates
parent
1aad80fe
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
31 deletions
+35
-31
profile.html
boodlesite/templates/profile.html
+28
-2
profile.html.orig
boodlesite/templates/profile.html.orig
+0
-6
store.html
boodlesite/templates/store.html
+2
-4
0001_initial.py
main/migrations/0001_initial.py
+1
-1
0005_delete_boodleuser.py
main/migrations/0005_delete_boodleuser.py
+0
-16
views.py
main/views.py
+4
-2
No files found.
boodlesite/templates/profile.html
View file @
1eeb586e
...
@@ -39,14 +39,40 @@
...
@@ -39,14 +39,40 @@
</div>
</div>
</div>
</div>
<!-- Purchase History -->
<div
class=
"header-container"
>
<h2>
Purchase History
</h2>
</div>
<div
class=
"event-container"
>
{% if won_auctions %}
{% for item in won_items %}
<div
class=
"event"
>
<img
src=
"https://www.kurin.com/wp-content/uploads/placeholder-square.jpg"
>
<div
class=
"event-text"
>
<h3>
{{ item.itemname }}
</h3>
<p>
Sold for: ₱ {{item.sellprice}}
</p>
{% for wonauc in won_auctions %}
{% if wonauc.itemid == item %}
<p>
{{ wonauc.auctionend }}
</p>
{% endif %}
{% endfor %}
</div>
</div>
{% endfor %}
{% else %}
<h4>
{{displayname}} has not won any bids.
</h4>
{% endif %}
</div>
</div>
<!--Change auctions_now, auction to like favorites, favorite-->
<!--Change auctions_now, auction to like favorites, favorite-->
<div
class=
"header-container"
>
<div
class=
"header-container"
>
<h2>
Current Biddings
</h2>
<h2>
Current Biddings
</h2>
</div>
</div>
<div
class=
"event-container"
>
<div
class=
"event-container"
>
{% if
auctions_of_u
ser %}
{% if
bidsByU
ser %}
{% for id in ids_of_auction %}
{% for id in ids_of_auction %}
<div
class=
"event"
>
<div
class=
"event"
>
<img
src=
"https://www.kurin.com/wp-content/uploads/placeholder-square.jpg"
>
<img
src=
"https://www.kurin.com/wp-content/uploads/placeholder-square.jpg"
>
...
@@ -56,7 +82,7 @@
...
@@ -56,7 +82,7 @@
</a>
</a>
<p>
{{ id.auctionend }}
</p>
<p>
{{ id.auctionend }}
</p>
</div>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% else %}
{% else %}
...
...
boodlesite/templates/profile.html.orig
View file @
1eeb586e
...
@@ -63,14 +63,8 @@
...
@@ -63,14 +63,8 @@
<h2> Current Biddings</h2>
<h2> Current Biddings</h2>
</div>
</div>
<div class="event-container">
<div class="event-container">
<<<<<<< HEAD
{% if auctions_of_user %}
{% if auctions_of_user %}
{% for id in ids_of_auction %}
{% for id in ids_of_auction %}
=======
{% if auctionsOfUser %}
{% for id in idsOfAuction %}
{% if id.auctionend > currentdate %}
>>>>>>> origin/xtine
<div class="event">
<div class="event">
<img src="http://via.placeholder.com/640x360" alt="">
<img src="http://via.placeholder.com/640x360" alt="">
<div class="event-text">
<div class="event-text">
...
...
boodlesite/templates/store.html
View file @
1eeb586e
...
@@ -89,15 +89,13 @@
...
@@ -89,15 +89,13 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% else %}
{% else %}
<h4
text-align=
"center"
>
Your Inventory is empty.
</h4>
<h4
text-align=
"center"
>
Your Inventory is empty.
</h4>
{% endif %}
{% endif %}
</div>
...
...
main/migrations/0001_initial.py
View file @
1eeb586e
# Generated by Django 4.0.3 on 2022-0
5-18 03:50
# Generated by Django 4.0.3 on 2022-0
3-12 07:26
from
django.db
import
migrations
,
models
from
django.db
import
migrations
,
models
...
...
main/migrations/0005_delete_boodleuser.py
deleted
100644 → 0
View file @
1aad80fe
# Generated by Django 3.2.12 on 2022-05-18 09:48
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'main'
,
'0004_delete_userfavorites'
),
]
operations
=
[
migrations
.
DeleteModel
(
name
=
'Boodleuser'
,
),
]
main/views.py
View file @
1eeb586e
...
@@ -317,9 +317,9 @@ def profile(request, pk):
...
@@ -317,9 +317,9 @@ def profile(request, pk):
if
auctionend
<
current_date
:
if
auctionend
<
current_date
:
bids
=
AuctionBid
.
objects
.
filter
(
auctionid
=
aucid
)
.
order_by
(
'-bidtime'
)
bids
=
AuctionBid
.
objects
.
filter
(
auctionid
=
aucid
)
.
order_by
(
'-bidtime'
)
highest_bidder
=
bids
[
0
]
.
boodle
userid
highest_bidder
=
bids
[
0
]
.
userid
if
highest_bidder
.
userid
==
current_user
.
user
id
:
if
highest_bidder
.
id
==
current_user
.
id
:
itemid
=
aucid
.
itemid
itemid
=
aucid
.
itemid
itemid
.
sellprice
=
bids
[
0
]
.
amount
itemid
.
sellprice
=
bids
[
0
]
.
amount
won_auctions
.
append
(
aucid
)
won_auctions
.
append
(
aucid
)
...
@@ -351,6 +351,8 @@ def profile(request, pk):
...
@@ -351,6 +351,8 @@ def profile(request, pk):
'store'
:
current_storeid
,
'store'
:
current_storeid
,
'bidsByUser'
:
bids_by_user
,
'bidsByUser'
:
bids_by_user
,
'auctions_of_user'
:
auctions_of_user
,
'auctions_of_user'
:
auctions_of_user
,
'won_items'
:
won_itemids
,
'won_auctions'
:
won_auctions
,
'auctions'
:
auctions
,
'auctions'
:
auctions
,
'ids_of_auction'
:
ids_of_auction
,
'ids_of_auction'
:
ids_of_auction
,
'createStoreForm'
:
form
'createStoreForm'
:
form
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment