Project

General

Profile

Redmine Banner Plugin

Added by Akiko Takano almost 13 years 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/redmine_banner.

There is a sample screenshot:

Screenshot for banner message.

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 (67.4 KB) banner-sample.png Screenshot for banner message.

Replies (28)

RE: Redmine Banner Plugin - Added by Steven Wong almost 13 years ago

Nice Job.
Thanks . I will try it later.

Redmine Banner Plugin -> 0.0.3 - Added by Akiko Takano almost 13 years 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 almost 13 years 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 over 12 years 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 over 12 years 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 over 12 years 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.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...

+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 over 12 years 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 over 12 years 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 over 12 years 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 over 12 years 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 over 12 years 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 over 12 years 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 over 12 years 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 over 12 years 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

RE: Redmine Banner Plugin - Added by Elite Moly over 12 years ago

I want one banner at login page for not authenticated users
and one banner for authenticated users.

Redmine Banner Plugin for Redmine 2.0.x. - Added by Akiko Takano over 12 years ago

Banner plugin is now version 0.0.7, compatible with Redmine 2.0.x.
(Sorry that no feature is added and porting works only.)

For Redmine 1.3 and 1.4, please use this code:

RE: Redmine Banner Plugin - Added by Akiko Takano about 12 years ago

Hello.

Banner plugin is now version 0.0.8, which supports Redmine 2.1.x.
(Sorry that no feature is added and porting works only....)

For Redmine 1.3 and 1.4, please use this code:

https://github.com/akiko-pusu/redmine_banner/tree/0.0.6
https://github.com/akiko-pusu/redmine_banner/zipball/0.0.6

Banner Plugin 0.0.9 released. - Added by Akiko Takano over 11 years ago

Hello.

Banner plugin is now version 0.0.9, some display options added.
Any suggestions and translations are appreciated.

RE: Redmine Banner Plugin - Added by Akiko Takano over 11 years ago

Hello.
I just released 0.0.9.

This version has someoptions to display global banner, such as:

  • Enabled to show only for authenticated users.
  • Authenticated user can tuen off banner in their sessions (with using cookie).
    • But if admin update global banner message, the new message will be shown.
  • Add an option to display login page only. (This is only affected for non authenticated users.)

Does this version meet your request?

I hope this plugin to be helpful for Administrators and Operators of Redmine.
Any suggestion would be appreciated!

Akiko Takano wrote:

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.)

Released 0.1.0 - Added by Akiko Takano over 10 years ago

Hello, everyone.

Banner plugin is now version 0.1.0.

Bug fix of timer function and add more link feature.

Also I've changed identifier of this plugin on Redmine Plugin Directory.

RE: Redmine Banner Plugin - Added by Y Z almost 10 years ago

Indeed, it's an amazing light extension for redmine and certainly it can become much better if there would be an option to keep at least 3 messages (keeping a frequently used messages) and activate one of them to show on demand . Would appreciate to see that feature and soonest update.

RE: Redmine Banner Plugin - Added by Akiko Takano almost 10 years ago

Hi, Yura. Thanks for your feedback.
This feature would be nice.

Do you hope to implement above option both global banner and project banner?

Banner plugin Released 0.1.1 - Added by Akiko Takano over 9 years ago

Hello, everyone.

Banner plugin is now version 0.1.1, support for Redmine 3.0.

I'm sorry but I do hope to implement the feature for keeping a frequently used messages next release.
Any suggestions and translations are appreciated.

Banner Plugin v0.1.2 - Added by Akiko Takano over 8 years ago

Hello, everyone.

Banner plugin is now version 0.1.2, support for Redmine 3.3.
There is a little update that global banner is displayed correctly when responsive view.
Any suggestions and translations are appreciated!

(1-25/28)