[[PageOutline(2-5,Contents,pullout)]] = Add context-aware css attribute = == Description == 1. Wiki Link Decoration by age of wiki page ... add "new" css-class to link to wiki page that is young. You can soecify ages at `trac.ini`. 1. Decayed Wiki ... Indicate how old the wiki page is. You can specify colors by age in seconds at `trac.ini`. 1. Ticket Link Decoration by field value ... Set css-class to link to tickets by field value. You can specify field names at `trac.ini`. 1. 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. 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 [report:9?COMPONENT=ContextChromePlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=ContextChromePlugin&owner=matobaa new ticket]. == Download == Download the zipped source from [download:contextchromeplugin here]. == Source == You can check out ContextChromePlugin from [http://trac-hacks.org/svn/contextchromeplugin here] using Subversion, or [source:contextchromeplugin browse the source] with Trac. == Example == example trac.ini: {{{ #!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: {{{ #!ini [wiki] wiki_new_info_second = 432000 }}} [[Image(newpage.png)]] === Decayed Wiki === example trac.ini: {{{ #!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: {{{ #!ini [ticket] decorate_fields = owner, milestone, type }}} example style.css: {{{ #!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; } }}} [[Image(linkdeco.png)]] === Tikcet color by Type === example style.css: {{{ #!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 */ } }}} [[Image(TypeClassToTicket.png)]] == Recent Changes == [[ChangeLog(contextchromeplugin, 3)]] == Author/Contributors == '''Author:''' [wiki:matobaa] [[BR]] '''Maintainer:''' [wiki:matobaa] [[BR]] '''Contributors:'''