2020-07-09 05:10:09 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ _("Review") }}
|
|
|
|
{% endblock %}
|
|
|
|
|
2020-07-09 06:01:18 +02:00
|
|
|
{% block link %}
|
2023-06-18 23:00:24 +02:00
|
|
|
<a href="{{ package.get_url('packages.view') }}">{{ package.title }}</a>
|
2020-07-09 06:01:18 +02:00
|
|
|
{% endblock %}
|
2020-07-09 05:10:09 +02:00
|
|
|
|
2023-12-16 01:57:13 +01:00
|
|
|
{% block scriptextra %}
|
|
|
|
{% from "macros/forms.html" import easymde_scripts %}
|
|
|
|
{{ easymde_scripts() }}
|
|
|
|
{% endblock %}
|
|
|
|
|
2020-07-09 06:01:18 +02:00
|
|
|
{% block content %}
|
2020-07-09 06:22:58 +02:00
|
|
|
<h1>{{ _("Post a review for %(title)s by %(author)s", title=self.link(), author=package.author.display_name) }}</h1>
|
2020-07-09 05:10:09 +02:00
|
|
|
|
2024-06-05 20:28:16 +02:00
|
|
|
<p class="alert alert-primary">
|
|
|
|
{{ _("Please make sure you read ContentDB's <a href='/rules/'>rules</a>") }}
|
|
|
|
</p>
|
|
|
|
|
2021-01-24 14:10:20 +01:00
|
|
|
{% if package.issueTracker %}
|
|
|
|
<p class="alert alert-secondary">
|
2022-01-08 18:57:05 +01:00
|
|
|
{{ _("Found a bug? Post on the <a href='%(url)s'>issue tracker</a> instead.", url=package.issueTracker) }}<br />
|
2021-01-24 14:10:20 +01:00
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
|
2024-06-05 20:28:16 +02:00
|
|
|
|
2020-07-10 21:47:03 +02:00
|
|
|
{% from "macros/forms.html" import render_field, render_submit_field, render_toggle_field %}
|
2020-07-09 05:10:09 +02:00
|
|
|
<form method="POST" action="" enctype="multipart/form-data">
|
|
|
|
{{ form.hidden_tag() }}
|
|
|
|
<div class="row mt-0 mb-4 comments mx-0">
|
|
|
|
<div class="col-md-1 p-1">
|
2023-08-25 21:49:55 +02:00
|
|
|
<img class="img-fluid user-photo img-thumbnail img-thumbnail-1"
|
|
|
|
src="{{ current_user.get_profile_pic_url() }}" loading="lazy">
|
2020-07-09 05:10:09 +02:00
|
|
|
</div>
|
|
|
|
<div class="col">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header {{ current_user.rank.name }}">
|
|
|
|
{{ current_user.display_name }}
|
|
|
|
<a name="reply"></a>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<p>
|
2024-06-09 14:26:16 +02:00
|
|
|
{{ package.type.do_you_recommend }}
|
2020-07-09 05:10:09 +02:00
|
|
|
</p>
|
2023-05-26 22:39:24 +02:00
|
|
|
{{ render_toggle_field(form.rating, icons={"5":"fa-thumbs-up", "3": "fa-minus", "1":"fa-thumbs-down"}) }}
|
2020-07-09 05:10:09 +02:00
|
|
|
|
|
|
|
<p class="mt-4 mb-3">
|
|
|
|
{{ _("Why or why not? Try to be constructive") }}
|
|
|
|
</p>
|
|
|
|
|
|
|
|
{{ render_field(form.title) }}
|
2024-06-08 12:12:42 +02:00
|
|
|
{{ render_field(form.language, hint=_("What language are you writing your review in?")) }}
|
2023-08-26 14:41:32 +02:00
|
|
|
{{ render_field(form.comment, label="", class_="m-0", fieldclass="form-control markdown", data_enter_submit="1") }} <br />
|
|
|
|
{{ render_submit_field(form.btn_submit) }}
|
2020-07-09 05:10:09 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
2020-07-10 20:26:37 +02:00
|
|
|
{% if review %}
|
2023-06-18 22:56:19 +02:00
|
|
|
<form method="POST" action="{{ review.get_delete_url() }}" class="alert alert-secondary my-5">
|
2020-07-10 20:26:37 +02:00
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
2023-08-22 20:58:43 +02:00
|
|
|
<input class="btn btn-sm btn-danger float-end" type="submit" value="{{ _('Delete') }}">
|
2020-07-10 20:26:37 +02:00
|
|
|
<b>{{ _("Delete review.") }}</b>
|
|
|
|
{{ _("This will convert the review into a thread, keeping the comments but removing its effect on the package's rating.") }}
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2020-07-09 05:10:09 +02:00
|
|
|
|
|
|
|
{% endblock %}
|