Sha256: 5ef08b0976ebc3c1d7c8623f70ff309c82f8fa479786124fa78b684b2f9b364c
Contents?: true
Size: 1.47 KB
Versions: 5
Compression:
Stored size: 1.47 KB
Contents
# Ddr::Alerts Alerts for the Duke Digital Repository ## Installation Add this line to your application's Gemfile: ```ruby gem 'ddr-alerts' ``` And then execute: $ bundle Or install it yourself as: $ gem install ddr-alerts ## Usage #### Migrations Install the ddr-alerts migrations: rake ddr_alerts:install:migrations then rake db:migrate rake db:test:prepare #### View Partial Ddr::Alerts contains a view partial (ddr/alerts/message/_alert_message.html.erb) that displays the alert messages. This partial depends on the local 'alert_messages' to contain an array of Ddr::Alert::Message which are to be displayed. Render this partial in the desired view / layout of your application, passing in the appropriate value for the 'alert_messages' local. For example, override Blacklight's shared/_flash_messages.html.erb as shown below to include all active alert messages above the application's flash messages on each page: ``` <div class="row"> <div class="col-md-12"> <div id="main-flashes"> <%= render partial: '/ddr/alerts/message/alert_message', locals: { alert_messages: Ddr::Alerts::Message.active } %> <%= yield %> </div> </div> </div> ``` ## Contributing 1. Fork it ( https://github.com/[my-github-username]/ddr-alerts/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ddr-alerts-2.0.0 | README.md |
ddr-alerts-2.0.0.rc1 | README.md |
ddr-alerts-1.1.0 | README.md |
ddr-alerts-1.1.0.rc1 | README.md |
ddr-alerts-1.0.0 | README.md |