-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e932e0c
commit fbfe762
Showing
26 changed files
with
1,075 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace App\Bibsys; | ||
|
||
use App\Record; | ||
|
||
class BibsysDokument extends Record | ||
{ | ||
/** | ||
* The primary key associated with the table. | ||
* | ||
* @var string | ||
*/ | ||
protected $primaryKey = 'dokid'; | ||
|
||
/** | ||
* Indicates if the IDs are auto-incrementing. | ||
* | ||
* @var bool | ||
*/ | ||
public $incrementing = false; | ||
|
||
public static $prefix = 'bibsys'; | ||
|
||
/** | ||
* The table associated with the model. | ||
* | ||
* @var string | ||
*/ | ||
protected $table = 'bibsys_dok'; | ||
|
||
public function createdBy() | ||
{ | ||
return $this->belongsTo('App\User', 'objektid'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace App\Bibsys; | ||
|
||
use App\Record; | ||
|
||
class BibsysObjekt extends Record | ||
{ | ||
/** | ||
* The primary key associated with the table. | ||
* | ||
* @var string | ||
*/ | ||
protected $primaryKey = 'objektid'; | ||
|
||
/** | ||
* Indicates if the IDs are auto-incrementing. | ||
* | ||
* @var bool | ||
*/ | ||
public $incrementing = false; | ||
|
||
/** | ||
* The table associated with the model. | ||
* | ||
* @var string | ||
*/ | ||
protected $table = 'bibsys'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
<?php | ||
|
||
namespace App\Bibsys; | ||
|
||
use App\Schema\Schema; | ||
|
||
class BibsysSchema extends Schema | ||
{ | ||
public $prefix = 'bibsys'; | ||
public $primaryId = 'dokid'; | ||
|
||
protected $schema = [ | ||
'fields' => [ | ||
// Søk i alle felt | ||
[ | ||
'key' => 'any_field_ts', | ||
'type' => 'simple', | ||
|
||
'displayable' => false, | ||
'editable' => false, | ||
'searchable' => 'simple', | ||
|
||
'searchOptions' => [ | ||
'placeholder' => 'Du kan søke etter objektid, dokid, knyttid, avdeling, samling, tekst i MARC-posten, osv.', | ||
'index' => ['type' => 'ts', 'ts_column' => 'any_field_ts'], | ||
'operators' => ['eq', 'neq'] | ||
], | ||
], | ||
], | ||
|
||
'groups' => [ | ||
[ | ||
'label' => 'Objektpost', | ||
'fields' => [ | ||
|
||
[ | ||
'key' => 'objektid', | ||
'type' => 'simple', | ||
|
||
'searchOptions' => [ | ||
'index' => ['column' => 'lower(objektid)'], | ||
'operators' => ['ex'], | ||
], | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'title_statement', | ||
'type' => 'simple', | ||
'orderable' => false, | ||
'searchable' => 'advanced', | ||
], | ||
|
||
[ | ||
'key' => 'pub_date', | ||
'type' => 'simple', | ||
'orderable' => false, | ||
'searchable' => 'advanced', | ||
], | ||
|
||
[ | ||
'key' => 'marc_record', | ||
'type' => 'simple', | ||
'orderable' => false, | ||
'searchable' => 'advanced', | ||
], | ||
] | ||
], | ||
[ | ||
'label' => 'Dokumentpost', | ||
'fields' => [ | ||
|
||
// Dokid | ||
[ | ||
'key' => 'dokid', | ||
'type' => 'simple', | ||
'searchOptions' => [ | ||
'index' => ['column' => 'lower(dokid)'], | ||
'operators' => ['ex'], | ||
], | ||
'orderable' => true, | ||
], | ||
|
||
// Strekkode | ||
[ | ||
'key' => 'strekkode', | ||
'type' => 'simple', | ||
'orderable' => false, | ||
'searchOptions' => [ | ||
'index' => ['column' => 'lower(strekkode)'], | ||
'operators' => ['ex'], | ||
], | ||
'orderable' => false, | ||
], | ||
|
||
// Status | ||
[ | ||
'key' => 'status', | ||
'type' => 'autocomplete', | ||
'orderable' => false, | ||
'searchable' => 'advanced', | ||
], | ||
|
||
// Avdeling | ||
[ | ||
'key' => 'avdeling', | ||
'type' => 'autocomplete', | ||
'orderable' => false, | ||
], | ||
|
||
// Samling | ||
[ | ||
'key' => 'samling', | ||
'type' => 'autocomplete', | ||
'orderable' => false, | ||
], | ||
|
||
// Hyllesignatur | ||
[ | ||
'key' => 'hyllesignatur', | ||
'type' => 'simple', | ||
'orderable' => false, | ||
], | ||
|
||
// Deponert | ||
[ | ||
'key' => 'deponert', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'lokal_anmerkning', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'beholdning', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'utlaanstype', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'lisensbetingelser', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'tilleggsplassering', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'intern_bemerkning_aapen', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
// [ | ||
// 'key' => 'intern_bemerkning_lukket', | ||
// 'type' => 'simple', | ||
|
||
// 'searchable' => 'advanced', | ||
// ], | ||
|
||
[ | ||
'key' => 'bestillingstype', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'statusdato', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'seriedokid', | ||
'type' => 'simple', | ||
'searchOptions' => [ | ||
'index' => ['column' => 'lower(seriedokid)'], | ||
'operators' => ['ex'], | ||
], | ||
'orderable' => false, | ||
], | ||
|
||
[ | ||
'key' => 'har_hefter', | ||
'type' => 'simple', | ||
|
||
'searchable' => 'advanced', | ||
'orderable' => false, | ||
], | ||
|
||
], | ||
], | ||
], | ||
]; | ||
|
||
public function __construct() | ||
{ | ||
$this->schemaOptions['autocompleteUrl'] = action('BibsysController@autocomplete'); | ||
|
||
parent::__construct(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace App\Bibsys; | ||
|
||
class BibsysView extends BibsysObjekt | ||
{ | ||
/** | ||
* The primary key associated with the table. | ||
* | ||
* @var string | ||
*/ | ||
protected $primaryKey = 'dokid'; | ||
|
||
/** | ||
* The table associated with the model. | ||
* | ||
* @var string | ||
*/ | ||
protected $table = 'bibsys_search'; | ||
|
||
/** | ||
* Indicates if the IDs are auto-incrementing. | ||
* | ||
* @var bool | ||
*/ | ||
public $incrementing = false; | ||
} |
Oops, something went wrong.