edit references in editor edit view
This commit is contained in:
parent
4d6664ce3a
commit
03bcbab560
12 changed files with 191 additions and 78 deletions
|
@ -34,42 +34,4 @@ class PublishController extends Controller
|
|||
'datasets' => $datasets,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified dataset for publishing.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function publish($id): View
|
||||
{
|
||||
$dataset = Dataset::query()
|
||||
->with([
|
||||
'titles',
|
||||
'persons' => function ($query) {
|
||||
$query->wherePivot('role', 'author');
|
||||
}
|
||||
])->findOrFail($id);
|
||||
|
||||
return view('workflow.publish.publish', [
|
||||
'dataset' => $dataset,
|
||||
]);
|
||||
}
|
||||
|
||||
public function publishUpdate(Request $request, $id)
|
||||
{
|
||||
$dataset = Dataset::findOrFail($id);
|
||||
$input = $request->all();
|
||||
$input['server_state'] = 'published';
|
||||
$time = new \Illuminate\Support\Carbon();
|
||||
$input['server_date_published'] = $time;
|
||||
|
||||
if ($dataset->update($input)) {
|
||||
// event(new PageUpdated($page));
|
||||
return redirect()
|
||||
->route('publish.workflow.publish.index')
|
||||
->with('flash_message', 'You have successfully published the dataset!');
|
||||
}
|
||||
throw new GeneralException(trans('exceptions.publish.publish.update_error'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue