summaryrefslogtreecommitdiff
path: root/app
AgeCommit message (Collapse)Author
2026-07-22Add attached nodes subsection in assets#show and thumbnail in nodes#createerdgeist
2026-07-22Make important flash notices survive the boilerplate Node-locked info in nodes controllererdgeist
2026-07-22Make nodes#show's add event/child buttons look consistenterdgeist
2026-07-22Implement controller and view side of the attach logicerdgeist
2026-07-22factor out flash rendering from layouts/adminerdgeist
2026-07-22Add Node#attach_asset! attaching across all lifecycle rowserdgeist
2026-07-22Split nodes#edit into a four-quadrant layout on desktoperdgeist
2026-07-22Retire nodes#recent, superseded by the action logerdgeist
2026-07-22Fix Node#title ignoring autosaveerdgeist
head ? head.title : draft.title never accounted for a node with only an autosave, reuses editable_page
2026-07-21Render PDF headlines as document cards, not lightbox imageserdgeist
A starred PDF previously ran through the same crop-and-lightbox path a photo does -- exactly the awkward treatment explicit headline designation was meant to avoid. _headline_image.html.erb now branches on @headline_asset.pdf?: a PDF renders as a linked card (a :medium thumbnail, a file icon, its name), no gallery participation at all. The existing image-headline and gallery-fallback logic is otherwise unchanged, now scoped to an image-specific headline only. Other attached PDFs -- headlined or not -- list below as plain links, same reasoning as why non-headline photos still get a gallery trigger: an attached document shouldn't go invisible just because nothing's been starred yet. headline_image's own render guard needed widening to cover a page with PDFs attached but no images and no headline at all -- the one case none of the existing conditions accounted for.
2026-07-21PDFs currently should have no credits attached to them in displayerdgeist
2026-07-21More PDF headline eligibilityerdgeist
2026-07-21Widen nodes#show to all attachmentserdgeist
2026-07-21Make PDFs eligible for headline and allow searching assets by filenameerdgeist
2026-07-21Extract Page#headline_asseterdgeist
The same related_assets.find_by(headline: true) query was written by hand in three places -- content_helper, nodes#show, and the chapter teaser partial (which was still using assets.first, the old position-based rule, until now). Collapsed to one method, one query.
2026-07-21Implement model side of PDF raster preview generationerdgeist
2026-07-21Add storage isolation for tests, preventing live data destructionerdgeist
2026-07-21Resolve preview's page-to-node lookup for every layererdgeist
pages_controller#preview loaded a page by id and rendered it directly, assuming @page.node was always present. True for head and draft, since both carry a real node_id: false for autosave, which deliberately has node_id: nil (the mechanism that excludes it from Node#pages and the revision count). A node with an autosave and no draft underneath it: lock, start editing, never explicitly save a draft: loads that autosave directly with no node at all, and any view code assuming @page.node is real (headline image, credits, gallery links) raises. When @page has no node, resolve it by checking autosave_id, then draft_id, then head_id on Node, and set @page.node in memory only: the autosave's node_id: nil is never persisted differently. The existing swap from draft to a fresher autosave, when both exist, is unchanged. Three tests: draft with a fresher autosave on top, autosave with no draft underneath, and the ordinary head-only case with neither.
2026-07-21Remove Page#update_assetserdgeist
Only caller left was the sort_images action removed last commit. Kept alive only as a test-setup convenience for diff_against coverage, which is what it actually was -- an implicit API with no deliberate contract, sitting there for anyone to call. Rewrote the one test to set up its fixture state directly via related_assets rather than through a method whose real job was already done.
2026-07-21Remove unreachable image_box drag-and-drop UIerdgeist
image_interface and meta_data (admin_interface.js), the sort_images action and route, and their admin.css rules -- the old vertical image_browser sidebar this all depended on isn't rendered by any current view. related_assets.js and the star-toggle sidebar fully supersede what this did. Confirmed unreachable via full grep across app/, config/routes.rb, and admin_bundle.js before removal -- route, controller action, and JS handler were all individually real and functional, just with nothing left anywhere that could ever trigger them.
2026-07-21Show which image is headlined on nodes#showerdgeist
The editable sidebar has had a star toggle since headline designation shipped; the read-only view never gained any equivalent indicator. Same visual language -- gold filled star, same .is_headline card highlight already defined in admin.css.
2026-07-21Render asset credit inside the gallery lightbox correctlyerdgeist
GLightbox's own selector-based description feature never actually resolved a selector in three different attempts -- literal text, then a resolved-but-empty div, then apparently not firing at all against the installed (unversioned) build. Replaced with a small afterSlideLoad handler that reads a plain data-credit-selector attribute and copies the real element's HTML into the slide's description area directly, depending only on GLightbox handing back a real DOM node per slide -- a much smaller contract than trusting its own caption-resolution feature. Renamed the credit div's class from glightbox-desc, since that name is reserved by the library's own bundled CSS (display: none !important) and can't be reliably overridden from here. Also: distinguishes the credit line and the "N Bilder" caption from ordinary body text (italic, muted, matching .author_and_date's existing convention), and makes the lightbox's caption card follow the site's light/dark toggle via Canvas/CanvasText, since the library's bundled theme never adapts to it on its own.
2026-07-21Stop related_assets from duplicating on every cloneerdgeist
self.assets = page.assets implicitly cleared the collection before recreating it. Replacing it with an explicit loop, to preserve the headline flag across clones, dropped that clearing -- every clone_attributes_from call since has been appending related_assets rather than replacing them. Restored with an explicit delete_all before the copy. update_assets (the sort_images reorder action) had the same gap for headline specifically; it now carries the previous headline forward when that asset is still present in the new list.
2026-07-21Whitespace fixerdgeist
2026-07-20Remove a superflous section headererdgeist
2026-07-20Improve discoverability of headline image logic in nodes#editerdgeist
2026-07-20Make headline images explicit, add asset creditserdgeist
- related_assets gains a `headline` boolean (DB-enforced: at most one per page), replacing "first image by position" as the headline rule. A rake task backfills the current first image on every live head/draft, so nothing changes visually until an editor changes it. - The image picker sidebar gets a star toggle reflecting the flag; the TinyMCE inline-image picker's badge now reads it too, instead of assuming position 0. - No headline chosen (or none attached) now falls back to the gallery-count caption itself becoming the lightbox trigger, instead of the gallery being unreachable. - Assets gain creator, source_url, and license_key (against a new config/asset_licenses.yml dictionary). asset_credit renders a degrading attribution line, reused as a hidden per-image glightbox caption so credit is one click away for every image, not only the headline's always-visible one. - Fixed: asset thumbnails rendered unconditionally regardless of whether a real variant exists on disk. Asset#has_variant? checks file existence, not content type -- some legacy PDFs have real pre-rewrite thumbnails a content-type check would have hidden. - assets#new/edit rebuilt onto the same node_description/node_content layout as assets#show, picking up the three new fields in the process.
2026-07-20Link publish actions to revision diffs in recentserdgeist
2026-07-19Remove one dead events viewerdgeist
2026-07-19Add copy-url button to assets; unified the mechanism across viewserdgeist
2026-07-19Simplify sanitize_filenames for the unicode ageerdgeist
2026-07-19Point the style sheet to the correct WIP version in treeerdgeist
2026-07-19Start demolition survey of the css for later redesignserdgeist
2026-07-19Log CSP violations to their own file instead of relying on Rails.loggererdgeist
2026-07-19Add a 500er logger and a trip wire in admin/boom to test iterdgeist
2026-07-19Fix render gallery rename issue. We saw 500serdgeist
2026-07-19Refine the action log's time column layouterdgeist
2026-07-18Accept blank template names in the allowlist validationserdgeist
2026-07-18Emit a report-only Content-Security-Policy with nonced inline scriptserdgeist
- dark-mode restore now travels nonced, the admin constants likewise - AUTH_TOKEN deleted in favour of the csrf meta tag - new report collector at /csp_reports
2026-07-18Give action log entries per-verb iconserdgeist
A muted glyph before each sentence makes both log surfaces scannable by verb: create, publish, move, trash, restore, destroy, and the discard pair. Rollback publishes get their own icon (history) distinct from ordinary promotion. Unknown verbs fall back to a dashed circle.
2026-07-18Annotate the History list with each revision's lifecycleerdgeist
Each row in nodes#show's History section now carries terse badges from the action log: created, published, and restored (rollback re-promotion), with date and actor, rendered from entry metadata alone. Backfilled entries wear the inferred marker, so reconstructed provenance stays distinguishable from witnessed history. A revision that was published and later restored shows both badges chronologically -- its true biography. Only create and publish entries carry page_id; trash, restore, and destroy annotate the node's own log zoom instead of any single revision, by design.
2026-07-18Give Trash a proper title on lazy constructionerdgeist
2026-07-18Keep the Trash out of the drafts surfaceserdgeist
2026-07-18Teach the action log reader the Trash vocabularyerdgeist
Sentences for trash (with the pre-trash path), restore_from_trash (with the destination), and destroy (with the final path, read from its flat create-symmetric key).
2026-07-18Add Trash affordances: cockpit, listing, dashboard entryerdgeist
nodes#show gains a Trash section on trashed nodes: provenance from the trash entry, a restore form whose parent picker pre-fills the old parent while it still lives, and permanent deletion. A Move-to-Trash button joins the status actions on living nodes. nodes#trashed lists trashed subtree roots with weight, provenance, and deletion; the dashboard housekeeping row links to it, and trash/destroy redirect there. Deletion from Trash now removes the whole subtree, deepest first, each node through a real destroy! so every per-node cascade runs -- amending the never-recursive rule for this one sanctioned path (both confirms state the count; the root entry carries destroyed_descendants). Bare Node#destroy still refuses children.
2026-07-17Route and control trash, restore, and permanent deletionerdgeist
2026-07-17Add trash!, restore_from_trash!, and destroy_from_trash! with log entrieserdgeist
Also update the node action contract to include the trash related verbs.
2026-07-17Bootstrap the Trash node: reserved slug, identity, guardserdgeist
2026-07-17Fix the cleanup cascade for a real node destroyerdgeist
related_assets rows outlived their pages; head and draft carried a dependent destroy that double-destroyed rows has_many :pages already owns. Autosave keeps its own -- autosave pages carry no node_id, so pages does not reach them.
2026-07-17Refuse destroying nodes that still have childrenerdgeist
NestedTree's before_destroy silently delete_all'd the whole subtree, bypassing every per-node cleanup. Nodes are never destroyed recursively; descendants must be removed individually.