Last commit july 5th

This commit is contained in:
2024-07-05 13:46:23 +02:00
parent dad0d86e8c
commit b0e4dfbb76
24982 changed files with 2621219 additions and 413 deletions

View File

@@ -0,0 +1,8 @@
{% extends 'base.html.twig' %}
{% block body %}
<h2>Comment reviewed, thank you!</h2>
<p>Applied transition: <strong>{{ transition }}</strong></p>
<p>New state: <strong>{{ comment.state }}</strong></p>
{% endblock %}

View File

@@ -1,26 +1,80 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
{% block stylesheets %}
{% endblock %}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% block javascripts %}
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% endblock %}
</head>
<body>
<header>
<h1><a href="{{ path('homepage') }}">Guestbook</a></h1>
<ul>
{% for conference in conferences %}
<li><a href="{{ path('conference', { slug: conference.slug }) }}">{{ conference }}</a></li>
{% endfor %}
</ul>
<hr />
</header>
{% block body %}{% endblock %}
</body>
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,500,500i,600,600i&display=swap"
rel="stylesheet"/>
{{ encore_entry_link_tags('app') }}
{% endblock %}
</head>
<body>
<header class="header">
<h1 class="visually-hidden">
Conference Guestbook
</h1>
<nav class="navbar navbar-expand-xl navbar-light bg-light">
<div class="container mt-4 mb-3">
<a class="navbar-brand me-4 pr-2" href="{{ path('homepage') }}">
&#128217; {{ 'Conference Guestbook'|trans }}
</a>
<button class="navbar-toggler border-0" type="button" data-bs-toggle="collapse"
data-bs-target="#header-menu" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Show/Hide navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="header-menu">
<ul class="navbar-nav ms-auto">
<li class="nav-item me-3">
<a class="nav-link" href="{{ path('admin') }}">
Admin
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown-language" role="button"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ app.request.locale|locale_name(app.request.locale)|u.title }}
</a>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdown-language">
<li><a class="dropdown-item" href="{{ path('homepage', {_locale: 'en'}) }}">English</a></li>
<li><a class="dropdown-item" href="{{ path('homepage', {_locale: 'fr'}) }}">Français</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<nav class="bg-light border-bottom">
<div class="container">
{{ render_esi(path('conference_header')) }}
</div>
</nav>
</header>
<main role="main" class="container mt-5">
{% block body %}{% endblock %}
</main>
<footer class="mt-7 px-3 py-5 text-center text-muted">
<p>
Conference Guestbook
</p>
<p>
<a href="#" class="text-white">Back to top</a>
</p>
</footer>
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
</body>
</html>

View File

@@ -0,0 +1,5 @@
{% for conference in conferences %}
<a class="nav-conference" href="{{ path('conference', { slug: conference.slug }) }}">
{{ conference }}
</a>
{% endfor %}

View File

@@ -1,17 +1,32 @@
{% extends 'base.html.twig' %}
{% block title %}Hello ConferenceController!{% endblock %}
{% block title %}Conference Guestbook{% endblock %}
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>
<h2 class="mb-5">
{{ 'Give your feedback!'|trans }}
</h2>
{% for conference in conferences %}
<h4>{{ conference }}</h4>
<p>
<a href="{{ path('conference', { slug: conference.slug }) }}">View</a>
</p>
{% for row in conferences|batch(4) %}
<div class="row">
{% for conference in row %}
<div class="col-12 col-md-6 col-lg-3 mb-4">
<div class="card border shadow lift">
<div class="card-body">
<div class="card-title">
<h4 class="font-weight-light">
{{ conference }}
</h4>
</div>
<a href="{{ path('conference', { slug: conference.slug }) }}"
class="btn btn-sm btn-primary stretched-link">
{{ 'View'|trans }}
</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
{% endblock %}

View File

@@ -3,32 +3,68 @@
{% block title %}Conference Guestbook - {{ conference }}{% endblock %}
{% block body %}
<h2>{{ conference }} Conference</h2>
{% if comments|length > 0 %}
<div>There are {{ comments|length }} comments.</div>
{% for comment in comments %}
{% if comment.photofilename %}
<img src="{{ asset('uploads/photos/' ~ comment.photofilename) }}" style="max-width: 200px" />
{% endif %}
{% for message in app.flashes('notification') %}
<div class="alert alert-info alert-dismissible fade show">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
{% endfor %}
<h2 class="mb-5">
{{ conference }} Conference
</h2>
<h4>{{ comment.author }}</h4>
<small>
{{ comment.createdAt|format_datetime('medium', 'short') }}
</small>
<div class="row">
<div class="col-12 col-lg-8">
{% if comments|length > 0 %}
{% for comment in comments %}
<div class="media shadow border rounded-3 p-3 mb-4">
<div class="comment-img me-3">
{% if comment.photofilename %}
<a href="{{ asset('uploads/photos/' ~ comment.photofilename) }}" target="_blank">
<img src="{{ asset('uploads/photos/' ~ comment.photofilename) }}" />
</a>
{% endif %}
</div>
<p>{{ comment.text }}</p>
{% endfor %}
{% if previous >= 0 %}
<a href="{{ path('conference', { slug: conference.slug, offset: previous }) }}">Previous</a>
{% endif %}
<div class="media-body">
<h4 class="font-weight-light mb-0">
{{ comment.author }}
</h4>
<div class="mb-2">
<small class="text-muted text-uppercase">
{{ comment.createdAt|format_datetime('medium', 'short') }}
</small>
</div>
<div class="comment-text">
{{ comment.text|nl2br }}
</div>
</div>
</div>
{% endfor %}
<div>{{ 'nb_of_comments'|trans({count: comments|length}) }}</div>
{% if previous >= 0 %}
<a href="{{ path('conference', { slug: conference.slug, offset: previous }) }}">Previous</a>
{% endif %}
{% if next < comments|length %}
<a href="{{ path('conference', { slug: conference.slug, offset: next }) }}">Next</a>
{% endif %}
{% else %}
<div>No comments have been posted yet for this conference.</div>
{% endif %}
<h2>Add your own feedback</h2>
{% else %}
<div class="text-center">
No comments have been posted yet for this conference.
</div>
{% endif %}
</div>
<div class="col-12 col-lg-4">
<div class="bg-light shadow border rounded-3 p-4">
<h3 class="font-weight-light">
Add your own feedback
</h3>
{{ form(comment_form) }}
{% endblock %}
{{ form(comment_form) }}
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,17 @@
{% extends '@email/default/notification/body.html.twig' %}
{% block content %}
Author: {{ comment.author }}<br />
Email: {{ comment.email }}<br />
State: {{ comment.state }}<br />
<p>
{{ comment.text }}
</p>
{% endblock %}
{% block action %}
<spacer size="16"></spacer>
<button href="{{ url('review_comment', { id: comment.id }) }}">Accept</button>
<button href="{{ url('review_comment', { id: comment.id, reject: true }) }}">Reject</button>
{% endblock %}