]> _ Git - psq.git/commitdiff
settings + not registered
authorLouis Jeckel <louis.jeckel@outlook.cm>
Thu, 6 Aug 2020 13:48:01 +0000 (15:48 +0200)
committerLouis Jeckel <louis.jeckel@outlook.cm>
Thu, 6 Aug 2020 13:48:01 +0000 (15:48 +0200)
15 files changed:
app/Http/Controllers/Admin/SettingController.php [new file with mode: 0644]
app/Http/Controllers/Auth/NotRegisteredYet.php [new file with mode: 0644]
config/twill-navigation.php
config/twill.php
database/migrations/2020_08_06_000005_create_twill_default_settings_table.php [new file with mode: 0644]
public/css/app.css
public/img/not-registered.jpg [new file with mode: 0644]
resources/sass/app.scss
resources/views/admin/settings/podcasts.blade.php [new file with mode: 0644]
resources/views/admin/settings/strings.blade.php [new file with mode: 0644]
resources/views/not-registered.blade.php [new file with mode: 0644]
resources/views/podcasts/index.blade.php
resources/views/welcome.blade.php [deleted file]
routes/admin.php
routes/web.php

diff --git a/app/Http/Controllers/Admin/SettingController.php b/app/Http/Controllers/Admin/SettingController.php
new file mode 100644 (file)
index 0000000..eb6ac09
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+
+namespace App\Http\Controllers\Admin;
+use A17\Twill\Http\Controllers\Admin\SettingController as Base;
+
+class SettingController extends Base
+{
+    public function strings()
+    {
+        return $this->index('strings');
+    }
+
+    public function podcasts()
+    {
+        return $this->index('podcasts');
+    }
+
+
+}
diff --git a/app/Http/Controllers/Auth/NotRegisteredYet.php b/app/Http/Controllers/Auth/NotRegisteredYet.php
new file mode 100644 (file)
index 0000000..a15f47c
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+
+namespace App\Http\Controllers\Auth;
+
+use App\Http\Controllers\Controller;
+
+
+class NotRegisteredYet extends Controller
+{
+
+    public function index()
+    {
+        return view('not-registered');
+    }
+
+}
index 18a37d76af74dd0d2140ff5f1edddbaccd9610b7..a52d699dc4b0e46ebb9789a33e088213bd0d1a30 100644 (file)
@@ -34,11 +34,23 @@ return [
                 'podcasts' => [
                     'title' => 'Podcasts',
                     'module' => true
-                ]
-
-
-        ]
+                ],
+        ],
     ],
+    'staticcontent' => [
+        'title' => 'Contenu statique',
+        'route' => 'admin.stat.strings',
+        'primary_navigation' => [
+            'strings' => [
+                'title' => 'Texte',
+                'route' => 'admin.stat.strings',
+            ],
+            'podcasts' => [
+                'title' => 'Texte',
+                'route' => 'admin.stat.podcasts',
+            ]
+        ]
+    ]
 
 
 
index dccbd52a6343de736538687f4d0307c77b02108a..4a7ebc4dbaa59a8e04eb918395d686e34b026955 100644 (file)
@@ -14,8 +14,10 @@ return [
 
     'enabled' => [
         'buckets' => true,
+        'settings' => true,
     ],
 
+
     'bucketsRoutes' => [
         'homepage' => 'content'
     ],
diff --git a/database/migrations/2020_08_06_000005_create_twill_default_settings_table.php b/database/migrations/2020_08_06_000005_create_twill_default_settings_table.php
new file mode 100644 (file)
index 0000000..3b13040
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Support\Str;
+
+class CreateTwillDefaultSettingsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        $twillSettingsTable = config('twill.settings_table', 'twill_settings');
+
+        if (!Schema::hasTable($twillSettingsTable)) {
+            Schema::create($twillSettingsTable, function (Blueprint $table) {
+                $table->{twillIncrementsMethod()}('id');
+                $table->timestamps();
+                $table->softDeletes();
+                $table->string('key')->nullable()->index();
+                $table->string('section')->nullable()->index();
+            });
+        }
+
+        if (!Schema::hasTable(Str::singular($twillSettingsTable) . '_translations')) {
+            Schema::create(Str::singular($twillSettingsTable) . '_translations', function (Blueprint $table) use ($twillSettingsTable) {
+                createDefaultTranslationsTableFields($table, Str::singular($twillSettingsTable));
+                $table->text('value')->nullable();
+            });
+        }
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        $twillSettingsTable = config('twill.settings_table', 'twill_settings');
+
+        Schema::dropIfExists(Str::singular($twillSettingsTable) . '_translations');
+        Schema::dropIfExists($twillSettingsTable);
+    }
+}
index bb2a3158b30b76553b5c200db7eed3685276eda1..1d1e25b707af2b1f1159048b814adf44c89a398e 100644 (file)
@@ -11304,6 +11304,10 @@ div.pill-box div > a {
   display: block;
 }
 
+.small-text {
+  font-size: xx-small;
+}
+
 .spotlight-news {
   background-color: rgba(7, 78, 156, 0.25);
   padding: 0.5rem;
diff --git a/public/img/not-registered.jpg b/public/img/not-registered.jpg
new file mode 100644 (file)
index 0000000..d0c1f41
Binary files /dev/null and b/public/img/not-registered.jpg differ
index 7f673924b6cf87ea5ba976aff93775707d82acc0..07b519ce15bb5d14911b43a9cb9a742742a3ce24 100644 (file)
@@ -38,6 +38,10 @@ a {
     display: block;
 }
 
+.small-text {
+    font-size: xx-small;
+}
+
 
 //Spotlight news
 
diff --git a/resources/views/admin/settings/podcasts.blade.php b/resources/views/admin/settings/podcasts.blade.php
new file mode 100644 (file)
index 0000000..e660370
--- /dev/null
@@ -0,0 +1,12 @@
+@extends('twill::layouts.settings', ['contentFieldsetLabel' => 'Modification de la page podcatss'])
+
+@section('contentFields')
+    @formField('wysiwyg', [
+        'label' => 'Texte page pas encore abonné',
+        'name' => 'not_registered_text',
+        'maxlength' => 1000,
+        'required' => true,
+        'toolbarOptions' => [ [ 'header' => [2, 3, false] ], 'bold', 'italic', 'underline', 'strike', 'list-ordered', 'list-unordered', [ 'indent' => '-1'], [ 'indent' => '+1' ] ],
+
+    ])
+@stop
diff --git a/resources/views/admin/settings/strings.blade.php b/resources/views/admin/settings/strings.blade.php
new file mode 100644 (file)
index 0000000..a2db18a
--- /dev/null
@@ -0,0 +1,12 @@
+@extends('twill::layouts.settings', ['contentFieldsetLabel' => 'Modification du contenu statique'])
+
+@section('contentFields')
+    @formField('wysiwyg', [
+        'label' => 'Texte page pas encore abonné',
+        'name' => 'not_registered_text',
+        'maxlength' => 1000,
+        'required' => true,
+        'toolbarOptions' => [ [ 'header' => [2, 3, false] ], 'bold', 'italic', 'underline', 'strike', 'list-ordered', 'list-unordered', [ 'indent' => '-1'], [ 'indent' => '+1' ] ],
+
+    ])
+@stop
diff --git a/resources/views/not-registered.blade.php b/resources/views/not-registered.blade.php
new file mode 100644 (file)
index 0000000..7d57e23
--- /dev/null
@@ -0,0 +1,20 @@
+@extends('layouts.app')
+@inject('settings', \A17\Twill\Repositories\SettingRepository)
+
+@section('content')
+<div class="container">
+    <h1>Pas encore abonné ?</h1>
+
+    <div class="row">
+        <div class="col-sm-6">
+            <img src="{{asset('img/not-registered.jpg')}}" alt="Image pas encore abonné" class="w-100">
+        </div>
+        <div class="col-sm-6">
+            {!! $settings->byKey('not_registered_text') !!}
+        </div>
+
+    </div>
+</div>
+
+
+@endsection
index b2b8bcf423c16ef19c2b550711f2d08cce9efe34..54c1f2810356e3fb662dbc802cc4f15e8f59d6dd 100644 (file)
@@ -6,10 +6,16 @@
 
 
     <div class="row mt-5">
+
+
+{{--        Static Mic Logo --}}
         <div class="col-sm-3 mb-3">
             <img src="{{asset('img/podcasts/microphone-temporary.png')}}" alt="Image microhpone" class="w-100">
             <a href="#" class="click-here">Cliquez ici pour écouter l'émission</a>
         </div>
+
+
+{{--        Description + weekly sponsor --}}
         <div class="col-sm-5 mb-3">
             <div class="text-justify mb-2">
                 {!! $podcast->description !!}
                     <a href="{{$podcast->sponsor_url}}">
                         <img src="{{$podcast->image('sponsor_logo', 'logo')}}" alt="Logo partenaire" class="w-100">
                     </a>
+                    <p class="small-text">Cliquez sur le logo pour accéder au site de notre partenaire</p>
                 </div>
             </div>
+        </div>
 
 
-        </div>
+{{--        Guests --}}
         <div class="col-sm-4 mb-3">
-                <h2 class="text-center">Nos débatteurs</h2>
+                <h2 class="text-center">Nos « débatteurs »</h2>
             <div class="row">
                 @foreach($podcast->guests as $guest)
                     <div class="col-6 mb-2">
     </div>
 
 
+    <div class="row mt-4">
+        <div class="col-12">
+            <h2 class="text-center">Nos rubriques du mois</h2>
+        </div>
+
+        <div class="col-sm-4"></div>
+        <div class="col-sm-4">
+
+        </div>
+        <div class="col-sm-4"></div>
+
+
+    </div>
+
+
+
+
 
 
 </div>
diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php
deleted file mode 100644 (file)
index 3fb48cc..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<!DOCTYPE html>
-<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
-    <head>
-        <meta charset="utf-8">
-        <meta name="viewport" content="width=device-width, initial-scale=1">
-
-        <title>Laravel</title>
-
-        <!-- Fonts -->
-        <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
-
-        <!-- Styles -->
-        <style>
-            html, body {
-                background-color: #fff;
-                color: #636b6f;
-                font-family: 'Nunito', sans-serif;
-                font-weight: 200;
-                height: 100vh;
-                margin: 0;
-            }
-
-            .full-height {
-                height: 100vh;
-            }
-
-            .flex-center {
-                align-items: center;
-                display: flex;
-                justify-content: center;
-            }
-
-            .position-ref {
-                position: relative;
-            }
-
-            .top-right {
-                position: absolute;
-                right: 10px;
-                top: 18px;
-            }
-
-            .content {
-                text-align: center;
-            }
-
-            .title {
-                font-size: 84px;
-            }
-
-            .links > a {
-                color: #636b6f;
-                padding: 0 25px;
-                font-size: 13px;
-                font-weight: 600;
-                letter-spacing: .1rem;
-                text-decoration: none;
-                text-transform: uppercase;
-            }
-
-            .m-b-md {
-                margin-bottom: 30px;
-            }
-        </style>
-    </head>
-    <body>
-        <div class="flex-center position-ref full-height">
-            @if (Route::has('login'))
-                <div class="top-right links">
-                    @auth
-                        <a href="{{ url('/home') }}">Home</a>
-                    @else
-                        <a href="{{ route('login') }}">Login</a>
-
-                        @if (Route::has('register'))
-                            <a href="{{ route('register') }}">Register</a>
-                        @endif
-                    @endauth
-                </div>
-            @endif
-
-            <div class="content">
-                <div class="title m-b-md">
-                    Laravel
-                </div>
-
-                <div class="links">
-                    <a href="https://laravel.com/docs">Docs</a>
-                    <a href="https://laracasts.com">Laracasts</a>
-                    <a href="https://laravel-news.com">News</a>
-                    <a href="https://blog.laravel.com">Blog</a>
-                    <a href="https://nova.laravel.com">Nova</a>
-                    <a href="https://forge.laravel.com">Forge</a>
-                    <a href="https://vapor.laravel.com">Vapor</a>
-                    <a href="https://github.com/laravel/laravel">GitHub</a>
-                </div>
-            </div>
-        </div>
-    </body>
-</html>
index f8df3d248761c912e61ea9bdc0cb231a7f50b2f9..6c059ab36964d1e475ca95f6735c95abd81360fb 100644 (file)
@@ -2,34 +2,43 @@
 
 Route::module('pdfFiles');
 
-Route::group(['prefix' => 'content'], function() {
+
+/** Dynamic content */
+Route::prefix('content')->group(function() {
     Route::module('articles');
     Route::module('adCampaigns');
     Route::module('events');
     Route::module('podcasts');
     Route::module('guests');
+    Route::get('settings/{section}', '\A17\Twill\Http\Controllers\Admin\SettingController@index')->name('content.settings');
 });
 
+/** Static content */
+Route::prefix('stat')->group(function() {
+   Route::get('strings', 'SettingController@strings' )->name('stat.strings');
+   Route::get('podcasts', 'SettingController@podcasts' )->name('stat.podcasts');
+});
 
-    /** Publishing and mass sending process */
-    Route::prefix('/publish')->group(function() {
-        Route::get('', 'PublishController@index')->name('publish');
-        Route::post('', 'PublishController@publish');
 
-        Route::post('/upload-file', 'PublishController@uploadFile');
-        Route::post('/preview', 'PublishController@previewEmail');
+/** Publishing and mass sending process */
+Route::prefix('publish')->group(function() {
+    Route::get('', 'PublishController@index')->name('publish');
+    Route::post('', 'PublishController@publish');
 
-        Route::get('/collections', 'PublishController@collections');
-        Route::get('/tags', 'PublishController@tags');
-        Route::get('/recipients', 'PublishController@recipientsCount');
+    Route::post('upload-file', 'PublishController@uploadFile');
+    Route::post('preview', 'PublishController@previewEmail');
 
-    });
+    Route::get('collections', 'PublishController@collections');
+    Route::get('tags', 'PublishController@tags');
+    Route::get('recipients', 'PublishController@recipientsCount');
 
-    Route::prefix('/statistics')->group(function () {
-        Route::get('', 'StatisticsController@index');
-        Route::get('/batches', 'StatisticsController@batches');
-        Route::get('/batches/{batch}/stats', 'StatisticsController@batchStatistics');
+});
 
-    });
+Route::prefix('statistics')->group(function () {
+    Route::get('', 'StatisticsController@index');
+    Route::get('batches', 'StatisticsController@batches');
+    Route::get('batches/{batch}/stats', 'StatisticsController@batchStatistics');
+
+});
 
-    Route::namespace('')->get('/preview/{file:slug}', '\\App\\Http\\Controllers\\FlowpaperController@preview')->name('preview');
+Route::namespace('')->get('/preview/{file:slug}', '\\App\\Http\\Controllers\\FlowpaperController@preview')->name('preview');
index 86fdcb1f9deb1967ac02c7e4b0031fdc1f4277fd..c230a0284b86b60b5119f5b3bc9567a67bf95ab2 100644 (file)
@@ -36,7 +36,7 @@ Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() {
     /** Home */
     Route::get('/', 'HomeController@index')->name('home');
 
-    Route::prefix('/account')->middleware(['login.token:false', 'auth'])->group(function() {
+    Route::prefix('/compte')->middleware(['login.token:false', 'auth'])->group(function() {
         Route::get('/', 'AccountController@index')->name('account.index');
         Route::post('/', 'AccountController@update')->name('account.update');
 
@@ -51,15 +51,16 @@ Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() {
 
     Route::get('/search', 'FileController@search');
 
-    Route::get('/campaigns', 'AdCampaignController@index');
-    Route::get('/campaigns/search', 'AdCampaignController@search');
+    Route::get('/campagnes-et-communication', 'AdCampaignController@index');
+    Route::get('/campagnes-et-communication/archives', 'AdCampaignController@search');
 
     Route::get('/podcasts', 'PodcastController@index');
 
+    Route::get('/pas-encore-inscrit', 'Auth\NotRegisteredYet@index');
+
     /** Metadata */
     Route::prefix('/files/{file:slug}')->group(function () {
         Route::get('/cover', 'FileController@cover');
-
     });
 
     Route::get('/l/{link:slug}', 'TrackedLinkController@redirect')->name('track');