Basic email template for notifications #96

Merged
Anna Sirota merged 14 commits from notification-templates into main 2024-05-02 14:04:24 +02:00
3 changed files with 2 additions and 26 deletions
Showing only changes of commit 0975b94a04 - Show all commits

View File

@ -1,5 +1,5 @@
{% load common filters %} {% load common filters %}
{% with latest=extension.latest_version thumbnail_360p_url=extension.previews.listed.first.thumbnail_360p_url %} {% with latest=extension.latest_version thumbnail_360p_url=extension.get_previews.0.thumbnail_360p_url %}
<div class="cards-item"> <div class="cards-item">
<div class="cards-item-content"> <div class="cards-item-content">
<a href="{{ extension.get_absolute_url }}"> <a href="{{ extension.get_absolute_url }}">

View File

@ -70,24 +70,6 @@
{% block extension_galleria %} {% block extension_galleria %}
{% include "extensions/components/galleria.html" with extension=extension %} {% include "extensions/components/galleria.html" with extension=extension %}
{% if pending_previews %}
<section class="my-3 box p-3">
<h3>Previews Pending Approval</h3>
<div class="row">
{% for preview in pending_previews %}
{% with thumbnail_1080p_url=preview.file.thumbnail_1080p_url %}
<div class="col-md-3">
<a href="{{ preview.file.source.url }}" class="d-block mb-2" title="{{ preview.caption }}" target="_blank">
<img class="img-fluid rounded" src="{{ thumbnail_1080p_url }}" alt="{{ preview.caption }}">
</a>
{% include "common/components/status.html" with object=preview.file class="d-block" %}
</div>
{% endwith %}
{% endfor %}
</div>
</section>
{% endif %}
{% endblock extension_galleria %} {% endblock extension_galleria %}
@ -167,9 +149,7 @@
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="btn-row ms-3 w-100 justify-content-end"> <div class="btn-row ms-3 w-100 justify-content-end">
{% if is_maintainer or request.user.is_moderator %} {% include "common/components/field.html" with field=form.type %}
{% include "common/components/field.html" with field=form.type %}
{% endif %}
<button type="submit" id="activity-submit" class="btn btn-primary"> <button type="submit" id="activity-submit" class="btn btn-primary">
<span>{% trans "Comment" %}</span> <span>{% trans "Comment" %}</span>

View File

@ -6,7 +6,6 @@ from django.views.generic import DetailView, FormView
from django.shortcuts import reverse from django.shortcuts import reverse
import django.forms import django.forms
from files.models import File
from extensions.models import Extension from extensions.models import Extension
from reviewers.forms import CommentForm from reviewers.forms import CommentForm
from reviewers.models import ApprovalActivity from reviewers.models import ApprovalActivity
@ -69,9 +68,6 @@ class ExtensionsApprovalDetailView(DetailView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs) ctx = super().get_context_data(**kwargs)
ctx['pending_previews'] = self.object.preview_set.exclude(
file__status=File.STATUSES.APPROVED
)
ctx['status_change_types'] = STATUS_CHANGE_TYPES ctx['status_change_types'] = STATUS_CHANGE_TYPES
if self.request.user.is_authenticated: if self.request.user.is_authenticated: