Ticket #926 (closed enhancement: fixed)
[PATCH] Allow aligning custom fields by specifying CSS style for them
| Reported by: | pkou <pkou at ua.fm> | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | ticket system | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Currently, there is no way to display custom fields in two columns, e.g. as main ticket fields are displayed.
The proposal is to implement this feature by adding customfield.class parameter for custom fields in trac.ini:
- When this parameter is not specified, Trac uses current approach:
- Every custom field is added into <div class="field custom_name"> section;
- Dashed line is added between main fields and custom fields.
- When .class is specified, Trac uses new approach:
- Every custom field with .class parameter starts new <div class="class"> section;
- Custom fields without .class paramter that follow a field with this paramter belong to the same class. The fields are separated using <br /> tag;
- No special separator is added between main and custom fields.
- It is possible to mix old and new approach:
- All custom fields before first field with .class paramter are processed in old way;
- For other fields, it is necessary to specify their class in trac.ini explicitly.
Also, three special classes are predefined:
- custom: Starting a new section and draw a dashed line above it;
- col1custom: Starting first column with dashed line above it;
- col2custom: Starting second column with dashed line above it.
Example setup for custom ticket fields is in attached file customalign.ini. Also, attached picture customalign.png shows the result for this setup.
Patch attached also.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


