| 9 | == My favorite customizations == |
| 10 | I'm using Trac on my site with some customization. |
| 11 | These are not so usefull for everyone, but someone may like it. |
| 12 | So I introduce them for those users. |
| 13 | |
| 14 | === Access Key === |
| 15 | When we modify the wiki page, we click 'Preview' button frequently before pressing 'Save Changes' button. |
| 16 | And to press 'preview button', usually we need scroll the page. |
| 17 | So I change the template and define HTML accesskey attribute to these buttons. |
| 18 | For example, specifying acccesskey attribute of 'Preview' button as "r", |
| 19 | we can use ALT-R instead of pressing that button. |
| 20 | |
| 21 | I'm using access key with following buttons: |
| 22 | * wiki page |
| 23 | * 'Edit' button with 'e' (ALT-E) |
| 24 | * 'Preview' button with 'r' (ALT-R) |
| 25 | * ticket page |
| 26 | * 'Preview' button with 'r' (ALT-R) |
| 27 | * new ticket page |
| 28 | * 'Preview' button with 'r' (ALT-R) |
| 29 | |
| 30 | The patch for above is in [http://projects.edgewall.com/trac/ticket/1752 tikect:1752]. |
| 31 | |
| 32 | === Too Wide Timeline Preference === |
| 33 | As default, preference box in timeline page is too wide (I feel). |
| 34 | I recommend more compact preference. |
| 35 | See [http://projects.edgewall.com/trac/ticket/1013 ticket:1013] for patch. |
| 36 | |
| 37 | === Too Narrow Search Box === |
| 38 | I feel that default size of search box is too narrow. |
| 39 | So I widen by using CSS via {{{site_css.cs}}}. |
| 40 | Like this: |
| 41 | {{{ |
| 42 | /* enlarge search text box */ |
| 43 | #proj-search { |
| 44 | width: 200px !important; |
| 45 | } |
| 46 | }}} |
| 47 | |
| 48 | === More Compact Navigation Button === |
| 49 | The box size of navigation bar on the top of page is too large, I feel. |
| 50 | Set them more compact with following CSS in {{{site_css.cs}}}: |
| 51 | {{{ |
| 52 | #mainnav :link, #mainnav :visited { |
| 53 | padding-left: 8px; |
| 54 | padding-right: 8px; |
| 55 | } |
| 56 | }}} |
| 57 | |
| 58 | === Links to Report in Site Header === |
| 59 | Some page customization are allowed by Trac via files: |
| 60 | {{{site_css.cs}}}, {{{site_header.cs}}} and {{{site_footer.cs}}}. |
| 61 | I'm using site_header.cs to show shortcut links in top of page (called as 'site header'): |
| 62 | * Active Tickets ... Link to report:1 with accesskey 'a' (ALT-A). |
| 63 | * My Tickets ... Link to report:7 with accesskey 'm' (ALT-M) displayed only if user logged in. |
| 64 | * Project List ... Link to parent directory to show project list with accesskey 'l' (ALT-L). |
| 65 | |
| 66 | My site_header.cs is bellow: |
| 67 | {{{ |
| 68 | <?cs |
| 69 | #################################################################### |
| 70 | # Site header - Contents are automatically inserted above Trac HTML |
| 71 | ?> |
| 72 | <div class='nav' style='float:right'> |
| 73 | <ul> |
| 74 | <li class='first'><a href="<?cs var:$trac.href.report ?>/1" accesskey="a"><u>A</u>ctive Tickets</a></li><?cs |
| 75 | if trac.authname != 'anonymous' ?> |
| 76 | <li ><a href="<?cs var:$trac.href.report ?>/7" accesskey="m"><u>M</u>y Tickets</a></li><?cs |
| 77 | /if ?> |
| 78 | <li class='last'><a href="/projects" accesskey="l">Project <u>L</u>ist</a></li> |
| 79 | <ul> |
| 80 | </div> |
| 81 | }}} |
| 82 | |
| 83 | |