- reject form für reviewer
- editor sees submission date in index table - 2 new routes: reject und rejectUpdate
This commit is contained in:
parent
abc0360835
commit
ec4ffbdcee
|
@ -128,6 +128,20 @@ class ReviewController extends Controller
|
||||||
throw new GeneralException(trans('exceptions.publish.review.update_error'));
|
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
|
//snakeToCamel
|
||||||
private static function convertColumnToFieldname($columnname)
|
private static function convertColumnToFieldname($columnname)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
<th>Dataset Title</th>
|
<th>Dataset Title</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Server State</th>
|
<th>Server State</th>
|
||||||
<th>Editor</th>
|
<th>Editor</th>
|
||||||
|
<th>Date of submission</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
|
@ -49,7 +50,11 @@
|
||||||
@elseif ($dataset->server_state == "editor_accepted")
|
@elseif ($dataset->server_state == "editor_accepted")
|
||||||
<td>in approvement by {{ optional($dataset->editor)->login }} </td>
|
<td>in approvement by {{ optional($dataset->editor)->login }} </td>
|
||||||
@endif
|
@endif
|
||||||
|
<td>
|
||||||
|
@if ($dataset->server_state == 'released')
|
||||||
|
{{ $dataset->server_date_modified }}
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if ($dataset->server_state == "released")
|
@if ($dataset->server_state == "released")
|
||||||
<a href="{{ URL::route('publish.workflow.editor.receive', $dataset->id) }}" class="pure-button">
|
<a href="{{ URL::route('publish.workflow.editor.receive', $dataset->id) }}" class="pure-button">
|
||||||
|
|
|
@ -53,6 +53,10 @@
|
||||||
<i class="fa fa-check"></i>
|
<i class="fa fa-check"></i>
|
||||||
<span>Review</span>
|
<span>Review</span>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="{{ URL::route('publish.workflow.review.reject', $dataset->id) }}" class="pure-button">
|
||||||
|
<i class="fas fa-undo"></i>
|
||||||
|
<span>Reject</span>
|
||||||
|
</a>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
{{-- <td>
|
{{-- <td>
|
||||||
|
|
57
resources/views/workflow/review/reject.blade.php
Normal file
57
resources/views/workflow/review/reject.blade.php
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
@extends('settings.layouts.app')
|
||||||
|
@section('content')
|
||||||
|
<div class="header">
|
||||||
|
<h3 class="header-title">
|
||||||
|
<i class="fa fa-share"></i> Reject approved dataset
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pure-g box-content">
|
||||||
|
|
||||||
|
<div class="pure-u-1 pure-u-md-1">
|
||||||
|
<div>
|
||||||
|
<a href="{{ route('publish.workflow.review.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.review.rejectUpdate', $dataset->id], 'id' => 'rejectForm',
|
||||||
|
'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-1 pure-div">
|
||||||
|
{!! Form::label('owner', 'reject note:') !!}
|
||||||
|
{!! Form::text('reject_reviewer_note', null, ['id' => 'reject_reviewer_note', 'class'=>'pure-u-23-24',
|
||||||
|
'placeholder' => '-- reject note for editor --',
|
||||||
|
'v-model' => 'dataset.reject_reviewer_note', "v-validate" => "'required|min:10|max:255'"]) !!}
|
||||||
|
<em>*</em>
|
||||||
|
|
||||||
|
<span class="help is-danger" v-if="errors.has('preferred_reviewer')" v-text="errors.first('preferred_reviewer')"></span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div class="pure-controls">
|
||||||
|
{{-- <button type="submit" class="pure-button">
|
||||||
|
<i class="fas fa-undo"></i>
|
||||||
|
<span>Reject</span>
|
||||||
|
</button> --}}
|
||||||
|
<span class="help is-danger">..to do: write code for setting state 'rejected_reviewer' in database</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{!! Form::close() !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('after-scripts')
|
||||||
|
@stop
|
|
@ -115,6 +115,14 @@ Route::group(
|
||||||
'middleware' => ['permission:dataset-review'],
|
'middleware' => ['permission:dataset-review'],
|
||||||
'as' => 'workflow.review.reviewUpdate', 'uses' => 'ReviewController@reviewUpdate',
|
'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
|
//publisher
|
||||||
Route::get('workflow/publish/index', [
|
Route::get('workflow/publish/index', [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user