|
| 1 | +# Snippets plugin for MantisBT |
| 2 | + |
| 3 | +Copyright (c) 2010 - 2012 John Reese - http://noswap.com |
| 4 | +Copyright (c) 2012 - 2014 MantisBT Team - [email protected] |
| 5 | + |
| 6 | +Released under the [MIT license](http://opensource.org/licenses/MIT) |
| 7 | + |
| 8 | + |
| 9 | +## Description |
| 10 | + |
| 11 | +Define snippets of text that can be easily pasted into text fields |
| 12 | + |
| 13 | + |
| 14 | +## Requirements |
| 15 | + |
| 16 | +The plugin requires [Mantis](http://www.mantisbt.org/) version 1.2.0 or higher |
| 17 | +and jQuery version 1.6 or later. |
| 18 | + |
| 19 | +Install the [jQuery plugin](https://github.com/mantisbt-plugins/jquery) |
| 20 | +before proceeding with the steps below. |
| 21 | + |
| 22 | + |
| 23 | +## Installation |
| 24 | + |
| 25 | +1. Download or clone a copy of the [plugin's code](https://github.com/mantisbt-plugins/snippets). |
| 26 | +2. Copy the plugin (the `Snippets/` directory) into your Mantis |
| 27 | + installation's `plugins/` directory. |
| 28 | +3. While logged into your Mantis installation as an administrator, go to |
| 29 | + *Manage -> Manage Plugins*. |
| 30 | +4. In the *Available Plugins* list, you'll find the *Snippets* plugin; |
| 31 | + click the **Install** link. |
| 32 | +5. In the *Installed Plugins* list, click on the **Snippets** plugin to configure it. |
| 33 | + |
| 34 | + |
| 35 | +## Usage |
| 36 | + |
| 37 | +### Managing Snippets |
| 38 | + |
| 39 | +- Global snippets can be managed from *Manage -> Manage Plugins*. |
| 40 | +- User-specific snippets can be managed from *My Account -> My Snippets*. |
| 41 | + |
| 42 | +The following placeholders are supported in the Snippet's text; they will be |
| 43 | +replaced by the corresponding contents when inserted: |
| 44 | + |
| 45 | + Placeholder | Description |
| 46 | +:-----------:|------------------------- |
| 47 | +%u | your username |
| 48 | +%r | the bug reporter's name |
| 49 | +%h | the bug handler's name |
| 50 | +%p | the project name |
| 51 | + |
| 52 | + |
| 53 | +### Using Snippets |
| 54 | + |
| 55 | +Each configured text field will have a selection list above it, which can be |
| 56 | +used to pick the desired Snippet. |
| 57 | + |
| 58 | +Once selection is made, the Snippet's text will be inserted in the field at the |
| 59 | +current position. If text is currently selected, the Snippet will replace the |
| 60 | +selection. |
| 61 | + |
| 62 | +Note that currently only the *Bug Note* field is configured to use Snippets. |
| 63 | +Other text fields (*Description*, *Steps To Reproduce* as well as *Additional |
| 64 | +Information*) can be setup to use Snippets with minimal configuration effort |
| 65 | +(see [this example](https://github.com/mantisbt-plugins/snippets/issues/3)). |
| 66 | + |
| 67 | + |
| 68 | +## Support |
| 69 | + |
| 70 | +Problems or questions dealing with use and installation should be |
| 71 | +directed to the [#mantisbt](irc://freenode.net/mantisbt) IRC channel |
| 72 | +on Freenode. |
| 73 | + |
| 74 | +The latest source code can found on |
| 75 | +[Github](https://github.com/mantisbt-plugins/snippets). |
| 76 | + |
| 77 | +We encourage you to submit Bug reports and enhancements requests on the |
| 78 | +[Github issues tracker](https://github.com/mantisbt-plugins/snippets/issues). |
| 79 | +If you would like to propose a patch, do not hesitate to submit a new |
| 80 | +[Pull Request](https://github.com/mantisbt-plugins/snippets/compare/). |
0 commit comments