File Manager Lite
Dir:
/home/codewavebd/public_html/resources/views/admin/team
Upload
[..]
index.blade.php (12.38 KB)
Edit
Rename
Del
Edit: index.blade.php
@extends('layouts.admin') @section('title', 'Team Management') @section('page_title', 'Team Members') @section('content') <div class="row g-4"> <!-- Left Column: Team List --> <div class="col-lg-8"> <div class="admin-card"> <h5 class="font-heading text-white mb-4"><i class="bi bi-people text-info me-2"></i>Active Team Profiles</h5> <div class="table-responsive mb-4"> <table class="table table-dark table-hover mb-0"> <thead> <tr class="small text-muted"> <th>Thumbnail</th> <th>Name</th> <th>Role / Title</th> <th>Display Order</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody> @forelse($members as $member) <tr class="small border-secondary"> <td> @if($member->image) <img src="{{ asset('uploads/' . $member->image) }}" class="rounded-circle" style="width: 40px; height: 40px; object-fit: cover;" alt="avatar"> @else <div class="bg-secondary rounded-circle text-center small pt-2 text-muted" style="width: 40px; height: 40px;">No Pic</div> @endif </td> <td class="text-white fw-bold">{{ $member->name }}</td> <td>{{ $member->role }}</td> <td><span class="badge bg-secondary">{{ $member->order }}</span></td> <td> <span class="badge {{ $member->status === 'active' ? 'bg-success' : 'bg-danger' }}"> {{ $member->status }} </span> </td> <td> <!-- Edit Trigger --> <button class="btn btn-sm btn-outline-info rounded-pill px-3 py-1 me-1" data-bs-toggle="modal" data-bs-target="#editTeamModal{{ $member->id }}"> Edit </button> <!-- Delete Form --> <form action="{{ route('admin.team.destroy', $member->id) }}" method="POST" class="d-inline" onsubmit="return confirm('Are you sure you want to delete this profile?')"> @csrf @method('DELETE') <button type="submit" class="btn btn-sm btn-outline-danger rounded-pill px-3 py-1">Delete</button> </form> </td> </tr> <!-- Edit Modal --> <div class="modal fade" id="editTeamModal{{ $member->id }}" tabindex="-1" style="backdrop-filter: var(--glass-blur);"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content bg-dark border-secondary text-white"> <div class="modal-header border-secondary"> <h5 class="modal-title font-heading text-info">Edit Profile</h5> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button> </div> <form action="{{ route('admin.team.update', $member->id) }}" method="POST" class="admin-form"> @csrf @method('PUT') <div class="modal-body p-4"> <div class="mb-3"> <label class="form-label text-secondary small">Full Name</label> <input type="text" name="name" class="form-control" value="{{ $member->name }}" required> </div> <div class="mb-3"> <label class="form-label text-secondary small">Role / Job Title</label> <input type="text" name="role" class="form-control" value="{{ $member->role }}" required> </div> <div class="row"> <div class="col-md-6 mb-3"> <label class="form-label text-secondary small">Display Order</label> <input type="number" name="order" class="form-control" value="{{ $member->order }}" required> </div> <div class="col-md-6 mb-3"> <label class="form-label text-secondary small">Status</label> <select name="status" class="form-select"> <option value="active" @selected($member->status === 'active')>Active</option> <option value="inactive" @selected($member->status === 'inactive')>Inactive</option> </select> </div> </div> <div class="mb-3"> <label class="form-label text-secondary small">Profile Photo Filename</label> <input type="text" name="image" class="form-control" value="{{ $member->image }}"> </div> <div class="mb-3"> <label class="form-label text-secondary small">Short Bio</label> <textarea name="bio" rows="2" class="form-control">{{ $member->bio }}</textarea> </div> <div class="row"> <div class="col-md-6 mb-3"> <label class="form-label text-secondary small">LinkedIn URL</label> <input type="url" name="linkedin" class="form-control" value="{{ $member->socials['linkedin'] ?? '' }}"> </div> <div class="col-md-6 mb-3"> <label class="form-label text-secondary small">GitHub URL</label> <input type="url" name="github" class="form-control" value="{{ $member->socials['github'] ?? '' }}"> </div> </div> <div class="mb-3"> <label class="form-label text-secondary small">Facebook URL</label> <input type="url" name="facebook" class="form-control" value="{{ $member->socials['facebook'] ?? '' }}"> </div> </div> <div class="modal-footer border-secondary"> <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button> <button type="submit" class="btn btn-primary-glow">Update Profile</button> </div> </form> </div> </div> </div> @empty <tr> <td colspan="6" class="text-center text-muted py-5">No team profiles found.</td> </tr> @endforelse </tbody> </table> </div> <!-- Pagination --> <div class="d-flex justify-content-center"> {{ $members->links() }} </div> </div> </div> <!-- Right Column: Create Panel --> <div class="col-lg-4"> <div class="admin-card border-info"> <h5 class="font-heading text-white border-bottom border-secondary pb-3 mb-3">Add Member</h5> <form action="{{ route('admin.team.store') }}" method="POST" class="admin-form"> @csrf <div class="mb-3"> <label class="form-label text-secondary small">Full Name</label> <input type="text" name="name" class="form-control" placeholder="e.g. Sabbir Ahmed" required> </div> <div class="mb-3"> <label class="form-label text-secondary small">Role / Job Title</label> <input type="text" name="role" class="form-control" placeholder="e.g. Lead Developer" required> </div> <div class="row"> <div class="col-md-6 mb-3"> <label class="form-label text-secondary small">Display Order</label> <input type="number" name="order" class="form-control" value="0" required> </div> <div class="col-md-6 mb-3"> <label class="form-label text-secondary small">Status</label> <select name="status" class="form-select"> <option value="active">Active</option> <option value="inactive">Inactive</option> </select> </div> </div> <div class="mb-3"> <label class="form-label text-secondary small">Profile Photo Filename</label> <input type="text" name="image" class="form-control" placeholder="e.g. member.webp"> </div> <div class="mb-3"> <label class="form-label text-secondary small">Short Bio</label> <textarea name="bio" rows="2" class="form-control" placeholder="Short description of experience..."></textarea> </div> <div class="row"> <div class="col-md-6 mb-3"> <label class="form-label text-secondary small">LinkedIn URL</label> <input type="url" name="linkedin" class="form-control" placeholder="https://..."> </div> <div class="col-md-6 mb-3"> <label class="form-label text-secondary small">GitHub URL</label> <input type="url" name="github" class="form-control" placeholder="https://..."> </div> </div> <div class="mb-4"> <label class="form-label text-secondary small">Facebook URL</label> <input type="url" name="facebook" class="form-control" placeholder="https://..."> </div> <button type="submit" class="btn btn-primary-glow w-100 py-3">Add Team Member</button> </form> </div> </div> </div> @endsection
Simpan