Merge branch 'dev' into module_profiler
This commit is contained in:
@@ -2,10 +2,12 @@
|
|||||||
namespace App\CMS\Pipeline\SavePipeline\Process;
|
namespace App\CMS\Pipeline\SavePipeline\Process;
|
||||||
|
|
||||||
use App\CMS\Contracts\Content\SavePipeline\Process;
|
use App\CMS\Contracts\Content\SavePipeline\Process;
|
||||||
|
use App\CMS\Helpers\RootDirectory;
|
||||||
use App\Models\Content\Content;
|
use App\Models\Content\Content;
|
||||||
use App\Models\FileManager\File;
|
use App\Models\FileManager\File;
|
||||||
|
|
||||||
class UploadTitlePhoto implements Process {
|
class UploadTitlePhoto implements Process
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Process and modify given page
|
* Process and modify given page
|
||||||
*
|
*
|
||||||
@@ -23,7 +25,10 @@ class UploadTitlePhoto implements Process {
|
|||||||
$page->titlePhoto = isset($input['existingTitlePhoto']) ? $input['existingTitlePhoto'] : null;
|
$page->titlePhoto = isset($input['existingTitlePhoto']) ? $input['existingTitlePhoto'] : null;
|
||||||
|
|
||||||
if (!is_null($titlePhoto)) {
|
if (!is_null($titlePhoto)) {
|
||||||
$file = $fileModel->upload($titlePhoto);
|
$root = RootDirectory::get();
|
||||||
|
$data = ['directoryId' => $root->id];
|
||||||
|
|
||||||
|
$file = $fileModel->upload($titlePhoto, (object)$data);
|
||||||
|
|
||||||
$page->titlePhoto = $file ? $file['filename'] : null;
|
$page->titlePhoto = $file ? $file['filename'] : null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ header.top-bar h1 a {
|
|||||||
|
|
||||||
.title-photo img {
|
.title-photo img {
|
||||||
border-radius: 0 0 5px 5px;
|
border-radius: 0 0 5px 5px;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.trainer {
|
.trainer {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 616 KiB After Width: | Height: | Size: 324 KiB |
+7
-1
@@ -9,10 +9,16 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
|
@if (!empty($page->titlePhoto))
|
||||||
|
<div class="row title-photo">
|
||||||
|
<img src="@upload($page->titlePhoto)" alt="">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="row content-container">
|
<div class="row content-container">
|
||||||
|
|
||||||
<div class="column text-center m-b-25 show-for-large">
|
<div class="column text-center m-b-25 show-for-large">
|
||||||
<h2>{{$page->title}}</h2>
|
<h1>{{$page->title}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column text-center large-4">
|
<div class="column text-center large-4">
|
||||||
|
|||||||
Reference in New Issue
Block a user