edit references in editor edit view
This commit is contained in:
parent
4d6664ce3a
commit
03bcbab560
12 changed files with 191 additions and 78 deletions
|
@ -186,6 +186,50 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-references">
|
||||
<legend>Dataset References</legend>
|
||||
{{-- <table class="table table-hover" v-if="dataset.keywords.length"> --}}
|
||||
@if ($dataset->references->count() > 0)
|
||||
<table id="references" class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20px;">Reference value</th>
|
||||
<th style="width: 20px;">Label</th>
|
||||
<th>Type</th>
|
||||
<th>Relation</th>
|
||||
<th style="width: 130px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- <tr v-for="(item, index) in dataset.keywords"> --}}
|
||||
@foreach($dataset->references as $key => $reference)
|
||||
<tr>
|
||||
<td>
|
||||
{{ Form::text('references['.$reference->id.'][value]', $reference->value, ['class' => 'form-control', 'placeholder' => '[REFERENCE VALUE]']) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::text('references['.$reference->id.'][label]', $reference->label, ['class' => 'form-control', 'placeholder' => '[REFERENCE LABEL]']) }}
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('references['.$reference->id.'][type]', $referenceTypes, $reference->type, ['placeholder' => '[reference type]', 'v-model' =>
|
||||
'item.type', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('references['.$reference->id.'][relation]', $relationTypes, $reference->relation, ['placeholder' => '[relation type]', 'v-model' =>
|
||||
'item.relation', "v-validate" => "'required'", 'data-vv-scope' => 'step-2']) !!}
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<span>...there are no references</span>
|
||||
@endif
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset-keywords">
|
||||
<legend>Dataset Keywords</legend>
|
||||
{{-- <table class="table table-hover" v-if="dataset.keywords.length"> --}}
|
||||
|
@ -219,7 +263,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<span>...ther are no keywords</span>
|
||||
<span>...there are no keywords</span>
|
||||
@endif
|
||||
</fieldset>
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
{{ $dataset->titles()->first()->value }}
|
||||
@else
|
||||
no title
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $dataset->id }}
|
||||
|
@ -77,7 +77,7 @@
|
|||
<span>Reject</span>
|
||||
</a>
|
||||
@elseif ($dataset->server_state == "reviewed")
|
||||
<a href="{{ URL::route('publish.workflow.publish.publishUpdate', $dataset->id) }}" class="pure-button">
|
||||
<a href="{{ URL::route('publish.workflow.editor.publishUpdate', $dataset->id) }}" class="pure-button">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>Publish</span>
|
||||
</a>
|
||||
|
|
85
resources/views/workflow/editor/publish.blade.php
Normal file
85
resources/views/workflow/editor/publish.blade.php
Normal file
|
@ -0,0 +1,85 @@
|
|||
@extends('settings.layouts.app')
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-share"></i> Publish reviewed dataset
|
||||
</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.publishUpdate', $dataset->id],
|
||||
'id' => 'publishForm', 'class' => 'pure-form', 'enctype' => 'multipart/form-data', 'v-on:submit.prevent' => 'checkForm'])
|
||||
!!}
|
||||
<fieldset id="fieldset-General">
|
||||
|
||||
|
||||
<h3>Selected Dataset</h3>
|
||||
<table style="margin-left: 2em">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top; padding-right: 1em">{{ $dataset->id }}</td>
|
||||
<td>
|
||||
@foreach($dataset->titles as $title)
|
||||
<div class="title" style="font-weight: bold">
|
||||
{{ $title->value }}
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="authors">
|
||||
@foreach($dataset->persons as $author)
|
||||
|
||||
{{ $author->full_name }}
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
<input type="hidden" name="selected[]" value="49">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="instruction">
|
||||
Are you sure you want to publish the selected dataset?
|
||||
</div>
|
||||
<table>
|
||||
<tbody><tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<button type="submit" class="pure-button">
|
||||
<i class="fa fa-share"></i>
|
||||
<span>Set published</span>
|
||||
</button>
|
||||
{{-- <input type="submit" name="sureno" value="No"> --}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
{{-- <div class="pure-controls">
|
||||
<button type="submit" class="pure-button">
|
||||
<i class="fa fa-share"></i>
|
||||
<span>Set published</span>
|
||||
</button>
|
||||
</div> --}}
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@stop
|
||||
@section('after-scripts')
|
||||
@stop
|
|
@ -35,21 +35,36 @@
|
|||
<div class="pure-g">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-1 pure-div">
|
||||
{!! Form::label('server_state', 'Status..') !!}
|
||||
{!! Form::text('server_state', 'rejected_editor', ['class'=>'pure-u-23-24','readonly']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
{!! Form::label('server_state', 'Status..') !!}
|
||||
{!! Form::text('server_state', 'rejected_editor', ['class'=>'pure-u-23-24','readonly']) !!}
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-1 pure-div">
|
||||
{!! Form::label('reject_editor_note', 'reject note:') !!}
|
||||
{!! Form::textarea('reject_editor_note',null, ['id' => 'reject_editor_note', 'class'=>'pure-u-23-24',
|
||||
'placeholder' => '-- reject note for submitter --', 'size' => '70x6',
|
||||
'v-model' => 'dataset.reject_editor_note', "v-validate" => "'required|min:10|max:255'"]) !!}
|
||||
<em>*</em>
|
||||
|
||||
<span class="help is-danger" v-if="errors.has('reject_editor_note')" v-text="errors.first('reject_editor_note')"></span>
|
||||
|
||||
</div>
|
||||
<em>*</em>
|
||||
<span class="help is-danger" v-if="errors.has('reject_editor_note')" v-text="errors.first('reject_editor_note')"></span>
|
||||
</div>
|
||||
|
||||
@if ($dataset->reject_reviewer_note != null)
|
||||
<div class="pure-u-1 pure-u-md-1-1">
|
||||
{!! Form::label('reject_reviewer_note', 'Reviewer reject note..') !!}
|
||||
{!! Form::text('reject_reviewer_note', null, ['class'=>'pure-u-23-24','readonly']) !!}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-1">
|
||||
<label for="BelongsToBibliography" class="pure-checkbox">
|
||||
<input type="hidden" name="reviewer_note_visible" value="0">
|
||||
<input name="reviewer_note_visible" value="1" type="checkbox" class="form-check-input">
|
||||
should reviewer note be visible to submitter?
|
||||
</label>
|
||||
</div>
|
||||
@else
|
||||
<div class="pure-u-1 pure-u-md-1-1">
|
||||
<span class="help is-info">There is no reject note from the reviewer</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue