mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Fixed attachments on draft pages
This commit is contained in:
parent
e639600ba5
commit
d3c7aada89
@ -40,7 +40,7 @@ class AttachmentController extends Controller
|
||||
]);
|
||||
|
||||
$pageId = $request->get('uploaded_to');
|
||||
$page = $this->pageRepo->getById($pageId);
|
||||
$page = $this->pageRepo->getById($pageId, true);
|
||||
|
||||
$this->checkPermission('attachment-create-all');
|
||||
$this->checkOwnablePermission('page-update', $page);
|
||||
@ -70,7 +70,7 @@ class AttachmentController extends Controller
|
||||
]);
|
||||
|
||||
$pageId = $request->get('uploaded_to');
|
||||
$page = $this->pageRepo->getById($pageId);
|
||||
$page = $this->pageRepo->getById($pageId, true);
|
||||
$attachment = $this->attachment->findOrFail($attachmentId);
|
||||
|
||||
$this->checkOwnablePermission('page-update', $page);
|
||||
@ -106,7 +106,7 @@ class AttachmentController extends Controller
|
||||
]);
|
||||
|
||||
$pageId = $request->get('uploaded_to');
|
||||
$page = $this->pageRepo->getById($pageId);
|
||||
$page = $this->pageRepo->getById($pageId, true);
|
||||
$attachment = $this->attachment->findOrFail($attachmentId);
|
||||
|
||||
$this->checkOwnablePermission('page-update', $page);
|
||||
@ -134,7 +134,7 @@ class AttachmentController extends Controller
|
||||
]);
|
||||
|
||||
$pageId = $request->get('uploaded_to');
|
||||
$page = $this->pageRepo->getById($pageId);
|
||||
$page = $this->pageRepo->getById($pageId, true);
|
||||
|
||||
$this->checkPermission('attachment-create-all');
|
||||
$this->checkOwnablePermission('page-update', $page);
|
||||
@ -153,9 +153,9 @@ class AttachmentController extends Controller
|
||||
*/
|
||||
public function listForPage($pageId)
|
||||
{
|
||||
$page = $this->pageRepo->getById($pageId);
|
||||
$page = $this->pageRepo->getById($pageId, true);
|
||||
$this->checkOwnablePermission('page-view', $page);
|
||||
return response()->json($page->files);
|
||||
return response()->json($page->attachments);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -193,7 +193,7 @@ p.neg, p .neg, span.neg, .text-neg {
|
||||
p.muted, p .muted, span.muted, .text-muted {
|
||||
color: lighten($text-dark, 26%);
|
||||
&.small, .small {
|
||||
color: lighten($text-dark, 42%);
|
||||
color: lighten($text-dark, 32%);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,11 +43,11 @@
|
||||
<div class="padded files">
|
||||
|
||||
<div id="file-list" ng-show="!editFile">
|
||||
<p class="muted small">Upload some files or attach some link to display on your page. This are visible in the page sidebar.</p>
|
||||
<p class="muted small">Upload some files or attach some link to display on your page. These are visible in the page sidebar. <span class="secondary">Changes here are saved instantly.</span></p>
|
||||
|
||||
<div tab-container>
|
||||
<div class="nav-tabs">
|
||||
<div tab-button="list" class="tab-item">File List</div>
|
||||
<div tab-button="list" class="tab-item">Attached Items</div>
|
||||
<div tab-button="file" class="tab-item">Upload File</div>
|
||||
<div tab-button="link" class="tab-item">Attach Link</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user