dataset publication workflow: editor page
This commit is contained in:
parent
de80de9d88
commit
246577b0b0
9 changed files with 246 additions and 35 deletions
|
@ -5,7 +5,9 @@
|
|||
<div class='col-lg-4 col-lg-offset-4'>
|
||||
<h1><center>403<br>
|
||||
ACCESS DENIED</center></h1>
|
||||
<a href="{{ URL::previous() }}" class="btn btn-default">Back</a>
|
||||
<h2>{{ $exception->getMessage() }}</h2>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('settings.collection.index') }}">COLLECTION</a></li>
|
||||
<li class="pure-menu-item"><a class="pure-menu-link" href="{{ route('settings.project') }}">PROJECT</a></li>
|
||||
|
||||
<!-- <li><a href="{{ route('settings.shelf') }}" class="marvel">SHELF</a></li>-->
|
||||
|
||||
|
||||
|
||||
<li class="pure-menu-item"><a href="{{ route('settings.license') }}" class="pure-menu-link">LICENSES</a></li>
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
</li>
|
||||
@endpermission
|
||||
|
||||
@permission('review')
|
||||
@role(array('administrator', 'editor', 'reviewer'))
|
||||
<li class="treeview">
|
||||
<h2 class="pure-menu-heading">Publish</h2>
|
||||
<ul class="pure-menu-list">
|
||||
|
@ -98,8 +98,8 @@
|
|||
<li class="pure-menu-item {{ Route::is('publish.workflow.index') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.index') }}"><i class="fa fa-upload"></i> All my datasets</a>
|
||||
</li>
|
||||
<li class="pure-menu-item {{ Route::is('publish.workflow.indexreleased') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.indexReleased') }}"><i class="fa fa-upload"></i> All released datasets</a>
|
||||
<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>
|
||||
{{-- <li class="pure-menu-item {{ Route::is('publish.workflow.release') ? 'active' : '' }}">
|
||||
<a class="pure-menu-link" href="{{ URL::route('publish.workflow.release') }}"><i class="fa fa-upload"></i> Release pending datasets</a>
|
||||
|
@ -109,7 +109,7 @@
|
|||
</li> --}}
|
||||
</ul>
|
||||
</li>
|
||||
@endpermission
|
||||
@endrole
|
||||
|
||||
|
||||
|
||||
|
|
89
resources/views/workflow/accept.blade.php
Normal file
89
resources/views/workflow/accept.blade.php
Normal file
|
@ -0,0 +1,89 @@
|
|||
@extends('settings.layouts.app')
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-share"></i> Accept released dataset
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Release your dataset for Editor
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1">
|
||||
<div>
|
||||
<a href="{{ route('publish.workflow.editorIndex') }}" 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';
|
||||
}
|
||||
@endphp
|
||||
|
||||
{!! Form::model($dataset, [ 'method' => 'POST', 'id' => 'acceptForm',
|
||||
'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('editor_id', 'preferred editor:') !!}
|
||||
{!! $dataset->editor->login !!}
|
||||
@if($userIsDesiredEditor == false)
|
||||
<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>
|
||||
<div class="pure-u-1 pure-u-md-1-1 pure-div">
|
||||
{!! Form::label('owner', 'dataset owner:') !!}
|
||||
{!! $dataset->user->login !!}
|
||||
{{-- <span class="help is-danger" v-if="errors.has('editor_id')" v-text="errors.first('editor_id')"></span> --}}
|
||||
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-1 pure-div">
|
||||
{!! Form::label('title', 'dataset title:') !!}
|
||||
@if ($dataset->titles()->first())
|
||||
{{ $dataset->titles()->first()->value }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
<div class="pure-controls">
|
||||
<button :disabled="errors.any()" type="submit" class="pure-button">
|
||||
<i class="fa fa-share"></i>
|
||||
<span>Accept</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/releaseDataset.js') }}"></script>
|
||||
|
||||
@stop
|
|
@ -2,7 +2,7 @@
|
|||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-file"></i> Review unpblished datasets
|
||||
<i class="fa fa-file"></i>EDITOR PAGE: Approve released datasets
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
|||
<th>Dataset Title</th>
|
||||
<th>ID</th>
|
||||
<th>Server State</th>
|
||||
<th>Preferred Editor</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
|
||||
|
@ -33,13 +34,25 @@
|
|||
<td>
|
||||
{{ $dataset->server_state }}
|
||||
</td>
|
||||
|
||||
<td> {{ optional($dataset->editor)->login }} </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>
|
||||
{{-- <a href="" class="pure-button button-small is-success">Restrict</a> --}}
|
||||
@if ($dataset->server_state == "released")
|
||||
<a href="{{ URL::route('publish.workflow.accept', $dataset->id) }}" class="pure-button">
|
||||
<i class="fa fa-share"></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> --}}
|
||||
|
||||
@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>
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue