Feature #2840
closed
Allow My Page blocks to be added to from a plugin
Added by Eric Davis over 15 years ago.
Updated almost 15 years ago.
Description
It would be great if a plugin could add a new My Page block. Right now the blocks are frozen constants. Maybe they could be refactored into a Database backed Model?
Files
I'm definitely on board with this one. I'm finding that few people in my Redmine instance are using My page. If it could be augmented via plugins to suit their needs, that'd be sweet. :)
- Category set to Plugin API
- Status changed from New to Resolved
- Target version set to 0.9.0
- Resolution set to Fixed
Feature added in r2529. Let me know what you think.
Mm. I like. Ran into one issue though. I wrote a plugin that requires custom CSS.
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'schedules', :plugin => 'redmine_schedules' %>
<% end %>
This code is fine when the page loads and the widget is there, but the CSS isn't included when the widget has been just added (before you hit save). I've attached a patch that would allow style and script additions to the page.
Does this work for you?
Also, there seems to be an issue with this implementation. I can't place any custom my page blocks in either the left or right content containers. If I do and hit save, it just appears in the top container.
- Status changed from Resolved to Closed
Brad Beattie wrote:
This code is fine when the page loads and the widget is there, but the CSS isn't included when the widget has been just added (before you hit save). I've attached a patch that would allow style and script additions to the page.
Shouldn't you patch app/views/my/page_layout.rhtml
instead of page.rhtml
?
Also, there seems to be an issue with this implementation. I can't place any custom my page blocks in either the left or right content containers. If I do and hit save, it just appears in the top container.
I'm able to move custom blocks to the right or left after they have been added.
I'm closing this ticket since the feature is added.
Please open a new ticket if I missed anything.
Also available in: Atom
PDF