params ['useLogin'] && ( in_array ( Yii::$app->request->userIP, Yii::$app->params ['authorizedIPs'] ) || in_array("all", Yii::$app->params['authorizedIPs'] ))) {
if (! \Yii::$app->user->isGuest) {
// Get the predefined user settings from the database and pass them to javascript
$settings=Yii::$app->user->identity->getUserSettings ();
$page = $settings['default_hits_per_page'];
$order = $settings['default_sort'];
$asc = $settings['order'];
$this->registerJs ( "var ops = " . json_encode ( $page ) . "; var or = " . json_encode ( $order ) . "; var asc = " . json_encode ( $asc ) . ";", View::POS_HEAD, 'my-options' );
Yii::$app->session ['search'] = Yii::$app->request->url;
Yii::$app->session ['records'] = $item_count;
// Create a Pjax widget which does not change the url.
// It contains two buttons one which saves the search and one which saves it by setting the
// subscription boolean to true.
Pjax::begin ( [
'enablePushState' => false
] );
?>
Subscribe to this search and get notified by email if new records
are added to the database.
= Html::a("Subscribe", ['account/subscribe'], ['class' => 'btn btn-primary','data-pjax'=>'w1','timeout'=>'100000'])?>
Save your search parameters without subscription
= Html::a("Save search", ['account/save'], ['class' => 'btn btn-primary','data-pjax'=>'w1','timeout'=>'100000'])?>
";
Pjax::begin ( [
'id' => 'shoppingCartContent',
'enablePushState' => false
] );
?>
There are = $shoppingCart?> samples in your basket. = Html::a('View Basket', ['cart/addedlist'],['class' => 'btn btn-primary', 'id' => 'cartButton','timeout'=>'100000']);?>
= Html::button('Add to basket', ['class' => 'btn btn-primary', 'id' => 'addButton', 'title'=>'Add your selected samples to your basket']);?>
= Html::a('View Basket', ['cart/cart'],['class' => 'btn btn-primary', 'name' => 'cart-button'])?>
'.Html::a('Log in',['site/login']).' to save your search parameters or to access the sample request system
';
$this->registerJs ( "var ops = 25; var or = 0 ; var asc = 'asc';", View::POS_HEAD, 'my-options' );
}
}
else
$this->registerJs ( "var ops = 25; var or = 0; var asc = 'asc';", View::POS_HEAD, 'my-options' );
echo "";
// END // used only if Login frame is activated in params.php
$contentLeft = "";
$contentRight = "";
// $model = new SearchForm ();
// Yii::info ( "listView" );
$elements = $model->getParameters ();
function createFilters($doc, $recordFilters) {
$docFilters = [
'unitID' => $doc->unitID,
'collectioncode' => $doc->collectioncode,
'institutioncode' => $doc->institutioncode,
'guid' => $doc->guid,
// 'trick17ID' => $doc->trick17ID,
'kindofunit' => $doc->sampletype
];
$i = 1;
return $docFilters;
}
function createRecordActionUrl($docFilters) {
// Yii::info ( $docFilters );
$docCP = array_slice ( $docFilters, 0, 4 );
$nurl = Url::to ( array_merge ( [
'search/record'
], $docCP ) );
return $nurl;
}
$nl = " ";
echo '
';
echo $model->previewTitle;
echo '
';
echo "
";
if (isset ( $response ))
if ($response != null && $item_count) {
if ($item_count >= Yii::$app->params['maxLines'])
echo $item_count . " (or more) record";
else
echo $item_count . " record";
if ($item_count > 1) {
echo "s";
}
echo " found";
if ($item_count >= Yii::$app->params['maxLines'])
echo " -- The display is limited to ".Yii::$app->params['maxLines']." records.";
} else
echo "No records found.";
echo "