- if dataset has no doi, show normal landingpage in search site (vue component)
This commit is contained in:
parent
da06f84659
commit
9138090e14
|
@ -26,7 +26,7 @@ class PagesController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id): View
|
||||
public function show($dataset_prefix, $id): View
|
||||
{
|
||||
//$dataset = Dataset::findOrFail($id);
|
||||
$dataset = Dataset::where('publish_id', '=', $id)->firstOrFail();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -43,6 +43,9 @@
|
|||
<a v-if="document.identifier && document.identifier.length > 0" target="_self" v-bind:href="'https://doi.'+ getDomainWithoutSubdomain() +'/' + document.identifier[0]" class="ng-binding">
|
||||
{{ document.title_output }}
|
||||
</a>
|
||||
<a v-else target="_self" v-bind:href="'dataset/' + document.id" class="ng-binding">
|
||||
{{ document.title_output }}
|
||||
</a>
|
||||
</h4>
|
||||
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@ Route::group([
|
|||
'domain' => 'doi.' . $base_domain,
|
||||
'as' => 'doi'
|
||||
], function () {
|
||||
$dataset_prefix = config('tethys.datacite_prefix');
|
||||
// $dataset_prefix = config('tethys.datacite_prefix');
|
||||
|
||||
|
||||
Route::get('/' . $dataset_prefix . '/tethys.{id}', [
|
||||
Route::get('/{dataset_prefix}/tethys.{id}', [
|
||||
'as' => 'dataset.show', 'uses' => 'Frontend\PagesController@show',
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user