diff --git a/app/Http/Controllers/DownloadFileController.php b/app/Http/Controllers/DownloadFileController.php new file mode 100644 index 0000000000000000000000000000000000000000..f5b86623fcb6dbbed3a803e3238a5b95181dd10e --- /dev/null +++ b/app/Http/Controllers/DownloadFileController.php @@ -0,0 +1,24 @@ + Menu::FILES, + ]); + } + + public function degreeSchedule() { + return Storage::download('public/grade_horario.docx'); + } + + public function manual() { + return Storage::download('public/manual.pdf'); + } +} diff --git a/app/Models/Util/Menu.php b/app/Models/Util/Menu.php index e689141c5e9d28ef2d47d72efa235288c782db05..4c83b61e025f46f155f757c5946238c9bf2239ac 100644 --- a/app/Models/Util/Menu.php +++ b/app/Models/Util/Menu.php @@ -11,9 +11,5 @@ class Menu const CURSOS = 5; const UNIDADES = 6; const PADS = 7; - - //Deletar depois - const DIRETORES = 4; - const COORDENADORES = 5; - const PROFESSORES = 7; + const FILES = 8; } \ No newline at end of file diff --git a/resources/views/components/cards/file_view.blade.php b/resources/views/components/cards/file_view.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..bc57ce29fb5de1a86c61177aa7e21de7d1bce747 --- /dev/null +++ b/resources/views/components/cards/file_view.blade.php @@ -0,0 +1,7 @@ +
+
+

+
{{ $title }}
+ +
+
diff --git a/resources/views/download/index.blade.php b/resources/views/download/index.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..0311e433aa604ab0236819421c3b406bc24df475 --- /dev/null +++ b/resources/views/download/index.blade.php @@ -0,0 +1,30 @@ +@extends('layouts.main') + +@section('title', 'Arquivos') +@section('header') + @include('layouts.header', [ + 'user' => Auth::user(), + ]) +@endsection +@section('nav') + @include('layouts.navigation', [ + 'menu' => $menu, + ]) +@endsection +@section('body') + +
+ + @include('components.cards.file_view', [ + 'title' => 'Grade de HorĂ¡rio (.docx)', + 'route' => 'download_grade_horario' + ]) + + @include('components.cards.file_view', [ + 'title' => 'Manual (.pdf)', + 'route' => 'download_manual' + ]) + +
+ +@endsection diff --git a/resources/views/layouts/user-navigation/navigation_teacher.blade.php b/resources/views/layouts/user-navigation/navigation_teacher.blade.php index 6a16bc134f4b7523a2face635dfc47b24a97d08f..24732d2d12f42485d0221cc3184fb4fe39921f49 100644 --- a/resources/views/layouts/user-navigation/navigation_teacher.blade.php +++ b/resources/views/layouts/user-navigation/navigation_teacher.blade.php @@ -7,6 +7,7 @@ $home_active = $menu == Menu::HOME ? 'active' : ''; $pads_active = $menu == Menu::PADS ? 'active' : ''; + $download_active = $menu == Menu::FILES ? 'active' : ''; @endphp @@ -23,4 +24,10 @@ PDAs + diff --git a/routes/web.php b/routes/web.php index e3f45fe110fc5cabd04eed55841e77800564cb31..8b2f322caf5951bd123313575d3a0c4ac3c9ac57 100644 --- a/routes/web.php +++ b/routes/web.php @@ -7,10 +7,11 @@ use App\Http\Controllers\CoordenadorController; use App\Http\Controllers\DiretorController; use App\Http\Controllers\ProfessorController; use App\Http\Controllers\AvaliadorController; +use App\Http\Controllers\DownloadFileController; use App\Http\Controllers\PadController; use App\Http\Controllers\PDFController; - +use FontLib\Table\Type\name; use Illuminate\Support\Facades\Route; /* @@ -112,5 +113,11 @@ Route::prefix('/user')->group(function () { Route::post('/update/password', [UserController::class, 'updatePassword'])->name('update_password'); }); +Route::prefix('/download')->group(function() { + Route::get('/index', [DownloadFileController::class, 'index'])->name('download_index'); + Route::get('/grade-horario', [DownloadFileController::class, 'degreeSchedule'])->name('download_grade_horario'); + Route::get('/manual', [DownloadFileController::class, 'manual'])->name('download_manual'); +}); + // Simple concept test of creating a LOREM IPSUM With Barryvdh-DomPDF Route::get('generate-pdf',[PDFController::class, 'generatePDF']); diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore index d6b7ef32c8478a48c3994dcadc86837f4371184d..481a0bb533ab31786af82f63bd4cd1b2da44a6e4 100755 --- a/storage/app/public/.gitignore +++ b/storage/app/public/.gitignore @@ -1,2 +1,4 @@ * +!grade_horario.docx +!manual.pdf !.gitignore diff --git a/storage/app/public/grade_horario.docx b/storage/app/public/grade_horario.docx new file mode 100644 index 0000000000000000000000000000000000000000..dd39dcb747f7310e2ca2f63edded68fc4f741fd2 Binary files /dev/null and b/storage/app/public/grade_horario.docx differ diff --git a/storage/app/public/manual.pdf b/storage/app/public/manual.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e5ed83bbc9f583f1d8707f8b98b0e3680f9d4939 Binary files /dev/null and b/storage/app/public/manual.pdf differ