Per-project sidebar content plugin¶
The Sidebar Content plugin adds user-defined content to the project sidebar. This content can be defined by project members having appropriate permissions (called “Manage sidebar”) and only for a particular project.
The plugin was written as an alternative to ezSidebar plugin. The last allows to define content for all pages and projects.
Using¶
By default the project sidebar content is disabled. To enable it go to Project → Settings → Sidebar tab and select one of the content types (to do this you must have “Manage sidebar” permission):
Content types¶
As seen on the screenshot the Sidebar content plugin supports three types of content:
Text¶
Textile (default) content. Textile is widely used1 in Redmine/ChiliProject:
Wiki page¶
The name of Wiki page:
The plugin will insert the content of the specified Wiki page into the sidebar.
HTML code¶
Raw HTML code:
Pages and URLs¶
After the content is defined you can shoose the location, where the content is to be shown.
As seen on the screenshot the content can be shown on:- Project “Overview” page;
- Issues pages (issues list and issue pages);
- User-defined URLs.
When user-defined URLs are selected you can optionally specify URL regular expression, which will be used to determine if the content should be shown for the URL. If the regular expression is not specified, the content will be shown for all project pages (for which the sidebar is shown) no matter whether “For URL” or “Not for URL” is selected.
Sample regular expressions¶
Check these samples of regular expressions:^/projects/redmine-sidebar(\?.*)?$
- show only on the “Overview” page^/issues/[0-9]+$
- show on issue pages^.+/wiki/.+$
- show on Wiki pages
Visibility configuration¶
Redmine has some pages, where you would like to put the content on the sidebar but which do not have the latter?.. Therefore, since 0.1.0 the plugin comes with the possibility to enable the sidebar for pages, which do not have it by default.
Global¶
Adding the sidebar to pages is an important decision, therefore, this should be first configured in the Administration. The Sidebar Content plugin adds the new administration section “Sidebar”:
When clicked, this section opens the form:
This form lists project pages, which do not come with the sidebar be default (of course, this can be changed by another plugin). But selecting these pages here does not mean enabling the sidebar! In fact, what does selection mean is controlled by the “Per-project configuration policy”:
Let’s review each policy:
- Global only
Sidebar visibility configuration can be done only globally, i.e., in Administration → Sidebar and for all projects. - Can be disabled
Only globally selected pages can be configured at the project level. The sidebar for these pages will be enabled by default. - Configurable if enabled globally (disabled by default)
Global settings in Administration → Sidebar actually specify, sidebar visibility for which pages can be controlled at the project level. That is, by default, the sidebar won’t be enabled for any page selected globally and pages not selected globally won’t be configurable at the project level. - Per-project only
Full control over the sidebar visibility is given to project managers.
Per-project¶
For all cases except “Global only” the sidebar visibility configuration is possible at the project level. In this case below the sidebar form you should see the “Sidebar visibility” link (see screenshots above). Clicking on this link opens the form:
Install¶
To install the plugin do:
- For Redmine 2.0.x and above:
- Copy
sidebar
directory to#{RAILS_ROOT}/plugins
. - Run:
rake redmine:plugins:migrate RAILS_ENV=production
.
- Copy
- For ChiliProject and Redmine 1.4.x and below:
- Copy
sidebar
directory to#{RAILS_ROOT}/vendor/plugins
. - Run:
rake db:migrate:plugins RAILS_ENV=production
.
- Copy
- Restart Redmine/ChiliProject.
- Grant “Manage sidebar” permission to appropriate roles.
1 this is the default type of all Redmine/ChiliProject pages, including Wiki