forked from aslan/applicant-site
Compare commits
8 Commits
242d498685
...
c91ae889a3
Author | SHA1 | Date |
---|---|---|
ROMANGOLIENKO | c91ae889a3 | |
aslan | 056452b137 | |
aslan | 00ae3b8938 | |
aslan | dcac3ed4a9 | |
aslan | 0996ea3b8c | |
aslan | 339b4bfb83 | |
aslan | dbb3e4190b | |
aslan | 8723cc7594 |
|
@ -9,65 +9,65 @@ on:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# build:
|
build:
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
#
|
|
||||||
# strategy:
|
strategy:
|
||||||
# matrix:
|
matrix:
|
||||||
# php-version: [ '8.3' ]
|
php-version: [ '8.3' ]
|
||||||
# node-version: ['20.x']
|
node-version: ['20.x']
|
||||||
# composer-version: ['2.6.6']
|
composer-version: ['2.6.6']
|
||||||
#
|
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
#
|
|
||||||
# - name: Set up PHP ${{ matrix.php-version }} with extensions and tools
|
- name: Set up PHP ${{ matrix.php-version }} with extensions and tools
|
||||||
# uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
# with:
|
with:
|
||||||
# php-version: ${{ matrix.php-version }}
|
php-version: ${{ matrix.php-version }}
|
||||||
# coverage: xdebug
|
coverage: xdebug
|
||||||
# extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
|
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
|
||||||
# tools: composer:${{ matrix.composer-version }}
|
tools: composer:${{ matrix.composer-version }}
|
||||||
# ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M
|
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M
|
||||||
# env:
|
env:
|
||||||
# debug: true
|
debug: true
|
||||||
#
|
|
||||||
# - name: PHP Security Checker
|
- name: PHP Security Checker
|
||||||
# uses: StephaneBour/actions-php-security-checker@1.1
|
uses: StephaneBour/actions-php-security-checker@1.1
|
||||||
#
|
|
||||||
# - name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
# uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
# with:
|
with:
|
||||||
# node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
#
|
|
||||||
# - name: Add keys
|
- name: Add keys
|
||||||
# run: |
|
run: |
|
||||||
# sudo curl -o ~/.composer/keys.tags.pub -sL https://composer.github.io/releases.pub
|
sudo curl -o ~/.composer/keys.tags.pub -sL https://composer.github.io/releases.pub
|
||||||
# sudo curl -o ~/.composer/keys.dev.pub -sL https://composer.github.io/snapshots.pub
|
sudo curl -o ~/.composer/keys.dev.pub -sL https://composer.github.io/snapshots.pub
|
||||||
#
|
|
||||||
# - name: Install dependencies
|
- name: Install dependencies
|
||||||
# env:
|
env:
|
||||||
# COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH_JSON }}
|
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH_JSON }}
|
||||||
# run: composer install
|
run: composer install
|
||||||
#
|
|
||||||
# - name: Setup project
|
- name: Setup project
|
||||||
# run: make setup-ci
|
run: make setup-ci
|
||||||
#
|
|
||||||
# - name: Check lint
|
- name: Check lint
|
||||||
# run: make lint
|
run: make lint
|
||||||
#
|
|
||||||
# - name: Check tests
|
- name: Check tests
|
||||||
# run: make test
|
run: make test
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
# needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: deploy to test server
|
- name: deploy to test server
|
||||||
uses: appleboy/ssh-action@v1.0.3
|
uses: appleboy/ssh-action@v1.0.3
|
||||||
|
|
||||||
with:
|
with:
|
||||||
host: http://gitea.mkgtu.ru
|
host: ${{ secrets.HOST }}
|
||||||
username: ${{ secrets.USERNAME }}
|
username: ${{ secrets.USERNAME }}
|
||||||
password: ${{ secrets.PASSWORD }}
|
password: ${{ secrets.PASSWORD }}
|
||||||
port: ${{ secrets.PORT }}
|
port: ${{ secrets.PORT }}
|
||||||
|
|
|
@ -4,21 +4,23 @@ namespace App\Services;
|
||||||
|
|
||||||
use App\Models\Direction;
|
use App\Models\Direction;
|
||||||
use Illuminate\Support\Facades\URL;
|
use Illuminate\Support\Facades\URL;
|
||||||
|
use PhpParser\Node\Expr\Array_;
|
||||||
|
|
||||||
class DirectonHtmlBuilder
|
class DirectonHtmlBuilder
|
||||||
{
|
{
|
||||||
private Direction $direction;
|
private array $direction;
|
||||||
public function __construct($direction)
|
public function __construct($direction)
|
||||||
{
|
{
|
||||||
$this->direction = $direction;
|
$this->direction = $direction;
|
||||||
}
|
}
|
||||||
public function getHTML()
|
public function getHTML()
|
||||||
{
|
{
|
||||||
// phpcs:disable
|
|
||||||
|
|
||||||
$direction = $this->direction;
|
$direction = $this->direction;
|
||||||
$fon_3 = URL::to('img/front-page/bakalavr-special/fon3_blok.png');
|
$fon_3 = URL::to('img/front-page/bakalavr-special/fon3_blok.png');
|
||||||
return "<div class=\"offcanvas offcanvas-bottom\" data-bs-scroll=\"true\" data-bs-backdrop=\"false\" tabindex=\"-1\" id=\"offcanvasScrolling-{$direction->id }\" aria-labelledby=\"offcanvasScrollingLabel-{$direction->id}\" style=\"height: 100%; font-family: Geologica-Medium; overflow-y: auto ; background-image: url({$fon_3}); color: #004329\">
|
$educationForm = implode(", ", $direction['educationForm']);
|
||||||
|
return "<div class=\"offcanvas offcanvas-bottom\" data-bs-scroll=\"true\" data-bs-backdrop=\"false\" tabindex=\"-1\" id=\"offcanvasScrolling-{$direction['id'] }\" aria-labelledby=\"offcanvasScrollingLabel-{$direction['id']}\" style=\"height: 100%; font-family: Geologica-Medium; overflow-y: auto ; background-image: url({$fon_3}); color: #004329\">
|
||||||
|
|
||||||
|
|
||||||
<div class=\"mx-5 \">
|
<div class=\"mx-5 \">
|
||||||
|
@ -32,11 +34,11 @@ class DirectonHtmlBuilder
|
||||||
<div class='col-md-6 col-12 d-block'>
|
<div class='col-md-6 col-12 d-block'>
|
||||||
|
|
||||||
<div class=\"\">
|
<div class=\"\">
|
||||||
<div class=\"display-6 \" style=\"font-family: Geologica-Light\"> {$direction->code} </div>
|
<div class=\"display-6 \" style=\"font-family: Geologica-Light\"> {$direction['code']} </div>
|
||||||
<div class=\"display-5 \" > {$direction->name}</div>
|
<div class=\"display-5 \" > {$direction['name']}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=\"mt-4\">
|
<div class=\"mt-4\">
|
||||||
<p style=\"text-align: justify;\">{$direction->description}</p>
|
<p style=\"text-align: justify;\">{$direction['description']}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,31 +48,32 @@ class DirectonHtmlBuilder
|
||||||
|
|
||||||
<div class=\"p-3 px-5 border-success fs-4\" style='border-radius: 50px; border: 2px solid;'>
|
<div class=\"p-3 px-5 border-success fs-4\" style='border-radius: 50px; border: 2px solid;'>
|
||||||
<div > Уровень образования:
|
<div > Уровень образования:
|
||||||
<strong>{$direction->educationLevel->name} </strong>
|
<strong>{$direction['educationLevel']} </strong>
|
||||||
</div>
|
</div>
|
||||||
<hr class='d-block d-md-none'><br>
|
<hr class='d-block d-md-none'><br>
|
||||||
<div > Форма обучения:
|
<div > Форма обучения:
|
||||||
<strong>{$direction->educationForm->name} </strong>
|
<strong> {$educationForm}
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<hr class='d-block d-md-none'><br>
|
<hr class='d-block d-md-none'><br>
|
||||||
<div > Бюджетные места:
|
<div > Бюджетные места:
|
||||||
<strong >{$direction->budget_places} </strong>
|
<strong >{$direction['budget_places']} </strong>
|
||||||
</div>
|
</div>
|
||||||
<hr class='d-block d-md-none'><br>
|
<hr class='d-block d-md-none'><br>
|
||||||
<div > Квота:
|
<div > Квота:
|
||||||
<strong >{$direction->quota} </strong>
|
<strong >{$direction['quota']} </strong>
|
||||||
</div>
|
</div>
|
||||||
<hr class='d-block d-md-none'><br>
|
<hr class='d-block d-md-none'><br>
|
||||||
<div > Места на контракт:
|
<div > Места на контракт:
|
||||||
<strong >{$direction->paid_places} </strong>
|
<strong >{$direction['paid_places']} </strong>
|
||||||
</div>
|
</div>
|
||||||
<hr class='d-block d-md-none'><br>
|
<hr class='d-block d-md-none'><br>
|
||||||
<div > Стоимость платного обучения:
|
<div > Стоимость платного обучения:
|
||||||
<strong >{$direction->cost_paid_place} </strong>
|
<strong >{$direction['cost_paid_place']} </strong>
|
||||||
</div>
|
</div>
|
||||||
<hr class='d-block d-md-none'><br>
|
<hr class='d-block d-md-none'><br>
|
||||||
<div > Период обучения (в годах):
|
<div > Период обучения (в годах):
|
||||||
<strong>{$direction->period} </span>
|
<strong>{$direction['period']} </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -359,20 +359,40 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@foreach($faculty->departments as $department)
|
@foreach($faculty->departments as $department)
|
||||||
@foreach($department->directions as $direction)
|
@php
|
||||||
|
$napr = array();
|
||||||
|
foreach ($department->directions as $direction){
|
||||||
|
$napr[$direction->name]['educationForm'][$direction->name . ' ' . $direction->id] = $direction->educationForm->name;
|
||||||
|
$napr[$direction->name]['id'] = $direction->id;
|
||||||
|
$napr[$direction->name]['code'] = $direction->code;
|
||||||
|
$napr[$direction->name]['educationLevel'] = $direction->educationLevel->name;
|
||||||
|
$napr[$direction->name]['name'] = $direction->name;
|
||||||
|
$napr[$direction->name]['budget_places'] = $direction->budget_places;
|
||||||
|
$napr[$direction->name]['quota'] = $direction->quota;
|
||||||
|
$napr[$direction->name]['paid_places'] = $direction->paid_places;
|
||||||
|
$napr[$direction->name]['cost_paid_place'] = $direction->cost_paid_place;
|
||||||
|
$napr[$direction->name]['period'] = $direction->period;
|
||||||
|
$napr[$direction->name]['description'] = $direction->description;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@foreach($napr as $el)
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class=" border border-dark rounded-3 p-2 hover1" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling-{{ $direction->id }}" aria-controls="offcanvasScrolling" role="button">{{ $direction->name }}</a>
|
<a class=" border border-dark rounded-3 p-2 hover1" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasScrolling-{{ $el['id'] }}" aria-controls="offcanvasScrolling" role="button">{{ $el['name'] }}</a>
|
||||||
@php
|
@php
|
||||||
$DirectonHtmlBuilder = new DirectonHtmlBuilder($direction);
|
$DirectonHtmlBuilder = new DirectonHtmlBuilder($el);
|
||||||
echo $DirectonHtmlBuilder->getHTML();
|
echo $DirectonHtmlBuilder->getHTML();
|
||||||
@endphp
|
@endphp
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td> {{ $direction->code }} </td>
|
<td> {{ $el['code'] }} </td>
|
||||||
<td> {{ $direction->educationLevel->name }} </td>
|
<td> {{ $el['educationLevel'] }} </td>
|
||||||
<td> {{ $direction->educationForm->name }} </td>
|
<td> <?php foreach($el['educationForm'] as $form) { echo $form . '<br>'; } ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
Loading…
Reference in New Issue