Changes between Version 16 and Version 17 of TicketNavPlugin
- Timestamp:
- Jun 8, 2015, 2:05:41 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TicketNavPlugin
v16 v17 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = Some miscellaneous functions to ticket view (CKEditor, navigation table, descriptions, sorting versions, etc.) =3 = Miscellaneous functions to ticket view: CKEditor, navigation table, descriptions, sorting versions 4 4 5 == Description ==5 == Description 6 6 7 === Component `TextAreaDescription` ===8 Shows next to a text area (like description itself or any custom description) 9 an description for what the field is for.7 === Component `TextAreaDescription` 8 9 Shows next to a text area (like description itself or any custom description) an description for what the field is for. 10 10 11 11 Default values for options: 12 {{{ 12 {{{#!ini 13 13 [ticket] 14 14 description_descr = … … 18 18 See [/attachment/wiki/TicketNavPlugin/TextAreaDescription.png Screenshot]. 19 19 20 21 === Component `CssTemplate` === 20 === Component `CssTemplate` 22 21 23 22 Add links to style sheets located in templates folder. 24 23 25 [http://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS] files 26 started with `"all_templates"` are added for all Trac sites. 27 CSS files starting with template name (without `.html`-suffix) 28 are added for specific template. 24 [http://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS] files started with `"all_templates"` are added for all Trac sites. 25 CSS files starting with template name (without `.html`-suffix) are added for specific template. 29 26 30 27 To apply changes you need to restart the server. … … 36 33 For discussion in Trac about this topic, see [http://trac.edgewall.org/ticket/9683 Trac ticket #9683]. 37 34 38 === Component `CustomizedTicketView` ===35 === Component `CustomizedTicketView` 39 36 40 37 Small changes of ticket view. … … 48 45 See [/attachment/wiki/TicketNavPlugin/CustomizedTicketView.png Screenshot]. 49 46 47 === Component `SortMilestoneVersion` 50 48 51 === Component `SortMilestoneVersion` === 52 Sorts drop-down lists of version and milestone regardless of the case and 53 make milestone a must field, when a default milestone is set. 49 Sorts drop-down lists of version and milestone regardless of the case and make milestone a must field, when a default milestone is set. 54 50 55 51 Default behavior of Trac for sorting milestones is: … … 63 59 }}} 64 60 65 66 === Component `TicketNavigation` === 61 === Component `TicketNavigation` 67 62 68 63 Implements an extra Navigation menu by dividing the main ticket information in an several div areas an providing a "jump-to" to the anker with are represented in the navigation box. 69 64 70 71 === ~~Component~~ `HtmlContent` (old) === 72 73 '''Deprecated - use CkEditorPlugin instead! ''' 74 '''See also''' CkEditorPlugin-Tickets #8586 for discussion of implementation. 75 The scope of CkEditorPlugin is changing output of CKEditor to trac wiki syntax, which would be better tha saving in HTML (as this Component is doing). 76 77 Enables HTML content in description, adding Javascript editor and 78 adding additional CSS file for manipulation CSS declarations. 79 80 Options: 81 || '''option name''' || '''values''' || '''description''' || 82 || description_format || `wiki` | `html` || format for ticket description (default: '''wiki''') || 83 || editor_source || valid path || Usually it should stored in project or common js folder. For ckeditor for example it could be site/js/ckeditor/ckeditor.js. || 84 || editor_replace || valid path || Javascript, which should replace textareas. || 85 || additional_css || valid path || Path to additional css file, which overrides css-declarations. || 86 87 Sample configuration: 88 {{{ 89 [ticket] 90 description_format = html 91 editor_source = site/js/ckeditor/ckeditor.js 92 editor_replace = <script type="text/javascript">CKEDITOR.replace('@FIELD_NAME@', {toolbar: 'custom'});</script> 93 additional_css = site/css/add_ticket.css 94 }}} 95 96 In above sample configuration [http://ckeditor.com/ CKEditor] is used as online editor and 97 the editor source is located in projects-folder `htdocs/js/ckeditor`, 98 after each `textarea` with HTML-Option content of `editor_replace` will be added. 99 The file in option `additional_css` will be added and therefore will override these declarations. 100 101 '''Attention:''' To have a correct preview, file `ticket_box.html` has to be edited: 102 {{{ 103 1 <py:if test="field"> 104 2 <py:choose test=""> 105 3 <py:when test="ticket[field.name] and field.format == 'html'">${wiki_to_html(context, '{{{ \n#!html \n' + ticket[field.name] + '\n}}}', escape_newlines=preserve_newlines)}</py:when> 106 4 <py:when test="'rendered' in field">${field.rendered}</py:when> 107 5 <py:otherwise>${ticket[field.name]}</py:otherwise> 108 6 </py:choose> 109 7 </py:if> 110 }}} 111 112 Line 3 has to be inserted into `py:choose` block in above template-snippet. 113 114 {{{ 115 <div py:if="ticket.description" class="searchable" xml:space="preserve"> 116 <py:choose> 117 <py:when test="description_format == 'html'">${wiki_to_html(context, '{{{ \n#!html \n' + ticket.description + '\n}}}', escape_newlines=preserve_newlines)}</py:when> 118 <py:otherwise>${wiki_to_html(context, ticket.description, escape_newlines=preserve_newlines)}</py:otherwise> 119 </py:choose> 120 </div> 121 }}} 122 123 Also `py:choose` block has to be added into div-block near the end of file (see above template-snippet). 124 125 126 === ~~Component~~ `DisplayDate` (old) === 127 128 '''This Component is removed in version 0.5, since it is fixed in Trac itself with revision 10629''' 129 (see Trac-Ticket [http://trac.edgewall.org/ticket/9777 #9777]). 130 131 132 === Screenshots === 65 == Screenshots 133 66 134 67 [[Image(TextAreaDescription.png)]] … … 152 85 ''Screenshot of `SortMilestoneVersion` -- versions are sorted in alphabetical order instead of their due / completion date'' 153 86 154 155 == Bugs/Feature Requests == 87 == Bugs/Feature Requests 156 88 157 89 Existing bugs and feature requests for TicketNavPlugin are … … 159 91 160 92 If you have any issues, create a 161 [ http://trac-hacks.org/newticket?component=TicketNavPlugin&owner=framaynew ticket].93 [/newticket?component=TicketNavPlugin new ticket]. 162 94 163 == Download == 95 [[TicketQuery(component=TicketNavPlugin&group=type,format=progress)]] 96 97 == Download 164 98 165 99 Download the zipped source from [download:ticketnavplugin here]. … … 167 101 Or download the pre-compiled [raw-attachment:TicketDisplay-0.4.0-py2.6.egg python egg]. 168 102 169 == Source ==103 == Source 170 104 171 105 You can check out TicketNavPlugin from [http://trac-hacks.org/svn/ticketnavplugin here] using Subversion, or [source:ticketnavplugin browse the source] with Trac. 172 106 173 == Example ==107 == Example 174 108 175 === Sample configuration of `TextAreaDescription` ===109 === Sample configuration of `TextAreaDescription` 176 110 177 111 {{{ … … 180 114 }}} 181 115 182 === Sample configuration of `HtmlContent` ===116 === Sample configuration of `HtmlContent` 183 117 184 {{{ 118 {{{#!ini 185 119 [ticket] 186 120 description_format = html … … 190 124 }}} 191 125 192 == Recent Changes ==126 == Recent Changes 193 127 194 128 [[ChangeLog(ticketnavplugin, 3)]] 195 129 196 == Author/Contributors ==130 == Author/Contributors 197 131 198 132 '''Author:''' [wiki:framay] [[BR]] 199 '''Maintainer:''' [ wiki:framay] [[BR]]133 '''Maintainer:''' [[Maintainer]] [[BR]] 200 134 '''Contributors:'''