-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IP-346: Refactor the project landing page to show the problems button…
… directly after the user has answered to the questionnaire (don't wait until the questionnaire is finalized)
- Loading branch information
1 parent
b94a1a9
commit 7449470
Showing
10 changed files
with
63 additions
and
214 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
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
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
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
129 changes: 13 additions & 116 deletions
129
resources/views/crowdsourcing-project/partials/motto.blade.php
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
9 changes: 9 additions & 0 deletions
9
resources/views/crowdsourcing-project/partials/next-actions.blade.php
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,9 @@ | ||
<div id="questionnaire-wrapper" class="py-5"> | ||
<div class="container"> | ||
<div id="questionnaire" | ||
class="align-items-center mx-0" | ||
style="background-image: url('{{ asset($viewModel->project->lp_questionnaire_img_path) }}')"> | ||
@include('crowdsourcing-project.partials.questionnaire-problems-buttons') | ||
</div> | ||
</div> | ||
</div> |
35 changes: 35 additions & 0 deletions
35
resources/views/crowdsourcing-project/partials/questionnaire-problems-buttons.blade.php
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,35 @@ | ||
<div class="text-center content-container"> | ||
{{-- Show Questionnaire Button if available and user has not answered --}} | ||
@if ($viewModel->questionnaire && !$viewModel->userResponse) | ||
<h3 class="project-section-title text-center mb-5"> | ||
{{ $viewModel->questionnaire->fieldsTranslation->title }} | ||
</h3> | ||
<a href="{{ route('show-questionnaire-page', ['locale' => app()->getLocale(), 'project' => $viewModel->project->slug, 'questionnaire' => $viewModel->questionnaire->id]) }}" | ||
class="btn btn-primary w-100 respond-questionnaire call-to-action"> | ||
{{ __("questionnaire.start_answering") }} | ||
</a> | ||
|
||
{{-- Show Problems Button if user has answered questionnaire or no questionnaire exists --}} | ||
@elseif (($viewModel->questionnaire && $viewModel->userResponse && $viewModel->projectHasPublishedProblems) || | ||
(!$viewModel->questionnaire && $viewModel->projectHasPublishedProblems)) | ||
<h3 class="project-section-title text-center mb-5"> | ||
@if ($viewModel->questionnaire) | ||
{{ __("my-dashboard.see_the_problems_cta") }} | ||
@endif | ||
</h3> | ||
<a href="{{ route('project.problems-page', ['project_slug' => $viewModel->project->slug]) }}" | ||
class="btn btn-primary w-100 call-to-action"> | ||
{{ __("project-problems.project_landing_page_problems_action_button") }} | ||
<i class="fas fa-arrow-right"></i> | ||
</a> | ||
@else | ||
<div> | ||
@if ($viewModel->project->status_id == App\BusinessLogicLayer\lkp\CrowdSourcingProjectStatusLkp::FINALIZED) | ||
<h3 class="project-section-title">{{ __("questionnaire.project_finalized") }}</h3> | ||
@else | ||
<h3 class="project-section-title">{{ __("questionnaire.no_active_questionnaires") }}</h3> | ||
<h3 class="project-section-title">{{ __("questionnaire.next_questionnaire") }}</h3> | ||
@endif | ||
</div> | ||
@endif | ||
</div> |
Oops, something went wrong.