PluginEmbedded
Version 3 (Dominic Clifton, 2010-05-14 14:26)
| 1 | 1 | Jean-Philippe Lang | h1. Embedded Plugin |
|---|---|---|---|
| 2 | 1 | Jean-Philippe Lang | |
| 3 | 1 | Jean-Philippe Lang | h2. Description |
| 4 | 1 | Jean-Philippe Lang | |
| 5 | 1 | Jean-Philippe Lang | This plugin lets you embed HTML files (eg. documentation, test reports...) in your projects. |
| 6 | 1 | Jean-Philippe Lang | |
| 7 | 1 | Jean-Philippe Lang | It has builtin templates to display the following files nicely: "Doxygen":http://www.doxygen.org and "Javadoc":http://java.sun.com/j2se/javadoc/ documentation and "Rcov":http://eigenclass.org/hiki.rb?rcov coverage reports. Any other HTML files can be displayed as well unless they contain HTML frames. |
| 8 | 1 | Jean-Philippe Lang | |
| 9 | 1 | Jean-Philippe Lang | It adds a new permission _View embedded doc_ and a new module _Embedded_ that can be enabled/disabled at project level. |
| 10 | 1 | Jean-Philippe Lang | |
| 11 | 2 | Jean-Philippe Lang | p=. !embedded_doxygen.png! !embedded_rcov.png! |
| 12 | 2 | Jean-Philippe Lang | |
| 13 | 1 | Jean-Philippe Lang | h2. Requirements |
| 14 | 1 | Jean-Philippe Lang | |
| 15 | 1 | Jean-Philippe Lang | This plugin requires Redmine r1659 or higher running Rails 2.1. Due to some changes in the plugin API, it *won't* work with 0.7.x releases. |
| 16 | 1 | Jean-Philippe Lang | |
| 17 | 1 | Jean-Philippe Lang | h2. Installation |
| 18 | 1 | Jean-Philippe Lang | |
| 19 | 1 | Jean-Philippe Lang | The plugin can be installed by running the following command from your redmine directory: |
| 20 | 1 | Jean-Philippe Lang | |
| 21 | 1 | Jean-Philippe Lang | <pre> |
| 22 | 1 | Jean-Philippe Lang | ruby script/plugin install http://redmine.rubyforge.org/svn/plugins/embedded |
| 23 | 1 | Jean-Philippe Lang | </pre> |
| 24 | 1 | Jean-Philippe Lang | |
| 25 | 1 | Jean-Philippe Lang | Then restart Redmine. |
| 26 | 1 | Jean-Philippe Lang | |
| 27 | 1 | Jean-Philippe Lang | h2. Configuration |
| 28 | 1 | Jean-Philippe Lang | |
| 29 | 3 | Dominic Clifton | 1. Go to _Administration -> Plugins -> Embedded -> Configure_ to configure the plugin: |
| 30 | 1 | Jean-Philippe Lang | |
| 31 | 1 | Jean-Philippe Lang | * *HTML directory*: enter the root directory where HTML files can be found for each project. You can use this tag: @{PROJECT}@ in the path to represent the project identifier. The application *need* to have *read access* on this path. |
| 32 | 1 | Jean-Philippe Lang | For example, this setting should be set to @/var/{PROJECT}/doxygen@ if you have a directory structure like below, where foo and bar are 2 projects: |
| 33 | 1 | Jean-Philippe Lang | |
| 34 | 1 | Jean-Philippe Lang | <pre> |
| 35 | 1 | Jean-Philippe Lang | -var |
| 36 | 1 | Jean-Philippe Lang | |-bar |
| 37 | 1 | Jean-Philippe Lang | | |-doxygen |
| 38 | 1 | Jean-Philippe Lang | | |-doc.html |
| 39 | 1 | Jean-Philippe Lang | | |-index.html |
| 40 | 1 | Jean-Philippe Lang | | |
| 41 | 1 | Jean-Philippe Lang | |-foo |
| 42 | 1 | Jean-Philippe Lang | |-doxygen |
| 43 | 1 | Jean-Philippe Lang | |-doc.html |
| 44 | 1 | Jean-Philippe Lang | |-index.html |
| 45 | 1 | Jean-Philippe Lang | |-subdirectory |
| 46 | 1 | Jean-Philippe Lang | |-index.html |
| 47 | 1 | Jean-Philippe Lang | |-misc.html |
| 48 | 1 | Jean-Philippe Lang | </pre> |
| 49 | 1 | Jean-Philippe Lang | |
| 50 | 1 | Jean-Philippe Lang | * *Index files*: a space separated list of file names that are displayed by default. |
| 51 | 1 | Jean-Philippe Lang | |
| 52 | 1 | Jean-Philippe Lang | * *Valid extension*: a space separated list of file extensions that can be displayed. Access to a file with a different extension will be denied. |
| 53 | 1 | Jean-Philippe Lang | |
| 54 | 1 | Jean-Philippe Lang | * *Default template*: Default template (stylesheet and javascript) that will be used when displaying a file. |
| 55 | 1 | Jean-Philippe Lang | If you have more than one kind of document (eg. Doxygen and Rdoc files), the template to use can be detected based on the file's path. For example, a file located in a path that contain @doxygen@ (as in the example above) will be automatically displayed with the Doxygen template. |
| 56 | 1 | Jean-Philippe Lang | |
| 57 | 1 | Jean-Philippe Lang | * *Encoding*: enter the files encoding if they're not UTF-8 encoded. Files are reencoded to UTF-8 to be properly displayed in Redmine. |
| 58 | 1 | Jean-Philippe Lang | |
| 59 | 1 | Jean-Philippe Lang | * *Tab caption*: text that is used for the navigation tab added to the project menu. |
| 60 | 1 | Jean-Philippe Lang | No navigation tab is added if this field is left blank. That way, you can link to the pages from your wiki. |
| 61 | 1 | Jean-Philippe Lang | |
| 62 | 1 | Jean-Philippe Lang | 2. Go to _Administration -> Roles and Permissions_ to give the new permission to your roles. |
| 63 | 1 | Jean-Philippe Lang | |
| 64 | 1 | Jean-Philippe Lang | 3. Enable the module in the project(s) settings. |
| 65 | 1 | Jean-Philippe Lang | |
| 66 | 1 | Jean-Philippe Lang | h3. Comments |
| 67 | 1 | Jean-Philippe Lang | |
| 68 | 1 | Jean-Philippe Lang | * If you enable the navigation tab, make sure that one of the index files you entered (eg. index.html) is present in the root directory of your project, otherwise clicking this tab will lead to a 404 error. |
| 69 | 1 | Jean-Philippe Lang | |
| 70 | 1 | Jean-Philippe Lang | * The URL pattern for accessing embedded pages is: @/embedded/:project/:path@ where @:project@ is the project identifier and @:path@ is the path of the embedded file relative to the HTML directory entered in the plugin settings. |
| 71 | 1 | Jean-Philippe Lang | Examples based on the above directory structure and _HTML directory_ set to @/var/{PROJECT}/doxygen@: |
| 72 | 1 | Jean-Philippe Lang | |
| 73 | 1 | Jean-Philippe Lang | <pre> |
| 74 | 1 | Jean-Philippe Lang | URL: |
| 75 | 1 | Jean-Philippe Lang | /embedded/foo => displays /var/foo/doxygen/index.html |
| 76 | 1 | Jean-Philippe Lang | /embedded/foo/index.html => same as above |
| 77 | 1 | Jean-Philippe Lang | /embedded/foo/subdirectory => displays /var/foo/doxygen/subdirectory/index.html |
| 78 | 1 | Jean-Philippe Lang | /embedded/foo/subdirectory/misc.html => displays /var/foo/doxygen/subdirectory/misc.html |
| 79 | 1 | Jean-Philippe Lang | </pre> |
| 80 | 1 | Jean-Philippe Lang | |
| 81 | 1 | Jean-Philippe Lang | * You can define new templates by adding stylesheets to the @/assets/stylesheets@ directory of the plugin. Needs application restart. |