Refactor course finder and resources templates for improved readability and functionality

- Updated course finder form to use HTML helper methods for cleaner syntax.
- Enhanced form structure with better class management and attributes.
- Implemented AJAX pagination for course listings to improve user experience.
- Cleaned up resource template code for consistency and readability.
- Ensured proper indentation and spacing for better maintainability.
- Added missing target="_blank" attribute for external links in resource documents.
This commit is contained in:
2025-08-03 18:01:22 +05:45
parent 5e4cb2767c
commit afc7c61f86
5 changed files with 582 additions and 450 deletions

View File

@@ -0,0 +1,82 @@
@if (isset($courses))
{{ $courses->links() }}
@forelse ($programs as $item)
<div class="course-finder-box">
<div class="row">
<div class="col col-md-2">
<div class="sm:w-50percent w-full h-70">
<img class="w-full h-full" src="{{ $item->institution?->image }}" alt="">
</div>
</div>
<div class="col col-md-7">
<div class="flex flex-col gap-5">
<h3 class="text-20 font-medium">{{ $item->title }}</h3>
<h5 class="text-16 font-lighter">{{ $item->institution?->title }} <span
class="text-brand">{{ $item->institution?->country?->title }}</span>
</h5>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Code:</span>
{{ !empty($item->code) ? $item->code : 'N/A' }}</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Fee:</span>
{{ !empty($item->fee) ? $item->fee : 'N/A' }}</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Schlorship:</span>
{{ !empty($item->scholarship) ? $item->scholarship : 'N/A' }}</h6>
</div>
<div class="flex gap-10 items-center">
<h6 class="text-grey font-medium text-14"><span class="font-bold">Level:</span>
{{ !empty($item->programlevel?->title) ? $item->programlevel?->title : 'N/A' }}
</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">Duration:</span>
{{ !empty($item->year) ? $item->year : 'N/A' }}</h6>
</h6>
<h6 class="text-grey font-medium text-14"><span class="font-bold">PSW:</span>
{{ !empty($item->psw) ? $item->psw : 'N/A' }}</h6>
</h6>
</div>
</div>
</div>
<div class="col col-md-3">
<div class="flex flex-col gap-10 ">
@foreach ($item->tests as $index => $test)
<h6 class="text-black text-16 font-medium"><span
class="font-bold">{{ $test->title }}:</span>
{{ $test->pivot?->min_score }}
({{ $test->pivot?->band_score }})
</h6>
@endforeach
</div>
</div>
</div>
<div class="row">
<div class="col col-12">
<div class="flex items-center gap-10">
@if (!empty($item->intakes))
<h6 class="text-16">Intake:</h6>
@forelse ($item->intakes as $value)
<h6 class="bg-sec text-14 text-white px-5 py-5 rounded-10 font-bold">
{{ $intakeOptions[$value] }}</h6>
</h6>
@empty
<span class="fs-13 text-muted mb-0 text-center"><span
class="badge bg-danger p-2">N/A</span></span>
@endforelse
@endif
</div>
</div>
</div>
</div>
@empty
<div class="text-center">
<p class="text-danger">No Course Found !!!</p>
</div>
@endforelse
{{ $programs->links() }}
@endif