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
+2
View File
@@ -13,10 +13,12 @@ return [
"field_published_to" => "Publikováno do",
"field_title" => "Titulek stránky",
"field_url" => "URL",
"files" => "Soubory",
"homepageProtected" => "Domovská stránka je zobrazena jen pro přihlášené uživatele. Toto může i nemusí být chyba.",
"homepageSetup" => "Domovská stránka úspěšně nastavena.",
"invalidPage" => "Požadovaná stránka neexistuje.",
"invalidStatus" => "Nelze změnit stav stránky na něco nedefinovaného.",
"lockUrl" => "Zachovat URL?",
"makeDraft" => "Převést na koncept",
"makeProtected" => "Zobrazit jen pro přihlášené",
"makePublic" => "Publikovat",
+3
View File
@@ -3,6 +3,7 @@ return [
"backToEdit" => "Zpět na editaci obsahu",
"backToOverview" => "Zpět na přehled historie",
"changedFromTo" => "Změna z <del>:from</del> na <ins>:to</ins>",
"columnFile" => "Přiřazené soubory",
"columnIs_homepage" => "Domovská stránka",
"columnMetaDescription" => "Popis",
"columnMetaKeywords" => "Klíčová slova",
@@ -13,10 +14,12 @@ return [
"columnTitle" => "Titulek",
"columnTitlePhotoFilename" => "Titulní obrázek",
"columnUrl" => "URL",
"deletedFile" => "Odebrán soubor <del>:file</del>.",
"diff" => "Rozdíl",
"diffPageName" => "Rozdíl v :column",
"emptyValue" => "<em>nic</em>",
"numOfChanges" => "Jedna změna|:count změny|:count změn",
"pageName" => "Historie :name",
"setupAsHomepage" => "Nastaveno jako domovská stránka",
"uploadedFile" => "Nahrán soubor <ins>:file</ins>.",
];
+1
View File
@@ -43,5 +43,6 @@ return [
'homepageProtected' => 'Your homepage is displayed only for logged in users. This may or may not be an error.',
'parentPage' => 'Parent page',
'alreadyHomepage' => 'Homepage',
'files' => 'Files',
'lockUrl' => 'Keep URL'
];
+4 -2
View File
@@ -7,6 +7,7 @@ return [
'columnMetaKeywords' => 'Meta keywords',
'columnMetaDescription' => 'Description',
'columnStatus' => 'Page visibility',
'columnFile' => 'Assigned file',
'columnTemplate' => 'Template',
'columnIs_homepage' => 'Homepage',
'columnParentPage' => 'Parent page',
@@ -18,6 +19,7 @@ return [
'diffPageName' => 'Difference of :column',
'backToOverview' => 'Back to history overview',
'backToEdit' => 'Back to editation form',
'setupAsHomepage' => 'Setup as homepage'
'setupAsHomepage' => 'Setup as homepage',
'uploadedFile' => 'File <ins>:file</ins> was uploaded.',
'deletedFile' => 'File <del>:file</del> was removed from this page.',
];
@@ -0,0 +1,20 @@
<div class="row">
@if(count($page->files))
<div class="column large-6">
<ul>
@foreach($page->files as $file)
<li><label><input type="checkbox" name="keepAssigned[{{$file->id}}]" checked /> {{$file->original_filename}}</label></li>
@endforeach
</ul>
</div>
@endif
<div class="columns large-6">
<label>
@lang('admin/contents.files')
<input type="file" name="files[]" multiple />
</label>
</div>
</div>