rosa-build/app/views/layouts/_notifies.html.haml

13 lines
584 B
Plaintext
Raw Normal View History

2012-07-23 15:25:37 +01:00
- if current_user || APP_CONFIG['anonymous_access']
.flash_notify
- flash_notify = FlashNotify.published.first
- if flash_notify && flash_notify.should_show?(cookies[:flash_notify_id], cookies[:flash_notify_hash])
.alert{:class => "alert-#{flash_notify.status}"}
= flash_notify.body current_user.language
%a{:class=>"close", :'data-dismiss'=>"alert", :href=>"#", :id => 'close-alert'} ×
:javascript
var FLASH_NOTIFY_ID = "#{flash_notify.id}";
var FLASH_HASH_ID = "#{flash_notify.hash_id}";
var FLASH_EXPIRES_AT = "#{Date.today + 1.year}";