FEATURE: add possibilityy to upload and assign files to content pages

This commit is contained in:
Michal Kváček
2016-07-29 01:22:49 +02:00
parent 790cc772a9
commit 0d5e6d4133
14 changed files with 275 additions and 28 deletions
+3 -2
View File
@@ -1,7 +1,6 @@
<?php
namespace App\Handlers;
use App\Enumerations\ModuleNamesWithIds;
use App\Enumerations\TemplatePathsHumanReadableRootOnly;
use App\Enumerations\WidgetTypes;
use App\Handlers\Contracts\AppHandler;
@@ -29,7 +28,8 @@ abstract class Handler implements AppHandler
'basicInfo' => trans('admin/contents.basicInfo'),
'meta' => trans('admin/contents.metaOptions'),
'publication' => trans('admin/contents.publicationOptions'),
'appearance' => trans('admin/contents.appearance')
'appearance' => trans('admin/contents.appearance'),
'files' => trans('admin/contents.files')
];
}
@@ -40,6 +40,7 @@ abstract class Handler implements AppHandler
'meta' => 'admin.content.formParts.metaInformation',
'publication' => 'admin.content.formParts.publicationSetup',
'appearance' => 'admin.content.formParts.appearance',
'files' => 'admin.content.formParts.files'
];
}
+9
View File
@@ -25,6 +25,15 @@ class History implements HistoryHandler
break;
case 'metaDescription':
return Differ::htmlDiff($changeset->old_value, $changeset->new_value);
break;
case 'file':
if (!$changeset->old_value) {
// old value is null -> new file was uploaded
return trans('admin/history.uploadedFile', ['file' => $changeset->new_value]);
} else {
return trans('admin/history.deletedFile', ['file' => $changeset->old_value]);
}
break;
case 'status':
$statuses = ContentStatuses::getWithTranslations();