118 lines
6.9 KiB
PHP
118 lines
6.9 KiB
PHP
@extends('admin.layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container py-5">
|
|
@if ($view == 'all')
|
|
<h1>All AI Tool List ({{ $counts->all }})</h1>
|
|
@elseif ($view == 'emailed')
|
|
<h1>Emailed AI Tool List ({{ $counts->emailed }})</h1>
|
|
@elseif ($view == 'not_emailed')
|
|
<h1>Not Emailed AI Tool List ({{ $counts->not_emailed }})</h1>
|
|
@endif
|
|
<p>Please do not share this list to others.</p>
|
|
|
|
<div class="d-flex justify-content-center mb-5 gap-2">
|
|
<a class="btn btn-light border-primary {{ $view == 'all' ? 'fw-bolder' : '' }}"
|
|
href="{{ route('ba.ai-tool-list', ['view' => 'all']) }}">All AI Tools ({{ $counts->all }})</a>
|
|
<a class="btn btn-light border-primary {{ $view == 'emailed' ? 'fw-bolder' : '' }}"
|
|
href="{{ route('ba.ai-tool-list', ['view' => 'emailed']) }}">Emailed ({{ $counts->emailed }})</a>
|
|
<a class="btn btn-light border-primary {{ $view == 'not_emailed' ? 'fw-bolder' : '' }}"
|
|
href="{{ route('ba.ai-tool-list', ['view' => 'not_emailed']) }}">Not Emailed
|
|
({{ $counts->not_emailed }})</a>
|
|
</div>
|
|
|
|
<div class="row">
|
|
@if ($ai_tool_list->count() > 0)
|
|
@foreach ($ai_tool_list as $ai_tool)
|
|
<div class="col-12">
|
|
<div class="card mb-2">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col">
|
|
<a style="font-size: 1.3em;" class="fw-bold mb-4" rel="noopener noreferrer nofollow"
|
|
target="_blank"
|
|
href="{{ route('front.aitool.show', ['ai_tool_slug' => $ai_tool->slug]) }}">{{ $ai_tool->tool_name }}</a><br>
|
|
<b>ID</b>: {{ $ai_tool->id }}<br>
|
|
<b>Added</b>: {{ $ai_tool->created_at->toDateTimeString() }}
|
|
</div>
|
|
|
|
@if ($ai_tool->has_emailed)
|
|
<div class="col d-flex">
|
|
<span class="align-self-center text-success">
|
|
Already emailed
|
|
</span>
|
|
</div>
|
|
<div class="col d-flex">
|
|
<span class="align-self-center text-success">
|
|
{{ $ai_tool->email }}
|
|
</span>
|
|
</div>
|
|
@else
|
|
<div class="col d-flex">
|
|
<span class="align-self-center text-danger">
|
|
Not yet emailed
|
|
</span>
|
|
</div>
|
|
|
|
<div class="col d-inline-flex justify-content-end">
|
|
|
|
<!-- Button trigger modal -->
|
|
<button type="button" class="btn btn-outline-primary d-inline"
|
|
data-bs-toggle="modal" data-bs-target="#staticBackdrop{{ $ai_tool->id }}">
|
|
Set to emailed
|
|
</button>
|
|
|
|
<!-- Modal -->
|
|
<form class="align-self-center" action="{{ route('ba.ai-tool-list.post') }}"
|
|
method="POST">
|
|
@csrf
|
|
<input type="hidden" name="id" value="{{ $ai_tool->id }}">
|
|
<div class="modal fade" id="staticBackdrop{{ $ai_tool->id }}"
|
|
data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
|
|
aria-labelledby="staticBackdropLabel{{ $ai_tool->id }}"
|
|
aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h1 class="modal-title fs-5"
|
|
id="staticBackdropLabel{{ $ai_tool->id }}">Set to
|
|
Emailed</h1>
|
|
<button type="button" class="btn-close"
|
|
data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<input required type="text" class="form-control"
|
|
name="email"
|
|
placeholder="Enter AI Tool Email (aitoolemail@email.com)">
|
|
</div>
|
|
<div class="modal-footer">
|
|
|
|
<button class="btn btn-outline-primary" type="submit">I
|
|
have emailed, Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
@endif
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
@else
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-body p-5 text-center">
|
|
<p>No records found.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
@endsection
|