Redmine Banner Plugin
Added by Akiko Takano 4 months ago
Hello,
I've written a little plugin to show the message from administrator site-widely in Redmine.
I've added an entry in the plugin list with the usual information: http://www.redmine.org/plugins/banner.
There is a sample screenshot:
I made this because I personally feel the news or welcome message are not noticeable.
I hope it would be useful for someone, especially site administrator.
Please not that its my first plugin and I'm really not a skilled developper....
Feedbacks are greatly appreciated!
banner-sample.png - Screenshot for banner message. (67.4 kB)
Replies (14)
RE: Redmine Banner Plugin - Added by Steven Wong 4 months ago
Nice Job.
Thanks . I will try it later.
Redmine Banner Plugin -> 0.0.3 - Added by Akiko Takano 3 months ago
Hello, I've just released version 0.0.3.
Please update to 0.0.3 if someone using previous version.
And I'm planning to support timer function next release.
Feedbacks, reviews are greatly appreciated!
RE: Redmine Banner Plugin - Added by Akiko Takano 3 months ago
I updated Banner Plugin to version 0.0.4.
Additional functions:- Timer support.
- Quick links to turn off / edit banner message.
Since it's being modified and feedback highly appreciated.
Next planning: Compact mode or each person enabled to hide message, and support banner message for each project if I could.
RE: Redmine Banner Plugin - Added by Nabil Faouzi 2 months ago
Good jobs, very useful feature.
But it is possible to show this banner ONLY at the login page?
Thanks.
RE: Redmine Banner Plugin - Added by Akiko Takano 2 months ago
Hello.
But it is possible to show this banner ONLY at the login page?
Sorry now we can't chose the page to show or hide banner. (Show site widely or hide completely.)
But I, as administrator, like your suggestion :)
This is just workaround to show banner ONLY at the login page. Please try if you could.
----------------
lib/banner_application_hooks.rb
private
def evaluate_if_option(if_option, context)
+ if (context[:controller].class.name != 'AccountController' and
+ context[:controller].action_name != 'login')
+ return false
+ end
case if_option
when Symbol
send(if_option, context)
----------------
How about?
I'll try to be able to select the place where to show banner, in a future release...
RE: Redmine Banner Plugin - Added by Terence Mill about 1 month ago
Akiko Takano wrote:
Hello.
But it is possible to show this banner ONLY at the login page?
Sorry now we can't chose the page to show or hide banner. (Show site widely or hide completely.)
But I, as administrator, like your suggestion :)This is just workaround to show banner ONLY at the login page. Please try if you could.
----------------
lib/banner_application_hooks.rbprivate
def evaluate_if_option(if_option, context)
+ if (context[:controller].class.name != 'AccountController' and
+ context[:controller].action_name != 'login')
+ return false
+ end
case if_option
when Symbol
send(if_option, context)----------------
How about?I'll try to be able to select the place where to show banner, in a future release...
+1 for new place "login page"
and +1 to show only one time after every login on any (first) page showed!
RE: Redmine Banner Plugin - Added by Nabil Faouzi about 1 month ago
This is just workaround to show banner ONLY at the login page. Please try if you could.
+1 Thank you for the code, It's work like i want :p
RE: Redmine Banner Plugin - Added by Akiko Takano about 1 month ago
Hello.
I've released Banner plugin 0.0.5. So this version supports project scope banner that migration is required.
Though there are some restrictions on project banner, project manager can customize where page to show banner.
Please see README.rdoc for more details.

RE: Redmine Banner Plugin - Added by Akiko Takano about 1 month ago
Banner plugin is now version 0.0.6.
Sorry this is bug fix release...
- Defect: Project banner should be off when module turned disabled.
- Defect: In some situation, "ActionView::TemplateError undefined method is_action_to_display" is happened.
Please update your plugin if possible.
RE: Redmine Banner Plugin - Added by Alex A about 1 month ago
Can you add option to enable/disable showing of a global banner on login page?
When user isn't logged on, the banner is not visible.
RE: Redmine Banner Plugin - Added by Akiko Takano about 1 month ago
Hello.
It's not difficult to show banner authenticated user only.
Alex A wrote:
Can you add option to enable/disable showing of a global banner on login page?
When user isn't logged on, the banner is not visible.
Then, let me confirm your proposal.
Which is the feature that you hope to? If I have some misunderstanding, please give me little more information about your request.
1. Global banner should be displayed against authenticated user only.
And global banner is shown not only login page but also other pages.
2. Global banner should be displayed against authenticated user only.
And global banner is shown just after logged in.
On the other pages except login page, global banner is not visible.
RE: Redmine Banner Plugin - Added by Alex A about 1 month ago
Global banner should be displayed after user logged in.
And global banner is not shown on login page, is shown on all other pages.
This option must be customizable.
RE: Redmine Banner Plugin - Added by Akiko Takano about 1 month ago
Alex, thank you for your more information.
So, I received two requests for global banner.
1. Global banner is visible only at the login page. (And just after logged in)
2. Global banner is visible whole the pages except login page.
(And administrator can change and customize above two types.)
Since I made this plugin for administrators, including me, I hope to implement above feature If someone has a good reason for that.
But I'm sorry following request is quite difficult for me. Please give me some time or help me x-(
show only one time after every login on any (first) page showed
RE: Redmine Banner Plugin - Added by Alex A about 1 month ago
For me, I patched banner_application_hooks.rb as
def should_display_header?(context)
# When Disabled, false.
return false if !User.current.logged? && Setting.login_required?
return false unless Setting.plugin_redmine_banner['enable'] == "true"
return false if Setting.plugin_redmine_banner['display_part'] == "footer"
return is_pass_timer?(context)
end
def should_display_footer?(context)
# When Disabled, false.
return false if !User.current.logged? && Setting.login_required?
return false unless Setting.plugin_redmine_banner['enable'] == "true"
return false if Setting.plugin_redmine_banner['display_part'] == "header"
return is_pass_timer?(context)
end
(1-14/14)