Contents
Add context-aware css attribute
Description
- Wiki Link Decoration by age of wiki page ... add "new" css-class to link to wiki page that is young. You can specify ages at trac.ini.
- Decayed Wiki ... Indicate how old the wiki page is. You can specify colors by age in seconds at trac.ini.
- Ticket Link Decoration by field value ... Set css-class to link to tickets by field value. You can specify field names at trac.ini.
- you can decorate over intertrac links, with XmlRpcPlugin and corsEnabler included.
- Ticket color by Type ... Set css-class to type on ticket. You can design for each type of ticket with trac:wiki:CookBook/SiteStyleCss feature.
- marked for validation ... set css-class to field specified by validator.
If you want to edit the css on browser, use WikiCssPlugin or ThemeEnginePlugin.
If you want to modify decoration link to new page. edit site.html and site.css.
Bugs/Feature Requests
Existing bugs and feature requests for ContextChromePlugin are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from here.
Source
You can check out ContextChromePlugin from here using Subversion, or browse the source with Trac.
Example
example trac.ini:
[components] contextchrome.linkdeco.internalstylesheet = enabled contextchrome.linkdeco.ticketlinkdecorator = enabled contextchrome.linkdeco.wikilinknewdecolator = enabled contextchrome.style.typeclasstoticket = enabled decayed.wiki.decayedwiki = enabled
wiki age to dacorate or not
example trac.ini:
[wiki] wiki_new_info_second = 432000
Decayed Wiki
example trac.ini:
[wiki] decay_colors = 86400:#ffffff, 604800:#eeeeee, 2678400:#dddddd, 31536000:#aaaaaa, 2147483647: #777777
background of wiki pages are colored by age, white for modified in a day, light grey for in a week, and so on.
Ticket link decoration by field value
example trac.ini:
[ticket] decorate_fields = owner, milestone, type
example style.css:
a.type_is_defect { background-color: #f5deb3; /* wheat */ } a.type_is_enhancement { background-color: #87ceeb; /* sky blue */ } a.type_is_task { background-color: #ffd700; /* gold */ } a.owner_is_somebody { border: maroon thin solid; }
To decorate over intertrac links, use XmlRpcPlugin and CrossOriginResourceSharingEnabler as follows:
Tikcet color by Type
example style.css:
body.type_is_defect { background-color: #f5deb3; /* wheat */ } body.type_is_enhancement { background-color: #87ceeb; /* sky blue */ } body.type_is_task { background-color: #ffd700; /* gold */ }
Marked for validation
enable required TracTicketValidatorPlugin and following example trac.ini:
[ticketvalidator] validates = keywords, vote keywords.rule = .+ vote.rule = .+
Recent Changes
- [13292] by matobaa on 2013-06-18 13:13:41
-
ContextChromePlugin: Added a new feature; decorate ticket links over intertrac.
- [12857] by matobaa on 2013-04-01 16:36:38
-
ContextChromePlugin: fixed a bug that admin/plugins page shows fake classes
- [12854] by matobaa on 2013-04-01 15:39:01
-
ContextChromePlugin: fixed a bug: current-status was missing when auto-preview is enabled
Author/Contributors
Attachments (5)
- TypeClassToTicket.png (47.0 KB) - added by matobaa 19 months ago.
- linkdeco.png (28.7 KB) - added by matobaa 11 months ago.
- newpage.png (20.6 KB) - added by matobaa 9 months ago.
- TracTicketValidator.png (21.4 KB) - added by matobaa 8 months ago.
- cors.png (53.8 KB) - added by matobaa 3 months ago.
Download all attachments as: .zip