diff --git a/app/BusinessLogicLayer/CrowdSourcingProject/CrowdSourcingProjectManager.php b/app/BusinessLogicLayer/CrowdSourcingProject/CrowdSourcingProjectManager.php index eeaee7ed..08e90996 100644 --- a/app/BusinessLogicLayer/CrowdSourcingProject/CrowdSourcingProjectManager.php +++ b/app/BusinessLogicLayer/CrowdSourcingProject/CrowdSourcingProjectManager.php @@ -10,6 +10,7 @@ use App\Notifications\QuestionnaireResponded; use App\Repository\CrowdSourcingProject\CrowdSourcingProjectRepository; use App\Repository\CrowdSourcingProject\CrowdSourcingProjectStatusHistoryRepository; +use App\Repository\CrowdSourcingProject\Problem\CrowdSourcingProjectProblemRepository; use App\Repository\LanguageRepository; use App\Repository\Questionnaire\QuestionnaireRepository; use App\Repository\Questionnaire\Responses\QuestionnaireResponseRepository; @@ -41,6 +42,7 @@ class CrowdSourcingProjectManager { protected CrowdSourcingProjectColorsManager $crowdSourcingProjectColorsManager; protected QuestionnaireResponseRepository $questionnaireResponseRepository; protected CrowdSourcingProjectTranslationManager $crowdSourcingProjectTranslationManager; + protected CrowdSourcingProjectProblemRepository $crowdSourcingProjectProblemRepository; public function __construct(CrowdSourcingProjectRepository $crowdSourcingProjectRepository, QuestionnaireRepository $questionnaireRepository, @@ -51,7 +53,8 @@ public function __construct(CrowdSourcingProjectRepository $crowdSourcingProject LanguageRepository $languageRepository, CrowdSourcingProjectColorsManager $crowdSourcingProjectColorsManager, QuestionnaireResponseRepository $questionnaireResponseRepository, - CrowdSourcingProjectTranslationManager $crowdSourcingProjectTranslationManager) { + CrowdSourcingProjectTranslationManager $crowdSourcingProjectTranslationManager, + CrowdSourcingProjectProblemRepository $crowdSourcingProjectProblemRepository) { $this->crowdSourcingProjectRepository = $crowdSourcingProjectRepository; $this->questionnaireRepository = $questionnaireRepository; $this->crowdSourcingProjectStatusManager = $crowdSourcingProjectStatusManager; @@ -62,6 +65,7 @@ public function __construct(CrowdSourcingProjectRepository $crowdSourcingProject $this->crowdSourcingProjectColorsManager = $crowdSourcingProjectColorsManager; $this->questionnaireResponseRepository = $questionnaireResponseRepository; $this->crowdSourcingProjectTranslationManager = $crowdSourcingProjectTranslationManager; + $this->crowdSourcingProjectProblemRepository = $crowdSourcingProjectProblemRepository; } public function getCrowdSourcingProjectsForHomePage(): Collection { @@ -94,15 +98,7 @@ public function getCrowdSourcingProjectBySlug($project_slug, $withRelationships public function getCrowdSourcingProjectViewModelForLandingPage( $questionnaireIdRequestedInTheURL, $project_slug): CrowdSourcingProjectForLandingPage { - $userId = null; - - // if the user is logged in, get the user id - if (Auth::check()) { - $userId = Auth::id(); - } // else, check if the user is anonymous (by checking the cookie) and get the user id - elseif (isset($_COOKIE[UserManager::$USER_COOKIE_KEY]) && intval($_COOKIE[UserManager::$USER_COOKIE_KEY])) { - $userId = intval($_COOKIE[UserManager::$USER_COOKIE_KEY]); - } + $userId = Auth::id() ?? intval($_COOKIE[UserManager::$USER_COOKIE_KEY] ?? 0); $project = $this->getCrowdSourcingProjectBySlug($project_slug); @@ -122,6 +118,7 @@ public function getCrowdSourcingProjectViewModelForLandingPage( $shareUrlForFacebook = ''; $shareUrlForTwitter = ''; $countAll = 0; + $projectHasPublishedProblems = false; if ($questionnaire) { $countAll = $this->questionnaireRepository->countAllResponsesForQuestionnaire($questionnaire->id); $questionnaireGoalVM = $this->questionnaireGoalManager->getQuestionnaireGoalViewModel($questionnaire, $countAll); @@ -131,6 +128,9 @@ public function getCrowdSourcingProjectViewModelForLandingPage( $shareButtonsModel = new QuestionnaireSocialShareButtons($questionnaire, $idOfUserThatCanShareTheQuestionnaire); $shareUrlForFacebook = $shareButtonsModel->getSocialShareURL($project, 'facebook'); $shareUrlForTwitter = $shareButtonsModel->getSocialShareURL($project, 'twitter'); + } else { + // if there is no questionnaire, we need to check if this project has published problems + $projectHasPublishedProblems = $this->crowdSourcingProjectProblemRepository->projectHasPublishedProblems($project->id); } if ($feedbackQuestionnaire) { $userFeedbackQuestionnaireResponse = @@ -143,6 +143,7 @@ public function getCrowdSourcingProjectViewModelForLandingPage( return new CrowdSourcingProjectForLandingPage($project, $questionnaire, $feedbackQuestionnaire, + $projectHasPublishedProblems, $userResponse, $userFeedbackQuestionnaireResponse, $countAll, diff --git a/app/Models/CrowdSourcingProject/Problem/CrowdSourcingProjectProblem.php b/app/Models/CrowdSourcingProject/Problem/CrowdSourcingProjectProblem.php index 10950ba7..446194d8 100644 --- a/app/Models/CrowdSourcingProject/Problem/CrowdSourcingProjectProblem.php +++ b/app/Models/CrowdSourcingProject/Problem/CrowdSourcingProjectProblem.php @@ -3,7 +3,6 @@ namespace App\Models\CrowdSourcingProject\Problem; use Awobaz\Compoships\Compoships; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; @@ -11,7 +10,7 @@ class CrowdSourcingProjectProblem extends Model { use Compoships; - use HasFactory, SoftDeletes; + use SoftDeletes; protected $table = 'crowd_sourcing_project_problems'; protected $fillable = ['id', 'project_id', 'slug', 'status_id', 'img_url', 'default_language_id']; @@ -22,6 +21,6 @@ public function defaultTranslation(): HasOne { } public function translations(): HasMany { - return $this->hasMany(CrowdSourcingProjectProblemTranslation::class, 'project_id', 'id'); + return $this->hasMany(CrowdSourcingProjectProblemTranslation::class, 'problem_id', 'id'); } } diff --git a/app/Models/CrowdSourcingProject/Problem/CrowdSourcingProjectProblemTranslation.php b/app/Models/CrowdSourcingProject/Problem/CrowdSourcingProjectProblemTranslation.php index 7f8931c6..e63ee730 100644 --- a/app/Models/CrowdSourcingProject/Problem/CrowdSourcingProjectProblemTranslation.php +++ b/app/Models/CrowdSourcingProject/Problem/CrowdSourcingProjectProblemTranslation.php @@ -5,12 +5,10 @@ use App\Models\CompositeKeysModel; use App\Models\Language; use Awobaz\Compoships\Compoships; -use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsTo; class CrowdSourcingProjectProblemTranslation extends CompositeKeysModel { use Compoships; - use HasFactory; protected $table = 'crowd_sourcing_project_problem_translations'; protected $fillable = ['problem_id', 'language_id', 'title', 'description']; diff --git a/app/Repository/CrowdSourcingProject/Problem/CrowdSourcingProjectProblemRepository.php b/app/Repository/CrowdSourcingProject/Problem/CrowdSourcingProjectProblemRepository.php index 125ddd23..7f73786e 100644 --- a/app/Repository/CrowdSourcingProject/Problem/CrowdSourcingProjectProblemRepository.php +++ b/app/Repository/CrowdSourcingProject/Problem/CrowdSourcingProjectProblemRepository.php @@ -2,6 +2,7 @@ namespace App\Repository\CrowdSourcingProject\Problem; +use App\BusinessLogicLayer\lkp\CrowdSourcingProjectProblemStatusLkp; use App\Models\CrowdSourcingProject\CrowdSourcingProject; use App\Models\CrowdSourcingProject\Problem\CrowdSourcingProjectProblem; use App\Repository\Repository; @@ -17,4 +18,13 @@ public function getModelClassName() { public function getProjectWithProblemsByProjectSlug(string $project_slug): CrowdSourcingProject { return CrowdSourcingProject::where('slug', $project_slug)->with(['problems'])->first(); } + + public function projectHasPublishedProblems(int $project_id): bool { + $hasPublishedProblemsWithTranslations = CrowdSourcingProjectProblem::where('project_id', $project_id) + ->where('status_id', CrowdSourcingProjectProblemStatusLkp::PUBLISHED) + ->whereHas('translations') + ->exists(); + + return $hasPublishedProblemsWithTranslations; + } } diff --git a/app/ViewModels/CrowdSourcingProject/CrowdSourcingProjectForLandingPage.php b/app/ViewModels/CrowdSourcingProject/CrowdSourcingProjectForLandingPage.php index 07b2525f..bb2fd122 100644 --- a/app/ViewModels/CrowdSourcingProject/CrowdSourcingProjectForLandingPage.php +++ b/app/ViewModels/CrowdSourcingProject/CrowdSourcingProjectForLandingPage.php @@ -9,6 +9,7 @@ class CrowdSourcingProjectForLandingPage { public $project; public $questionnaire; public $feedbackQuestionnaire; + public $projectHasPublishedProblems; public $userResponse; public $userFeedbackQuestionnaireResponse; public $totalResponses; @@ -24,6 +25,7 @@ public function __construct( $project, $questionnaire, $feedbackQuestionnaire, + $projectHasPublishedProblems, $userResponse, $userFeedbackQuestionnaireResponse, $totalResponses, @@ -35,6 +37,7 @@ public function __construct( $this->project = $project; $this->questionnaire = $questionnaire; $this->feedbackQuestionnaire = $feedbackQuestionnaire; + $this->projectHasPublishedProblems = $projectHasPublishedProblems; $this->userResponse = $userResponse; $this->userFeedbackQuestionnaireResponse = $userFeedbackQuestionnaireResponse; $this->totalResponses = $totalResponses; diff --git a/database/seeders/AirQualityProjectSeeder.php b/database/seeders/AirQualityProjectSeeder.php new file mode 100644 index 00000000..ee66b506 --- /dev/null +++ b/database/seeders/AirQualityProjectSeeder.php @@ -0,0 +1,99 @@ +projectRepository = $crowdSourcingProjectRepository; + $this->projectTranslationRepository = $crowdSourcingProjectTranslationRepository; + } + + /** + * Run the database seeds. + */ + public function run(): void { + $project = [ + 'id' => 4, + 'slug' => 'air-quality-europe', + 'external_url' => 'https://www.scify.gr/site/en/', + 'img_path' => '/images/projects/air-quality-europe/logo-bg.webp', + 'logo_path' => '/images/projects/air-quality-europe/logo.webp', + 'user_creator_id' => 1, + 'language_id' => 6, + 'should_send_email_after_questionnaire_response' => 1, + 'lp_primary_color' => '#707070', + 'lp_questionnaire_image_path' => '/images/projects/air-quality-europe/logo.webp', + 'lp_show_speak_up_btn' => 1, + 'sm_featured_img_path' => '/images/projects/air-quality-europe/logo.webp', + 'display_landing_page_banner' => 1, + 'status_id' => CrowdSourcingProjectStatusLkp::PUBLISHED, + ]; + + $project_translations = [ + [ + 'id' => 6, + 'language_id' => 6, + 'project_id' => 4, + 'name' => 'Air Quality in Europe', + 'motto_title' => 'Please share with us your opinion on the air quality in Europe. Your voice matters!', + 'motto_subtitle' => 'You can make an impact! Share your opinion with us!', + 'description' => 'Lorem ipsum dolor site amet', + 'about' => '

Contribute to solving air quality problems in Athens and across Europe. Write points for and against the proposed solutions. Your contributions will be a valuable contribution to official policy to improve air quality in Athens and across Europe.

', + 'footer' => '

© SCIFY ' . now()->year . ' |  + Terms of use |  + Privacy Policy |  + Cookie Policy', + 'sm_title' => 'Air Quality in Europe', + 'sm_description' => 'Please share with us your opinion on the air quality in Europe. Your voice matters!', + 'sm_keywords' => 'Social Media Keywords', + 'questionnaire_response_email_intro_text' => '

Thanks to your contribution we are one step closer to understanding the problem.

', + 'questionnaire_response_email_outro_text' => '

Thank you for your time and effort.

', + ], + [ + 'id' => 7, + 'language_id' => 12, + 'project_id' => 4, + 'name' => 'Η Ποιότητα του Αέρα στην Ευρώπη', + 'motto_title' => 'Παρακαλούμε μοιραστείτε μαζί μας την άποψή σας για την ποιότητα του αέρα στην Ευρώπη. Η φωνή σας μετράει!', + 'motto_subtitle' => 'Μπορείς να κάνεις διαφορά! Μοιραστείτε την άποψή σας μαζί μας!', + 'description' => 'Lorem ipsum dolor site amet', + 'about' => '

Συμβάλλετε στην επίλυση των προβλημάτων ποιότητας του αέρα στην Αθήνα και σε όλη την Ευρώπη. Γράψτε επιχειρήματα υπέρ και κατά των προτεινόμενων λύσεων. Η συμβολή σας θα είναι πολύτιμη για τη διαμόρφωση επίσημης πολιτικής για τη βελτίωση της ποιότητας του αέρα στην Αθήνα και σε όλη την Ευρώπη.

', + 'footer' => '

© SCIFY ' . now()->year . ' |  + Πολιτική Ορθής Χρήσης |  + Πολιτική Ιδιωτικότητας |  + Πολιτική Cookies', + 'sm_title' => 'Η Ποιότητα του Αέρα στην Ευρώπη', + 'sm_description' => 'Παρακαλούμε μοιραστείτε μαζί μας την άποψή σας για την ποιότητα του αέρα στην Ευρώπη. Η φωνή σας μετράει!', + 'sm_keywords' => 'Social Media Keywords', + 'questionnaire_response_email_intro_text' => '

Χάρη στη συνεισφορά σας είμαστε ένα βήμα πιο κοντά στην κατανόηση του προβλήματος.

', + 'questionnaire_response_email_outro_text' => '

Σας ευχαριστούμε για το χρόνο και την προσπάθειά σας.

', + ], + ]; + + $project = $this->projectRepository->updateOrCreate(['id' => $project['id']], + Helpers::getFilteredAttributes($project, (new CrowdSourcingProject)->getFillable())); + if (app()->environment() !== 'testing') { + echo "\nAdded Project: " . $project['name'] . ' with slug: ' . $project->slug . "\n"; + } + + foreach ($project_translations as $project_translation) { + $this->projectTranslationRepository->updateOrCreate(['id' => $project_translation['id']], + Helpers::getFilteredAttributes($project_translation, (new CrowdSourcingProjectTranslation)->getFillable())); + if (app()->environment() !== 'testing') { + echo "\nAdded Project Translation: " . $project_translation['name'] . ' with id: ' . $project_translation['id'] . "\n"; + } + } + } +} diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 8b17afcb..dfa49cb7 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -18,6 +18,7 @@ public function run() { LanguagesLkpTableSeeder::class, CrowdSourcingProjectStatusesLkpTableSeeder::class, DefaultProjectSeeder::class, + AirQualityProjectSeeder::class, QuestionnaireStatusesLkpTableSeeder::class, QuestionnaireStatisticsPageVisibilityLkpSeeder::class, MailChimpListsTableSeeder::class, diff --git a/database/seeders/DefaultProjectSeeder.php b/database/seeders/DefaultProjectSeeder.php index 6e8d77e5..4aabb242 100644 --- a/database/seeders/DefaultProjectSeeder.php +++ b/database/seeders/DefaultProjectSeeder.php @@ -75,22 +75,6 @@ public function run() { 'display_landing_page_banner' => 1, 'status_id' => CrowdSourcingProjectStatusLkp::DRAFT, ], - [ - 'id' => 4, - 'slug' => 'air-quality-europe', - 'external_url' => 'https://www.scify.gr/site/en/', - 'img_path' => '/images/projects/air-quality-europe/logo-bg.webp', - 'logo_path' => '/images/projects/air-quality-europe/logo.webp', - 'user_creator_id' => 1, - 'language_id' => 6, - 'should_send_email_after_questionnaire_response' => 1, - 'lp_primary_color' => '#707070', - 'lp_questionnaire_image_path' => '/images/projects/air-quality-europe/logo.webp', - 'lp_show_speak_up_btn' => 1, - 'sm_featured_img_path' => '/images/projects/air-quality-europe/logo.webp', - 'display_landing_page_banner' => 1, - 'status_id' => CrowdSourcingProjectStatusLkp::PUBLISHED, - ], ]; $project_translations = [ @@ -191,44 +175,6 @@ public function run() { 'questionnaire_response_email_intro_text' => '

Thanks to your contribution we are one step closer to understanding the problem.

', 'questionnaire_response_email_outro_text' => '

Thank you for your time and effort.

', ], - [ - 'id' => 6, - 'language_id' => 6, - 'project_id' => 4, - 'name' => 'Air Quality in Europe', - 'motto_title' => 'Please share with us your opinion on the air quality in Europe. Your voice matters!', - 'motto_subtitle' => 'You can make an impact! Share your opinion with us!', - 'description' => 'Lorem ipsum dolor site amet', - 'about' => '

Contribute to solving air quality problems in Athens and across Europe. Write points for and against the proposed solutions. Your contributions will be a valuable contribution to official policy to improve air quality in Athens and across Europe.

', - 'footer' => '

© SCIFY ' . now()->year . ' |  - Terms of use |  - Privacy Policy |  - Cookie Policy', - 'sm_title' => 'Air Quality in Europe', - 'sm_description' => 'Please share with us your opinion on the air quality in Europe. Your voice matters!', - 'sm_keywords' => 'Social Media Keywords', - 'questionnaire_response_email_intro_text' => '

Thanks to your contribution we are one step closer to understanding the problem.

', - 'questionnaire_response_email_outro_text' => '

Thank you for your time and effort.

', - ], - [ - 'id' => 7, - 'language_id' => 12, - 'project_id' => 4, - 'name' => 'Η Ποιότητα του Αέρα στην Ευρώπη', - 'motto_title' => 'Παρακαλούμε μοιραστείτε μαζί μας την άποψή σας για την ποιότητα του αέρα στην Ευρώπη. Η φωνή σας μετράει!', - 'motto_subtitle' => 'Μπορείς να κάνεις διαφορά! Μοιραστείτε την άποψή σας μαζί μας!', - 'description' => 'Lorem ipsum dolor site amet', - 'about' => '

Συμβάλλετε στην επίλυση των προβλημάτων ποιότητας του αέρα στην Αθήνα και σε όλη την Ευρώπη. Γράψτε επιχειρήματα υπέρ και κατά των προτεινόμενων λύσεων. Η συμβολή σας θα είναι πολύτιμη για τη διαμόρφωση επίσημης πολιτικής για τη βελτίωση της ποιότητας του αέρα στην Αθήνα και σε όλη την Ευρώπη.

', - 'footer' => '

© SCIFY ' . now()->year . ' |  - Πολιτική Ορθής Χρήσης |  - Πολιτική Ιδιωτικότητας |  - Πολιτική Cookies', - 'sm_title' => 'Η Ποιότητα του Αέρα στην Ευρώπη', - 'sm_description' => 'Παρακαλούμε μοιραστείτε μαζί μας την άποψή σας για την ποιότητα του αέρα στην Ευρώπη. Η φωνή σας μετράει!', - 'sm_keywords' => 'Social Media Keywords', - 'questionnaire_response_email_intro_text' => '

Χάρη στη συνεισφορά σας είμαστε ένα βήμα πιο κοντά στην κατανόηση του προβλήματος.

', - 'questionnaire_response_email_outro_text' => '

Σας ευχαριστούμε για το χρόνο και την προσπάθειά σας.

', - ], ]; foreach ($data as $project) { diff --git a/resources/lang/bg/project-problems.php b/resources/lang/bg/project-problems.php new file mode 100644 index 00000000..701a6b89 --- /dev/null +++ b/resources/lang/bg/project-problems.php @@ -0,0 +1,10 @@ + 'Назад', + 'the_topic' => 'Темата:', + 'list_of_problems' => 'Списък с проблеми', + 'see_all_problems' => 'Виж всички проблеми', + 'solutions_for' => 'Решения за', + 'project_landing_page_problems_action_button' => 'Виж всички проблеми', +]; diff --git a/resources/lang/de/project-problems.php b/resources/lang/de/project-problems.php new file mode 100644 index 00000000..fc8a574f --- /dev/null +++ b/resources/lang/de/project-problems.php @@ -0,0 +1,10 @@ + 'Zurück', + 'the_topic' => 'Das Thema:', + 'list_of_problems' => 'Liste der Probleme', + 'see_all_problems' => 'Alle Probleme anzeigen', + 'solutions_for' => 'Lösungen für', + 'project_landing_page_problems_action_button' => 'Alle Probleme anzeigen', +]; diff --git a/resources/lang/el/project-problems.php b/resources/lang/el/project-problems.php index ec119597..19bfe79d 100644 --- a/resources/lang/el/project-problems.php +++ b/resources/lang/el/project-problems.php @@ -6,4 +6,5 @@ 'list_of_problems' => 'Λίστα Προβλημάτων', 'see_all_problems' => 'Δες όλα τα προβλήματα', 'solutions_for' => 'Λύσεις για', + 'project_landing_page_problems_action_button' => 'Δες όλα τα προβλήματα', ]; diff --git a/resources/lang/en/project-problems.php b/resources/lang/en/project-problems.php index 4c75bd70..e1435bbe 100644 --- a/resources/lang/en/project-problems.php +++ b/resources/lang/en/project-problems.php @@ -6,4 +6,5 @@ 'list_of_problems' => 'List of Problems', 'see_all_problems' => 'See all problems', 'solutions_for' => 'Solutions for', + 'project_landing_page_problems_action_button' => 'See all problems', ]; diff --git a/resources/lang/es/project-problems.php b/resources/lang/es/project-problems.php new file mode 100644 index 00000000..924b9dc7 --- /dev/null +++ b/resources/lang/es/project-problems.php @@ -0,0 +1,10 @@ + 'Atrás', + 'the_topic' => 'El tema:', + 'list_of_problems' => 'Lista de problemas', + 'see_all_problems' => 'Ver todos los problemas', + 'solutions_for' => 'Soluciones para', + 'project_landing_page_problems_action_button' => 'Ver todos los problemas', +]; diff --git a/resources/lang/et/project-problems.php b/resources/lang/et/project-problems.php new file mode 100644 index 00000000..75a54e30 --- /dev/null +++ b/resources/lang/et/project-problems.php @@ -0,0 +1,10 @@ + 'Tagasi', + 'the_topic' => 'Teema:', + 'list_of_problems' => 'Probleemide loetelu', + 'see_all_problems' => 'Vaata kõiki probleeme', + 'solutions_for' => 'Lahendused', + 'project_landing_page_problems_action_button' => 'Vaata kõiki probleeme', +]; diff --git a/resources/lang/fr/project-problems.php b/resources/lang/fr/project-problems.php new file mode 100644 index 00000000..af457be1 --- /dev/null +++ b/resources/lang/fr/project-problems.php @@ -0,0 +1,10 @@ + 'Retour', + 'the_topic' => 'Le sujet:', + 'list_of_problems' => 'Liste des problèmes', + 'see_all_problems' => 'Voir tous les problèmes', + 'solutions_for' => 'Solutions pour', + 'project_landing_page_problems_action_button' => 'Voir tous les problèmes', +]; diff --git a/resources/lang/hu/project-problems.php b/resources/lang/hu/project-problems.php new file mode 100644 index 00000000..f3f88903 --- /dev/null +++ b/resources/lang/hu/project-problems.php @@ -0,0 +1,10 @@ + 'Vissza', + 'the_topic' => 'A téma:', + 'list_of_problems' => 'Problémák listája', + 'see_all_problems' => 'Összes probléma megtekintése', + 'solutions_for' => 'Megoldások', + 'project_landing_page_problems_action_button' => 'Összes probléma megtekintése', +]; diff --git a/resources/lang/it/project-problems.php b/resources/lang/it/project-problems.php new file mode 100644 index 00000000..3dd60792 --- /dev/null +++ b/resources/lang/it/project-problems.php @@ -0,0 +1,10 @@ + 'Indietro', + 'the_topic' => 'L\'argomento:', + 'list_of_problems' => 'Elenco dei problemi', + 'see_all_problems' => 'Vedi tutti i problemi', + 'solutions_for' => 'Soluzioni per', + 'project_landing_page_problems_action_button' => 'Vedi tutti i problemi', +]; diff --git a/resources/lang/lv/project-problems.php b/resources/lang/lv/project-problems.php new file mode 100644 index 00000000..8113a3ff --- /dev/null +++ b/resources/lang/lv/project-problems.php @@ -0,0 +1,10 @@ + 'Atpakaļ', + 'the_topic' => 'Tēma:', + 'list_of_problems' => 'Problēmu saraksts', + 'see_all_problems' => 'Skatīt visas problēmas', + 'solutions_for' => 'Risinājumi', + 'project_landing_page_problems_action_button' => 'Skatīt visas problēmas', +]; diff --git a/resources/lang/nl/project-problems.php b/resources/lang/nl/project-problems.php new file mode 100644 index 00000000..2d57cda9 --- /dev/null +++ b/resources/lang/nl/project-problems.php @@ -0,0 +1,10 @@ + 'Terug', + 'the_topic' => 'Het onderwerp:', + 'list_of_problems' => 'Lijst met problemen', + 'see_all_problems' => 'Bekijk alle problemen', + 'solutions_for' => 'Oplossingen voor', + 'project_landing_page_problems_action_button' => 'Bekijk alle problemen', +]; diff --git a/resources/lang/pt/project-problems.php b/resources/lang/pt/project-problems.php new file mode 100644 index 00000000..eed0ab4d --- /dev/null +++ b/resources/lang/pt/project-problems.php @@ -0,0 +1,10 @@ + 'Voltar', + 'the_topic' => 'O tópico:', + 'list_of_problems' => 'Lista de problemas', + 'see_all_problems' => 'Ver todos os problemas', + 'solutions_for' => 'Soluções para', + 'project_landing_page_problems_action_button' => 'Ver todos os problemas', +]; diff --git a/resources/lang/sk/project-problems.php b/resources/lang/sk/project-problems.php new file mode 100644 index 00000000..1592d910 --- /dev/null +++ b/resources/lang/sk/project-problems.php @@ -0,0 +1,10 @@ + 'Späť', + 'the_topic' => 'Téma:', + 'list_of_problems' => 'Zoznam problémov', + 'see_all_problems' => 'Zobraziť všetky problémy', + 'solutions_for' => 'Riešenia pre', + 'project_landing_page_problems_action_button' => 'Zobraziť všetky problémy', +]; diff --git a/resources/lang/sr/project-problems.php b/resources/lang/sr/project-problems.php new file mode 100644 index 00000000..eeab4969 --- /dev/null +++ b/resources/lang/sr/project-problems.php @@ -0,0 +1,10 @@ + 'Nazad', + 'the_topic' => 'Tema:', + 'list_of_problems' => 'Lista problema', + 'see_all_problems' => 'Pogledaj sve probleme', + 'solutions_for' => 'Rešenja za', + 'project_landing_page_problems_action_button' => 'Pogledaj sve probleme', +]; diff --git a/resources/views/crowdsourcing-project/partials/motto.blade.php b/resources/views/crowdsourcing-project/partials/motto.blade.php index 44ddb313..c7fc34d8 100644 --- a/resources/views/crowdsourcing-project/partials/motto.blade.php +++ b/resources/views/crowdsourcing-project/partials/motto.blade.php @@ -94,8 +94,12 @@ class="btn btn-primary w-100 respond-questionnaire call-to-action @endif + @elseif($viewModel->projectHasPublishedProblems) + + {{__("project-problems.project_landing_page_problems_action_button")}} @else - {{-- PROJECT DOES NOT HAVE AN ACTIVE QUESTIONNAIRE --}} @include('crowdsourcing-project.partials.external-url') @endif