PluginEmbedded » History » Version 2
Jean-Philippe Lang, 2008-07-16 20:00
screenshots added
1 | 1 | Jean-Philippe Lang | h1. Embedded Plugin |
---|---|---|---|
2 | |||
3 | h2. Description |
||
4 | |||
5 | This plugin lets you embed HTML files (eg. documentation, test reports...) in your projects. |
||
6 | |||
7 | 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 | |||
9 | It adds a new permission _View embedded doc_ and a new module _Embedded_ that can be enabled/disabled at project level. |
||
10 | |||
11 | 2 | Jean-Philippe Lang | p=. !embedded_doxygen.png! !embedded_rcov.png! |
12 | |||
13 | 1 | Jean-Philippe Lang | h2. Requirements |
14 | |||
15 | 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 | |||
17 | h2. Installation |
||
18 | |||
19 | The plugin can be installed by running the following command from your redmine directory: |
||
20 | |||
21 | <pre> |
||
22 | ruby script/plugin install http://redmine.rubyforge.org/svn/plugins/embedded |
||
23 | </pre> |
||
24 | |||
25 | Then restart Redmine. |
||
26 | |||
27 | h2. Configuration |
||
28 | |||
29 | 1. Go to _Administration -> Information_ to configure the plugin: |
||
30 | |||
31 | * *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 | 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 | |||
34 | <pre> |
||
35 | -var |
||
36 | |-bar |
||
37 | | |-doxygen |
||
38 | | |-doc.html |
||
39 | | |-index.html |
||
40 | | |
||
41 | |-foo |
||
42 | |-doxygen |
||
43 | |-doc.html |
||
44 | |-index.html |
||
45 | |-subdirectory |
||
46 | |-index.html |
||
47 | |-misc.html |
||
48 | </pre> |
||
49 | |||
50 | * *Index files*: a space separated list of file names that are displayed by default. |
||
51 | |||
52 | * *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 | |||
54 | * *Default template*: Default template (stylesheet and javascript) that will be used when displaying a file. |
||
55 | 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 | |||
57 | * *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 | |||
59 | * *Tab caption*: text that is used for the navigation tab added to the project menu. |
||
60 | No navigation tab is added if this field is left blank. That way, you can link to the pages from your wiki. |
||
61 | |||
62 | 2. Go to _Administration -> Roles and Permissions_ to give the new permission to your roles. |
||
63 | |||
64 | 3. Enable the module in the project(s) settings. |
||
65 | |||
66 | h3. Comments |
||
67 | |||
68 | * 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 | |||
70 | * 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 | Examples based on the above directory structure and _HTML directory_ set to @/var/{PROJECT}/doxygen@: |
||
72 | |||
73 | <pre> |
||
74 | URL: |
||
75 | /embedded/foo => displays /var/foo/doxygen/index.html |
||
76 | /embedded/foo/index.html => same as above |
||
77 | /embedded/foo/subdirectory => displays /var/foo/doxygen/subdirectory/index.html |
||
78 | /embedded/foo/subdirectory/misc.html => displays /var/foo/doxygen/subdirectory/misc.html |
||
79 | </pre> |
||
80 | |||
81 | * You can define new templates by adding stylesheets to the @/assets/stylesheets@ directory of the plugin. Needs application restart. |