Skip to content

Commit

Permalink
Add sales/purchases template files
Browse files Browse the repository at this point in the history
  • Loading branch information
pH-7 committed Oct 26, 2017
1 parent ef17010 commit 32d82b9
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
40 changes: 40 additions & 0 deletions marketplaceapp/templates/my_purchases.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% extends 'base.html' %}
{% load staticfiles %}

{% block page %}
<h1 class="argin-heading">My Sales</h1>

<div class="panel panel-default">
<table class="table table-bordered table-striped">
<thead class="bg-success">
<tr>
<th>
<th>Gig Title</th>
<th>Buyer</th>
<th>Price ($)</th>
<th>Date</th>
</td>
</tr>
</thead>

<tbody>
{% for purchase in purchases}
<tr>
<td>{{ forloop.counter}}</td>
<td>
<a href="{% url 'gig_details' purchase.gig.id %}">
{{ purchase.gig.title }}
</a>
</td>
<td>
<a href="{% url 'profile' purchase.buyer.username %}">
{{ purchase.buyer.username }}
</a>
</td>
<td>{{ purchase.gig.price }}</td>
<td>{{ purchase.time }}</td>
</tr>
</tbody>
</table>
</div>
{% endblock %}
40 changes: 40 additions & 0 deletions marketplaceapp/templates/my_sales.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% extends 'base.html' %}
{% load staticfiles %}

{% block page %}
<h1 class="argin-heading">My Purchases</h1>

<div class="panel panel-default">
<table class="table table-bordered table-striped">
<thead class="bg-success">
<tr>
<th>
<th>Gig Title</th>
<th>Author</th>
<th>Price ($)</th>
<th>Date</th>
</td>
</tr>
</thead>

<tbody>
{% for purchase in purchases}
<tr>
<td>{{ forloop.counter}}</td>
<td>
<a href="{% url 'gig_details' purchase.gig.id %}">
{{ purchase.gig.title }}
</a>
</td>
<td>
<a href="{% url 'profile' purchase.gig.user.username %}">
{{ purchase.gig.user.username }}
</a>
</td>
<td>{{ purchase.gig.price }}</td>
<td>{{ purchase.time }}</td>
</tr>
</tbody>
</table>
</div>
{% endblock %}

0 comments on commit 32d82b9

Please sign in to comment.