Commit 160350ce authored by ZeMKI's avatar ZeMKI

Optimizations

* Sorting type in the homepage.
* interviewee name in the public url list.
parent 3c4e8483
......@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use App\Exports\AllInterviewTokenExport;
use App\Helpers\Helper;
use App\Study;
use App\User;
use Illuminate\Support\Facades\DB;
......@@ -16,7 +17,8 @@ class StudyInterviewController extends Controller
$data['publicInterviews'] = collect(DB::select('
select study_interview_public_url.id,
art_urls.id as url_id,
url,first_opened_at,
art_urls.url as url,
first_opened_at,
submitted_at,
code
from art_urls
......@@ -26,7 +28,8 @@ class StudyInterviewController extends Controller
foreach ($data['publicInterviews'] as $publicInterview)
{
$publicInterview->url = url('','short')."=".$publicInterview->code;
$publicInterview->shorturl = url('','short')."=".$publicInterview->code;
$publicInterview->url = (Helper::get_string_between($publicInterview->url,"&interviewed=","&t") == "") ? "Name not provided" : Helper::get_string_between($publicInterview->url,"&interviewed=","&t");
}
$data['study'] = $study;
......
......@@ -13,6 +13,9 @@
<template slot-scope="props">
<b-table-column field="url" :label="trans('Url')" sortable>
{{ props.row.shorturl }}
</b-table-column>
<b-table-column field="name" :label="trans('Name')" sortable>
{{ props.row.url }}
</b-table-column>
......
......@@ -120,6 +120,9 @@
<p class="mt-2 text-2xl font-extrabold text-blue-600 break-words">
{{$study->name}}
</p>
<p class="mt-2 w-1/2 mx-auto rounded-full text-sm font-extrabold text-blue-300 bg-gray-900 break-words">
{{$study->sortings[0]->name}}
</p>
<div class="text-sm text-left my-2 px-2">
<h5 class="font-bold text-center whitespace-normal break-words mb-2">{{ __('Responsible Researcher(s)') }}</h5>
<p>@text($study->author)</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment