mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
feat: display moderation requests to moderators
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
{%- block additional_css -%}
|
||||
<link rel="stylesheet" href="{{ static('sas/css/picture.scss') }}">
|
||||
<link rel="stylesheet" href="{{ static('webpack/sas/viewer-index.css') }}" defer>
|
||||
<link rel="stylesheet" href="{{ static('webpack/sas/viewer-index.css') }}">
|
||||
{%- endblock -%}
|
||||
|
||||
{%- block additional_js -%}
|
||||
@ -30,10 +30,10 @@
|
||||
<br>
|
||||
|
||||
<template x-if="!currentPicture.is_moderated">
|
||||
<div class="alert alert-red">
|
||||
<div class="alert alert-red" @click="console.log(currentPicture)">
|
||||
<div class="alert-main">
|
||||
<template x-if="currentPicture.askedForRemoval">
|
||||
<span class="important">{% trans %}Asked for removal{% endtrans %}</span>
|
||||
<template x-if="currentPicture.asked_for_removal">
|
||||
<h3 class="alert-title">{% trans %}Asked for removal{% endtrans %}</h3>
|
||||
</template>
|
||||
<p>
|
||||
{% trans trimmed %}
|
||||
@ -41,16 +41,33 @@
|
||||
It will be hidden to other users until it has been moderated.
|
||||
{% endtrans %}
|
||||
</p>
|
||||
<template x-if="currentPicture.asked_for_removal">
|
||||
<div>
|
||||
<h5 @click="console.log(currentPicture.moderationRequests)">
|
||||
{% trans %}The following issues have been raised:{% endtrans %}
|
||||
</h5>
|
||||
<template x-for="req in (currentPicture.moderationRequests ?? [])" :key="req.id">
|
||||
<div>
|
||||
<h6
|
||||
x-text="`${req.author.first_name} ${req.author.last_name}`"
|
||||
></h6>
|
||||
<i x-text="Intl.DateTimeFormat(
|
||||
'{{ LANGUAGE_CODE }}',
|
||||
{dateStyle: 'long', timeStyle: 'short'}
|
||||
).format(new Date(req.created_at))"></i>
|
||||
<blockquote x-text="`> ${req.reason}`"></blockquote>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<button class="btn btn-blue" @click="moderatePicture()">
|
||||
{% trans %}Moderate{% endtrans %}
|
||||
</button>
|
||||
<button class="btn btn-red" @click.prevent="deletePicture()">
|
||||
{% trans %}Delete{% endtrans %}
|
||||
</button>
|
||||
</div>
|
||||
<div class="alert-aside">
|
||||
<button class="btn btn-blue" @click="moderatePicture()">
|
||||
{% trans %}Moderate{% endtrans %}
|
||||
</button>
|
||||
<button class="btn btn-red" @click.prevent="deletePicture()">
|
||||
{% trans %}Delete{% endtrans %}
|
||||
</button>
|
||||
<p x-show="!!moderationError" x-text="moderationError"></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -58,7 +75,6 @@
|
||||
|
||||
<div class="container" id="pict">
|
||||
<div class="main">
|
||||
|
||||
<div class="photo" :aria-busy="currentPicture.imageLoading">
|
||||
<img
|
||||
:src="currentPicture.compressed_url"
|
||||
|
Reference in New Issue
Block a user