GithubHelp home page GithubHelp logo

akiko-pusu / redmine_banner Goto Github PK

View Code? Open in Web Editor NEW
98.0 18.0 54.0 498 KB

Maintenance Repository - https://github.com/agileware-jp/redmine_banner

License: GNU General Public License v2.0

Ruby 70.01% HTML 17.90% JavaScript 2.06% CSS 5.37% Shell 1.26% Dockerfile 3.41%
oss redmine-plugin

redmine_banner's Introduction

Redmine Banner Plugin

Plugin to show site-wide message from site administrator, such as maintenance information or notifications.

Plugin info at redmine.org CircleCI Sider

Plugin installation

  1. Copy the plugin directory into the $REDMINE_ROOT/plugins directory. Please note that plugin's folder name should be "redmine_banner". If changed, some migration task will be failed.

  2. Do migration task.

    e.g. rake redmine:plugins:migrate RAILS_ENV=production

  3. (Re)Start Redmine.

Uninstall

Try this:

  • rake redmine:plugins:migrate NAME=redmine_banner VERSION=0 RAILS_ENV=production

Usage for site wide banner

  1. Go to plugin's page and click "Settings" link of Redmine Banner Plugin. You can edit banner message and select style for message. Also you can access setting page from administration menu, click "banner" icon.

Usage for project scope banner

  1. Banner can be used as project module. If you want to manage the banner for your project, "Manage Banner" permission is required to your role.

  2. Go to project settings tab and check "Banner" as project module.

  3. Then you can see "Banner" tab on project settings page.

Current limitations

  1. Banner for each project does not support timer.
  2. Banner for each project is located at the top of the project only. (Not support footer)

Note

Please use ver 0.1.x or v0.1.x-support-Redmine3 branch in case using Redmine3.x.

Changelog

0.3.4

Maintenance release.

  • Update German translation. (GutHub: #142 by @teatower)

0.3.3

This is bugfix release against 0.3.2. Updating to 0.3.3 is highly recommended!

  • Bugfix: HTML problems on redmine_banner.
  • Bugfix: Fix wrong url to project banner setting. *Refactor: Remove unused file.

0.3.2

This is bugfix release against 0.3.1. Updating to 0.3.2 is highly recommended!

  • Bugfix: HTML problems on redmine_banner 0.3.1. (#134)
  • Bugfix: Global banner off does not work correctly. (Degrade from v0.2x)
  • Update Chinese translation. (GutHub: #131 by iWangJiaxiang)

0.3.1

  • Feature: Enabled to switch who can see the global banner. (#126)
  • Refactor: Change to use project menu to prevent the project setting tab's conflict. (#127)

0.3.1

  • Feature: Enabled to switch who can see the global banner. (#126)
  • Refactor: Change to use project menu to prevent the project setting tab's conflict. (#127)

0.3.0

  • Add feature: Give the ability to specific users to manage the site-wide banner. (GitHub: #86 / #113)
    • Administrator can assign a group to manage global banner via UI.
  • Code refactoring for maintainability.
  • Change not to use SettingsController's patch to the update global banner.

0.2.2

This is bugfix release against 0.2.1. Updating to 0.2.2 is highly recommended!

  • Fix: Prevent conflict with other plugins. (GitHub: #121)
  • French translation update by sparunakian (GitHub: #117)

0.2.1

  • Fix: Prevent conflict with CKEditor. (GitHub: #111)
  • Code refactoring.
  • Add feature to update Global Banner via API. (Alpha / Related: #86 #113)
    • Not only Redmine admin but also user who assigned group named GlobalBanner_Admin can also update Global banner via API.
    • Even prptotype version.
    • Please see swagger.yml to try update global banner via API.
  • Update CI Setting
    • Add step to build and push image to AWS ECR.
    • Add steps to build and deploy to Heroku Container registry as release container service.
  • Add how to try banner via Docker in README.

0.2.0

NOTE: Mainly, maintenance, bugfix and refactoring only. There is no additional feature, translation in this release.

0.1.2

  • Fix style and css selector. (Github: #45)
  • Change global banner style for responsive mode. (Github: #68)
  • Code refactoring.
  • Fix: Prevent deprecation warning. (Github PR: #60) Thanks, Wojciech.
  • Refactor: Rename file to prevent conflict (Github #63 / r-labs: 54).
  • i18n: Update Italian translation file. (Github: #61 / r-labs: 57) Thanks, R-i-c-k-y.
  • i18n: Add Spanish translation file. (Github: #61 / r-labs: 52) Thanks Picazamora!
  • i18n: Update Turkish translation file. (Github: #64) Thank you so much, Adnan.
  • i18n: Update Portuguese translation file. (Github: #50) Thanks, Guilherme.

0.1.1

  • Support Redmine 3.x.
  • Update some translation files. Bulgarian, German. Thank you so much, Ivan Cenov, Daniel Felix.
  • Change column type of banner_description from string to text.Thank you so much Namezero. (#44)

0.1.0

  • Fixed bug: Global banner timer does not work. (r-labs: #1337)
  • Feature: Add related link field for more information to Global Banner. (r-labs: #1339)
  • i18n: Update Korean translation file. (r-labs: #1329) Thank you so much, Ki Won Kim.

0.0.9

  • Authenticated users can turn off global banner in their session.
  • Add option to show global banner only for authenticated users.
  • Add option to show only at the login page.
  • Code refactoring.
  • Italian translation was contributed by @R-i-c-k-y.
  • French translation was contributed by Laurent HADJADJ.

0.0.8

  • Support Redmine 2.1. (Redmine 2.0.x is no longer supported. Please use version 0.0.7 for Redmine 2.0.x)

0.0.7

  • Compatible with Redmine 2.0.0

0.0.6

  • Fixed bug: Project banner should be off when module turned disabled.
  • Fixed bug: In some situation, "ActionView::TemplateError undefined method is_action_to_display" is happened.
  • Update Russian Translation. Thank you so much, Александр Ананьев.

0.0.5

  • Support banner for each project. Thank you so much, Denny Schäfer, Haru Iida.

0.0.4

  • Support timer function.
  • Add links to turn off or modify banner message quickly. (Links are shown to Administrator only)

0.0.3

  • Code refactoring. Stop to override base.rhtml and use javascript. Great thanks, Haru Iida-san. Also, remove some "To-Do" section of README.

  • Add translations. Russian, German, Brazilian Portugues. Thank you so much, Александр Ананьев, Denny Schäfer, Maiko de Andrade!

0.0.2

  • Support i18n.

0.0.1

  • First release

Quick try with using Docker

You can try quickly this plugin with Docker environment. Please try:

# Admin password is 'redmine_banner_commit_sha'
% git clone https://github.com/akiko-pusu/redmine_banner
% cd redmine_banner
% docker-compose up web -d

# or
#
# Admin password is 'redmine_banner_{COMMIT}'
% docker build --build-arg=COMMIT=$(git rev-parse --short HEAD) \
  --build-arg=BRANCH=$(git name-rev --name-only HEAD) -t akiko/redmine_banner:latest .

% docker run -p 3000:3000 akiko/redmine_banner:latest

Run test

Please see wercker.yml for more details.

% cd REDMINE_ROOT_DIR
% cp plugins/redmine_banner/Gemfile.local plugins/redmine_banner/Gemfile
% bundle install --with test
% export RAILS_ENV=test
% bundle exec ruby -I"lib:test" -I plugins/redmine_banner/test \
  plugins/redmine_banner/test/functional/banner_controller_test.rb

or

% bundle exec rails redmine_banner:test

Repository

WebPage

License

This software is licensed under the GNU GPL v2. See COPYRIGHT and COPYING for details.

redmine_banner's People

Contributors

akiko-pusu avatar archonwang avatar ardahaal avatar atopcu avatar beandj avatar cforce avatar codeinsider avatar dondimarco avatar dr-itz avatar fingolfin avatar iwangjiaxiang avatar jwalkerbg avatar namezero111111 avatar soniaz08 avatar sparunakian avatar yukikita avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redmine_banner's Issues

new tag

Hi There,

You've recorded in your latest comment that the trunk/master was "Update to 0.0.9". However, that tag does not exist. Was this an oversight? Or did you intend to do more with trunk/master?

-Thanks for your time and the code.

Please add support for Version 3.x

As stated, this banner plugin is simple by design. Please consider to allow support for version 3.x series of redmine. I am still on version 3.4 for the time being and would love to use this banner.

ダウンロードしてRedmine3.xに使えませんでした。このプラグイン情報を読んだら結構シンプルなんだから、もしちょっと古Redmineに使うのが凄く嬉しいです。

よろしくお願い致します。

Banner for each project

This is a really great app.
Is that possible to display a banner only on a specific project, of just for the creating new task page of a specific project?

Option to disable operations for non-admins

Hello

I think that it will be useful to have an option to disable Redmine operations for non-admin users. Example use case:

The administrator needs to test some new plugin. While in doing this, he/she does not want any other user to work with Redmine. So, he/she activates redmine_banner and activates an option to disable operations for the regular users. A banner explains that Redmine is disabled and no other links and pages are displayed for the regular users. Redmine is functional fully for the administrator and the banner stays to remind him that Redmine is in maintenance mode.

After finishing the work, the administrator deactivates redmine_banner.

How fixed the Edit Text formatting for banner

I really like this plugin...
I would like to add the following features:
I will install Redmine per project formatting plugin to change Text formatting for per project,
but i change to redmine_ckeditor , the formatting was wrong about this:
image

but the homepage is fine:

image

We system default is Markdown formatting .

Project seetings are not accessable

By using the redmine_bunner plugin in version 0.2.2 or 0.3.0 the project settings can't be accessed anymore.

It seems that it is caused by issue #120 by changing lib/banners/projects_helper_patch.rb.
projects_helper_patch rb

If we patch projects_helper_patch.rb and replace again
ProjectsHelper.prepend(Banners::ProjectsHelperPatch)
by
ProjectsController.helper(Banners::ProjectsHelperPatch)
it works again.

Our patched version looks like this now:

unless ProjectsHelper.included_modules.include?(Banners::ProjectsHelperPatch)
  ProjectsController.helper(Banners::ProjectsHelperPatch)
end

I don't know if there are side effects that I could not figure out so far.

Internal Error on Redmine 2.6

I am trying to install this plugin on Redmine 2.6 and I have tried plugin version 0.1.1 and 0.1.0. After migrating the plugin, and restarting apache I get the following error (my settings require login):

ActionView::Template::Error (Missing partial banner/project_body_bottom with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :rsb]}. Searched in:
  * "/var/www/redmine-2.6.0/app/views"
):
    56:         <%= view_layouts_base_sidebar_hook_response %>
    57:     </div>
    58:
    59:     <div id="content">
    60:         <%= render_flash_messages %>
    61:         <%= yield %>
    62:         <%= call_hook :view_layouts_base_content %>
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:158:in `call_hook'
  app/views/layouts/base.html.erb:59:in `_app_views_layouts_base_html_erb__2916634008638019023_17558600'
  app/controllers/application_controller.rb:465:in `block (2 levels) in render_error'
  app/controllers/application_controller.rb:463:in `render_error'
  app/controllers/application_controller.rb:451:in `render_404'
  app/controllers/application_controller.rb:475:in `missing_template'

Reload plugin.html.erb

Hello, Akiko Takano.
You're overloaded plugin.html.erb file, that's too bad. Other plugins assume that indents will be as usual, and as a result of setting page layout breaks.

2.1.2 Compatibility

Dear akiko-pusu,
redmin_banner is very usefull and I am using it. I was upgrade our redmine to 2.1.2 last month. But I cant use this very usefull plugin after this upgrade.

With my Best Regards,
Adnan Topcu

500 Internal Server Error on global settings

Hello akiko-pusu,
I'm using your plugin since long time. There is 500 Internal Server Error now. however, this conflict is in global settings only, not the project settings.

This problem started after installing an other plugin ( https://github.com/zaneli/akayagi ). I want to use both of these plugins. I am updating global settings with direct-accessing to DB now.

log:
Started GET "/settings/plugin/redmine_banner" for x.x.x.x at 2015-05-15 09:54:34 +0300
Processing by SettingsController#plugin as HTML
Parameters: {"id"=>"redmine_banner"}
Rendered plugins/redmine_banner/app/views/settings/_redmine_banner.html.erb (29.7ms)
Rendered plugins/redmine_banner/app/views/settings/plugin.html.erb within layouts/admin (51.4ms)
Completed 500 Internal Server Error in 121.2ms

ActionView::Template::Error (undefined method strftime' for nil:NilClass): 70: <div id="banner_timer_setting" style="display: <%= @settings['use_timer'] == 'true' ? 'block' : 'none' %>"> 71: <p> 72: <%=content_tag(:label, l(:label_start_datetime))%> 73: <%= text_field_tag 'settings[start_ymd]', @start_datetime.strftime("%Y-%m-%d"), :size => 10 %> 74: <%= select_hour @start_datetime, :prefix => 'settings', :field_name => 'start_hour', 75: :time_separator => ':', :include_seconds => false %>: 76: <%= select_minute @start_datetime, :prefix => 'settings', :field_name => 'start_min', :time_separator => ':', :include_seconds => false %> plugins/redmine_banner/app/views/settings/_redmine_banner.html.erb:73:in_plugins_redmine_banner_app_views_settings__redmine_banner_html_erb___4012071094739498116_70150482271060'

Environment:
Redmine version 2.6.4.stable.14229
Ruby version 2.0.0-p481 (2014-05-08) [x86_64-linux]
Rails version 3.2.21
Environment production
Database adapter Mysql2

incompatible character encodings: UTF-8 and ASCII-8BIT

When I tried to view my banner settings at admin page, got this error(log below ).

redmine running env:
mysql version:
Server version: 5.0.92 FreeBSD port: mysql-server-5.0.92

uname -a
FreeBSD redmine 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011

Environment:
Redmine version 2.2.0.stable
Ruby version 1.9.3 (i386-freebsd8.2)
Rails version 3.2.9
Environment production
Database adapter Mysql2
Redmine plugins:
redmine_banner 0.0.8

I tested this plugin in another linux server (CentOS 5.7, same gem environment), everything is fine.
I can't figure out what is wrong with it on freebsd...
Will you help me, please...

log ------------------------------------------------------------------------------------------------------------>>>>>>>>>>>>>>>>>>>>>>>
Started GET "/settings/plugin/redmine_banner" for 130.140.23.33 at 2012-12-30 16:23:12 +0800
Processing by SettingsController#plugin as HTML
Parameters: {"id"=>"redmine_banner"}
Current user: user(id=3)
Rendered plugins/redmine_banner/app/views/settings/_redmine_banner.html.erb (3.8ms)
Rendered plugins/redmine_banner/app/views/settings/plugin.html.erb within layouts/admin (5.0ms)
Completed 500 Internal Server Error in 13ms

ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
31:


32:


33: <%=content_tag(:label, l(:label_banner_message)) %>
34: <%=text_area_tag 'settings[banner_description]', @settings['banner_description'], :size =>"40x3",
35: :class => 'wiki-edit' ,:required => true %>

36:


37: <%= wikitoolbar_for "settings_banner_description" %>
activesupport (3.2.9) lib/active_support/core_ext/string/output_safety.rb:133:in concat' activesupport (3.2.9) lib/active_support/core_ext/string/output_safety.rb:133:inconcat'
actionpack (3.2.9) lib/action_view/buffers.rb:11:in <<' plugins/redmine_banner/app/views/settings/_redmine_banner.html.erb:34:in_plugins_redmine_banner_app_views_settings__redmine_banner_html_erb__364948030_359002770'
actionpack (3.2.9) lib/action_view/template.rb:145:in block in render' activesupport (3.2.9) lib/active_support/notifications.rb:125:ininstrument'
actionpack (3.2.9) lib/action_view/template.rb:143:in render' actionpack (3.2.9) lib/action_view/renderer/partial_renderer.rb:265:inrender_partial'
actionpack (3.2.9) lib/action_view/renderer/partial_renderer.rb:238:in block in render' actionpack (3.2.9) lib/action_view/renderer/abstract_renderer.rb:38:inblock in instrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in block in instrument' activesupport (3.2.9) lib/active_support/notifications/instrumenter.rb:20:ininstrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in instrument' actionpack (3.2.9) lib/action_view/renderer/abstract_renderer.rb:38:ininstrument'
actionpack (3.2.9) lib/action_view/renderer/partial_renderer.rb:237:in render' actionpack (3.2.9) lib/action_view/renderer/renderer.rb:41:inrender_partial'
actionpack (3.2.9) lib/action_view/renderer/renderer.rb:15:in render' actionpack (3.2.9) lib/action_view/helpers/rendering_helper.rb:24:inrender'
plugins/redmine_banner/app/views/settings/plugin.html.erb:6:in block in _plugins_redmine_banner_app_views_settings_plugin_html_erb___639556692_352227250' actionpack (3.2.9) lib/action_view/helpers/capture_helper.rb:40:inblock in capture'
actionpack (3.2.9) lib/action_view/helpers/capture_helper.rb:187:in with_output_buffer' actionpack (3.2.9) lib/action_view/helpers/capture_helper.rb:40:incapture'
actionpack (3.2.9) lib/action_view/helpers/form_tag_helper.rb:663:in form_tag_in_block' actionpack (3.2.9) lib/action_view/helpers/form_tag_helper.rb:70:inform_tag'
plugins/redmine_banner/app/views/settings/plugin.html.erb:4:in _plugins_redmine_banner_app_views_settings_plugin_html_erb___639556692_352227250' actionpack (3.2.9) lib/action_view/template.rb:145:inblock in render'
activesupport (3.2.9) lib/active_support/notifications.rb:125:in instrument' actionpack (3.2.9) lib/action_view/template.rb:143:inrender'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:47:in block (2 levels) in render_template' actionpack (3.2.9) lib/action_view/renderer/abstract_renderer.rb:38:inblock in instrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in block in instrument' activesupport (3.2.9) lib/active_support/notifications/instrumenter.rb:20:ininstrument'
activesupport (3.2.9) lib/active_support/notifications.rb:123:in instrument' actionpack (3.2.9) lib/action_view/renderer/abstract_renderer.rb:38:ininstrument'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:46:in block in render_template' actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:54:inrender_with_layout'
actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:45:in render_template' actionpack (3.2.9) lib/action_view/renderer/template_renderer.rb:18:inrender'
actionpack (3.2.9) lib/action_view/renderer/renderer.rb:36:in render_template' actionpack (3.2.9) lib/action_view/renderer/renderer.rb:17:inrender'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:110:in _render_template' actionpack (3.2.9) lib/action_controller/metal/streaming.rb:225:in_render_template'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:103:in render_to_body' actionpack (3.2.9) lib/action_controller/metal/renderers.rb:28:inrender_to_body'
actionpack (3.2.9) lib/action_controller/metal/compatibility.rb:50:in render_to_body' actionpack (3.2.9) lib/abstract_controller/rendering.rb:88:inrender'
actionpack (3.2.9) lib/action_controller/metal/rendering.rb:16:in render' actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:40:inblock (2 levels) in render'
activesupport (3.2.9) lib/active_support/core_ext/benchmark.rb:5:in block in ms' /usr/local/ruby/lib/ruby/1.9.1/benchmark.rb:295:inrealtime'
activesupport (3.2.9) lib/active_support/core_ext/benchmark.rb:5:in ms' actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:40:inblock in render'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:83:in cleanup_view_runtime' activerecord (3.2.9) lib/active_record/railties/controller_runtime.rb:24:incleanup_view_runtime'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:39:in render' actionpack (3.2.9) lib/action_controller/metal/implicit_render.rb:10:indefault_render'
actionpack (3.2.9) lib/action_controller/metal/implicit_render.rb:5:in send_action' actionpack (3.2.9) lib/abstract_controller/base.rb:167:inprocess_action'
actionpack (3.2.9) lib/action_controller/metal/rendering.rb:10:in process_action' actionpack (3.2.9) lib/abstract_controller/callbacks.rb:18:inblock in process_action'
activesupport (3.2.9) lib/active_support/callbacks.rb:469:in _run__718432368__process_action__306609611__callbacks' activesupport (3.2.9) lib/active_support/callbacks.rb:405:in__run_callback'
activesupport (3.2.9) lib/active_support/callbacks.rb:385:in _run_process_action_callbacks' activesupport (3.2.9) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (3.2.9) lib/abstract_controller/callbacks.rb:17:in process_action' actionpack (3.2.9) lib/action_controller/metal/rescue.rb:29:inprocess_action'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:30:in block in process_action' activesupport (3.2.9) lib/active_support/notifications.rb:123:inblock in instrument'
activesupport (3.2.9) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (3.2.9) lib/active_support/notifications.rb:123:ininstrument'
actionpack (3.2.9) lib/action_controller/metal/instrumentation.rb:29:in process_action' actionpack (3.2.9) lib/action_controller/metal/params_wrapper.rb:207:inprocess_action'
activerecord (3.2.9) lib/active_record/railties/controller_runtime.rb:18:in process_action' actionpack (3.2.9) lib/abstract_controller/base.rb:121:inprocess'
actionpack (3.2.9) lib/abstract_controller/rendering.rb:45:in process' actionpack (3.2.9) lib/action_controller/metal.rb:203:indispatch'
actionpack (3.2.9) lib/action_controller/metal/rack_delegation.rb:14:in dispatch' actionpack (3.2.9) lib/action_controller/metal.rb:246:inblock in action'
actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:73:in call' actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:73:indispatch'
actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:36:in call' journey (1.0.4) lib/journey/router.rb:68:inblock in call'
journey (1.0.4) lib/journey/router.rb:56:in each' journey (1.0.4) lib/journey/router.rb:56:incall'
actionpack (3.2.9) lib/action_dispatch/routing/route_set.rb:601:in call' rack-openid (1.3.1) lib/rack/openid.rb:98:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/best_standards_support.rb:17:in call' rack (1.4.1) lib/rack/etag.rb:23:incall'
rack (1.4.1) lib/rack/conditionalget.rb:25:in call' actionpack (3.2.9) lib/action_dispatch/middleware/head.rb:14:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/params_parser.rb:21:in call' actionpack (3.2.9) lib/action_dispatch/middleware/flash.rb:242:incall'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in context' rack (1.4.1) lib/rack/session/abstract/id.rb:200:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/cookies.rb:341:in call' activerecord (3.2.9) lib/active_record/query_cache.rb:64:incall'
activerecord (3.2.9) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in call' actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:28:inblock in call'
activesupport (3.2.9) lib/active_support/callbacks.rb:405:in _run__806045766__call__1029084472__callbacks' activesupport (3.2.9) lib/active_support/callbacks.rb:405:in__run_callback'
activesupport (3.2.9) lib/active_support/callbacks.rb:385:in _run_call_callbacks' activesupport (3.2.9) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (3.2.9) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (3.2.9) lib/action_dispatch/middleware/remote_ip.rb:31:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/debug_exceptions.rb:16:in call' actionpack (3.2.9) lib/action_dispatch/middleware/show_exceptions.rb:56:incall'
railties (3.2.9) lib/rails/rack/logger.rb:32:in call_app' railties (3.2.9) lib/rails/rack/logger.rb:16:inblock in call'
activesupport (3.2.9) lib/active_support/tagged_logging.rb:22:in tagged' railties (3.2.9) lib/rails/rack/logger.rb:16:incall'
actionpack (3.2.9) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:incall'
rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.9) lib/active_support/cache/strategy/local_cache.rb:72:incall'
rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.9) lib/action_dispatch/middleware/static.rb:62:incall'
rack-cache (1.2) lib/rack/cache/context.rb:136:in forward' rack-cache (1.2) lib/rack/cache/context.rb:245:infetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in lookup' rack-cache (1.2) lib/rack/cache/context.rb:66:incall!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in call' railties (3.2.9) lib/rails/engine.rb:479:incall'
railties (3.2.9) lib/rails/application.rb:223:in call' railties (3.2.9) lib/rails/railtie/configurable.rb:30:inmethod_missing'
passenger (3.0.18) lib/phusion_passenger/rack/request_handler.rb:96:in process_request' passenger (3.0.18) lib/phusion_passenger/abstract_request_handler.rb:516:inaccept_and_process_next_request'
passenger (3.0.18) lib/phusion_passenger/abstract_request_handler.rb:274:in main_loop' passenger (3.0.18) lib/phusion_passenger/rack/application_spawner.rb:206:instart_request_handler'
passenger (3.0.18) lib/phusion_passenger/rack/application_spawner.rb:171:in block in handle_spawn_application' passenger (3.0.18) lib/phusion_passenger/utils.rb:470:insafe_fork'
passenger (3.0.18) lib/phusion_passenger/rack/application_spawner.rb:166:in handle_spawn_application' passenger (3.0.18) lib/phusion_passenger/abstract_server.rb:357:inserver_main_loop'
passenger (3.0.18) lib/phusion_passenger/abstract_server.rb:206:in start_synchronously' passenger (3.0.18) lib/phusion_passenger/abstract_server.rb:180:instart'
passenger (3.0.18) lib/phusion_passenger/rack/application_spawner.rb:129:in start' passenger (3.0.18) lib/phusion_passenger/spawn_manager.rb:253:inblock (2 levels) in spawn_rack_application'
passenger (3.0.18) lib/phusion_passenger/abstract_server_collection.rb:132:in lookup_or_add' passenger (3.0.18) lib/phusion_passenger/spawn_manager.rb:246:inblock in spawn_rack_application'
passenger (3.0.18) lib/phusion_passenger/abstract_server_collection.rb:82:in block in synchronize' <internal:prelude>:10:insynchronize'
passenger (3.0.18) lib/phusion_passenger/abstract_server_collection.rb:79:in synchronize' passenger (3.0.18) lib/phusion_passenger/spawn_manager.rb:244:inspawn_rack_application'
passenger (3.0.18) lib/phusion_passenger/spawn_manager.rb:137:in spawn_application' passenger (3.0.18) lib/phusion_passenger/spawn_manager.rb:275:inhandle_spawn_application'
passenger (3.0.18) lib/phusion_passenger/abstract_server.rb:357:in server_main_loop' passenger (3.0.18) lib/phusion_passenger/abstract_server.rb:206:instart_synchronously'
passenger (3.0.18) helper-scripts/passenger-spawn-server:99:in `'

Javascript error

Every time i use the timer, i became following Javascript error

banner_timer_setting is not defined
banner_timer_setting.style.display = vis; banner.js (Line 25)

Fixed in tuxinaut@8c07e7a

Italian translation

Italian strings go here for Rails i18n

it:
banner: "Banner"
setting_banner_display_part: "Posizione sullo schermo"
label_header_only: "Solo testata"
label_footer_only: "Solo piè di pagina"
label_both: "Testata / Piè di pagina"
label_banner_message: "Messaggio sul banner"
label_message_type: "Tipo di messaggio"
label_start_datetime: "Data/ora inizio"
label_end_datetime: "Data/ora fine"
label_use_timer: "Usa timer"
error_banner_date_range: "La data di inizio deve precedere quella di fine."
redmine_banner_title: "Vai alle impostazioni del banner."
button_off: "Spento"
banner_off: "Disattiva messaggio banner."
permission_manage_banner: "Gestione Banner"
project_module_banner: "Banner"
page_overview_only: "Solo visione"
page_all: "Tutta la pagina"
page_overview_and_issues: "Visione e segnalazioni"
page_new_issue_only: "Solo nuova segnalazione"

Banner not getting changed..

Hello,

I am using redmine 2.2 and i have entered a banner message and it worked fine. But when i tried to modify the message it is not changing and the same message is getting displayed. Kindly let me know if any configuration changes need to be done.

Error 500: link_to_remove

I just installed your plugin. Here is my config

ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

*** LOCAL GEMS ***

actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8)
arel (3.0.2)
builder (3.0.3, 3.0.0)
bundler (1.2.1)
coderay (1.0.7)
daemon_controller (1.0.0)
erubis (2.7.0)
fastercsv (1.5.5)
fastthread (1.0.7)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.7.5)
mail (2.4.4)
mime-types (1.19)
multi_json (1.3.6)
mysql (2.8.1)
mysql2 (0.3.11)
net-ldap (0.3.1)
passenger (3.0.17)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.8)
railties (3.2.8)
rake (0.9.2.2)
rdoc (3.12)
rmagick (2.13.1)
ruby-openid (2.1.8)
sprockets (2.1.3)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)

I get that error when trying to open the settings page

ActionView::Template::Error (undefined method `link_to_remote' for #<#<Class:0x7f3f73277658>:0x7f3f7326f318>):
    32:         :class => 'wiki-edit' ,:required => true  %><br/> 
    33: </p>       
    34:  <%= wikitoolbar_for "settings_banner_description" %>
    35:   <%= link_to_remote l(:label_preview),
    36:                        { :url => { :controller => 'banner', :action => 'preview'},
    37:                          :method => 'post',
    38:                          :id => 'banner_preview',
  plugins/redmine_banner/app/views/settings/_redmine_banner.html.erb:35:in `_plugins_redmine_banner_app_views_settings__redmine_banner_html_erb__1701637301_69955245650100'
  actionpack (3.2.8) lib/action_view/template.rb:145:in `send'
  actionpack (3.2.8) lib/action_view/template.rb:145:in `render'
  activesupport (3.2.8) lib/active_support/notifications.rb:125:in `instrument'
  actionpack (3.2.8) lib/action_view/template.rb:143:in `render'
  actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
  actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:238:in `render'
  actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
  activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:237:in `render'
  actionpack (3.2.8) lib/action_view/renderer/renderer.rb:41:in `render_partial'
  actionpack (3.2.8) lib/action_view/renderer/renderer.rb:15:in `render'
  actionpack (3.2.8) lib/action_view/helpers/rendering_helper.rb:24:in `render'
  plugins/redmine_banner/app/views/settings/plugin.html.erb:6:in `_plugins_redmine_banner_app_views_settings_plugin_html_erb___1536401553_69955245694300'
  actionpack (3.2.8) lib/action_view/helpers/capture_helper.rb:40:in `capture'
  actionpack (3.2.8) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
  actionpack (3.2.8) lib/action_view/helpers/capture_helper.rb:40:in `capture'
  actionpack (3.2.8) lib/action_view/helpers/form_tag_helper.rb:662:in `form_tag_in_block'
  actionpack (3.2.8) lib/action_view/helpers/form_tag_helper.rb:70:in `form_tag'
  plugins/redmine_banner/app/views/settings/plugin.html.erb:4:in `_plugins_redmine_banner_app_views_settings_plugin_html_erb___1536401553_69955245694300'
  actionpack (3.2.8) lib/action_view/template.rb:145:in `send'
  actionpack (3.2.8) lib/action_view/template.rb:145:in `render'
  activesupport (3.2.8) lib/active_support/notifications.rb:125:in `instrument'
  actionpack (3.2.8) lib/action_view/template.rb:143:in `render'
  actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:47:in `render_template'
  actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
  activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:46:in `render_template'
  actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
  actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:45:in `render_template'
  actionpack (3.2.8) lib/action_view/renderer/template_renderer.rb:18:in `render'
  actionpack (3.2.8) lib/action_view/renderer/renderer.rb:36:in `render_template'
  actionpack (3.2.8) lib/action_view/renderer/renderer.rb:17:in `render'
  actionpack (3.2.8) lib/abstract_controller/rendering.rb:110:in `_render_template'
  actionpack (3.2.8) lib/action_controller/metal/streaming.rb:225:in `_render_template'
  actionpack (3.2.8) lib/abstract_controller/rendering.rb:103:in `render_to_body'
  actionpack (3.2.8) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
  actionpack (3.2.8) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
  actionpack (3.2.8) lib/abstract_controller/rendering.rb:88:in `render'
  actionpack (3.2.8) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:40:in `render'
  activesupport (3.2.8) lib/active_support/core_ext/benchmark.rb:5:in `ms'
  /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
  activesupport (3.2.8) lib/active_support/core_ext/benchmark.rb:5:in `ms'
  actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:40:in `render'
  actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
  activerecord (3.2.8) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
  actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:39:in `render'
  actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (3.2.8) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:in `process_action'
  activesupport (3.2.8) lib/active_support/callbacks.rb:469:in `_run__1144642187__process_action__1839414159__callbacks'
  activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `send'
  activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `send'
  activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.8) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.8) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
  activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.8) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  activerecord (3.2.8) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.8) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.8) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.8) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.8) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.8) lib/action_controller/metal.rb:246:in `action'
  actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `call'
  journey (1.0.4) lib/journey/router.rb:56:in `each'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:in `call'
  rack-openid (1.3.1) lib/rack/openid.rb:98:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.1) lib/rack/etag.rb:23:in `call'
  rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
  rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/cookies.rb:339:in `call'
  activerecord (3.2.8) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
  activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `_run__1844350639__call__4__callbacks'
  activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `send'
  activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `send'
  activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.1) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.1) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
  rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
  rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.8) lib/rails/engine.rb:479:in `call'
  railties (3.2.8) lib/rails/application.rb:223:in `call'
  railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `send'
  railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `method_missing'
  passenger (3.0.17) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.17) lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
  passenger (3.0.17) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  passenger (3.0.17) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.17) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
  passenger (3.0.17) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
  passenger (3.0.17) lib/phusion_passenger/utils.rb:470:in `safe_fork'
  passenger (3.0.17) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:180:in `start'
  passenger (3.0.17) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
  passenger (3.0.17) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
  passenger (3.0.17) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
  passenger (3.0.17) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.17) helper-scripts/passenger-spawn-server:99

Header Only normal banner displayed as footer in Search page

In my redmine 1.3.0 installation, we user the plugin (0.0.4) to publish a "normal" message on all pages, positioned as "header only"

This works fine for every page but the 'search' page, both on simply selecting the search ({redmine homne}/search) and search result.

Thanks

Give ability to specific users to manage the site-wide banner

Hello,

Thanks very much for your work, your plugin is a real advantage.
I only have a suggestion : Do you think it would be possible to give the ability, for non-admin users, to show a site-wide banner instead per project like now ?

Because I would like to let only two users to print a global alert banner, but I don't want to give them the Administrator rights.

Cheers, and regards,

--
Léo, Paris - France.

config the banner shows error

the error infomation is

ActionView::TemplateError (Validation failed: style not in list) on line #3 of vendor/plugins/redmine_banner/app/views/banner/_show.html.erb:
1:


2: <%
3: @Banner = Banner.find_or_create(@project.id)
4: %>
5: <% labelled_tabular_form_for :settings, @Banner,
6: :url => {:controller => 'banner',

vendor/plugins/redmine_banner/app/models/banner.rb:19:in `find_or_create'
vendor/plugins/redmine_banner/app/views/banner/_show.html.erb:3
app/views/common/_tabs.html.erb:24
app/views/common/_tabs.html.erb:23:in `each'
app/views/common/_tabs.html.erb:23
app/helpers/application_helper.rb:222:in `render_tabs'
app/views/projects/settings.html.erb:3

Rendering /usr/local/redmine-1.3/public/500.html (500 Internal Server Error)

Fix install guide

Migrate plugin: rake db:migrate_plugins RAILS_ENV=production

is not needed!

The base.rhtml is extend for call hook one line

<%= call_hook :view_layouts_base_after_top_menu %>

Internationalise banner message

Hello,
I have just discovered this plugin
Thanks a lot for the work done

I will nevertheless have one need.
My users speak various language ?

Is there a way to configure/tweak it to have the right message displayed to each user according to his language ?

Thanks
dn

de locale /utf8-without BOM

de:
banner: "Banner"
setting_banner_display_part: "Anzeigeposition"
label_header_only: "Nur Kopfzeile"
label_footer_only: "Nur Fußzeile"
label_both: "Kopf und Fußzeile"
label_banner_message: "Banner Nachricht"
label_message_type: "Nachrichtenart"
label_start_datetime: "Startzeitpunkt"
label_end_datetime: "Endzeitpunkt"
label_use_timer: "Timer benutzen"
error_banner_date_range: "Der Startzeitpunkt muss vor dem Endzeitpunkt liegen."
redmine_banner_title: "Springe zu den Banner Einstellungen."
button_off: "Deaktivieren"
banner_off: "Deaktiviert das Banner."
permission_manage_banner: "Banner verwalten"
project_module_banner: "Banner"
page_overview_only: "Nur auf der Übersichtsseite"
page_all: "Auf allen Seiten"
page_overview_and_issues: "Auf der Übersichtsseite und Ticketübersicht"
page_new_issue_only: "Nur auf der Seite für neue Tickets"

Redmine 4.0 not compatible

Hi,

I've tried to install the plugin in a Redmine 4.0 server and it shows the following error:

/opt/bitnami/apps/redmine/htdocs$ bundle exec rake redmine:plugins:migrate RAILS_ENV=production
rake aborted!
NameError: uninitialized constant Rake::TestTask
/opt/bitnami/apps/redmine/htdocs/plugins/redmine_banner/lib/tasks/test.rake:7:in block in <top (required)>' /opt/bitnami/apps/redmine/htdocs/plugins/redmine_banner/lib/tasks/test.rake:1:in <top (required)>'
/opt/bitnami/apps/redmine/htdocs/lib/tasks/redmine.rake:190:in load' /opt/bitnami/apps/redmine/htdocs/lib/tasks/redmine.rake:190:in block in <top (required)>'
/opt/bitnami/apps/redmine/htdocs/lib/tasks/redmine.rake:190:in each' /opt/bitnami/apps/redmine/htdocs/lib/tasks/redmine.rake:190:in <top (required)>'
/opt/bitnami/apps/redmine/htdocs/Rakefile:7:in <top (required)>' /opt/bitnami/ruby/bin/bundle:23:in load'
/opt/bitnami/ruby/bin/bundle:23:in `

'
(See full trace by running task with --trace)
bitnami@ip-172-31-42-244:/opt/bitnami/apps/redmine/htdocs$ bundle exec rake redmine:plugins:migrate RAILS_ENV=production
(See full trace by running task with --trace)

Do you intend to make it compatible with the new Redmine version? Thanks for your nice plugin!

redmine_banner issue after upgrade

Upgraded redmine from 2.5.2 to 2.6.5 After upgrade, I got a new copy of redmine_banner from here.
I did a rake: rake redmine:plugins:migrate RAILS_ENV=production
Now, the banner header isn't functioning correctly:
redmine_banner_issue

I tried to remove it by doing this:
rake redmine:plugins:migrate NAME=redmine_banner VERSION=0 RAILS_ENV=production
rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
It looks like it correctly removed the plugin table 'banner' from the database.
I deleted the /plugins/redmine_banner folder
I deleted the /public/plugin_assets/redmine_banner/ folder
I added it back again after restarting redmine, but i still appears this way.

It is still showing the same banner message as I set it to before. I found and deleted this in the database:
DELETE from settings where name LIKE "plugin_redmine_banner";
I did the whole plugin remove process again installed it again. It now has the default banner message, but still shows up like in the above image.What am I missing?

Thanks for your time

Compatibility with Easy Redmine?

We're considering getting EasyRedmine for functionality not available via other Redmine plugins. Has this plugin been tested or used with EasyRedmine? Thanks.

Little error in spanish translation

There is an error in label:

error_banner_date_range: "La fecha de inicio debe ser anterior a la den fin."

correct label is:

error_banner_date_range: "La fecha de inicio debe ser anterior a la de fin."
(Just an "n")

Thanks!

Internal Server Error when used with some other plugin and redmine 4.0 (no superclass method `project_settings_tabs)

Summary

Internal Server Error when used with some other plugin and redmine 4.0

Description

Install redmine_default_custom_query and banner on Redmine 4.0.
In this environment, Internal Server Error occurs when adding Project or displaying Project setting screen.

The following error is recorded in production.log.

ActionView::Template::Error (super: no superclass method `project_settings_tabs'

The situation is similar to the following.
akiko-pusu/redmine_issue_templates#217

Environment

Redmine version 4.0.3.stable
Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux]
Rails version 5.2.3
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.7.14
Git 1.8.3.1
Filesystem
Redmine plugins:
redmine_banner 0.2.0
redmine_default_custom_query 1.4.0

Workaround

If any of the following actions are taken, an error will not occur on the project setting screen.

1.Remove one of Plugins of redmine_default_custom_query and banner.
2. Perform the same correction as template on banner.
akiko-pusu/redmine_issue_templates@ea7f6ea

This is log for Internal Error

ActionView::Template::Error (super: no superclass method `project_settings_tabs' for #<#<Class:0x0000555b99b9de90>:0x0000555b9a9a91d8>
Did you mean?  project_issues_path):
    1: <h2><%=l(:label_settings)%></h2>
    2:
    3: <%= render_tabs project_settings_tabs %>
    4:
    5: <% html_title(l(:label_settings)) -%>

plugins/redmine_banner/lib/banners/projects_helper_patch.rb:8:in `project_settings_tabs'
plugins/redmine_default_custom_query/app/patches/helpers/projects_helper_patch.rb:13:in `project_settings_tabs_with_default_query_setting_tab'
plugins/redmine_banner/lib/banners/projects_helper_patch.rb:8:in `project_settings_tabs'
app/views/projects/settings.html.erb:3:in `_app_views_projects_settings_html_erb___172753448128794209_46925954742420'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Internal error

I've installed the plugin and restarted Redmine , but then when I try to navigate to redmine the following error apears in page:
Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

and the log:

ActionView::Template::Error (Missing partial banner/project_body_bottom with {:locale=>[:zh, :en], :formats=>[:html], :handlers=>[:erb, :builder, :rsb]}. Searched in:

  • "/opt/bitnami/apps/redmine/htdocs/app/views"
    ):
    56: <%= view_layouts_base_sidebar_hook_response %>
    57:
    58:
    59:

    60: <%= render_flash_messages %>
    61: <%= yield %>
    62: <%= call_hook :view_layouts_base_content %>
    lib/redmine/hook.rb:61:in block (2 levels) in call_hook' lib/redmine/hook.rb:61:ineach'
    lib/redmine/hook.rb:61:in block in call_hook' lib/redmine/hook.rb:58:intap'
    lib/redmine/hook.rb:58:in call_hook' lib/redmine/hook.rb:158:incall_hook'
    app/views/layouts/base.html.erb:59:in _app_views_layouts_base_html_erb___3927069031350559510_52561340' app/controllers/application_controller.rb:397:inblock (2 levels) in render_error'
    app/controllers/application_controller.rb:395:in render_error' app/controllers/application_controller.rb:383:inrender_404'
    app/controllers/application_controller.rb:407:in `missing_template'

ruby script/about:

Environment:
Redmine version 2.3.1.stable
Ruby version 1.9.3 (x86_64 -linux)
Rails version 3.2.13
Environment production
Database adapter MySQL2
Redmine plugins:
redmine_banner 0.0.9

Show banner only one time per user

If using banner as information it would be great if an user get to see this only one time (per login) For next login for the same benner activation this banner won't be shown again for this user.

Update docker sample

docker-compose.ymlのアップデート。
docker-compose runの際に、グローバルバナーをオンにした形で起動させる。

rails runner 'Setting.send("plugin_redmine_banner=", {enable: "true", type: "info", display_part: "both", banner_description: "This is a test message for Global Banner."}.stringify_keys)'

Update README

Instructions for installing this plugin should be more careful explanation.
Related: #66

conflict with redmine_CKEditor

hi, i have conflict with redmine_CKEditor.
if remove redmine_baner, then the error in ckeditor does not appear.

same details (a-ono/redmine_ckeditor#306).

Log:

Started GET "/settings/plugin/redmine_ckeditor" for 127.0.0.1 at 2019-07-29 14:49:58 +0800
Processing by SettingsController#plugin as HTML
Parameters: {"id"=>"redmine_ckeditor"}
Current user: admin (id=1)
Rendering settings/plugin.html.erb within layouts/admin
Rendered plugins/redmine_ckeditor/app/views/settings/_ckeditor.html.erb (411.5ms)
Rendered settings/plugin.html.erb within layouts/admin (425.3ms)
Completed 500 Internal Server Error in 495ms (ActiveRecord: 25.3ms)

ActionView::Template::Error (undefined local variable or method `ckeditor_javascripts' for #<#Class:0x000000000c2f81c0:0x000000000c2f1e38>):
1: <%= ckeditor_javascripts %>
2: <%= stylesheet_link_tag 'editor', :plugin => 'redmine_ckeditor'%>
3: <%= stylesheet_link_tag 'selector', :plugin => 'redmine_ckeditor'%>
4:

plugins/redmine_ckeditor/app/views/settings/_ckeditor.html.erb:1:in _plugins_redmine_ckeditor_app_views_settings__ckeditor_html_erb__87485380_102164980' app/views/settings/plugin.html.erb:6:in block in _app_views_settings_plugin_html_erb__39754121_102220920'
app/views/settings/plugin.html.erb:4:in _app_views_settings_plugin_html_erb__39754121_102220920' lib/redmine/sudo_mode.rb:63:in sudo_mode'

Redmine plugins:

redmine_banner: 0.2.0
redmine_ckeditor: 1.2.2

ActionView::Template::Error (Missing partial banner/_project_body_bottom

Hi akiko-pusu, I`m asakura0603.
Today, I have an error about "Redmine 500 Internal Error", when I introducing redmine_banner.
please give me advice.

OS : Windows 7
Redmine : Bitnami Redmine 3.4.4-3

Started GET "/redmine/projects/boma" for 127.0.0.1 at 2018-05-22 17:30:23 +0900
Processing by ProjectsController#show as HTML
  Parameters: {"id"=>"boma"}
  Current user: anonymous
Redirected to http://127.0.0.1:3001/redmine/login?back_url=http%3A%2F%2F127.0.0.1%3A3001%2Fredmine%2Fprojects%2Fboma
Filter chain halted as :authorize rendered or redirected
Completed 302 Found in 3561ms (ActiveRecord: 1397.0ms)
Started GET "/redmine/login?back_url=http%3A%2F%2F127.0.0.1%3A3001%2Fredmine%2Fprojects%2Fboma" for 127.0.0.1 at 2018-05-22 17:30:29 +0900
Processing by AccountController#login as HTML
  Parameters: {"back_url"=>"http://127.0.0.1:3001/redmine/projects/boma"}
  Current user: anonymous
  Rendered account/login.html.erb within layouts/base (175.0ms)
Missing template, responding with 404
  Rendered common/error.html.erb within layouts/base (10.0ms)
Completed 500 Internal Server Error in 3028ms (ActiveRecord: 424.0ms)

ActionView::Template::Error (Missing partial banner/_project_body_bottom with {:locale=>[:ja, :en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :rsb]}. Searched in:
  * "C:/Bitnami/redmine-3.4.4-3/apps/redmine/htdocs/plugins/redmine_work_time/app/views"
  * "C:/Bitnami/redmine-3.4.4-3/apps/redmine/htdocs/plugins/easy_gantt/app/views"
  * "C:/Bitnami/redmine-3.4.4-3/apps/redmine/htdocs/app/views"
  * "C:/Bitnami/redmine-3.4.4-3/ruby/lib/ruby/gems/2.3.0/gems/redmine_extensions-0.2.9/app/views"
):
    88: 							<%= yield :sidebar %>
    89: 							<%= view_layouts_base_sidebar_hook_response %>
    90: 						</div>
    91: 						<div id="content">
    92: 							<%= render_flash_messages %>
    93: 							<%= yield %>
    94: 							<!-- <%= call_hook :view_layouts_base_content %> -->
  plugins/redmine_banner-master/lib/banner_application_hooks.rb:17:in `view_layouts_base_content'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:96:in `call_hook'
  app/views/layouts/base.html.erb:91:in `_app_views_layouts_base_html_erb__203227295_41807196'
  app/controllers/application_controller.rb:491:in `block (2 levels) in render_error'
  app/controllers/application_controller.rb:489:in `render_error'
  app/controllers/application_controller.rb:477:in `render_404'
  app/controllers/application_controller.rb:501:in `missing_template'

ActionView::Template::Error (Missing partial banner/project_body_bottom

Hi, I've installed the plugin and restarted Redmine (2.0.3), but then when I try to navigate to redmine/my/page the following error apears:

Started GET "/redmine/my/page" for 127.0.0.1 at Thu Jul 19 10:31:49 -0300 2012
Processing by MyController#page as HTML
Rendered issues/_list_simple.html.erb (0.0ms)
Rendered my/blocks/_issuesassignedtome.html.erb (62.5ms)
Rendered issues/_list_simple.html.erb (0.0ms)
Rendered my/blocks/_issuesreportedbyme.html.erb (31.2ms)
Rendered my/page.html.erb within layouts/base (109.4ms)
Completed 500 Internal Server Error in 188ms

ActionView::Template::Error (Missing partial banner/project_body_bottom with {:handlers=>[:rjs, :rsb, :builder, :erb], :locale=>[:es, :en], :formats=>[:html]}. Searched in:

  • "C:/Archivos de programa/BitNami Redmine Stack/apps/redmine/htdocs/app/views"
    ):
    62: <%= view_layouts_base_sidebar_hook_response %>
    63:
    64:
    65:

    66: <%= render_flash_messages %>
    67: <%= yield %>
    68: <%= call_hook :view_layouts_base_content %>
    lib/redmine/hook.rb:61:in send' lib/redmine/hook.rb:61:incall_hook'
    lib/redmine/hook.rb:61:in each' lib/redmine/hook.rb:61:incall_hook'
    lib/redmine/hook.rb:58:in tap' lib/redmine/hook.rb:58:incall_hook'
    lib/redmine/hook.rb:158:in call_hook' app/views/layouts/base.html.erb:65:in_app_views_layouts_base_html_erb___522620181_52520364'

Any suggestion? I'm new in Ruby.
Thanks

Redmine 3.x breaks backward support?

The README says "0.0.8 or higher" for Redmine 2.x, but 0.1.1 -- which is "higher" -- does not meet dependency requirements if applied on v2.3. I know I'm on an outdated version, but a bit more clarification would be nice. Thankfully releases are tagged so it is easy to revert to 0.0.8 and be up and running on 2.3.

In responsible theme, scroll up remains project title bar.

Server platform: Ruby 2.3.1, Redmine 3.3.0, and CentOS 6.8 64bit.
Client platform - A: Android 6.0.1, Chrome browser
Client platform - B: Windows 10, Firefox browser

In responsive theme, for example on an Android browser or Windows browser with small window size, when banner is active and the page is scrolled up, banner is gone but project title bar is not scrolled up and remains at original place.

  • when banner is enabled and page shown

responsible_scroll-1

  • scroll the page up

responsible_scroll-2

  • and scroll the page up and up

responsible_scroll-3

redmine theme is alternate.

redmine 2.0.3: uninitialized constant BannerHeaderHooks::BannerHelper

Hi there;

I tried to install your plugin in my redmind but I got an error when I ran the migration command ("uninitialized constant BannerHeaderHooks::BannerHelper")

First this is my redmine environment:
Environment:
Redmine version 2.0.3.stable.9882
Ruby version 1.8.7 (i686-linux)
Rails version 3.2.6
Environment production
Database adapter MySQL

This is the error

rake --trace redmine:plugins:migrate RAILS_ENV=production
(in /usr/share/redmine-2.0)
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!

uninitialized constant BannerHeaderHooks::BannerHelper

/usr/share/redmine-2.0/plugins/redmine_banner/lib/banner_application_hooks.rb:3
/usr/share/redmine-2.0/plugins/redmine_banner/init.rb:2
/usr/share/redmine-2.0/lib/redmine/plugin.rb:129:in `load'

Error 500 with Ruby 1.8 & Redmine 1.3.0 Fresh Install Plugin

Hi,

Thanks contributing for Redmine with your plugin.

We have an Error 500, when we try to configure Banner plugin.

Here is the log :
[...]
Processing SettingsController#plugin (for 110.0.67.39 at 2012-03-09 18:44:19) [GET]
Parameters: {"controller"=>"settings", "id"=>"redmine_banner", "action"=>"plugin"}

ArgumentError (invalid date):
/usr/local/lib/ruby/1.8/date.rb:956:in new_by_frags' /usr/local/lib/ruby/1.8/date.rb:980:instrptime'
config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering /var/www/redmine/public/500.html (500 Internal Server Error)
[...]

install of plugin was done with "git clone" command.

Thanks in advance for replying to our request.

Anthony H.

You are duplicating unique CSS IDs in your code making impossible to style your banners correctly

Hi, Love your module and use it on all my redmine sites. It is however difficult to work with when making your own themes or custom CSS. You have given us an option to put banners at the top and bottom of the page but you gave them both the same ID (CSS bad practice) Your plugin would work better with themes and other plugin (like custom css plugin) if you allow us to style each banner (top and bottom) separately. As it stand now, to move the banner out of the way for breadcrumbs with a margin I must also move the bottom one down the page. If you Change the banner div ids to banner_top and banner_bottom, this could easily be 10x more stylable.

Spanish strings go here for Rails i18n

This is my contribution ;)

Spanish strings go here for Rails i18n

es:
banner: "Baner"
setting_banner_display_part: "Posición en la pantalla"
label_header_only: "Solo en la cabecera"
label_footer_only: "Solo en el pie"
label_both: "Cabecera y pie"
label_banner_message: "Mensaje del baner"
label_message_type: "Tipo de mensaje"
label_start_datetime: "Fecha y hora de inicio"
label_end_datetime: "Fecha y hora de fin"
label_use_timer: "Temporizador"
error_banner_date_range: "La fecha de inicio debe ser anterior a la den fin."
redmine_banner_title: "Ir a la configuración del baner."
button_off: "Apagado"
banner_off: "No mostrar el baner en la sesión. (El baner se volvera a encender si el admin lo modifica)"
permission_manage_banner: "Administrar banner"
project_module_banner: "Baner"
page_overview_only: "Solo vista general"
page_all: "En toda la pagina"
page_overview_and_issues: "Vista general y tareas"
page_new_issue_only: "Solo en nueva tarea"
label_display_authenticated_user_only: "Mostrar solo el baner solo a los usuarios autenticados."
lalel_check_if_banner_show_only_login_page: "Opción: Mostrar solo en la pagina de acceso."
setting_banner_related_link: "Enlace relacionado"
setting_banner_related_link_description: "Si se define, Enlace para obtener información adjunta."
more_info: "[Más info]"
label_more_info: "Enlace para más información."

Per project banner configuration not visible

Hi,

At first, thank you for this useful plugin !

Since an upgrade to Redmine 2.2.0.devel.4243, the configuration tab of banner in my projects is not visible anymore. (global banner works fine, and I double checked banner module was activated in my project)

I have reinstalled the plugin and ran the migrations, and it didn't fix. (I tried master branch and tag 0.0.9.)

Is my upgrade process wrong ?

Thank you.

it.yml update

add these lines:

label_display_authenticated_user_only: "Mostra banner solo agli utenti autenticati."
lalel_check_if_banner_show_only_login_page: "Opzione: mostra solo nella pagina di login."
setting_banner_related_link: "Link collegato"
setting_banner_related_link_description: "Se definito, viene allegato il link per ulteriori informazioni."
more_info: "[Piu' Info]"
label_more_info: "Link per ulteriori informazioni."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.