30 | | |
31 | | == Installation |
32 | | |
33 | | 1. '''Install''' globally with: |
34 | | {{{ |
35 | | #!sh |
36 | | sudo easy_install https://trac-hacks.org/svn/datefieldplugin/0.11/ |
37 | | }}} |
38 | | 1. '''Enable''' the plugin by updating TracIni file (..../trac.ini) as follows: |
39 | | {{{ |
40 | | #!ini |
41 | | [components] |
42 | | datefield.* = enabled |
43 | | }}} |
44 | | 1. '''Configure''' the project management support for the plugin in its own configuration section, placed into 'trac.ini' file as follows: |
45 | | 1. To add a Due Date, just set up the field as a [http://trac.edgewall.org/wiki/TracTicketsCustomFields custom field], or use the CustomFieldAdminPlugin (image right) to create a date field: [[Image(customfields.jpg, right, 20%)]] |
46 | | {{{ |
47 | | #!ini |
48 | | [ticket-custom] |
49 | | due_date = text |
50 | | due_date.date = true |
51 | | due_date.label = Due Date |
52 | | due_date.value = <now> # special value <now> works with 1.0 branch only |
53 | | due_date.date_empty = true |
54 | | }}} |
55 | | The example demonstrated use of the special value `<now>`, which is supported only on the 1.0 branch. The value will be replaced with the current date. |
56 | | 1. Site-wide defaults for macro arguments may be set at [datefield] section. More details about them see [#Arguments #Arguments section]. |
57 | | {{{ |
58 | | #!ini |
59 | | [datefield] |
60 | | format = mdy |
61 | | separator = - |
62 | | first_day = 1 |
63 | | }}} |
64 | | 1. '''Restart''' web server on command line: |
65 | | {{{ |
66 | | #!sh |
67 | | sudo /etc/init.d/apache2 restart |
68 | | }}} |
69 | | |
70 | | === Arguments |
71 | | |
72 | | This plugin can be controlled with a number of arguments, inside `[datefield]` section contained in `trac.ini` configuration file: |
73 | | |
74 | | ||'''Argument''' ||'''Version''' ||'''Description''' ||'''Default[[BR]]value''' || |
75 | | || `format`|| ||The format to use for dates. valid formats are `dmy`, `mdy`, and `ymd` || `dmy` || |
76 | | || `separator`|| ||The separator character to use for dates. Possible values are `-` or `.` or `/` || `/` || |
77 | | || `first_day`|| >= [6118] ||First day of the week (0=Sunday .. 6=Saturday) || `0` || |
78 | | || `months`|| >= [7192] ||How many months to show at once? || `1` || |
79 | | || `milestone`|| >= [7192] ||Use datepicker for milestone due/complete fields? (format= must match your locale) If you turn this on, you must use `MM/DD/YYYY` for the date format. Set format to `mdy` and separator to `/`. || `false` || |
80 | | || `weeknumbers`|| >= [7192] ||Show ISO8601 week number in calendar? || `false` || |
81 | | || `panel`|| >= [7192] ||Show panel with a "Today" and "Done" buttons (at bottom)? || `false` || |
82 | | || `change_month`|| >= [7192] ||Show a dropdown with month selection? || `false` || |
83 | | || `change_year`|| >= [7192] ||Show a dropdown with year selection? || `false` || |
84 | | || `match_request`|| >= [7192] ||Use datepicker on arbitrary request paths. Use text fields with class=datepick in your template, and configure the start of request path (in list format), like: ''match_request = /query,/other_path'' || `` || |
85 | | || `months`|| >= [7192] ||Number of months visible in datepicker || `1` || |
86 | | |
87 | | There are many other options, but you need to modify the `datefield.html` template if you want to use them. See [http://docs.jquery.com/UI/Datepicker] |
| 47 | == Installation |
| 48 | |
| 49 | 1. '''Install''' globally with: |
| 50 | {{{#!sh |
| 51 | sudo easy_install https://trac-hacks.org/svn/datefieldplugin/0.11/ |
| 52 | }}} |
| 53 | 1. '''Enable''' the plugin by updating TracIni file (..../trac.ini) as follows: |
| 54 | {{{#!ini |
| 55 | [components] |
| 56 | datefield.* = enabled |
| 57 | }}} |
| 58 | 1. '''Configure''' the project management support for the plugin in its own configuration section, placed into 'trac.ini' file as follows: |
| 59 | 1. To add a Due Date, just set up the field as a [http://trac.edgewall.org/wiki/TracTicketsCustomFields custom field], or use the CustomFieldAdminPlugin (image right) to create a date field: [[Image(customfields.jpg, right, 20%)]] |
| 60 | {{{#!ini |
| 61 | [ticket-custom] |
| 62 | due_date = text |
| 63 | due_date.date = true |
| 64 | due_date.label = Due Date |
| 65 | due_date.value = <now> # special value <now> works with 1.0 branch only |
| 66 | due_date.date_empty = true |
| 67 | }}} |
| 68 | The example demonstrated use of the special value `<now>`, which is supported only on the 1.0 branch. The value will be replaced with the current date. |
| 69 | 1. Site-wide defaults for macro arguments may be set at [datefield] section. More details about them see [#Arguments #Arguments section]. |
| 70 | {{{#!ini |
| 71 | [datefield] |
| 72 | format = mdy |
| 73 | separator = - |
| 74 | first_day = 1 |
| 75 | }}} |
| 76 | 1. '''Restart''' web server on command line: |
| 77 | {{{#!sh |
| 78 | sudo /etc/init.d/apache2 restart |
| 79 | }}} |
| 80 | |
| 81 | === Arguments |
| 82 | |
| 83 | This plugin can be controlled with a number of arguments, inside `[datefield]` section contained in `trac.ini` configuration file: |
| 84 | |
| 85 | ||'''Argument''' ||'''Version''' ||'''Description''' ||'''Default[[BR]]value''' || |
| 86 | || `format`|| ||The format to use for dates. valid formats are `dmy`, `mdy`, and `ymd` || `dmy` || |
| 87 | || `separator`|| ||The separator character to use for dates. Possible values are `-` or `.` or `/` || `/` || |
| 88 | || `first_day`|| >= [6118] ||First day of the week (0=Sunday .. 6=Saturday) || `0` || |
| 89 | || `months`|| >= [7192] ||How many months to show at once? || `1` || |
| 90 | || `milestone`|| >= [7192] ||Use datepicker for milestone due/complete fields? (format= must match your locale) If you turn this on, you must use `MM/DD/YYYY` for the date format. Set format to `mdy` and separator to `/`. || `false` || |
| 91 | || `weeknumbers`|| >= [7192] ||Show ISO8601 week number in calendar? || `false` || |
| 92 | || `panel`|| >= [7192] ||Show panel with a "Today" and "Done" buttons (at bottom)? || `false` || |
| 93 | || `change_month`|| >= [7192] ||Show a dropdown with month selection? || `false` || |
| 94 | || `change_year`|| >= [7192] ||Show a dropdown with year selection? || `false` || |
| 95 | || `match_request`|| >= [7192] ||Use datepicker on arbitrary request paths. Use text fields with class=datepick in your template, and configure the start of request path (in list format), like: ''match_request = /query,/other_path'' || `` || |
| 96 | || `months`|| >= [7192] ||Number of months visible in datepicker || `1` || |
| 97 | |
| 98 | There are many other options, but you need to modify the `datefield.html` template if you want to use them. See [http://docs.jquery.com/UI/Datepicker]. |
| 99 | |