wiki:Templates
Last modified 11 years ago Last modified on 04/07/10 14:06:13

Page templates

For each page template in addition to page options frames (as well as other options) should be present in templates. The frames in a page templates are just like frame templates, but here they will be called Slots instead of templates.

Page options

The page options should be like they are now, however the UI may be slightly different (and the order can be other)

Frames

Existing frames should be added like Slots. Slots should be named just "Slot" and in brackets should be displayed frame name. For each slot checkboxes will show what frame options should be preserved for this slot.

Groups

Groups will be added like slots with subslots.

Creating instance of a page template

Creating an instance of a template will create new page with all the options following the page template and new frames following the slots. This means that if "Slot (Frame A)" was created with unchecked position checkbox, it will appear on position 0,0.

Applying a template to an existing page

The user interface will be decribed further below. However, the main idea is the following:

  • Each of the existing frames can be
    • assigned to a slot (1)
    • left unassigned to a slot(2)
    • deleted (3)
  • For each slot
    • a new frame can be created (4)
    • can be assigned to an existing frame (1)
    • can be unused (5)

Behavior:

(1) The frame is assigned to this slot. Slot options that were checked on template creating are applied to the frame. If the slot is modified, changes are applied to the asociated frame(or frames on more pages). If the slot is deleted, the frames associated to it on different pages are removed.
(2) The frame remains on the page untouched. Z-order is undefined, but the behavior is not important. Changing template (and slots) does not affect this frame. *
(3) The frame will be deleted*
(4) New frame is created and associated with the corresponding slot. Unchecked checkboxes fallback to the parent template (or the empty)
(5) The slot is unused for this instance. Changing (or deleting) this slot does nothing to the instance.


* Due to difficult user interface, this could be chosen for all existing frames on the page.

Deleting a template

There are two options

  • Allow deleting a template, pop up a warning that existing pages may lose formatting
  • Don't allow deleting existing template

It would be better to allow deleting templates. This should remove from pages frames associated with a template and page options defined by a template.

Editing a template

  • Book templates
    • Book templates should be edited like now. Save button should be present to be able to save changes.
  • Page templates
    • Page templates should be opened for editing in a book window. It should not have page controls in it. Instead of "Add to template" halo an "Edit template options" halo should be present. It should bring up the same dialog as add to template halo. The user should be able to choose which options should be part of the template. Resources palette should contain template resources such as main resource, frame templates.
    • Size - the size of the page template opened for editing should be the same as the book size. If there is no parent book, a default minimum size should be shown (or a size that contains all elements with positive coordinates, but if it is larger than the minimum). However, the user should be able to edit the size.
  • Frame templates
    • Frame templates should be opened for editing like the page templates. Page halos however should not be shown.The page that should be shown to the user should be transparent. A non-changeable black border (1px) will be nice too.
    • Page and frame size and position in frame template editing editing
      • For frame templates with undefined size a default frame size should be shown.
      • For frame templates with undefined position the page should be with the size of the frame and the frame should be positioned to 0,0
      • For all other frames the position should be their real position and the page size should be default or big enough to contain the frame.

Attachments