# Task List View Mockup - Design **Purpose**: Centralized, cross-project task list with filtering, sorting, pagination ## Page Layout Two-column responsive layout (sidebar left, table right on desktop; stacked on mobile <1024px). **Header bar**: "All Tasks" title on left; "+ New Task" button on right (visible only to users with create permission, `user_level >= 3`). --- ## Sidebar Filters (Fixed Width ~280px) All filters in a single GET form. Five filter sections, each with a label and control: 1. `Status` - six checkboxes (New, Backlog, Blocked, In Progress, Test/Review, Closed). Multi-select. Values come from `ListOfTaskStatus` model (user-configurable; defaults shown). 2. `Assignee` - a dropdown: "All Assignees" + all users who have task access in the current user's accessible projects + "Unassigned" option. 3. `Project` - a dropdown: "All Projects" + projects the user has `ObjectAssignment` access to (via their groups). 4. `Date Range` - two HTML5 date inputs: "Start Date" (filters `task_start_date >= value`) and "End Date" (filters `task_end_date <= value`). Each optional independently. 5. `Actions` - two buttons: "Clear Filters" (secondary style, links to base `/tasks/` URL) and "Apply" (primary style, submits form). --- ## Main Table Area ### Results Header - Left: "Showing X–Y of Z tasks" (uses paginator `start_index`, `end_index`, `count`) - Right: Page size dropdown (10, 25, 50, 100; default 25). Auto-submits on change. ### Data Table (9 Columns) | Column | Sortable | Content | |--------|----------|---------| | Title | Yes | Bold task short description + small gray task ID (`#T-{id}`) | | Status | Yes | Colored badge (see badge spec below) | | Priority | Yes | Colored dot (8px) + text: High (red), Medium (orange), Low (green) | | Assignee | Yes | Username or hyphen if unassigned | | Project | Yes | Project name | | Start Date | Yes | YYYY-MM-DD | | End Date | Yes | YYYY-MM-DD | | Created | Yes | YYYY-MM-DD | | Actions | No | "View" button linking to `task_information` for that task | ### Sorting - Click any sortable header → toggles ASC/DESC. - URL param: `?sort=field` (asc) or `?sort=-field` (desc). - Header shows ▲ (asc) or ▼ (desc) next to column name. - Default sort: `-created` (newest first). ### Status Badges (Exact Colors — Match Higher-Order Status) | Higher-Order Status | Example Statuses | Background | Text | CSS Class | |---------------------|------------------|------------|------|-----------| | Backlog | New, Backlog | `#fff3cd` | `#856404` | `badge badge-backlog` | | Normal | In Progress, Test/Review | `#cce5ff` | `#004085` | `badge badge-normal` | | Blocked | Blocked | `#f8d7da` | `#721c24` | `badge badge-blocked` | | Closed | Closed | `#d4edda` | `#155724` | `badge badge-closed` | CSS classes use **higher-order status** (4 classes), not individual status names. Template logic: `badge badge-{{ task.task_status.task_higher_order_status|lower }}`. ### Priority Indicators - Colored 8px circle (border-radius 50%) + label. - High: `#cb2431` • Medium: `#e67e22` • Low: `#28a745`. - Classes: `priority priority-high/medium/low` with `.priority-indicator` child. ### Empty State When queryset empty: single row spanning all columns, centered "No tasks found" text. ### Pagination Footer - "◀ Prev" (disabled on page 1) - Page numbers: 1 2 3 4 5 … 6 (ellipsis after page 5) - "Next ▶" (disabled on last page) - All links preserve every active filter, sort, and page_size query parameter. --- ## Permission Awareness | Element | Condition | |---------|-----------| | "+ New Task" button | `user_level >= 3` | | "View" action links | `user_level >= 1` | | Filter sidebar | Always visible (read-only users can filter) | `user_level` = max `permission_set__task` across user's groups for accessible projects. Superusers see all tasks and all UI elements. --- ## Design System Conformance - Buttons: `btn btn-primary` / `btn btn-secondary` - Form controls: `form-control` class on all inputs/selects - Table: standard HTML table with 12px 16px cell padding - Badges: `badge` base + status modifier - Colors: Primary `#0366d6`, text `#24292e`, borders `#e1e4e8` - Spacing: 8px base unit, 16px section gaps --- ## What Is Explicitly Excluded No bulk actions, no column visibility toggle, no saved filter presets, no real-time updates, no drag-and-drop, no live collaboration indicators. This is a read/list view only. --- ## Deliverable Expectation A single self-contained HTML file with embedded CSS/JS that: - Renders correctly standalone in a browser - Uses realistic sample data (8–10 rows covering all 6 default statuses and 3 priorities) - Contains Django template syntax (`{% for %}`, `{% if %}`, form field rendering) - Matches every component, color, and behavior described above - Serves as the exact visual and structural target for implementation