Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions lang/en/cantcreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

return [
'heading' => 'Adding events',
'intro' => 'You need to be a host of a group in order to create a new event listing.',
'image_alt' => 'Materials for promoting upcoming Restart events',
'not_host_q' => 'Not a host?',
'not_host_body' => 'You can view already listed events for any groups that you\'re following, and other events near you, on the <a href="/group">Events</a> page.',
'missing_event' => '(If an event is missing, please encourage the group host to list it!)',
'want_to_add_group_q' => 'Want to add a group that you host?',
'want_to_add_group_body' => 'Check whether it\'s already listed on the <a href="/group">Groups</a> page - and if not, please create it!',
'start_new_group_q' => 'Want to start a new group?',
'start_new_group_body' => 'Find out more here: <a href="https://talk.restarters.net/t/how-to-power-up-community-repair-with-restarters-net/1228/2">How to power up community repair with Restarters.net</a>.',
];
14 changes: 14 additions & 0 deletions lang/fr-BE/cantcreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

return [
'heading' => 'Ajouter des événements',
'intro' => 'Vous devez être hôte d\'un groupe pour pouvoir créer une nouvelle annonce d\'événement.',
'image_alt' => 'Matériel pour promouvoir les prochains événements Restart',
'not_host_q' => 'Vous n\'êtes pas hôte ?',
'not_host_body' => 'Vous pouvez consulter les événements déjà annoncés par les groupes que vous suivez, ainsi que d\'autres événements près de chez vous, sur la page <a href="/group">Événements</a>.',
'missing_event' => '(Si un événement est manquant, encouragez l\'hôte du groupe à l\'annoncer !)',
'want_to_add_group_q' => 'Vous voulez ajouter un groupe dont vous êtes hôte ?',
'want_to_add_group_body' => 'Vérifiez s\'il est déjà répertorié sur la page <a href="/group">Groupes</a> — sinon, créez-le !',
'start_new_group_q' => 'Vous voulez démarrer un nouveau groupe ?',
'start_new_group_body' => 'Pour en savoir plus : <a href="https://talk.restarters.net/t/how-to-power-up-community-repair-with-restarters-net/1228/2">Comment dynamiser la réparation communautaire avec Restarters.net</a>.',
];
14 changes: 14 additions & 0 deletions lang/fr/cantcreate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

return [
'heading' => 'Ajouter des événements',
'intro' => 'Vous devez être hôte d\'un groupe pour pouvoir créer une nouvelle annonce d\'événement.',
'image_alt' => 'Matériel pour promouvoir les prochains événements Restart',
'not_host_q' => 'Vous n\'êtes pas hôte ?',
'not_host_body' => 'Vous pouvez consulter les événements déjà annoncés par les groupes que vous suivez, ainsi que d\'autres événements près de chez vous, sur la page <a href="/group">Événements</a>.',
'missing_event' => '(Si un événement est manquant, encouragez l\'hôte du groupe à l\'annoncer !)',
'want_to_add_group_q' => 'Vous voulez ajouter un groupe dont vous êtes hôte ?',
'want_to_add_group_body' => 'Vérifiez s\'il est déjà répertorié sur la page <a href="/group">Groupes</a> — sinon, créez-le !',
'start_new_group_q' => 'Vous voulez démarrer un nouveau groupe ?',
'start_new_group_body' => 'Pour en savoir plus : <a href="https://talk.restarters.net/t/how-to-power-up-community-repair-with-restarters-net/1228/2">Comment dynamiser la réparation communautaire avec Restarters.net</a>.',
];
2 changes: 2 additions & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import EventAddEditPage from './components/EventAddEditPage.vue'
import EventAddEdit from './components/EventAddEdit.vue'
import EventsRequiringModeration from './components/EventsRequiringModeration.vue'
import EventPage from './components/EventPage.vue'
import CantCreateEventPage from './components/CantCreateEventPage.vue'
import FixometerPage from './components/FixometerPage.vue'
import GroupsPage from './components/GroupsPage.vue'
import GroupPage from './components/GroupPage.vue'
Expand Down Expand Up @@ -400,6 +401,7 @@ function initializeJQuery() {
'eventaddedit': EventAddEdit,
'eventsrequiringmoderation': EventsRequiringModeration,
'eventpage': EventPage,
'cantcreateeventpage': CantCreateEventPage,
'fixometerpage': FixometerPage,
'groupspage': GroupsPage,
'grouppage': GroupPage,
Expand Down
44 changes: 44 additions & 0 deletions resources/js/components/CantCreateEventPage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<template>
<section class="events events-page">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-lg-12">
<header>
<h2>{{ __('cantcreate.heading') }}</h2>
</header>

<p>{{ __('cantcreate.intro') }}</p>

<img

Check warning on line 12 in resources/js/components/CantCreateEventPage.vue

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove redundant word "image" from the "alt" attribute of your "img" tag.

See more on https://sonarcloud.io/project/issues?id=TheRestartProject_restarters.net&issues=AZ56--oB_mu6a-CMemye&open=AZ56--oB_mu6a-CMemye&pullRequest=867
class="d-none d-md-block img-fluid img-thumbnail mb-4"
src="/images/dashboard/dashboard__getting-started-in-community-repair-1.png"
:alt="__('cantcreate.image_alt')"
>

<p>
<strong>{{ __('cantcreate.not_host_q') }}</strong>
<span v-html="__('cantcreate.not_host_body')" />
<br>
<em>{{ __('cantcreate.missing_event') }}</em>
</p>

<p>
<strong>{{ __('cantcreate.want_to_add_group_q') }}</strong>
<span v-html="__('cantcreate.want_to_add_group_body')" />
</p>

<p>
<strong>{{ __('cantcreate.start_new_group_q') }}</strong>
<span v-html="__('cantcreate.start_new_group_body')" />
</p>
</div>
</div>
</div>
</section>
</template>

<script>
export default {
name: 'CantCreateEventPage',
}
</script>
35 changes: 6 additions & 29 deletions resources/views/events/cantcreate.blade.php
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
@extends('layouts.app')
@section('content')
<section class="events events-page">

<div class="container-fluid">

<div class="row justify-content-center">
<div class="col-lg-12">

<header>
<h2>Adding events</h2>
</header>

<p>You need to be a host of a group in order to create a new event listing.</p>

<img class="d-none d-md-block img-fluid img-thumbnail mb-4" src="/images/dashboard/dashboard__getting-started-in-community-repair-1.png" alt="Materials for promoting upcoming Restart events">

<p><strong>Not a host?</strong> You can view already listed events for any groups that you're following, and other events near you, on the <a href="/group">Events</a> page.
<br>(If an event is missing, please encourage the group host to list it!)
</p>

<p><strong>Want to add a group that you host?</strong> Check whether it's already listed on the <a href="/group">Groups</a> page - and if not, please create it!</p>

<p><strong>Want to start a new group?</strong> Find out more here: <a href="https://talk.restarters.net/t/how-to-power-up-community-repair-with-restarters-net/1228/2">How to power up community repair with Restarters.net</a>.
</p>
</div>
</div>

</div>

</section>
<div class="vue-placeholder vue-placeholder-large">
<div class="vue-placeholder-content">@lang('partials.loading')...</div>
</div>
<div class="vue">
<CantCreateEventPage />
</div>
@endsection
20 changes: 20 additions & 0 deletions tests/Feature/Events/CantCreateEventPageTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Tests\Feature\Events;

use App\Role;
use App\User;
use Tests\TestCase;

class CantCreateEventPageTest extends TestCase
{
public function testRestarterSeesVueCantCreatePage(): void
{
$user = User::factory()->restarter()->create();
$this->actingAs($user);

$response = $this->get('/party/create');
$response->assertSuccessful();
$response->assertSee('<CantCreateEventPage', false);
}
}