-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redid much of the trip front end and added internal navigation for ma…
…tching views
- Loading branch information
1 parent
bb624c6
commit 69d99e7
Showing
3 changed files
with
178 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,77 @@ | ||
{% extends "home_default/base.html" %} | ||
{% extends 'home_default/base.html' %} | ||
{% load user_profile_custom_tags %} | ||
{% load static %} | ||
{% block content %} | ||
|
||
<!-- Navigation --> | ||
<div class="container mt-5"> | ||
<div class="row"> | ||
<ul class="nav nav-tabs"> | ||
<li class="nav-item"> | ||
<a class="nav-link" | ||
aria-current="page" | ||
href="{% url 'matching:show_potential_matches' utrip_id=utrip_id %}"> | ||
Fellow Travellers | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" | ||
aria-current="page" | ||
href="{% url 'matching:show_pending_requests' utrip_id=utrip_id %}"> | ||
Match Requests | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" | ||
href="{% url 'matching:show_matches' utrip_id=utrip_id %}" | ||
aria-current="page" | ||
tabindex="-1"> | ||
Matches | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
<!-- End Navigation --> | ||
|
||
{% if pending_matches %} | ||
|
||
<div class="d-flex container mt-5"> | ||
<div class="row justify-content-start"> | ||
<h1>These users would like to travel with you</h1> | ||
<div class="container mt-5"> | ||
<div class="row"> | ||
{% if pending_matches %} | ||
{% for pending_match in pending_matches %} | ||
<div class="col-md-3"> | ||
<div class="d-flex col-md-3"> | ||
<div class="card my-3"> | ||
{% if pending_match.image %} | ||
<img class="card-img-top" src="{{ pending_match.image }}" alt="image"> | ||
<img class="card-img-top" src="{{ pending_match.image }}" alt="image"> | ||
{% else %} | ||
<img class="card-img-top" src="/media/default_avatar.png" alt="image"> | ||
<img class="card-img-top" src="/media/default_avatar.png" alt="image"> | ||
{% endif %} | ||
<div class="card-body"> | ||
<div class="card-title"> | ||
<h4> | ||
<i>{{ pending_match.sender.first_name }} {{ pending_match.sender.last_name|slice:":1" }}.</i> | ||
</h4> | ||
</div> | ||
<br> | ||
|
||
<form action="{% url 'matching:react_request' utrip_id=utrip_id %}" method="post"> | ||
{% csrf_token %} | ||
<input type="hidden" name="sender_utrip_id" | ||
value="{{ pending_match.sender_user_trip.id }}"> | ||
<input type="hidden" name="sender_utrip_id" value="{{ pending_match.sender_user_trip.id }}"> | ||
<input type="hidden" name="sender_id" value="{{ pending_match.sender.id }}"> | ||
|
||
<div class="d-flex justify-content-between"> | ||
<button type="submit" name="pending_request" value="Rejected" | ||
class="btn btn-rounded btn-danger"> | ||
Reject | ||
</button> | ||
<div> | ||
<a href="{% url 'user_profile:detail_profile' id=pending_match.sender.id %}" | ||
class="btn btn-primary">View Profile </a> | ||
</div> | ||
<button type="submit" name="pending_request" value="Matched" | ||
class="btn btn-rounded btn-info"> | ||
Match | ||
</button> | ||
<button type="submit" name="pending_request" value="Rejected" class="btn btn-rounded btn-outline-danger">Reject</button> | ||
<a href="{% url 'user_profile:detail_profile' id=pending_match.sender.id %}" class="btn btn-outline-info">View Profile</a> | ||
<button type="submit" name="pending_request" value="Matched" class="btn btn-rounded btn-outline-success">Accept</button> | ||
</div> | ||
</form> | ||
</div> | ||
<br> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
{% else %} | ||
<div class="col"> | ||
<h1>When a traveller sends you a match request, you will see it here</h1> | ||
<img src="{% static 'home_default/site_images/sc-party-people-1.png'%}"> | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
|
||
|
||
{% else %} | ||
<div class="d-flex container mt-5"> | ||
<h1>When a traveller sends you a match request, you will see it here</h1> | ||
</div> | ||
{% endif %} | ||
|
||
|
||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters