web/docs/design/CP-TEMPLATES.md
2026-11-27 23:43:05 +00:00

9.6 KiB

CP template master register

This is the central register for reusable internal CP page designs. Consult it before creating another page layout. Templates are for implementation use only; players do not see a template or schematic manager.

Naming

<version>.<organisation>.<page> identifies the design version and its purpose. A template version is separate from the active application release. Preserve the exact identifier agreed with the user.

Registered designs

Template Purpose Shared implementation Adapter Status Specification
1.0.0.8.clan.dashboard Read-only welcome dashboard with emblem, description, separate MOTD and summary cards website/control-panel/public/organisation-dashboard.mjs + organisation-dashboard.css website/control-panel/public/clan-profile-panels.mjs Approved/live; PR #347, CI #335, illustrated dashboard Full design

Shared workflow

  1. Review and design Clan CP page by page with the user; placeholder missing services clearly.
  2. Commit and publish the authorised design batches through CI.
  3. After the page designs are settled, implement backend integrations using existing infrastructure and agreed rules.
  4. Reuse the same shared templates for Company CP, changing organisation labels, artwork, adapters and company-specific rules. No PvP or military conquest in companies.
  5. Keep later bug fixes separate and update this register when template versions or status change.

Design rules

  • Dashboard is display/read/navigation only. Edit controls belong on management/settings pages.
  • Preserve each organisation's actual logo and description. MOTD is distinct from description.
  • Show real member faces, roles, requests and counts only from existing authorised data.
  • Do not invent balances, unread counts, claims, news or events. Show clear pending/unavailable states.
  • Reuse the same layout rather than copying independent implementations for each organisation.
  • Preserve existing bank accounts, loans, permissions and personal voting rights.

Shared navigation contract

Clan CP and Company CP must use the same menu structure, grouping and item order. Adapt only terminology, artwork, data and organisation-specific eligibility/behaviour. Keep unavailable capabilities clearly marked rather than inventing a different navigation structure. Template/schematic naming and this register remain internal.

Stored modules

Module Responsibility Reuse
organisation-dashboard.mjs + .css Shared welcome and overview-card layout Clan/company adapters; read-only presentation
organisation-activity.mjs Render safe title/message/time activity items Clans, companies and politics
clan-dashboard-data.mjs Existing authorised bank/mail read adapters Clan dashboard; no new financial or membership writes
node/clan-activity.mjs Project selected scoped clan audit events into member-visible news Clan adapter; raw audits/private applications are never returned
node/organisation-motd.mjs Shared scoped welcome-message storage and validation Clan connected first; owner edit/member read contract
cp-v2-claim-tariffs.mjs Universal published chunk limits, upkeep and unlock costs Rates & Charges, clan settings/dashboard and Claims previews; web/API phase contract
node/postbank-mandate-policy.mjs + existing bank authorisations Shared optional organisation scope on existing bank mandates Gated clan adapter; future company/politics adapters; contract and pending tests
node/organisation-keys.mjs One private generator/registry/lifecycle for CLAN, COM and POL keys Server-only charter adapter prepared, not activated; key contract
cp-v2-code-redemption.mjs Shared Imperial desk: code format, effect preview and fresh confirmation Existing Codes page; future clan/company/political adapters; contract

Basic organisation sequence

Current implementation priority: finish the key-upgrade flow, then Claims, then Transfer of Power. Both key upgrade and Claims must work before implementing transfer mechanics. Basic has no conquest, organisation political powers or House candidacy; personal voting remains absolute. Transfer is currently a prepared web placeholder only.

Finish Basic clan first, including claims and an editable MOTD in settings with read-only display on the dashboard. Reuse and save that shared basis for Company CP and applicable Politics CP pages. Claims belong to Basic; conquest does not. After Basic, a CLAN code upgrades the same organisation to an Original House with mother-house capability. Royal House is a later political appointment which issues a separate POL code. Use the central Redeem desk, not duplicate redemption forms on each organisation page. Preserve organisation UUIDs and data.

Validate designs inside the actual legacy page and styles before publication. Replace old page chrome on focused CP routes; do not stack a new dashboard underneath directory summaries and duplicate tabs. MOTD, News and Treasury are separate sections; Treasury and mail may reuse their existing authorised services as specifically requested.

Live verification for the focused-dashboard correction: clan client, shared activity renderer, treasury/mail adapter, and Household Dashboard navigation label returned HTTP 200 with the expected current-release content. Six focused tests and the integrated browser checks passed before CI/publication. No real payments or membership test mutations were made.

Dashboard illustration and hierarchy design

Keep the existing template ID 1.0.0.8.clan.dashboard. Every summary card has a translucent background illustration and a restrained colour accent, scoped above legacy styles. The grid has explicit inset padding, including on mobile, so cards never touch the outer page border. Clan description and MOTD are two separate subboxes inside the welcome card. Subhouses & subsidiaries has a clear hierarchy placeholder; no child-organisation data or powers are invented.

Relations/backbone decision: later CP forms and request pages reuse the old Dev Center integration pattern with a separate osTicket backbone for bank/clan/company workflows, separate from Support. The CP owns the player-facing interface and access checks. Existing operational/banking modules execute approved decisions. Dashboard links should be switched to the new CP routes only when those workflows exist; the dashboard itself does not require that migration.

Dashboard 1.0.0.8.clan.dashboard was approved by the user after PR #347 / CI #335. Keep the approved design stable.

Next design batch: settings is organised by category using organisation-settings.mjs / .css, with existing authorised forms moved intact. Roster, applications, clan mail and treasury remain routable but are hidden from the sidebar (dashboardOnly metadata); dashboard actions lead to their existing full-page routes. Member-card actions and clan bank tabs follow the common CP style. General menu deduplication automation and the same design/menu review for User CP are deferred follow-ups, not work to perform during this batch.

Settings/navigation publication

PR #348 is live as release 21b765bb after main CI #339. The reusable organisation-settings.mjs / .css template supplies six category blocks, with the original three forms preserved. Roster, applications, correspondence and treasury are dashboard-only navigation entries; their routes and access checks remain. Member-card actions, banking tabs and single-workspace chrome use the common CP presentation. Actual live modules and styles were verified HTTP 200. Settings remains a design for user review; no template version was assigned without agreement.

Internal organisation boards

The compact board/thread view uses website/integrations/mybb/system-board.css and system-board-embed.php. It reuses native MyBB posts, posting forms and permissions. Scope the stylesheet to embedded CP output; the public forum keeps its full profiles, artwork and signatures. Internal views show a compact author line, readable topic table, native controls, a practical reply form and an Open in Boards link. Reuse the same adapter for clans, companies and elections. Existing palace artwork supplies the subdued green/gold background. Browser preview checked at 1100, 760 and 390 pixels without clipping.

The board administration form reuses system-board-manage-view.php and system-board.css: illustrated heading, labelled field grid, clear primary/cancel actions and a read-only guidance column. Retain this view for clan/company board creation rather than styling separate standalone forms.

Shared page chrome

The CP shell supplies one outer page frame. Template tab panels, embedded frame containers and embedded clan workspace wrappers remain transparent and unframed. Keep meaningful content cards, forms and description/MOTD subcards; do not add another decorative border around a group that already contains framed cards. This applies across personal, clan, company and political CP pages using the shared template, not just Claims or the dashboard.

Clan public deed and dynasty

1.0.1.0.clan.public-profile uses clan-dynasty.mjs + .css for the shared playercard tree and registered deed card. Public /clans/<TAG> reads node/public-clans.mjs; settings use clan-deed-settings.mjs against the same deed. See deed contract. Consort is honorary; Heir is a separate scoped appointment, never a member rank. Dates use the shared dune-date.mjs display convention.