Skip to content
Snippets Groups Projects
Commit 489fe583 authored by Alexander Purr's avatar Alexander Purr Committed by Robert Lange
Browse files

refs #19204 [fid_bbi] digitization-on-demand

* templating and translations of digitization-on-demand-service
* order only with full_access
* add order list links to profile menu
** for normal user own acquisitions
** for admin complete acquisitions
parent 32514a83
No related merge requests found
......@@ -27,4 +27,9 @@ relative_path = ../../../fid/config/vufind/permissions.ini
[access.AdminModule]
role[] = loggedin
FidApiPermission[] = edit_user
permission = access.AdminModule
\ No newline at end of file
permission = access.AdminModule
[fid.Acquisitions]
role[] = loggedin
FidApiPermission[] = full_access
permission = fid.Acquisitions
......@@ -209,8 +209,7 @@ $nonTabRecordActions = [
'PDA',
'EmailHold',
'ReportErrors',
'Acquisition',
'fidSubitoPartialCopy'
'Acquisition'
];
......
......@@ -12,3 +12,5 @@ permission_extended_access = "Zugriff auf FID-Lizenzen"
permission_full_access = "Zugriff auf lizenzbewehrte Literatur, Direktlieferung & Digitise-on-Demand"
label_college = "Hochschule oder andere affiliierte Institution"
acquisition_fid_name = "FID BBI"
<?php
/** @var \fid\Service\DataTransferObject\User $user */
/** @var \fid\Service\DataTransferObject\Address $address */
$address = $this->user->getDeliveryAddress();
?>
<h2><?=$this->translate("fid::acquisition_delivery_to")?></h2>
<table class="table table-striped">
<tbody>
<tr>
<th><?= $this->translate("fid::acquisition_order_delivery_name") ?></th>
<td><?= $this->user->getFirstname() ?> <?= $this->user->getLastname() ?></td>
</tr>
<tr>
<th><?= $this->translate("fid::order_delivery_address") ?></th>
<td>
<?php if($user->deliveryAddressIsBusinessAddress() && !empty($college=$user->getCollege())): ?>
<?= $college ?><br>
<?php endif ?>
<?= $address->getLine1() ?><br>
<?= !empty($address->getLine2()) ? $address->getLine2() . '<br>' : '' ?>
<?= $address->getZip() ?> <?= $address->getCity() ?><br>
<?= $address->getCountry() ?>
</td>
</tr>
<tr>
<th><?= $this->translate("Email Address") ?></th>
<td><?= $this->user->getUsername() ?></td>
</tr>
</tbody>
</table>
<?php
use Zend\Form\Element;
use Zend\Form\Form;
use Zend\Form\View\Helper\FormElementErrors;
use Zend\Form\View\Helper\FormLabel;
use Zend\Form\View\Helper\FormSubmit;
$driver = $this->driver;
/** @var Form $form */
/** @var FormLabel $formLabel */
/** @var FormSubmit $formSubmit */
/** @var FormElementErrors $formElementErrors */
$form = $this->form;
$formLabel = $this->formLabel();
$formLabel->setTranslatorTextDomain('fid');
$formSubmit = $this->formSubmit();
$formSubmit->setTranslatorTextDomain('fid');
$formElementErrors = $this->formElementErrors();
$formElementErrors->setTranslatorTextDomain('fid');
$this->headTitle($title = $this->translate("fid::acquisition_digitization"));
$form->setAttribute('class','fid-acquisition-form');
?>
<h1><?= $title ?></h1>
<?= $this->flashmessages() ?>
<?= $this->form()->openTag($form) ?>
<div class="form-group">
<?= $this->translate("fid::acquisition_digitization_info", [
'%%fidname%%' => $this->translate("fid::acquisition_fid_name"),
]); ?>
</div>
<?=$this->render('fid/record/acquisition-address-details'); ?>
<?php
$formatter = $this->recordDataFormatter();
$this->coreFields = $formatter->getData($driver, $formatter->getDefaults('fid-acquisition-general'));
?>
<?=$this->render('fid/record/acquisition-record-details'); ?>
<? /* format */ ?>
<?php
/** @var Element\Select $elemFormat */
$elemFormat = $form->get('format');
$elemFormat->setLabelAttributes(['class' => 'control-label']);
$elemFormat->setAttributes(['class' => 'form-control']);
?>
<? /* comments */ ?>
<?php
/** @var Element\Text $elemComment */
$elemComment = $form->get('comment');
$elemComment->setLabelAttributes(['class' => 'control-label']);
$elemComment->setAttributes(['class' => 'form-control']);
?>
<div class="form-group">
<?= $this->formElementErrors($elemFormat) ?>
<?= $this->formLabel($elemFormat) ?>
<?= $this->formElement($elemFormat) ?>
</div>
<div class="form-group">
<?= $this->formElementErrors($elemComment) ?>
<?= $this->formLabel($elemComment) ?>
<?= $this->formElement($elemComment) ?>
</div>
<? /* submit button */ ?>
<?php
/** @var Element\Submit $elemSubmit */
$elemSubmit = $form->get('submit');
$elemSubmit->setAttributes(['class' => 'btn btn-primary']);
?>
<div class="form-group right">
<?= $this->formElement($elemSubmit) ?>
</div>
<?= $this->form()->closeTag($form) ?>
<?php /* Display FID Acquisition Record Details */ ?>
<?php if (!empty($this->coreFields)): ?>
<h2><?= $this->translate("fid::acquisition_info_requested_item") ?></h2>
<table class="table table-striped">
<?php foreach ($this->coreFields as $current): ?>
<?php if ($current['label'] == null): ?>
<?= $current['value'] ?>
<?php else: ?>
<tr>
<th><?= $this->transEsc($current['label']) ?>:</th>
<td><?= $current['value'] ?></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?php /* End FID Acquisition Record Details */ ?>
......@@ -61,6 +61,13 @@
<?php if ($this->userlist()->getMode() !== 'disabled'): ?>
<h3><?=$this->translate('Your Lists')?></h3>
<ul class="unstyled-list">
<li>
<a data-lightbox href="<?=$this->url('fid/user/orders')?>">
<?=$this->transEsc('Your Orders')?>
</a>
</li>
<?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?>
<li>
<a
......@@ -124,6 +131,9 @@
<li>
<a href="<?=$this->url('admin/tags', ['action' => 'List'])?>"><?=$this->translate('Tag Management')?></a>
</li>
<li>
<a href="<?=$this->url('fid/admin/orders')?>"><?=$this->transEsc('fid::permission_read_order_list')?></a>
</li>
</ul>
<?php endif; ?>
</div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment