improved accessibility
This commit is contained in:
parent
f14e945bf2
commit
31b4cbd81e
@ -25,7 +25,6 @@ import reviews.views
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('home/', reviews.views.home, name='home'),
|
||||
path('', LoginView.as_view(
|
||||
template_name='authentication/login.html',
|
||||
redirect_authenticated_user=True), name='login'),
|
||||
|
BIN
LITReview/media/uploads/spongeBob.jpg
Normal file
BIN
LITReview/media/uploads/spongeBob.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
@ -2,15 +2,18 @@
|
||||
{% load reviews_extras %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<section>
|
||||
<div class="row" id="atitle">
|
||||
<div class="d-flex justify-content-center mt-5">
|
||||
<h2> Bienvenue {{ request.user }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="row d-flex justify-content-center mt-4 mb-3">
|
||||
<div class="col-3 d-flex justify-content-center">
|
||||
<a href="{% url 'ticket-add' %}" type="button" class="btn btn-primary">Demander une critique</a>
|
||||
@ -19,8 +22,10 @@
|
||||
<a href="{% url 'review-add' %}" type="button" class="btn btn-primary">Créer une critique</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<section>
|
||||
<div class="row" id="flux">
|
||||
{% for post in posts %}
|
||||
{% if post.content_type == 'TICKET' %}
|
||||
<div class="row border border-2 border-secondary-subtle my-3">
|
||||
@ -44,7 +49,9 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,33 +0,0 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="d-flex justify-content-center mt-5">
|
||||
<h2> Bienvenue {{ request.user }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center mt-4 mb-3">
|
||||
<div class="col-3 d-flex justify-content-center">
|
||||
<a href="{% url 'ticket-add' %}" type="button" class="btn btn-primary">Demander une critique</a>
|
||||
</div>
|
||||
<div class="col-3 d-flex justify-content-center">
|
||||
<a href="{% url 'review-add' %}" type="button" class="btn btn-primary">Créer une critique</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{% for ticket in tickets %}
|
||||
{% include 'reviews/ticket_detail.html' %}
|
||||
<div class="col-6 d-flex justify-content-end mb-2">
|
||||
{% if not ticket.review %}
|
||||
<div class="col-4 align-self-end">
|
||||
<a href="{% url 'review-ticket' ticket.id %}" type="button" class="btn btn-primary">Créer une critique</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,14 +1,17 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<div class="container">
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="d-flex justify-content-center mt-5">
|
||||
<h2> Posts </h2>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
{% for ticket in tickets %}
|
||||
<div class="row border border-2 border-secondary-subtle my-3">
|
||||
{% include 'reviews/ticket_detail.html' %}
|
||||
@ -22,7 +25,9 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
<section>
|
||||
{% for review in reviews %}
|
||||
<div class="row border border-2 border-secondary-subtle my-3">
|
||||
{% include 'reviews/review_detail.html' %}
|
||||
@ -36,7 +41,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
@ -1,14 +1,15 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row mt-3">
|
||||
<div class="row mt-5">
|
||||
<div class="col d-flex justify-content-center">
|
||||
<h2>Créer une critique</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row border border-3 border-secondary-subtle mb-3 justify-content-center">
|
||||
<section>
|
||||
<div class="row border border-3 border-secondary-subtle justify-content-center mt-3 mb-1">
|
||||
<h3> Livre/Article </h3>
|
||||
<div class="col-4 mb-2">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
@ -16,9 +17,11 @@
|
||||
{% csrf_token %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="row border border-3 border-secondary-subtle justify-content-center">
|
||||
<h3>Critique</h3>
|
||||
<div class="col-4 mb-2">
|
||||
<div class="col-4 mb-4">
|
||||
{% include 'reviews/review_form.html' %}
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="submit" class="btn btn-primary"> Envoyer </button>
|
||||
@ -26,6 +29,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container text-center" style="height: 100vh">
|
||||
<div class="row h-100 align-items-center">
|
||||
<form method="post">
|
||||
@ -11,6 +11,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,19 +1,25 @@
|
||||
{% load reviews_extras %}
|
||||
|
||||
<div class="row">
|
||||
<main>
|
||||
<section>
|
||||
<div class="row" id="owner_date">
|
||||
<div class="col-8 mb-4">
|
||||
{% display_owner review.user %} publié une critique
|
||||
</div>
|
||||
|
||||
<div class="col-4 d-flex justify-content-end">
|
||||
{{ review.time_created }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<section>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<span style="font-size: 22px" class="mb-3">{{ review.headline }} - {{ review.rating|rating_stars }}</span>
|
||||
<span style="font-size: 22px" class="mb-3">
|
||||
{{ review.headline }} - {{ review.rating|rating_stars }}
|
||||
</span>
|
||||
<p> {{ review.comment }} </p>
|
||||
<div class="col-10 border border-2 border-secondary-subtle mb-3">
|
||||
{% include 'reviews/ticket_detail.html' with ticket=review.ticket %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
@ -1,13 +1,14 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row mt-3">
|
||||
<div class="col d-flex justify-content-center">
|
||||
<h2>Créer une critique</h2>
|
||||
</div>
|
||||
</div>
|
||||
<section>
|
||||
<div class="row border border-3 border-secondary-subtle">
|
||||
<p>Vous êtes en train de répondre à </p>
|
||||
<div class="col d-flex justify-content-center mb-2">
|
||||
@ -16,20 +17,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<section>
|
||||
<div class="row border border-3 border-secondary-subtle">
|
||||
<h3>Critique</h3>
|
||||
<div class="d-flex justify-content-center mb-2">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{% include 'reviews/review_form.html' %}
|
||||
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="submit" class="btn btn-primary"> Envoyer </button>
|
||||
</div>
|
||||
<form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
@ -2,30 +2,27 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row my-4">
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="row mt-5">
|
||||
<div class="col d-flex justify-content-center">
|
||||
<h2>Modifier votre critique</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row border border-3">
|
||||
<p>Vous êtes en train de poster en réponse à</p>
|
||||
|
||||
<section>
|
||||
<div class="row border border-3 mt-3 mb-1">
|
||||
<h3>Vous êtes en train de poster en réponse à</h3>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-10 border border-2 border-secondary-subtle mb-3">
|
||||
{% include 'reviews/ticket_detail.html' with ticket=review.ticket %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row border border-3 p-2">
|
||||
<div class="col-3">
|
||||
<p>Critique</p>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="col-4 mb-2">
|
||||
</section>
|
||||
<section>
|
||||
<div class="row border border-3 border-secondary-subtle justify-content-center mb-5 pb-5">
|
||||
<h3>Critique</h3>
|
||||
<div class="col-4 mb-4">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{% include 'reviews/review_form.html' %}
|
||||
@ -35,9 +32,9 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container text-center">
|
||||
<section>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="d-flex justify-content-center my-5">
|
||||
<h2> Suivre d'autres utilisateurs </h2>
|
||||
@ -20,8 +22,9 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<div class="row d-flex justify-content-end">
|
||||
<div class="d-flex justify-content-center mt-5">
|
||||
<h2> Abonnements </h2>
|
||||
@ -37,7 +40,9 @@
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="d-flex justify-content-center mt-5">
|
||||
<h2> Abonnés </h2>
|
||||
@ -49,7 +54,7 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
@ -1,24 +1,28 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-md-auto form-group mt-5">
|
||||
<div class="row mt-5">
|
||||
<div class="col d-flex justify-content-center">
|
||||
<h2> Créer un ticket </h2>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center border border-3 border-secondary-subtle mt-5">
|
||||
<div class="col-4 mt-5">
|
||||
</div>
|
||||
<section>
|
||||
<div class="row border border-3 border-secondary-subtle justify-content-center mt-3">
|
||||
<h3> Livre/Article </h3>
|
||||
<div class="col-4 mb-4">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ ticket_form.as_p }}
|
||||
<div class="d-flex justify-content-end mb-4">
|
||||
{% include 'reviews/ticket_form.html' %}
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="submit" class="btn btn-primary"> Envoyer </button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container text-center" style="height: 100vh">
|
||||
<div class="row h-100 align-items-center">
|
||||
<form method="post">
|
||||
@ -11,6 +11,7 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
{% load reviews_extras %}
|
||||
|
||||
<main>
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-8 mb-4">
|
||||
{% display_owner ticket.user %} publié une demande
|
||||
@ -8,10 +10,12 @@
|
||||
{{ ticket.time_created }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<section>
|
||||
<p><strong> {{ ticket.title }} </strong></p>
|
||||
<p> {{ ticket.desc }} </p>
|
||||
|
||||
<div class="col-3 mb-2">
|
||||
<img src="{{ ticket.image.url }}" class="img" alt="Couverture de {{ ticket.title }}">
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
@ -1,16 +1,30 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="row d-flex align-items-center">
|
||||
<h2> Modifier la demande {{ ticket.title }}</h2>
|
||||
<div class="row mt-5">
|
||||
<div class="col d-flex justify-content-center">
|
||||
<h2> Modifier la demande "{{ ticket.title }}"</h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
<section>
|
||||
<div class="row border border-3 border-secondary-subtle justify-content-center mt-3">
|
||||
<h3> Livre/Article </h3>
|
||||
<div class="col-4 mb-4">
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{% include 'reviews/ticket_form.html' %}
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="submit" class="btn btn-primary"> Envoyer </button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
<div class="container text-center" style="height: 100vh">
|
||||
<div class="row h-100 align-items-center">
|
||||
<form method="post">
|
||||
@ -11,4 +11,5 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
@ -7,14 +7,6 @@ from reviews.forms import TicketForm, ReviewForm, ToFollowForm
|
||||
from itertools import chain
|
||||
|
||||
|
||||
@login_required
|
||||
def home(request):
|
||||
tickets = Ticket.objects.all()
|
||||
return render(request,
|
||||
'reviews/home.html',
|
||||
{'tickets': tickets})
|
||||
|
||||
|
||||
@login_required
|
||||
def flux(request):
|
||||
"""
|
||||
@ -67,6 +59,7 @@ def ticket(request, ticket_id):
|
||||
'reviews/ticket.html',
|
||||
{'ticket': ticket})
|
||||
|
||||
|
||||
@login_required
|
||||
def create_ticket(request):
|
||||
"""
|
||||
@ -107,7 +100,7 @@ def update_ticket(request, ticket_id):
|
||||
|
||||
return render(request,
|
||||
'reviews/ticket_update.html',
|
||||
{'ticket_form': ticket_form})
|
||||
{'ticket_form': ticket_form, 'ticket': ticket})
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -26,7 +26,8 @@
|
||||
</header>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<footer>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user