forked from aslan/applicant-site
screen changes
This commit is contained in:
parent
81642ce6ba
commit
1745310d89
|
@ -0,0 +1,99 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Enums\ExaminationTypeEnum;
|
||||||
|
use App\Models\Direction;
|
||||||
|
use App\Models\Faculty;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Spatie\QueryBuilder\QueryBuilder;
|
||||||
|
|
||||||
|
class DirectionForTildaController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$directions = QueryBuilder::for(Direction::class)
|
||||||
|
->allowedFilters('name')
|
||||||
|
->orderBy('id', 'desc')->get();
|
||||||
|
// $directions = Direction::all()->sortBy('created_at', SORT_REGULAR, true);
|
||||||
|
$filter = $request->filter ?? null;
|
||||||
|
return view('new-design.tilda.index', compact('directions', 'filter'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*/
|
||||||
|
public function show(Direction $direction)
|
||||||
|
{
|
||||||
|
// $department = $direction->department;
|
||||||
|
// $faculty = Faculty::find($department->faculty->id);
|
||||||
|
// $educationalInstitution = $faculty->educationalInstitution;
|
||||||
|
//
|
||||||
|
// $ege = $direction
|
||||||
|
// ->entranceExaminations
|
||||||
|
// ->where('examination_type_id', '=', ExaminationTypeEnum::Ege->value)
|
||||||
|
// ->sortBy('position')
|
||||||
|
// ->pluck('scores', 'subject_id');
|
||||||
|
//
|
||||||
|
// $spo = $direction
|
||||||
|
// ->entranceExaminations->where('examination_type_id', '=', ExaminationTypeEnum::Spo->value)
|
||||||
|
// ->sortBy('position')
|
||||||
|
// ->pluck('scores', 'subject_id');
|
||||||
|
//
|
||||||
|
// $magistracy = $direction
|
||||||
|
// ->entranceExaminations
|
||||||
|
// ->where('examination_type_id', '=', ExaminationTypeEnum::Magistracy->value)
|
||||||
|
// ->sortBy('position')
|
||||||
|
// ->pluck('scores', 'subject_id');
|
||||||
|
|
||||||
|
return view(
|
||||||
|
'new-design.tilda.show',
|
||||||
|
compact(
|
||||||
|
'direction'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit(string $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request, string $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy(string $id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
@extends('layouts.admin_layout')
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
@foreach($directions as $direction)
|
||||||
|
{{-- @dd($direction)--}}
|
||||||
|
<table>
|
||||||
|
<tr class="">
|
||||||
|
<th scope="row">{{ $direction->position }}</th>
|
||||||
|
<td><a href="{{ route('tilda.show', $direction) }}">{{ $direction->name }}</a>
|
||||||
|
<br>
|
||||||
|
<p @style(['font-size: 0.7em', 'color: grey'])>
|
||||||
|
@foreach($direction->directionProfiles as $directionProfile)
|
||||||
|
{{ $directionProfile->name }} <br>
|
||||||
|
@endforeach
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td>{{ Str::words($direction->description, 10, '...') }}</td>
|
||||||
|
<td>{{ $direction->slug }}</td>
|
||||||
|
<td>{{ $direction->department->name }}</td>
|
||||||
|
<td>{{ $direction->educationLevel->name }}</td>
|
||||||
|
<td>
|
||||||
|
<a href="{{ route("directions.edit", $direction) }}"
|
||||||
|
class="btn btn-secondary">редактировать</a>
|
||||||
|
<a rel="nofollow" data-method="post"
|
||||||
|
href="{{ route('directions.duplication', $direction->id) }}"
|
||||||
|
class="btn btn-warning">Дублировать</a>
|
||||||
|
<a rel="nofollow" data-method="delete" data-confirm="Вы действительно хотите удалить?"
|
||||||
|
href="{{ route('directions.destroy', $direction) }}"
|
||||||
|
class="btn btn-danger">удалить</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
@endsection
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
@php
|
||||||
|
use App\Models\Subject;
|
||||||
|
use App\Models\EducationForm;
|
||||||
|
@endphp
|
||||||
|
@extends('layouts.new-design-layout')
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.fon2_blok {
|
||||||
|
background-image: url({{ URL::to('img/front-page/bakalavr-special/fon2_blok.png') }}); background-repeat: no-repeat; background-attachment: fixed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="fon2_blok">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
{{-- <h1>{{$direction->name}} {{$direction->code}} </h1>--}}
|
||||||
|
<br>
|
||||||
|
<h3>Уроdень образования:
|
||||||
|
{{-- @if($direction->education_level_id = 1)--}}
|
||||||
|
|
||||||
|
{{-- @elseif--}}
|
||||||
|
|
||||||
|
{{-- @endif--}}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@dd($direction)
|
||||||
|
|
||||||
|
@endsection
|
|
@ -4,6 +4,7 @@ use App\Http\Controllers\admin\FeedbackController;
|
||||||
use App\Http\Controllers\admin\PageController;
|
use App\Http\Controllers\admin\PageController;
|
||||||
use App\Models\Faculty;
|
use App\Models\Faculty;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use App\Http\Controllers\DirectionForTildaController;
|
||||||
|
|
||||||
Route::get('/inostran', function () {
|
Route::get('/inostran', function () {
|
||||||
return view('new-design.inostran');
|
return view('new-design.inostran');
|
||||||
|
@ -21,6 +22,10 @@ Route::get('/magistr', [PageController::class, 'magistr'])->name('magistr');
|
||||||
|
|
||||||
Route::post('/feedback', [FeedbackController::class, 'store'])->name('feedback.store');
|
Route::post('/feedback', [FeedbackController::class, 'store'])->name('feedback.store');
|
||||||
|
|
||||||
|
Route::resource('/tilda', DirectionForTildaController::class)->scoped(['direction' => 'slug']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Route::get('/course', function () {
|
//Route::get('/course', function () {
|
||||||
// return view('menu.course');
|
// return view('menu.course');
|
||||||
|
|
Loading…
Reference in New Issue