- search tsyle: doi url in green color

- datasets without a DOI ar getting the landingpage /dataset/{id}
This commit is contained in:
Arno Kaimbacher 2021-06-02 11:48:25 +02:00
parent 9138090e14
commit 1a387965c6
5 changed files with 39 additions and 5 deletions

View file

@ -26,7 +26,40 @@ class PagesController extends Controller
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($dataset_prefix, $id): View
public function showDoi($dataset_prefix, $id): View
{
//$dataset = Dataset::findOrFail($id);
$dataset = Dataset::where('publish_id', '=', $id)->firstOrFail();
$dataset->load('titles');
$dataset->load('abstracts');
// $authors = $dataset->persons()
// ->wherePivot('role', 'author')
// ->orderBy('link_documents_persons.sort_order', 'desc')
// ->get();
// $contributors = $dataset->persons()
// ->wherePivot('role', 'contributor')
// ->orderBy('link_documents_persons.sort_order', 'desc')
// ->get();
// $submitters = $dataset->persons()
// ->wherePivot('role', 'submitter')
// ->orderBy('link_documents_persons.sort_order', 'desc')
// ->get();
// $authors = $dataset->persons()
// ->wherePivot('role', 'author')
// ->orderBy('link_documents_persons.sort_order', 'desc')
// ->get();
// return view('frontend.dataset.show', compact('dataset', 'authors', 'contributors', 'submitters'));
return view('frontend.dataset.show', compact('dataset'));
//return view('frontend.dataset.show', compact('id'));//wenn über solr
}
public function show($id): View
{
//$dataset = Dataset::findOrFail($id);
$dataset = Dataset::where('publish_id', '=', $id)->firstOrFail();