-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from delaynore/feature/attachments
Добавление файлов, локализация
- Loading branch information
Showing
20 changed files
with
298 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
return [ | ||
'title' => 'Вложения', | ||
'create' => [ | ||
'title' => 'Добавление вложения', | ||
'form-title' => 'Добавление вложения для - :concept', | ||
'name' => [ | ||
'label' => 'Название вложения', | ||
'placeholder' => 'Если хотите введите название', | ||
], | ||
'file' => [ | ||
'label' => 'Выберите файл', | ||
], | ||
'description' => [ | ||
'label' => 'Описание', | ||
'placeholder' => 'Опишите на какую тему будет словарь...', | ||
], | ||
], | ||
'available-file-types' => 'JPEG, JPG, PNG, MP3, MP4, максимум 10 МБ', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
<?php | ||
|
||
return [ | ||
'sidebar' => [ | ||
'menu' => [ | ||
'export' => 'Экспорт списка понятий', | ||
'create' => 'Создать новое понятие' | ||
] | ||
] | ||
'sidebar' => [ | ||
'menu' => [ | ||
'export' => 'Экспорт списка понятий', | ||
'create' => 'Создать новое понятие' | ||
], | ||
], | ||
'attachments' => [ | ||
'title' => 'Вложения ":concept"', | ||
'header' => 'Вложения ":concept"', | ||
], | ||
'examples' => [ | ||
'header' => 'Примеры ":concept"', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,5 +49,5 @@ | |
'created_at' => 'Создан', | ||
'actions' => 'Действия', | ||
] | ||
] | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@props(['dictionary', 'concept']) | ||
|
||
<x-layout.main> | ||
<x-slot name="navigation"></x-slot> | ||
<x-slot:title>{{ __('attachment-page.create.title') }}</x-slot:title> | ||
|
||
<div class="flex overflow-y-auto overflow-x-hidden justify-center items-center w-full md:inset-0 h-modal md:h-full"> | ||
<div class="relative p-4 w-full max-w-2xl h-full md:h-auto"> | ||
<div class="relative p-4 bg-white rounded-lg shadow dark:bg-gray-800 sm:p-5"> | ||
<div class="flex justify-between items-center pb-4 mb-4 rounded-t border-b sm:mb-5 dark:border-gray-600"> | ||
<h3 class="text-lg font-semibold text-gray-900 dark:text-white"> | ||
{{ __('attachment-page.create.form-title', ['concept' => $concept->name]) }} | ||
</h3> | ||
<a href="{{ route('concept.attachments', [$dictionary, $concept]) }}" class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"> | ||
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> | ||
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path> | ||
</svg> | ||
<span class="sr-only">{{ __('screen-reader.modal.close')}}</span> | ||
</a> | ||
</div> | ||
<form enctype="multipart/form-data" method="POST" action="{{route('attachment.store', [$dictionary, $concept])}}"> | ||
@csrf | ||
<div class="grid gap-4 mb-4"> | ||
<div class="col-span-2"> | ||
<label for="name" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">{{ __('attachment-page.create.name.label')}}</label> | ||
<input type="text" name="name" id="name" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" placeholder="{{ __('attachment-page.create.name.placeholder') }}" value="{{old('name')}}" required=""> | ||
<x-input-error :messages="$errors->get('name')" class="mt-2" /> | ||
</div> | ||
<div class="col-span-2"> | ||
|
||
<label class="block mb-2 text-sm font-medium text-gray-900 dark:text-white" for="file">{{ __('attachment-page.create.file.label')}}</label> | ||
<input accept=".jpeg,.jpg,.png,.mp3,.mp4" name="file" class="block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400" aria-describedby="file_input_help" id="file" type="file"> | ||
<p class="mt-1 text-sm text-gray-500 dark:text-gray-300" id="file_input_help">{{ __('attachment-page.available-file-types') }}</p> | ||
|
||
<x-input-error :messages="$errors->get('file')" class="mt-2" /> | ||
</div> | ||
</div> | ||
<button type="submit" class="text-white inline-flex items-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800"> | ||
<svg class="mr-1 -ml-1 w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> | ||
<path fill-rule="evenodd" d="M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z" clip-rule="evenodd"></path> | ||
</svg> | ||
{{ __('shared.submit.create') }} | ||
</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</x-layout.main> |
Oops, something went wrong.