Course Overview
Locked video preview

Paid video

Please purchase the course to watch.

Creating and managing articles

Admin UI

Here is a summary of the video transcript:

  • Admin Page Objective
    The video builds an admin landing page that displays all articles in a paginated table. It includes options to edit existing articles and prepare for creating new ones.

  • Database Queries and Model Updates
    New queries are added to retrieve all articles (not just published ones) and to support pagination with a count query. The model is updated to use these queries, accepting some duplication for simplicity.

  • Routing and Controller Setup
    An /admin route is introduced with a corresponding controller action. The controller fetches paginated articles and passes them to a new admin view.

  • Admin View Layout and Structure
    The admin page reuses the base layout and applies a grid-based structure. A header section introduces the page, followed by a table spanning two columns to display article data.

  • Table Construction and Components
    A table is created with headers for title, created date, updated date, published status, and actions. A reusable header component is introduced to reduce repetition.

  • Rendering Article Data
    Articles are looped over to populate rows dynamically. Created and updated timestamps are displayed, and published status is shown as either “Draft” or “Published.”

  • Conditional Styling and Actions
    Published status is conditionally styled with color indicators for clarity. An “Edit” link is added per row, with plans to connect it to a dedicated edit page.

  • Pagination Integration
    A pagination component is reused and configured for the admin route. Navigation between next and previous pages is verified.

  • Navigation and Future Enhancements
    An admin link is added to the main navigation bar. Future steps include implementing authentication, conditional navigation visibility, logout functionality, and building the article creation form.