diff --git a/app/Http/Controllers/Publish/ReviewController.php b/app/Http/Controllers/Publish/ReviewController.php
index 9d43810..a783788 100644
--- a/app/Http/Controllers/Publish/ReviewController.php
+++ b/app/Http/Controllers/Publish/ReviewController.php
@@ -128,6 +128,20 @@ class ReviewController extends Controller
throw new GeneralException(trans('exceptions.publish.review.update_error'));
}
+ /**
+ * Reject dataset back to editor
+ *
+ * @param int $id
+ * @return \Illuminate\View\View
+ */
+ public function reject($id): View
+ {
+ $dataset = Dataset::with('user:id,login')->findOrFail($id);
+ return view('workflow.review.reject', [
+ 'dataset' => $dataset,
+ ]);
+ }
+
//snakeToCamel
private static function convertColumnToFieldname($columnname)
{
diff --git a/resources/views/workflow/editor/index.blade.php b/resources/views/workflow/editor/index.blade.php
index 657d665..cb871d5 100644
--- a/resources/views/workflow/editor/index.blade.php
+++ b/resources/views/workflow/editor/index.blade.php
@@ -14,7 +14,8 @@
Dataset Title |
ID |
Server State |
- Editor |
+ Editor |
+ Date of submission |
|
@@ -49,7 +50,11 @@
@elseif ($dataset->server_state == "editor_accepted")
in approvement by {{ optional($dataset->editor)->login }} |
@endif
-
+
+ @if ($dataset->server_state == 'released')
+ {{ $dataset->server_date_modified }}
+ @endif
+ |
@if ($dataset->server_state == "released")
diff --git a/resources/views/workflow/review/index.blade.php b/resources/views/workflow/review/index.blade.php
index a844576..4027937 100644
--- a/resources/views/workflow/review/index.blade.php
+++ b/resources/views/workflow/review/index.blade.php
@@ -53,6 +53,10 @@
Review
+
+
+ Reject
+
@endif
|
{{--
diff --git a/resources/views/workflow/review/reject.blade.php b/resources/views/workflow/review/reject.blade.php
new file mode 100644
index 0000000..50eef3b
--- /dev/null
+++ b/resources/views/workflow/review/reject.blade.php
@@ -0,0 +1,57 @@
+@extends('settings.layouts.app')
+@section('content')
+
+
+
+
+
+
+
+
+ {!! Form::model($dataset, [ 'method' => 'POST', 'route' => ['publish.workflow.review.rejectUpdate', $dataset->id], 'id' => 'rejectForm',
+ 'class' => 'pure-form', 'enctype' => 'multipart/form-data', 'v-on:submit.prevent' => 'checkForm']) !!}
+
+
+
+
+ {{-- --}}
+ ..to do: write code for setting state 'rejected_reviewer' in database
+
+
+ {!! Form::close() !!}
+
+
+
+
+
+@stop
+
+@section('after-scripts')
+@stop
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index 51a7e65..5816a63 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -115,6 +115,14 @@ Route::group(
'middleware' => ['permission:dataset-review'],
'as' => 'workflow.review.reviewUpdate', 'uses' => 'ReviewController@reviewUpdate',
]);
+ Route::get('workflow/review/reject/{id}', [
+ 'middleware' => ['permission:dataset-review-reject'],
+ 'as' => 'workflow.review.reject', 'uses' => 'ReviewController@reject',
+ ]);
+ Route::post('workflow/review/reject/{id}', [
+ 'middleware' => ['permission:dataset-review-reject'],
+ 'as' => 'workflow.review.rejectUpdate', 'uses' => 'ReviewController@rejectUpdate',
+ ]);
//publisher
Route::get('workflow/publish/index', [
|