ITADN

fix: show post approve button properly on mobile (#720)

#761Pull Requestshayesdevel 创建于 2026-02-26
S
shayesdevelcommented
Closes #720 ## Summary - Added inline filter approve/remove buttons to the mobile footer bar in both post listing and single post views, matching the desktop behavior where these buttons are directly visible for filtered posts - Fixed CSS classes on approve/remove buttons in the admin mobile modal (`actions_admin_mobile.html`) from `dropdown-item list-inline-item` to `list-group-item` to match the parent `list-group` container, giving proper padding and consistent styling ## Changes - `files/templates/submission_listing.html` -- added filter approve/remove buttons to mobile footer when post is filtered - `files/templates/submission.html` -- same change for the single post view mobile bar - `files/templates/component/post/actions_admin_mobile.html` -- fixed CSS classes on mod approve/remove from dropdown-item to list-group-item, added icon margin - `files/tests/test_admin.py` -- added 3 page load tests for filtered post approve button rendering ## Testing - Visual review of approve button placement on mobile-width viewports - Verified button styling matches existing patterns (btn-primary for Approve, btn-danger for Remove, same padding/font-size as the Reports button) - Verified admin modal approve/remove items now use list-group-item consistent with sibling elements - **Automated tests added:** - `test_filtered_post_has_approve_button` -- loads individual filtered post page as admin, verifies approve/remove button markup - `test_filtered_post_listing_has_approve_button` -- loads /admin/filtered/posts with a filtered post, verifies buttons - `test_filtered_post_mobile_actions_load` -- verifies mobile admin actions modal renders list-group-item styled buttons Generated with [Claude Code](https://claude.com/claude-code)
合并状态:未合并 1 条评论