implement entire Wagn layout as a card
Ticket
+issues
We want to be able to specify the basic layout of Wagn — top bar with links and Search bar, left column with main card area (which includes help text area above), right column with logo and sidebar and "Wheeled by" link — in a card, so that it can be altered directly in Wagn.
+solution
Once we have patterns, we should be able to set a card's default layout with a pattern, like {Pattern}+*layout, which should be a pointer to a single layout card. For now, we can probably get away with one pointer to set the default layout: *layout. We probably need to make this layout readable to everyone and editable only by admin, even on more private wagns.
So as not to sacrifice existing functionality, we also need to support our other layouts (like noside, blank, and none), probably by reproducing these in cards and making layout=X refer to these cards.
The *layout card will need a way to reproduce the current "yield" functionality, which produces the main content of the page. One idea would be able to do something like {{_page}} or {{_main}}.
To replicate our current layout, we will need several new coded virtual cards (for which we will need to build some extra structure).
- *navbar
- *account links - must have all the logic from the relevant section in top_menu
- *head (note that is is necessary to do this if we want some layouts, like "none", not to have the head tag
- *alerts - popup status messages (connecting to server..., done, etc.)
- *foot - javascript (tinyMCE, google analytics)
- *version card, which we could either actually make a normal card and update every version (in which case rollbacks would be tricky, but updates are easy to track) or do as a virtual card that pulls from the current representation.
Note that when we render inclusions in a layout the default view should be naked!
Will be good to test that special pages still work, eg. /recent , /admin/tasks , /account/invite , etc.
+example
checkout http://test.dwagn.org/wagn/*layout
This shows a fairly complete configuration of the layout we want. Note that you can't see the '*account links' card because the #logging css uses absolute positioning. You can see it closer to the right place in this one:
http://test.dwagn.org/wagn/Default_Layout?view=content&layout=blank