wizard for publishing: step 0

This commit is contained in:
Arno Kaimbacher 2019-03-19 18:04:41 +01:00
parent d9b26afb3f
commit 9d195c450e
10 changed files with 102 additions and 55 deletions

View file

@ -253,7 +253,7 @@ class RequestController extends Controller
*/
private function handleListRecords($oaiRequest)
{
$maxRecords = 20;//$this->_configuration->getMaxListRecords();
$maxRecords = 30;//$this->_configuration->getMaxListRecords();
$this->handlingOfLists($oaiRequest, $maxRecords);
}

View file

@ -326,36 +326,38 @@ class IndexController extends Controller
$licenses = $request->input('licenses');
$dataset->licenses()->sync($licenses);
$data_to_sync = [];
//store authors
if (isset($data['authors'])) {
$data_to_sync = [];
//$data_to_sync = [];
foreach ($request->get('authors') as $key => $person_id) {
$pivot_data = ['role' => 'author', 'sort_order' => $key + 1];
// if ($galery_id == $request->get('mainPicture')) $pivot_data = ['main' => 1];
$data_to_sync[$person_id] = $pivot_data;
}
$dataset->persons()->sync($data_to_sync);
//$dataset->persons()->sync($data_to_sync);
}
//store contributors
if (isset($data['contributors'])) {
$data_to_sync = [];
//$data_to_sync = [];
foreach ($request->get('contributors') as $key => $contributor_id) {
$pivot_data = ['role' => 'contributor', 'sort_order' => $key + 1];
$data_to_sync[$contributor_id] = $pivot_data;
}
$dataset->persons()->sync($data_to_sync);
//$dataset->persons()->sync($data_to_sync);
}
//store submitters
if (isset($data['submitters'])) {
$data_to_sync = [];
//$data_to_sync = [];
foreach ($request->get('submitters') as $key => $submitter_id) {
$pivot_data = ['role' => 'submitter', 'sort_order' => $key + 1];
$data_to_sync[$submitter_id] = $pivot_data;
}
$dataset->persons()->sync($data_to_sync);
//$dataset->persons()->sync($data_to_sync);
}
$dataset->persons()->sync($data_to_sync);
//save main title:

View file

@ -206,7 +206,7 @@ class QueryBuilder
$query = new SolrSearchQuery(SolrSearchQuery::ALL_DOCS);
$query->setStart("0");//$input['start']);
//$query->setRows($input['rows']);
$query->setRows("10");
$query->setRows("100");
$query->setSortField($input['sortField']);
$query->setSortOrder($input['sortOrder']);

View file

@ -22,12 +22,12 @@ trait DatasetExtension
protected $externalFields = array(
'TitleMain' => array(
'model' => Title::class,
'options' => array('type' => ['main', 'alternative', 'subtitle', 'other']),
'options' => array('type' => ['main', 'alternative', 'sub', 'translated', 'other']),
'fetch' => 'eager'
),
'TitleAbstract' => array(
'model' => Description::class,
'options' => array('type' => ['abstract', 'methods']),
'options' => array('type' => ['abstract', 'methods', 'technical_info', 'series_information', 'other']),
'fetch' => 'eager'
),
'Licence' => array(