Added the ability to add project information.
This commit is contained in:
35 files changed
+862
-14
No files matched your search
@@ -0,0 +1 @@
|
||||
tinymce.addI18n("ru",{"#":"#","Accessibility":"\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438","Accordion":"","Accordion body...":"","Accordion summary...":"","Action":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435","Activity":"\u0414\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c","Address":"\u0410\u0434\u0440\u0435\u0441","Advanced":"\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435","Align":"\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c","Align center":"\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","Align left":"\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u043f\u043e \u043b\u0435\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","Align right":"\u0412\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u043f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","Alignment":"\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435","Alignment {0}":"","All":"\u0412\u0441\u0435","Alternative description":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","Alternative source":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a","Alternative source URL":"URL \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430","Anchor":"\u042f\u043a\u043e\u0440\u044c","Anchor...":"\u042f\u043a\u043e\u0440\u044c...","Anchors":"\u042f\u043a\u043e\u0440\u044f","Animals and Nature":"\u0416\u0438\u0432\u043e\u0442\u043d\u044b\u0435 \u0438 \u043f\u0440\u0438\u0440\u043e\u0434\u0430","Arrows":"\u0421\u0442\u0440\u0435\u043b\u043a\u0438","B":"B","Background color":"\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430","Background color {0}":"","Black":"\u0427\u0435\u0440\u043d\u044b\u0439","Block":"\u0411\u043b\u043e\u043a","Block {0}":"","Blockquote":"\u0411\u043b\u043e\u043a \u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","Blocks":"\u0411\u043b\u043e\u043a\u0438","Blue":"\u0421\u0438\u043d\u0438\u0439","Blue component":"\u0421\u0438\u043d\u044f\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430","Body":"\u0422\u0435\u043b\u043e","Bold":"\u0416\u0438\u0440\u043d\u044b\u0439 \u0448\u0440\u0438\u0444\u0442","Border":"\u0413\u0440\u0430\u043d\u0438\u0446\u0430","Border color":"\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u044b","Border style":"\u0421\u0442\u0438\u043b\u044c \u0440\u0430\u043c\u043a\u0438","Border width":"\u0428\u0438\u0440\u0438\u043d\u0430 \u0440\u0430\u043c\u043a\u0438","Bottom":"\u041f\u043e \u043d\u0438\u0437\u0443","Browse files":"","Browse for an image":"\u0412\u044b\u0431\u043e\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f","Browse links":"","Bullet list":"\u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","Cancel":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c","Caption":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","Cell":"\u042f\u0447\u0435\u0439\u043a\u0430","Cell padding":"\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043e\u0442\u0441\u0442\u0443\u043f \u044f\u0447\u0435\u0439\u043a\u0438","Cell properties":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044f\u0447\u0435\u0439\u043a\u0438","Cell spacing":"\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u043e\u0442\u0441\u0442\u0443\u043f \u044f\u0447\u0435\u0439\u043a\u0438","Cell styles":"\u0421\u0442\u0438\u043b\u0438 \u044f\u0447\u0435\u0439\u043a\u0438","Cell type":"\u0422\u0438\u043f \u044f\u0447\u0435\u0439\u043a\u0438","Center":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","Characters":"\u0421\u0438\u043c\u0432\u043e\u043b\u044b","Characters (no spaces)":"\u0421\u0438\u043c\u0432\u043e\u043b\u044b (\u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432)","Circle":"\u041a\u0440\u0443\u0436\u043e\u043a","Class":"\u041a\u043b\u0430\u0441\u0441","Clear formatting":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435","Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Code":"\u041a\u043e\u0434","Code sample...":"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430...","Code view":"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043a\u043e\u0434\u0430","Color Picker":"\u041f\u0438\u043f\u0435\u0442\u043a\u0430 \u0446\u0432\u0435\u0442\u0430","Color swatch":"\u041e\u0431\u0440\u0430\u0437\u0435\u0446 \u0446\u0432\u0435\u0442\u0430","Cols":"\u0421\u0442\u043e\u043b\u0431\u0446\u044b","Column":"\u0421\u0442\u043e\u043b\u0431\u0435\u0446","Column clipboard actions"Line truncated
|
||||
@@ -0,0 +1,7 @@
|
||||
@csrf
|
||||
<x-volt.forms.input :title="__('validation.attributes.title')" name="title" type="text" :value="$content->title" required autofocus />
|
||||
<x-volt.forms.textarea-wysiwyg :title="__('validation.attributes.description')" name="description" :value="$content->description" />
|
||||
|
||||
@canany(['create', 'update'], $content)
|
||||
<button class="btn btn-primary" type="submit">{{ __('Save') }}</button>
|
||||
@endcanany
|
||||
@@ -0,0 +1,17 @@
|
||||
@section('meta_title', __('admin-sections.Project') . ': ' . $project->name)
|
||||
@section('h1', __('admin-sections.Project') . ': ' . $project->name)
|
||||
<x-admin.layout>
|
||||
<div class="row">
|
||||
<div class="col-12 mb-4">
|
||||
<div class="card border-0 shadow components-section">
|
||||
<div class="card-body">
|
||||
<h3 id="category" class="mb-4">{{ __('admin-sections.About project') }} ({{ $language->title }})</h3>
|
||||
<form method="post" action="{{ route('admin.projects.about.update', ['project' => $project->id, 'language' => $language->id]) }}">
|
||||
@method('PUT')
|
||||
@include('admin.projects.about._from')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-admin.layout>
|
||||
@@ -0,0 +1,42 @@
|
||||
@section('meta_title', __('admin-sections.Project') . ': ' . $project->name)
|
||||
@section('h1', __('admin-sections.Project') . ': ' . $project->name)
|
||||
@php
|
||||
$contents = $project->contents;
|
||||
@endphp
|
||||
<x-admin.layout>
|
||||
<div class="card border-0 shadow mb-4">
|
||||
<div class="card-body">
|
||||
<h3 id="category" class="mb-4">{{ __('admin-sections.About project') }}</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-centered table-nowrap mb-0 rounded">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="border-0">{{ __('admin-sections.Languages') }}</th>
|
||||
<th class="border-0">{{ __('admin-sections.Last update') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($project->languages as $language)
|
||||
@php
|
||||
$content = $contents->firstWhere('language_id', $language->id);
|
||||
@endphp
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.projects.about.edit', ['project' => $project->id, 'language' => $language->id]) }}" class="fw-bold">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
|
||||
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
|
||||
</svg>
|
||||
{{ $language->title }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $content?->updated_at }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-admin.layout>
|
||||
@@ -11,6 +11,7 @@
|
||||
<th class="border-0">{{ __('validation.attributes.name') }}</th>
|
||||
<th class="border-0">{{ __('validation.attributes.code') }}</th>
|
||||
<th class="border-0">{{ __('validation.attributes.http_host') }}</th>
|
||||
<th class="border-0">{{ __('validation.attributes.is_public') }}</th>
|
||||
<th class="border-0 rounded-end" style="width: 150px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -18,9 +19,9 @@
|
||||
@foreach($projects as $project)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.projects.edit', $project) }}" class="fw-bold">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
|
||||
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
|
||||
<a href="{{ route('admin.projects.show', $project) }}" class="fw-bold">
|
||||
<svg data-slot="icon" width="16" height="16" fill="currentColor" class="align-text-top" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"></path>
|
||||
</svg>
|
||||
{{ $project->name }}
|
||||
</a>
|
||||
@@ -32,12 +33,26 @@
|
||||
{{ $project->http_host }}
|
||||
</td>
|
||||
<td>
|
||||
@if($project->is_public)
|
||||
{{ __('Yes') }}
|
||||
@else
|
||||
{{ __('No') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('admin.projects.edit', $project) }}" class="btn btn-primary" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ __('Edit') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
|
||||
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
|
||||
</svg>
|
||||
</a>
|
||||
@can('delete', $project)
|
||||
<form method="post" action="{{ route('admin.projects.destroy', $project) }}">
|
||||
<form method="post" class="d-inline-block" action="{{ route('admin.projects.destroy', $project) }}">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-danger click-confirm">
|
||||
{{ __('Delete') }}
|
||||
<button type="submit" class="btn btn-danger click-confirm" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ __('Delete') }}">
|
||||
<svg data-slot="icon" fill="currentColor" width="20" height="20" class="align-text-center" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
@endcan
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
@section('meta_title', __('admin-sections.Project') . ': ' . $project->name)
|
||||
@section('h1', __('admin-sections.Project') . ': ' . $project->name)
|
||||
<x-admin.layout>
|
||||
@include('admin.projects._top')
|
||||
<div class="card border-0 shadow mb-4">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-centered table-nowrap mb-0 rounded">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="border-0">{{ __('admin-sections.Sections') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@can('viewAny', \App\Models\ProjectContent::class)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.projects.about.languages', ['project' => $project->id]) }}" class="fw-bold">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
|
||||
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
|
||||
</svg>
|
||||
{{ __('admin-sections.About project') }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endcan
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-admin.layout>
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="mb-3">
|
||||
<label for="form-textarea-wysiwyg-{{ $requestName }}">{{ $title }}</label>
|
||||
<textarea class="form-control textarea-tinymce @error($requestName) is-invalid @enderror" name="{{ $name }}" id="form-textarea-wysiwyg-{{ $requestName }}" rows="3">{{ $value }}</textarea>
|
||||
@error($requestName)
|
||||
<span class="invalid-feedback">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
@pushOnce('scripts')
|
||||
<script src="{{ asset('/build/tinymce/tinymce.min.js') }}" referrerpolicy="origin"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
tinymce.init({
|
||||
selector: '.textarea-tinymce',
|
||||
@if(in_array(app()->getLocale(), ['ru'], true))
|
||||
language: '{{ app()->getLocale() }}',
|
||||
@endif
|
||||
license_key: '{{ $tinymceLicenseKey }}',
|
||||
plugins: 'advlist code emoticons link lists table codesample',
|
||||
toolbar: 'bold italic | bullist numlist | link emoticons codesample',
|
||||
referrer_policy: 'origin',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpushonce
|
||||
@@ -0,0 +1,7 @@
|
||||
<div class="mb-3">
|
||||
<label for="form-textarea-{{ $requestName }}">{{ $title }}</label>
|
||||
<textarea class="form-control @error($requestName) is-invalid @enderror" name="{{ $name }}" id="form-textarea-{{ $requestName }}" rows="3">{{ $value }}</textarea>
|
||||
@error($requestName)
|
||||
<span class="invalid-feedback">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
Reference in new issue
Block a user