publication workflow: review
This commit is contained in:
parent
5df9b0beef
commit
ad982a1ac5
219
app/Http/Controllers/Publish/EditorController.php
Normal file
219
app/Http/Controllers/Publish/EditorController.php
Normal file
|
@ -0,0 +1,219 @@
|
|||
<?php
|
||||
namespace App\Http\Controllers\Publish;
|
||||
|
||||
use App\Exceptions\GeneralException;
|
||||
use App\Http\Requests\DocumentRequest;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Dataset;
|
||||
use App\Models\Project;
|
||||
use App\Models\License;
|
||||
use App\Models\User;
|
||||
use App\Models\Title;
|
||||
use App\Models\Description;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class EditorController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
//$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of released and accepted datasets.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index(): View
|
||||
{
|
||||
$user = Auth::user();
|
||||
$user_id = $user->id;
|
||||
|
||||
$builder = Dataset::query();
|
||||
//"select * from [documents] where [server_state] in (?) or ([server_state] = ? and [editor_id] = ?)"
|
||||
$datasets = $builder
|
||||
->where('server_state', 'released')
|
||||
// ->whereIn('server_state', ['released'])
|
||||
->orWhere(function ($query) use ($user_id) {
|
||||
$query->where('server_state', 'editor_accepted')
|
||||
->where('editor_id', $user_id);
|
||||
})->get();
|
||||
return view('workflow.editor.index', compact('datasets'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function accept($id): View
|
||||
{
|
||||
$dataset = Dataset::with('user:id,login')->findOrFail($id);
|
||||
|
||||
return view('workflow.editor.accept', [
|
||||
'dataset' => $dataset,
|
||||
]);
|
||||
}
|
||||
|
||||
public function acceptUpdate(Request $request, $id)
|
||||
{
|
||||
$dataset = Dataset::findOrFail($id);
|
||||
|
||||
try {
|
||||
$dataset->setServerState("editor_accepted");
|
||||
$user = Auth::user();
|
||||
$dataset->editor()->associate($user)->save();
|
||||
$dataset->save();
|
||||
// return redirect()->back();
|
||||
return redirect()->route('publish.workflow.editor.index');
|
||||
} catch (Exception $e) {
|
||||
throw new GeneralException(trans('exceptions.publish.accept.update_error'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id): View
|
||||
{
|
||||
$dataset = Dataset::findOrFail($id);
|
||||
$dataset->load('licenses', 'titles', 'abstracts', 'files');
|
||||
|
||||
$projects = Project::pluck('label', 'id');
|
||||
|
||||
$datum = date('Y-m-d');
|
||||
$nowYear = substr($datum, 0, 4);
|
||||
$years = array();
|
||||
for ($jahr = 1990; $jahr <= $nowYear; $jahr++) {
|
||||
$years[$jahr] = $jahr;
|
||||
}
|
||||
|
||||
$languages = DB::table('languages')
|
||||
->where('active', true)
|
||||
->pluck('part1', 'part1');
|
||||
|
||||
//$options = License::all();
|
||||
$options = License::all('id', 'name_long');
|
||||
$checkeds = $dataset->licenses->pluck('id')->toArray();
|
||||
|
||||
return view(
|
||||
'workflow.editor.edit',
|
||||
compact('dataset', 'projects', 'options', 'checkeds', 'years', 'languages')
|
||||
);
|
||||
}
|
||||
|
||||
//https://stackoverflow.com/questions/17480200/using-laravel-how-do-i-create-a-view-that-will-update-a-one-to-many-relationshi?rq=1
|
||||
// https://laravel.io/forum/06-11-2014-how-to-save-eloquent-model-with-relations-in-one-go
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(DocumentRequest $request, $id): RedirectResponse
|
||||
{
|
||||
$dataset = Dataset::findOrFail($id);
|
||||
//$input = $request->all();
|
||||
$input = $request->except('abstracts', 'licenses', 'titles', '_method', '_token');
|
||||
// foreach ($input as $key => $value) {
|
||||
// $dataset[$key] = $value;
|
||||
// }
|
||||
//$dataset->update($input);
|
||||
// $dataset->type = $input['type'];
|
||||
// $dataset->thesis_year_accepted = $input['thesis_year_accepted'];
|
||||
// $dataset->project_id = $input['project_id'];
|
||||
// $dataset->save();
|
||||
|
||||
$licenses = $request->input('licenses');
|
||||
//$licenses = $input['licenses'];
|
||||
$dataset->licenses()->sync($licenses);
|
||||
|
||||
//save the titles:
|
||||
$titles = $request->input('titles');
|
||||
if (is_array($titles) && count($titles) > 0) {
|
||||
foreach ($titles as $key => $formTitle) {
|
||||
$title = Title::findOrFail($key);
|
||||
$title->value = $formTitle['value'];
|
||||
$title->language = $formTitle['language'];
|
||||
$title->save();
|
||||
}
|
||||
}
|
||||
|
||||
//save the abstracts:
|
||||
$abstracts = $request->input('abstracts');
|
||||
if (is_array($abstracts) && count($abstracts) > 0) {
|
||||
foreach ($abstracts as $key => $formAbstract) {
|
||||
$abstract = Description::findOrFail($key);
|
||||
$abstract->value = $formAbstract['value'];
|
||||
$abstract->language = $formAbstract['language'];
|
||||
$abstract->save();
|
||||
}
|
||||
}
|
||||
|
||||
if (!$dataset->isDirty(dataset::UPDATED_AT)) {
|
||||
$time = new \Illuminate\Support\Carbon();
|
||||
$dataset->setUpdatedAt($time);
|
||||
}
|
||||
// $dataset->save();
|
||||
if ($dataset->update($input)) {
|
||||
//event(new DatasetUpdated($dataset));
|
||||
session()->flash('flash_message', 'You have updated 1 dataset!');
|
||||
return redirect()->route('publish.workflow.editor.index');
|
||||
}
|
||||
throw new GeneralException(trans('exceptions.backend.dataset.update_error'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function approve($id): View
|
||||
{
|
||||
$dataset = Dataset::with('user:id,login')->findOrFail($id);
|
||||
|
||||
$reviewers = User::whereHas('roles', function ($q) {
|
||||
$q->where('name', 'reviewer');
|
||||
})->pluck('login', 'id');
|
||||
|
||||
return view('workflow.editor.approve', [
|
||||
'dataset' => $dataset,
|
||||
'reviewers' => $reviewers,
|
||||
]);
|
||||
}
|
||||
public function approveUpdate(Request $request, $id)
|
||||
{
|
||||
// $dataset = Dataset::findOrFail($id);
|
||||
// try {
|
||||
// $dataset->setServerState("approved");
|
||||
// $user = Auth::user();
|
||||
// $dataset->reviewer()->associate($user)->save();
|
||||
// $dataset->save();
|
||||
// // return redirect()->back();
|
||||
// return redirect()->route('publish.workflow.editor.index');
|
||||
// } catch (Exception $e) {
|
||||
// throw new GeneralException(trans('exceptions.publish.approve.update_error'));
|
||||
// }
|
||||
$dataset = Dataset::findOrFail($id);
|
||||
$input = $request->all();
|
||||
$input['server_state'] = 'approved';
|
||||
|
||||
if ($dataset->update($input)) {
|
||||
// event(new PageUpdated($page));
|
||||
return redirect()
|
||||
->route('publish.workflow.editor.index')
|
||||
->with('flash_message', 'You have approved one dataset!');
|
||||
}
|
||||
throw new GeneralException(trans('exceptions.publish.approve.update_error'));
|
||||
}
|
||||
}
|
37
app/Http/Controllers/Publish/ReviewController.php
Normal file
37
app/Http/Controllers/Publish/ReviewController.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
namespace App\Http\Controllers\Publish;
|
||||
|
||||
use App\Exceptions\GeneralException;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Dataset;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class ReviewController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
//$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of released and accepted datasets.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index() : View
|
||||
{
|
||||
$user = Auth::user();
|
||||
$userId = $user->id;
|
||||
|
||||
$builder = Dataset::query();
|
||||
//"select * from [documents] where [server_state] in (?) or ([server_state] = ? and [editor_id] = ?)"
|
||||
$datasets = $builder
|
||||
->where('server_state', 'approved')
|
||||
->where('reviewer_id', $userId)
|
||||
->get();
|
||||
return view('workflow.review.index', compact('datasets'));
|
||||
}
|
||||
}
|
|
@ -2,10 +2,6 @@
|
|||
namespace App\Http\Controllers\Publish;
|
||||
|
||||
use App\Exceptions\GeneralException;
|
||||
// use App\Http\Requests\ProjectRequest;
|
||||
// use App\Models\Project;
|
||||
// use Illuminate\Http\RedirectResponse;
|
||||
// use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Dataset;
|
||||
use App\Models\User;
|
||||
|
@ -15,7 +11,7 @@ use Illuminate\Support\Facades\Auth;
|
|||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class WorkflowController extends Controller
|
||||
class SubmitController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -29,11 +25,11 @@ class WorkflowController extends Controller
|
|||
|
||||
$builder = Dataset::query();
|
||||
$myDatasets = $builder
|
||||
->whereIn('server_state', ['inprogress', 'released', 'editor_accepted'])
|
||||
->whereIn('server_state', ['inprogress', 'released', 'editor_accepted', 'approved'])
|
||||
->where('account_id', $user_id)
|
||||
->with('user:id,login')
|
||||
->get();
|
||||
return view('workflow.index', [
|
||||
return view('workflow.submitter.index', [
|
||||
'datasets' => $myDatasets,
|
||||
]);
|
||||
}
|
||||
|
@ -47,16 +43,13 @@ class WorkflowController extends Controller
|
|||
public function release($id): View
|
||||
{
|
||||
$dataset = Dataset::with('user:id,login')->findOrFail($id);
|
||||
// $editors = User::whereHas('roles', function ($q) {
|
||||
// $q->where('login', 'admin');
|
||||
// })->pluck('login', 'id');
|
||||
$editors = User::with(['roles' => function ($query) {
|
||||
$query->where('name', 'editor');
|
||||
}])
|
||||
->pluck('login', 'id');
|
||||
//$editors = Role::where('name', 'reviewer')->first()->users;
|
||||
|
||||
return view('workflow.release', [
|
||||
$editors = User::whereHas('roles', function ($q) {
|
||||
$q->where('name', 'editor');
|
||||
})->pluck('login', 'id');
|
||||
//$editors = Role::where('name', 'editor')->first()->users()->get();
|
||||
|
||||
return view('workflow.submitter.release', [
|
||||
'dataset' => $dataset,
|
||||
'editors' => $editors,
|
||||
]);
|
||||
|
@ -110,82 +103,6 @@ class WorkflowController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function editorIndex()
|
||||
{
|
||||
$user = Auth::user();
|
||||
$user_id = $user->id;
|
||||
|
||||
$builder = Dataset::query();
|
||||
$datasets = $builder
|
||||
//->where('server_state', 'inprogress')
|
||||
->whereIn('server_state', ['released'])
|
||||
//->where('server_state', 'editor_accepted')
|
||||
->orWhere(function ($query) use ($user_id) {
|
||||
$query->where('server_state', 'editor_accepted')
|
||||
->where('editor_id', $user_id);
|
||||
})
|
||||
->get();
|
||||
return view('workflow.editor_index', compact('datasets'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function accept($id): View
|
||||
{
|
||||
$dataset = Dataset::with('user:id,login')->findOrFail($id);
|
||||
// $editors = User::whereHas('roles', function ($q) {
|
||||
// $q->where('login', 'admin');
|
||||
// })->pluck('login', 'id');
|
||||
$editors = User::with(['roles' => function ($query) {
|
||||
$query->where('name', 'editor');
|
||||
}])
|
||||
->pluck('login', 'id');
|
||||
//$editors = Role::where('name', 'reviewer')->first()->users;
|
||||
|
||||
return view('workflow.accept', [
|
||||
'dataset' => $dataset,
|
||||
'editors' => $editors,
|
||||
]);
|
||||
}
|
||||
|
||||
public function acceptUpdate(Request $request, $id)
|
||||
{
|
||||
$dataset = Dataset::findOrFail($id);
|
||||
|
||||
try {
|
||||
$dataset->setServerState("editor_accepted");
|
||||
$user = Auth::user();
|
||||
$dataset->editor()->associate($user)->save();
|
||||
$dataset->save();
|
||||
return redirect()->back();
|
||||
//return redirect()->route('settings.review.index');
|
||||
} catch (Exception $e) {
|
||||
throw new GeneralException(trans('exceptions.publish.accept.update_error'));
|
||||
}
|
||||
}
|
||||
|
||||
// public function release()
|
||||
// {
|
||||
// $user = Auth::user();
|
||||
// $user_id = $user->id;
|
||||
|
||||
// $builder = Dataset::query();
|
||||
// $datasets = $builder
|
||||
// ->where('server_state', 'inprogress')
|
||||
// ->where('account_id', $user_id)
|
||||
// ->get();
|
||||
// return view('workflow.release', compact('datasets'));
|
||||
// }
|
||||
|
||||
public function changestate($id, $targetState)
|
||||
{
|
||||
// $docId = $this->getRequest()->getParam('docId');
|
|
@ -36,7 +36,9 @@ class Dataset extends Model
|
|||
'project_id',
|
||||
'embargo_date',
|
||||
'belongs_to_bibliography',
|
||||
'editor_id'
|
||||
'editor_id',
|
||||
'preferred_editor',
|
||||
'reviewer_id'
|
||||
];
|
||||
//protected $guarded = [];
|
||||
/**
|
||||
|
@ -96,13 +98,21 @@ class Dataset extends Model
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the account that the dataset belongs to
|
||||
* Get the editor of the dataset
|
||||
*/
|
||||
public function editor()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'editor_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the editor of the dataset
|
||||
*/
|
||||
public function reviewer()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'reviewer_id', 'id');
|
||||
}
|
||||
|
||||
public function collections()
|
||||
{
|
||||
return $this
|
||||
|
|
24
composer.lock
generated
24
composer.lock
generated
|
@ -3183,20 +3183,20 @@
|
|||
},
|
||||
{
|
||||
"name": "myclabs/deep-copy",
|
||||
"version": "1.9.0",
|
||||
"version": "1.9.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/DeepCopy.git",
|
||||
"reference": "78af75148f9fdd34ea727c8b529a9b4a8f7b740c"
|
||||
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/78af75148f9fdd34ea727c8b529a9b4a8f7b740c",
|
||||
"reference": "78af75148f9fdd34ea727c8b529a9b4a8f7b740c",
|
||||
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
|
||||
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2"
|
||||
"php": "^7.1"
|
||||
},
|
||||
"replace": {
|
||||
"myclabs/deep-copy": "self.version"
|
||||
|
@ -3204,8 +3204,6 @@
|
|||
"require-dev": {
|
||||
"doctrine/collections": "^1.0",
|
||||
"doctrine/common": "^2.6",
|
||||
"phpstan/phpstan": "^0.9.2",
|
||||
"phpstan/phpstan-phpunit": "^0.9.4",
|
||||
"phpunit/phpunit": "^7.1"
|
||||
},
|
||||
"type": "library",
|
||||
|
@ -3229,7 +3227,7 @@
|
|||
"object",
|
||||
"object graph"
|
||||
],
|
||||
"time": "2018-10-30T00:14:44+00:00"
|
||||
"time": "2019-04-07T13:18:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
|
@ -4452,16 +4450,16 @@
|
|||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "3.4.1",
|
||||
"version": "3.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||
"reference": "5b4333b4010625d29580eb4a41f1e53251be6baa"
|
||||
"reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5b4333b4010625d29580eb4a41f1e53251be6baa",
|
||||
"reference": "5b4333b4010625d29580eb4a41f1e53251be6baa",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
|
||||
"reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4499,7 +4497,7 @@
|
|||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-03-19T03:22:27+00:00"
|
||||
"time": "2019-04-10T23:49:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
|
|
1
public/backend/publish/approveDataset.js
Normal file
1
public/backend/publish/approveDataset.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
9
public/backend/style.css
vendored
9
public/backend/style.css
vendored
|
@ -939,16 +939,23 @@ textarea.large, input.large {
|
|||
.pure-table tr.inprogress {
|
||||
padding: 0.8em;
|
||||
background-color: paleturquoise;
|
||||
color: gray;
|
||||
}
|
||||
.pure-table tr.released {
|
||||
background-color: greenyellow;
|
||||
color: gray;
|
||||
}
|
||||
.pure-table tr.editor_accepted {
|
||||
padding: 0.8em;
|
||||
background-color: lightblue;
|
||||
color: gray;
|
||||
}
|
||||
.pure-table tr.approved {
|
||||
padding: 0.8em;
|
||||
background-color: rgb(86, 86, 241);
|
||||
color: whitesmoke;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.help {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"/backend/publish/approveDataset.js": "/backend/publish/approveDataset.js",
|
||||
"/backend/publish/datasetPublish.js": "/backend/publish/datasetPublish.js",
|
||||
"/backend/publish/releaseDataset.js": "/backend/publish/releaseDataset.js",
|
||||
"/js/app.js": "/js/app.js",
|
||||
|
|
32
resources/assets/js/approveDataset.js
Normal file
32
resources/assets/js/approveDataset.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
// releaseDataset.js
|
||||
import Vue from 'vue';
|
||||
import VeeValidate from 'vee-validate';
|
||||
Vue.use(VeeValidate);
|
||||
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app1',
|
||||
data() {
|
||||
return {
|
||||
dataset: {
|
||||
firstName: '',
|
||||
reviewer_id: ''
|
||||
},
|
||||
submitted: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkForm(e) {
|
||||
// Log entire model to console
|
||||
// console.log(this.dataset);
|
||||
this.submitted = true;
|
||||
this.$validator.validate().then(result => {
|
||||
if (result) {
|
||||
console.log('From Submitted!');
|
||||
document.getElementById("approveForm").submit();
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
|
@ -10,7 +10,7 @@ const app = new Vue({
|
|||
return {
|
||||
dataset: {
|
||||
firstName: '',
|
||||
editor_id: ''
|
||||
preferred_editor: ''
|
||||
},
|
||||
submitted: false
|
||||
}
|
||||
|
|
|
@ -14,11 +14,14 @@ return [
|
|||
*/
|
||||
'publish' => [
|
||||
'release' => [
|
||||
'update_error' => 'There was a problem rleasing this dataset. Please try again.',
|
||||
'update_error' => 'There was a problem releasing this dataset. Please try again.',
|
||||
],
|
||||
'accept' => [
|
||||
'update_error' => 'There was a problem accepting this dataset. Please try again.',
|
||||
],
|
||||
'approve' => [
|
||||
'update_error' => 'There was a problem approving this dataset. Please try again.',
|
||||
],
|
||||
],
|
||||
|
||||
'backend' => [
|
||||
|
|
|
@ -103,8 +103,13 @@
|
|||
</li>
|
||||
@endpermission
|
||||
@permission('dataset-editor-list')
|
||||
<li class="pure-menu-item {{ Route::is('publish.workflow.editorIndex') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.editorIndex') }}"><i class="fa fa-upload"></i> EDITOR PAGE: Released datasets</a>
|
||||
<li class="pure-menu-item {{ Route::is('publish.workflow.editor.index') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.editor.index') }}"><i class="fa fa-upload"></i> EDITOR PAGE: Released datasets</a>
|
||||
</li>
|
||||
@endpermission
|
||||
@permission('dataset-review-list')
|
||||
<li class="pure-menu-item {{ Route::is('publish.workflow.review.index') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.review.index') }}"><i class="fa fa-upload"></i> REVIEW PAGE: Approved datasets</a>
|
||||
</li>
|
||||
@endpermission
|
||||
{{-- <li class="pure-menu-item {{ Route::is('publish.workflow.release') ? 'active' : '' }}">
|
||||
|
|
|
@ -32,9 +32,16 @@
|
|||
</script>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.10/summernote-lite.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.10/summernote-lite.js"></script>
|
||||
{{-- <script src="https://cloud.tinymce.com/5/tinymce.min.js"></script> --}}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#desc_markup').summernote();
|
||||
// tinymce.init({
|
||||
// selector: "#desc_markup",
|
||||
// plugins: "code",
|
||||
// // toolbar: "code",
|
||||
// menubar: "tools"
|
||||
// });
|
||||
});
|
||||
</script>
|
||||
@endsection
|
137
resources/views/workflow/editor/_form.blade.php
Normal file
137
resources/views/workflow/editor/_form.blade.php
Normal file
|
@ -0,0 +1,137 @@
|
|||
<fieldset id="fieldset-General">
|
||||
<legend>General</legend>
|
||||
<div class="pure-g">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('type', 'Type..') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select('type', Lang::get('doctypes'), null, ['id' => 'type', 'placeholder' => '-- select type --']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('server_state', 'Status..') !!}
|
||||
{{-- {!! Form::select('server_state', Config::get('enums.server_states'), null, ['id' => 'server_state', 'placeholder' => '-- select server state --']) !!} --}}
|
||||
{!! Form::text('server_state', null, ['class'=>'pure-u-23-24','readonly']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('project_id', 'Project..') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select('project_id', $projects, null, ['id' => 'project_id', 'placeholder' => '--no project--']) !!}
|
||||
</div>
|
||||
<small id="projectHelp" class="pure-form-message-inline">project is optional</small>
|
||||
</div>
|
||||
|
||||
{{-- <div class="pure-control-group">
|
||||
{!! Form::label('shelf_id', 'Shelf..') !!}
|
||||
{!! Form::select('shelf_id', $shelves, null, ['id' => 'shelf_id']) !!}
|
||||
</div> --}}
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('embargo_date', 'Embargo Date') !!}
|
||||
{!! Form::date('embargo_date', null, ['placeholder' => date('y-m-d'), 'class' => 'pure-u-23-24']) !!}
|
||||
<small id="projectHelp" class="pure-form-message-inline">embargo_date is optional</small>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-titles">
|
||||
<legend>Title</legend>
|
||||
<div class="pure-g">
|
||||
|
||||
@foreach($dataset->titles as $key => $title)
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{{ Form::label('title', 'Title ' .($key+1).':') }}
|
||||
<!-- Notice this is an array now: -->
|
||||
{{ Form::text('titles['.$title->id.'][value]', $title->value, ['class' => 'pure-u-23-24']) }}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{{ Form::label('language', 'Language..') }}
|
||||
<div class="select pure-u-23-24">
|
||||
{{ Form::select('titles['.$title->id.'][language]', $languages, $title->language, ['placeholder' => '--no language--']) }}
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-abstracts">
|
||||
<legend>Abstract</legend>
|
||||
<div class="pure-g">
|
||||
|
||||
@foreach($dataset->abstracts as $key => $abstract)
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{{ Form::label('abstract', 'Abstract ' .($key+1).':') }}
|
||||
<!-- Notice this is an array now: -->
|
||||
{{ Form::textarea('abstracts['.$abstract->id.'][value]', $abstract->value, ['class' => 'pure-u-23-24', 'size' => '70x6']) }}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{{ Form::label('language', 'Language..') }}
|
||||
<div class="select pure-u-23-24">
|
||||
{{ Form::select('abstracts['.$abstract->id.'][language]', $languages, $abstract->language, ['placeholder' => '--no language--']) }}
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-licenses">
|
||||
<legend>Licenses</legend>
|
||||
|
||||
{{-- <div class="form-group">
|
||||
{!! Form::label('licenses[]', 'Licenses..') !!}
|
||||
{!! Form::select('licenses[]', $options, array_pluck($dataset->licenses, 'id'), ['multiple' ]) !!}
|
||||
</div> --}}
|
||||
|
||||
<div class="pure-control-group checkboxlist">
|
||||
@foreach ($options as $license)
|
||||
|
||||
<label for={{"license". $license->id }} class="pure-checkbox">
|
||||
<input name="licenses[]" value={{ $license->id }} {{ (in_array($license->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input">
|
||||
{{ $license->name_long }}
|
||||
</label>
|
||||
|
||||
<!--{!! Form::checkbox('licenses[]', $license->id, in_array($license->id, $checkeds) ? true : false) !!}
|
||||
{!! Form::label('license' . $license->id, $license->name_long) !!}-->
|
||||
@endforeach
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset id="fieldset-abstracts">
|
||||
<legend>Files</legend>
|
||||
<table id="items" class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Path Name</th>
|
||||
<th>Label</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($dataset->files as $key => $file)
|
||||
<tr>
|
||||
<td>
|
||||
@if($file->exists() === true)
|
||||
<a href="{{ route('settings.file.download', ['id' => $file->id]) }}"> {{ $file->path_name }} </a>
|
||||
@else
|
||||
<span class="alert">missing file: {{ $file->path_name }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td> {{ $file->label }} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
<button type="submit" class="pure-button button-small">
|
||||
<i class="fa fa-save"></i>
|
||||
<span>{!! $submitButtonText !!}</span>
|
||||
</button>
|
||||
</div>
|
|
@ -16,21 +16,20 @@
|
|||
|
||||
<div class="pure-u-1 pure-u-md-1">
|
||||
<div>
|
||||
<a href="{{ route('publish.workflow.editorIndex') }}" class="pure-button button-small">
|
||||
<a href="{{ route('publish.workflow.editor.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div id="app1">
|
||||
@php
|
||||
//if userid changed from last iteration, store new userid and change color
|
||||
// $lastid = $detail->payment->userid;
|
||||
if ($dataset->editor->id == Auth::user()->id) {
|
||||
$userIsDesiredEditor = true;
|
||||
} else {
|
||||
$userIsDesiredEditor = false;
|
||||
$message = 'you are not the desired editor, but you can still accept the dataset';
|
||||
}
|
||||
// if ($dataset->editor->id == Auth::user()->id) {
|
||||
// $userIsDesiredEditor = true;
|
||||
// } else {
|
||||
// $userIsDesiredEditor = false;
|
||||
// $message = 'you are not the desired editor, but you can still accept the dataset';
|
||||
// }
|
||||
$message = 'If you are not the desired editor, you can still accept the dataset!!';
|
||||
@endphp
|
||||
|
||||
{!! Form::model($dataset, [ 'method' => 'POST', 'route' => ['publish.workflow.acceptUpdate', $dataset->id], 'id' => 'acceptForm',
|
||||
|
@ -41,10 +40,10 @@
|
|||
|
||||
<div class="pure-u-1 pure-u-md-1-1 pure-div">
|
||||
{!! Form::label('editor_id', 'preferred editor:') !!}
|
||||
{!! $dataset->editor->login !!}
|
||||
@if($userIsDesiredEditor == false)
|
||||
{!! $dataset->preferred_editor !!}
|
||||
|
||||
<span class="help is-danger"> {!! $message !!}</span>
|
||||
@endif
|
||||
|
||||
{{-- <span class="help is-danger" v-if="errors.has('editor_id')" v-text="errors.first('editor_id')"></span> --}}
|
||||
|
||||
</div>
|
60
resources/views/workflow/editor/approve.blade.php
Normal file
60
resources/views/workflow/editor/approve.blade.php
Normal file
|
@ -0,0 +1,60 @@
|
|||
@extends('settings.layouts.app')
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-share"></i> Approve corrected datasets
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1">
|
||||
<div>
|
||||
<a href="{{ route('publish.workflow.editor.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div id="app1">
|
||||
{!! Form::model($dataset, [ 'method' => 'POST', 'route' => ['publish.workflow.editor.approveUpdate', $dataset->id], 'id' => 'approveForm',
|
||||
'class' => 'pure-form', 'enctype' => 'multipart/form-data', 'v-on:submit.prevent' => 'checkForm']) !!}
|
||||
<fieldset id="fieldset-General">
|
||||
<legend>General</legend>
|
||||
<div class="pure-g">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('reviewer_id', 'reviewer:') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select('reviewer_id', $reviewers, null, ['id' => 'reviewer_id', 'placeholder' => '-- select reviewer --', 'v-model' =>
|
||||
'dataset.reviewer_id', "v-validate" => "'required'"]) !!}
|
||||
</div>
|
||||
<span class="help is-danger" v-if="errors.has('reviewer_id')" v-text="errors.first('reviewer_id')"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
<button :disabled="errors.any()" type="submit" class="pure-button">
|
||||
<i class="fa fa-share"></i>
|
||||
<span>Approve</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('after-scripts') {{--
|
||||
<script type="text/javascript" src="{{ asset('js/lib.js') }}"></script> --}} {{--
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>--}} {{--
|
||||
<script type="text/javascript" src="{{ resource_path('assets\js\datasetPublish.js') }}"></script> --}}
|
||||
<script type="text/javascript" src="{{ asset('backend/publish/approveDataset.js') }}"></script>
|
||||
|
||||
@stop
|
28
resources/views/workflow/editor/edit.blade.php
Normal file
28
resources/views/workflow/editor/edit.blade.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
@extends('settings.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<span>Correct Dataset</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-3-3">
|
||||
<div>
|
||||
<a href="{{ route('publish.workflow.editor.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
{!! Form::model($dataset, ['method' => 'POST', 'route' => ['publish.workflow.editor.update', $dataset->id], 'class' => 'pure-form', 'enctype' => 'multipart/form-data' ]) !!}
|
||||
@include('workflow/editor/_form', ['submitButtonText' => 'Edit Dataset', 'bookLabel' => 'Edit Dataset.'])
|
||||
@include('errors._errors')
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
|
@ -2,7 +2,7 @@
|
|||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-file"></i>EDITOR PAGE: Approve released datasets
|
||||
<i class="fa fa-file"></i> EDITOR PAGE: Approve released datasets
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
|
@ -44,7 +44,8 @@
|
|||
{{ $dataset->server_state }}
|
||||
</td>
|
||||
@if ($dataset->server_state == "released")
|
||||
<td>Preferred editor: {{ optional($dataset->editor)->login }} </td>
|
||||
{{-- <td>Preferred editor: {{ optional($dataset->editor)->login }} </td> --}}
|
||||
<td>Preferred editor: {{ $dataset->preferred_editor }} </td>
|
||||
@elseif ($dataset->server_state == "editor_accepted")
|
||||
<td>in approvement by {{ optional($dataset->editor)->login }} </td>
|
||||
@endif
|
||||
|
@ -52,14 +53,18 @@
|
|||
<td>
|
||||
@if ($dataset->server_state == "released")
|
||||
<a href="{{ URL::route('publish.workflow.accept', $dataset->id) }}" class="pure-button">
|
||||
<i class="fa fa-share"></i>
|
||||
<i class="fa fa-check"></i>
|
||||
<span>Accept editor task</span>
|
||||
</a>
|
||||
{{-- <a href="{{ URL::route('publish.workflow.delete', $dataset->id) }}" class="pure-button">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>Reject</span>
|
||||
</a> --}}
|
||||
|
||||
@elseif ($dataset->server_state == "editor_accepted")
|
||||
<a href="{{ URL::route('publish.workflow.editor.edit', $dataset->id) }}" class="pure-button">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>Improve/Edit</span>
|
||||
</a>
|
||||
<a href="{{ URL::route('publish.workflow.editor.approve', $dataset->id) }}" class="pure-button">
|
||||
<i class="fa fa-share"></i>
|
||||
<span>Approve</span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
{{-- <td>
|
71
resources/views/workflow/review/index.blade.php
Normal file
71
resources/views/workflow/review/index.blade.php
Normal file
|
@ -0,0 +1,71 @@
|
|||
@extends('settings.layouts.app')
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-file"></i> REVIEW PAGE: Review approved datasets assigned to you
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
<div class="pure-u-1">
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
|
||||
<thead>
|
||||
<th>Dataset Title</th>
|
||||
<th>ID</th>
|
||||
<th>Server State</th>
|
||||
<th>Editor</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($datasets as $dataset)
|
||||
@php
|
||||
//if userid changed from last iteration, store new userid and change color
|
||||
// $lastid = $detail->payment->userid;
|
||||
if ($dataset->server_state == 'editor_accepted') {
|
||||
$rowclass = 'editor_accepted';
|
||||
} elseif ($dataset->server_state == 'released') {
|
||||
$rowclass = 'released';
|
||||
}
|
||||
@endphp
|
||||
<tr>
|
||||
<td>
|
||||
@if ($dataset->titles()->first())
|
||||
{{ $dataset->titles()->first()->value }}
|
||||
@else
|
||||
no title
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $dataset->id }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $dataset->server_state }}
|
||||
</td>
|
||||
@if ($dataset->server_state == "approved")
|
||||
<td>editor: {{ optional($dataset->editor)->login }}</td>
|
||||
@endif
|
||||
|
||||
<td>
|
||||
@if ($dataset->server_state == "approved")
|
||||
<a class="pure-button">
|
||||
<i class="fa fa-check"></i>
|
||||
<span>Review</span>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
{{-- <td>
|
||||
@if ($dataset->server_state == "unpublished")
|
||||
<a href="{{ URL::route('publish.review.changestate',['id' => $dataset->id, 'targetState' => 'published']) }}" class="pure-button button-small is-success">Publish</a>
|
||||
@endif
|
||||
</td> --}}
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
|
@ -29,6 +29,8 @@
|
|||
}
|
||||
elseif ($dataset->server_state == 'editor_accepted') {
|
||||
$rowclass = 'editor_accepted';
|
||||
} elseif ($dataset->server_state == 'approved') {
|
||||
$rowclass = 'approved';
|
||||
}
|
||||
@endphp
|
||||
<tr class="{{ $rowclass }}">
|
|
@ -29,12 +29,15 @@
|
|||
<div class="pure-g">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-2 pure-div">
|
||||
{!! Form::label('editor_id', 'preferred editor:') !!}
|
||||
<div class="select pure-u-23-24">
|
||||
{!! Form::select('editor_id', $editors, null, ['id' => 'editor_id', 'placeholder' => '-- select editor --', 'v-model' =>
|
||||
'dataset.editor_id', "v-validate" => "'required'"]) !!}
|
||||
</div>
|
||||
<span class="help is-danger" v-if="errors.has('editor_id')" v-text="errors.first('editor_id')"></span>
|
||||
{!! Form::label('preferred_editor', 'preferred editor:') !!}
|
||||
|
||||
{{-- {!! Form::select('editor_id', $editors, null, ['id' => 'editor_id', 'placeholder' => '-- select editor --', 'v-model' =>
|
||||
'dataset.editor_id', "v-validate" => "'required'"]) !!} --}}
|
||||
{!! Form::text('preferred_editor', null, ['id' => 'preferred_editor', 'class'=>'pure-u-23-24',
|
||||
'placeholder' => '-- enter name of preferred editor --',
|
||||
'v-model' => 'dataset.preferred_editor', "v-validate" => "'required|min:3|max:20'"]) !!}
|
||||
|
||||
<span class="help is-danger" v-if="errors.has('preferred_editor')" v-text="errors.first('preferred_editor')"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -57,39 +57,59 @@ Route::group(
|
|||
|
||||
Route::get('workflow/index', [
|
||||
'middleware' => ['permission:dataset-list'],
|
||||
'as' => 'workflow.index', 'uses' => 'WorkflowController@index',
|
||||
'as' => 'workflow.index', 'uses' => 'SubmitController@index',
|
||||
]);
|
||||
Route::get('workflow/release/{id}', [
|
||||
'middleware' => ['permission:dataset-create', 'isUserDatasetAdmin:true'],
|
||||
'as' => 'workflow.release', 'uses' => 'WorkflowController@release',
|
||||
'middleware' => ['permission:dataset-submit', 'isUserDatasetAdmin:true'],
|
||||
'as' => 'workflow.release', 'uses' => 'SubmitController@release',
|
||||
]);
|
||||
Route::post('workflow/release/{id}', [
|
||||
'middleware' => ['permission:dataset-create', 'isUserDatasetAdmin:true'],
|
||||
'as' => 'workflow.releaseUpdate', 'uses' => 'WorkflowController@releaseUpdate',
|
||||
'middleware' => ['permission:dataset-submit', 'isUserDatasetAdmin:true'],
|
||||
'as' => 'workflow.releaseUpdate', 'uses' => 'SubmitController@releaseUpdate',
|
||||
]);
|
||||
Route::get('workflow/delete/{id}', [
|
||||
'middleware' => ['isUserDatasetAdmin:true'],
|
||||
'as' => 'workflow.delete', 'uses' => 'WorkflowController@delete',
|
||||
'as' => 'workflow.delete', 'uses' => 'SubmitController@delete',
|
||||
]);
|
||||
// Route::get('workflow/release/{id}', [
|
||||
// 'as' => 'workflow.release', 'uses' => 'WorkflowController@release',
|
||||
// ]);
|
||||
|
||||
Route::get('workflow/editor_index', [
|
||||
//editor
|
||||
Route::get('workflow/editor/index', [
|
||||
'middleware' => ['permission:dataset-editor-list'],
|
||||
'as' => 'workflow.editorIndex', 'uses' => 'WorkflowController@editorIndex',
|
||||
'as' => 'workflow.editor.index', 'uses' => 'EditorController@index',
|
||||
]);
|
||||
Route::get('workflow/accept/{id}', [
|
||||
'middleware' => ['permission:dataset-accept'],
|
||||
'as' => 'workflow.accept', 'uses' => 'WorkflowController@accept',
|
||||
'as' => 'workflow.accept', 'uses' => 'EditorController@accept',
|
||||
]);
|
||||
Route::post('workflow/accept/{id}', [
|
||||
'middleware' => ['permission:dataset-accept'],
|
||||
'as' => 'workflow.acceptUpdate', 'uses' => 'WorkflowController@acceptUpdate',
|
||||
'as' => 'workflow.acceptUpdate', 'uses' => 'EditorController@acceptUpdate',
|
||||
]);
|
||||
Route::get('workflow/edit/{id}', [
|
||||
'middleware' => ['permission:dataset-editor-update'],
|
||||
'as' => 'workflow.editor.edit', 'uses' => 'EditorController@edit',
|
||||
]);
|
||||
Route::post('workflow/edit/{id}', [
|
||||
'middleware' => ['permission:dataset-editor-update'],
|
||||
'as' => 'workflow.editor.update', 'uses' => 'EditorController@update',
|
||||
]);
|
||||
Route::get('workflow/approve/{id}', [
|
||||
'middleware' => ['permission:dataset-approve'],
|
||||
'as' => 'workflow.editor.approve', 'uses' => 'EditorController@approve',
|
||||
]);
|
||||
Route::post('workflow/approve/{id}', [
|
||||
'middleware' => ['permission:dataset-approve'],
|
||||
'as' => 'workflow.editor.approveUpdate', 'uses' => 'EditorController@approveUpdate',
|
||||
]);
|
||||
|
||||
//reviewer
|
||||
Route::get('workflow/review/index', [
|
||||
'middleware' => ['permission:dataset-review-list'],
|
||||
'as' => 'workflow.review.index', 'uses' => 'ReviewController@index',
|
||||
]);
|
||||
|
||||
Route::get('workflow/changestate/{id}/changestate/{targetState}', [
|
||||
'as' => 'review.changestate', 'uses' => 'WorkflowController@changestate',
|
||||
'as' => 'review.changestate', 'uses' => 'SubmitController@changestate',
|
||||
]);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -18,6 +18,7 @@ mix.js('resources/assets/js/datasetPublish.js', 'public/backend/publish')
|
|||
.js('resources/assets/js/app.js', 'public/js')
|
||||
.js('resources/assets/js/lib.js', 'public/js')
|
||||
.js('resources/assets/js/releaseDataset.js', 'public/backend/publish')
|
||||
.js('resources/assets/js/approveDataset.js', 'public/backend/publish')
|
||||
.scripts([
|
||||
'node_modules/datatables.net/js/jquery.dataTables.js',
|
||||
'node_modules/datatables.net-buttons/js/dataTables.buttons.js',
|
||||
|
|
Loading…
Reference in New Issue
Block a user