From cdd9fcf7bf49e4468c2290e30a98c6730a334900 Mon Sep 17 00:00:00 2001 From: Mateja Date: Mon, 2 Nov 2020 17:45:41 +0100 Subject: News system finished... --- resources/views/inc/navbar.blade.php | 2 +- resources/views/pages/callsigns.blade.php | 2 +- resources/views/pages/editpost.blade.php | 52 +++++++++++++++++++++ resources/views/pages/index.blade.php | 2 +- resources/views/pages/news-admin.blade.php | 73 ++++++++++++++++++++++++++++++ resources/views/pages/news.blade.php | 7 +-- 6 files changed, 132 insertions(+), 6 deletions(-) create mode 100644 resources/views/pages/editpost.blade.php create mode 100644 resources/views/pages/news-admin.blade.php (limited to 'resources/views') diff --git a/resources/views/inc/navbar.blade.php b/resources/views/inc/navbar.blade.php index 485dc9c..60bda7b 100644 --- a/resources/views/inc/navbar.blade.php +++ b/resources/views/inc/navbar.blade.php @@ -20,7 +20,7 @@ Administration diff --git a/resources/views/pages/callsigns.blade.php b/resources/views/pages/callsigns.blade.php index 6c795c4..feed795 100644 --- a/resources/views/pages/callsigns.blade.php +++ b/resources/views/pages/callsigns.blade.php @@ -37,7 +37,7 @@ @csrf
- + @error('sign')
{{ $message }}
@enderror diff --git a/resources/views/pages/editpost.blade.php b/resources/views/pages/editpost.blade.php new file mode 100644 index 0000000..4be1dff --- /dev/null +++ b/resources/views/pages/editpost.blade.php @@ -0,0 +1,52 @@ +@extends('layouts.app') + +@section('title', 'Edit post') + +@section('navbar', View::make('inc.navbar')) + +@section('content') +

Edit Post:

+ @if (session('status')) +
+ {{ session('status') }} +
+ @endif +
+ @csrf +
+ + + @error('title') +
{{ $message }}
+ @enderror +
+ +
+ + +
+ +
+ + + @error('text') +
{{ $message }}
+ @enderror +
+ +
+ + +
+
+@endsection + +@section('scripts') + + +@endsection diff --git a/resources/views/pages/index.blade.php b/resources/views/pages/index.blade.php index 22e6a6c..5c16327 100644 --- a/resources/views/pages/index.blade.php +++ b/resources/views/pages/index.blade.php @@ -32,7 +32,7 @@ Here one can get information and seek help, take the advertising materials, buy authentic souvenirs and prepare local or international projects.

-School-recreational center “The Sand Pits of Deliblato“– “Čardak” is situated in the forest part of The Sand Pits, +School-recreational center “The Sand Pits of Deliblato“ – “Čardak” is situated in the forest part of The Sand Pits, only 7 kilometers away from the village Deliblato. It is consisted of the management building, restaurant (for 500 people), diff --git a/resources/views/pages/news-admin.blade.php b/resources/views/pages/news-admin.blade.php new file mode 100644 index 0000000..55c94e6 --- /dev/null +++ b/resources/views/pages/news-admin.blade.php @@ -0,0 +1,73 @@ +@extends('layouts.app') + +@section('title', 'News administration') + +@section('navbar', View::make('inc.navbar')) + +@section('content') +

News Administration:

+ @if (session('statusE')) +
+ {{ session('statusE') }} +
+ @endif + @if (count($data) > 0) +
+ + @foreach ($data as $row) + + + + + + @endforeach +
{{ $row->title }}EditDelete
+
+ @else + There are currently no callsigns. + @endif + +

Add Post:

+ @if (session('status')) +
+ {{ session('status') }} +
+ @endif +
+ @csrf +
+ + + @error('title') +
{{ $message }}
+ @enderror +
+ +
+ + +
+ +
+ + + @error('text') +
{{ $message }}
+ @enderror +
+ +
+ +
+
+@endsection + +@section('scripts') + + +@endsection diff --git a/resources/views/pages/news.blade.php b/resources/views/pages/news.blade.php index 44d0202..1e9b83b 100644 --- a/resources/views/pages/news.blade.php +++ b/resources/views/pages/news.blade.php @@ -4,10 +4,11 @@ @section('content') @foreach($news as $post) -
-

{{ $post->title }}

+
+

{{ $post->title }}

Published at {{ $post->created_at->format('Y-m-d') }}@isset ($post->author) by {{$post->author }}@endisset -

{{ $post->text }}

+
+
{!! $post->text !!}
@endforeach @endsection() -- cgit v1.2.3