- doi url for dc:identifier
- readonly keywords with id for editor and submitter for edit forms
This commit is contained in:
parent
d80a8ab3f4
commit
28a38da865
|
@ -125,6 +125,7 @@ class RequestController extends Controller
|
|||
$this->proc->setParameter('', 'baseURL', url('/') . $uri[0]);
|
||||
$this->proc->setParameter('', 'repURL', url('/'));
|
||||
$this->proc->setParameter('', 'downloadLink', url('/') . '/file/download/');
|
||||
$this->proc->setParameter('', 'doiLink', 'https://doi.org/');
|
||||
|
||||
// $resumptionPath = $this->configuration->getResumptionTokenPath();
|
||||
|
||||
|
|
|
@ -386,15 +386,21 @@ class EditorController extends Controller
|
|||
if (is_array($keywords) && count($keywords) > 0) {
|
||||
foreach ($keywords as $key => $formKeyword) {
|
||||
if (isset($formKeyword['id'])) {
|
||||
// is readonly
|
||||
$subject = Subject::findOrFail($formKeyword['id']);
|
||||
$subject->value = $formKeyword['value'];
|
||||
$subject->type = $formKeyword['type'];
|
||||
if ($subject->isDirty()) {
|
||||
$subject->save();
|
||||
}
|
||||
// $subject->value = $formKeyword['value'];
|
||||
// $subject->type = $formKeyword['type'];
|
||||
// if ($subject->isDirty()) {
|
||||
// $subject->save();
|
||||
// }
|
||||
} else {
|
||||
$subject = new Subject($formKeyword);
|
||||
$dataset->subjects()->save($subject);
|
||||
// $subject = new Subject($formKeyword);
|
||||
// $dataset->subjects()->save($subject);
|
||||
$keyword = Subject::firstOrCreate(
|
||||
['value' => $formKeyword['value'], 'language' => $formKeyword['language']],
|
||||
$formKeyword
|
||||
);
|
||||
$dataset->subjects()->attach($keyword);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -317,14 +317,19 @@ class SubmitController extends Controller
|
|||
foreach ($keywords as $key => $formKeyword) {
|
||||
if (isset($formKeyword['id'])) {
|
||||
$subject = Subject::findOrFail($formKeyword['id']);
|
||||
$subject->value = $formKeyword['value'];
|
||||
$subject->type = $formKeyword['type'];
|
||||
if ($subject->isDirty()) {
|
||||
$subject->save();
|
||||
}
|
||||
// $subject->value = $formKeyword['value'];
|
||||
// $subject->type = $formKeyword['type'];
|
||||
// if ($subject->isDirty()) {
|
||||
// $subject->save();
|
||||
// }
|
||||
} else {
|
||||
$subject = new Subject($formKeyword);
|
||||
$dataset->subjects()->save($subject);
|
||||
// $subject = new Subject($formKeyword);
|
||||
// $dataset->subjects()->save($subject);
|
||||
$keyword = Subject::firstOrCreate(
|
||||
['value' => $formKeyword['value'], 'language' => $formKeyword['language']],
|
||||
$formKeyword
|
||||
);
|
||||
$dataset->subjects()->attach($keyword);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<xsl:param name="repositoryName" />
|
||||
<xsl:param name="repIdentifier" />
|
||||
<xsl:param name="downloadLink" />
|
||||
<xsl:param name="doiLink" />
|
||||
<xsl:param name="sampleIdentifier" />
|
||||
<xsl:param name="docId" />
|
||||
<xsl:param name="dateDelete" />
|
||||
|
@ -370,6 +371,9 @@
|
|||
<!-- <dc:format> -->
|
||||
<xsl:apply-templates select="File" mode="oai_dc" />
|
||||
<!-- dc:identifier -->
|
||||
<xsl:if test="Identifier">
|
||||
<xsl:apply-templates select="Identifier" mode="oai_dc" />
|
||||
</xsl:if>
|
||||
<dc:identifier>
|
||||
<xsl:value-of select="@landingpage"/>
|
||||
</dc:identifier>
|
||||
|
@ -561,6 +565,12 @@
|
|||
</dc:identifier>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Identifier" mode="oai_dc">
|
||||
<dc:identifier>
|
||||
<xsl:value-of select="concat($doiLink, @Value)" />
|
||||
</dc:identifier>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@CreatingCorporation" mode="oai_dc">
|
||||
<dc:language>
|
||||
<xsl:value-of select="." />
|
||||
|
|
|
@ -546,7 +546,7 @@
|
|||
|
||||
<td>
|
||||
<input v-bind:name="'subjects[' + index +'][id]'" readonly class="form-control" v-model="item.id" hidden />
|
||||
<input v-bind:name="'subjects[' + index +'][value]'" class="form-control"
|
||||
<input v-bind:name="'subjects[' + index +'][value]'" :readonly="item.id != undefined" class="form-control"
|
||||
placeholder="[KEYWORD VALUE]" v-model="item.value" v-validate="'required'" />
|
||||
{{-- {{ Form::text('keywords['.$keyword->id.'][value]', $keyword->value, ['class' => 'form-control', 'placeholder' => '[KEYWORD VALUE]']) }}
|
||||
--}}
|
||||
|
|
|
@ -542,7 +542,7 @@
|
|||
|
||||
<td>
|
||||
<input v-bind:name="'subjects[' + index +'][id]'" readonly class="form-control" v-model="item.id" hidden />
|
||||
<input v-bind:name="'subjects[' + index +'][value]'" class="form-control"
|
||||
<input v-bind:name="'subjects[' + index +'][value]'" :readonly="item.id != undefined" class="form-control"
|
||||
placeholder="[KEYWORD VALUE]" v-model="item.value" v-validate="'required'" />
|
||||
{{-- {{ Form::text('keywords['.$keyword->id.'][value]', $keyword->value, ['class' => 'form-control', 'placeholder' => '[KEYWORD VALUE]']) }}
|
||||
--}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user