User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


mantisbt:page_template_requirements

This is an old revision of the document!


Page Template Requirements

Author: Glenn Henshaw (thraxisp)

Introduction

Mantis pages are currently hard coded as php files with embedded HTML and a smattering of CSS. In many cases, the page itself determines the presentation based on the current user's access level and system parameters. There are also several pages that are graphically close to each other or related. This construction makes it difficult to modify the overall look and feel of a site, or to add or delete fields.

The construction of the code will be reviewed to separate the business logic (feature interactions and user capabilities), and presentation.

The general implementation will have the following attributes:

  • use a generally accepted Template engine - Smarty seems to be a logical choice because of it's widespread adoption and simple implementation. Other engines are probably also viable.
  • have different selectable views for the same site - different themes should be available. When a specific template is missing, the display should fall back to a default template.
  • Within a theme, it should be trivial to remove a field from the display. In this case, the display should beave a hole / space where the original field was.
  • an individual user should be able to select their theme for the site, or an specific project
  • the existing multi-lingual interface is required. Retaining the existing language files is desired.

Database Changes

  • none should be required

Template Construction

  • Template will be passed an array to determine what should be displayed ($show). This will be prebuilt to enable features based on access level and features and fields that are enabled
  • bugs and other information will be passed through an instance of the “Bug” object. This allows some processing or formatting of the data before it is displayed (or controls are generated).

Other Changes

Feedback

Please add your comments and feedback in this section.

mantisbt/page_template_requirements.1158630864.txt.gz · Last modified: (external edit)

CC Attribution-Noncommercial-Share Alike 4.0 International Driven by DokuWiki