Project

General

Profile

PluginEmbedded » History » Version 1

Jean-Philippe Lang, 2008-07-16 19:55

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
h2. Requirements
12
13
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.
14
15
h2. Installation
16
17
The plugin can be installed by running the following command from your redmine directory:
18
19
<pre>
20
ruby script/plugin install http://redmine.rubyforge.org/svn/plugins/embedded
21
</pre>
22
23
Then restart Redmine.
24
25
h2. Configuration
26
27
1. Go to _Administration -> Information_ to configure the plugin:
28
29
* *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.
30
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:
31
32
<pre>
33
-var
34
 |-bar
35
 | |-doxygen
36
 |  |-doc.html
37
 |  |-index.html
38
 |   
39
 |-foo
40
   |-doxygen
41
     |-doc.html
42
     |-index.html
43
     |-subdirectory
44
       |-index.html
45
       |-misc.html
46
</pre>
47
48
* *Index files*: a space separated list of file names that are displayed by default.
49
50
* *Valid extension*: a space separated list of file extensions that can be displayed. Access to a file with a different extension will be denied.
51
52
* *Default template*: Default template (stylesheet and javascript) that will be used when displaying a file.
53
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.
54
55
* *Encoding*: enter the files encoding if they're not UTF-8 encoded. Files are reencoded to UTF-8 to be properly displayed in Redmine.
56
57
* *Tab caption*: text that is used for the navigation tab added to the project menu.
58
No navigation tab is added if this field is left blank. That way, you can link to the pages from your wiki.
59
60
2. Go to _Administration -> Roles and Permissions_ to give the new permission to your roles.
61
62
3. Enable the module in the project(s) settings.
63
64
h3. Comments
65
66
* 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.
67
68
* 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.
69
Examples based on the above directory structure and _HTML directory_ set to @/var/{PROJECT}/doxygen@:
70
71
<pre>
72
URL:
73
/embedded/foo                           => displays /var/foo/doxygen/index.html
74
/embedded/foo/index.html                => same as above
75
/embedded/foo/subdirectory              => displays /var/foo/doxygen/subdirectory/index.html
76
/embedded/foo/subdirectory/misc.html    => displays /var/foo/doxygen/subdirectory/misc.html
77
</pre>
78
79
* You can define new templates by adding stylesheets to the @/assets/stylesheets@ directory of the plugin. Needs application restart.