Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bookshare
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
30
Issues
30
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SRCT
bookshare
Commits
dcc97bd4
Commit
dcc97bd4
authored
Aug 24, 2015
by
Daniel W Bond
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
broke out bid row into separate file for hiding flagged bids
parent
65618310
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
44 deletions
+91
-44
bookshare/trades/templates/bid_display.html
bookshare/trades/templates/bid_display.html
+67
-0
bookshare/trades/templates/detail_listing.html
bookshare/trades/templates/detail_listing.html
+24
-44
No files found.
bookshare/trades/templates/bid_display.html
0 → 100644
View file @
dcc97bd4
{% load humanize %}
<div
class=
"row"
>
<div
class=
"col-md-3 col-sm-6 col-xs-6 text-center"
>
<h4><a
href=
"{{ bid.bidder.get_absolute_url }}"
>
{{ bid.bidder.user.first_name }}
{{ bid.bidder.user.last_name }}
</a></h4>
</div>
<div
class=
"col-md-1 col-sm-6 col-xs-6 text-center"
>
<h6>
{{ bid.created|naturaltime }}
</h6>
</div>
<div
class=
"col-md-5 col-sm-6 col-xs-6"
>
<h4><small>
{% if bid.text %}
{{ bid.text }}
{% else %}
{% endif %}
</small></h4>
</div>
<div
class=
"col-md-2 col-sm-4 col-xs-4 text-center"
>
{% if request.user == bid.bidder.user and not listing.exchanged and not listing.cancelled %}
<h4><a
href=
"{% url 'edit_bid' listing.slug bid.slug %}"
<
span
class=
"label label-default"
>
Edit
</span></a></h4>
{% endif %}
{% if bid == listing.winning_bid %}
<h4><small><span
class=
"label label-success"
>
Winning Bid
</span></small>
<strong>
${{ bid.price }}
</strong></h4>
{% else %}
<h4><strong>
${{ bid.price }}
</strong></h4>
{% endif %}
</div>
<div
class=
"col-md-1 col-sm-2 col-xs-2"
>
{% if request.user == bid.bidder.user %}
{% else %}
{% comment %}
Annoyingly convoluted way of getting needed info: see
bids_with_info in view to see what's going on.
tuple is (flaggable, the slug)
{% endcomment %}
{% if info.0 %}
<h5
class=
"text-center"
><a
href=
"{% url 'create_bid_flag' bid.listing.slug bid.slug %}"
>
<i
class=
"fa fa-flag fa-fw fa-lg"
></i>
<br
/>
<small>
Flag Bid
</small>
</a></h5>
{% else %}
<h5
class=
"text-center"
><a
href=
"{% url 'delete_bid_flag' bid.listing.slug bid.slug info.1 %}"
>
<span
class=
"fa-stack fa-lg"
>
<i
class=
"fa fa-flag fa-stack-1x"
></i>
<i
class=
"fa fa-ban fa-stack-2x text-danger"
></i>
</span>
<br
/>
<small>
Remove Flag
</small>
</a></h5>
{% endif %}
{% endif %}
</div>
</div>
<hr/>
bookshare/trades/templates/detail_listing.html
View file @
dcc97bd4
...
...
@@ -157,9 +157,15 @@ SRCT Bookshare • {{ listing.title }}
{% if request.user == listing.poster.user %}
{% else %}
{% if can_flag %}
<h5><a
href=
"{% url 'create_flag' listing.slug %}"
><
span
class=
"label label-danger"
><i
class=
"fa fa-flag fa-fw fa-lg"
></i>
Flag
</span>
</a></h5>
<h5><a
href=
"{% url 'create_flag' listing.slug %}"
><
i
class=
"fa fa-flag fa-fw fa-lg"
></i>
Flag Listing
</a></h5>
{% else %}
<h5><a
href=
"{% url 'delete_flag' listing.slug flag_slug %}"
><span
class=
"label label-danger"
><i
class=
"fa fa-flag fa-fw fa-lg"
></i>
Remove Flag
</span></a></h5>
<h5><a
href=
"{% url 'delete_flag' listing.slug flag_slug %}"
>
<span
class=
"fa-stack fa-lg"
>
<i
class=
"fa fa-flag fa-stack-1x"
></i>
<i
class=
"fa fa-ban fa-stack-2x text-danger"
></i>
</span>
Remove Flag
</a></h5>
{% endif %}
{% endif %}
</div>
...
...
@@ -262,53 +268,27 @@ SRCT Bookshare • {{ listing.title }}
</div>
<div
class=
"panel-body"
>
{% if bids %}
{% if bids
or flagged_bids
%}
<div
id=
"bids"
class=
"panel-collapse collapse in"
>
{% endif %}
{% for bid in bids %}
<!-- BID DISPLAY -->
<div
class=
"row"
>
<div
class=
"col-md-3 col-sm-6 col-xs-6 text-center"
>
<h4><a
href=
"{{ bid.bidder.get_absolute_url }}"
>
{{ bid.bidder.user.first_name }}
{{ bid.bidder.user.last_name }}
</a></h4>
</div>
<div
class=
"col-md-2 col-sm-6 col-xs-6 small-text-center"
>
<h4><small>
{{ bid.created|naturaltime }}
</small></h4>
</div>
<div
class=
"col-md-5 col-sm-6 col-xs-6 small-text-center"
>
<h4><small>
{% if bid.text %}
{{ bid.text }}
{% else %}
{% endif %}
</small></h4>
</div>
<div
class=
"col-md-2 col-sm-6 col-xs-6 text-center"
>
{% if request.user == bid.bidder.user and not listing.exchanged and not listing.cancelled %}
<h4><a
href=
"{% url 'edit_bid' listing.slug bid.slug %}"
<
span
class=
"label label-default"
>
Edit
</span></a></h4>
{% endif %}
{% if bid == listing.winning_bid %}
<h4><small><span
class=
"label label-success"
>
Winning Bid
</span></small>
<strong>
${{ bid.price }}
</strong></h4>
{% else %}
<h4><strong>
${{ bid.price }}
</strong></h4>
{% endif %}
</div>
</div>
<hr/>
<!-- BID DISPLAY -->
{% for bid, info in bids %}
{% include 'bid_display.html' %}
{% endfor %}
{% if bids %}
{% if flagged_bids %}
<button
class=
"btn btn-primary btn-sm"
type=
"button"
data-toggle=
"collapse"
data-target=
"#flaggedBids"
aria-expanded=
"false"
aria-controls=
"flaggedBids"
>
<i
class=
"fa fa-exclamation-triangle fa-fw"
></i>
See flagged bids
</button>
<div
class=
"collapse"
id=
"flaggedBids"
>
<br
/>
{% for bid, info in flagged_bids %}
{% include 'bid_display.html' %}
{% endfor %}
</div>
{% endif %}
{% if bids or flagged_bids %}
</div>
{% endif %}
...
...
Mark Stenglein
@mstengle
mentioned in commit
afe5ec5c
·
Apr 06, 2016
mentioned in commit
afe5ec5c
mentioned in commit afe5ec5c05f2c7381b64d5554826d8921a50187b
Toggle commit list
Mark Stenglein
@mstengle
mentioned in commit
b0d0a566
·
Apr 06, 2016
mentioned in commit
b0d0a566
mentioned in commit b0d0a56664420c31e15ec9c75d1a96ff0a67120e
Toggle commit list
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