diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-11-12 16:28:12 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-11-12 16:28:12 +0400 |
commit | dd501aa7a79644919ba0c47d1ed764b6db768c8d (patch) | |
tree | c861b365ef67e6a07b9a3b0d6608fa8cd2301c6c /app/views/admin/broadcast_messages/index.html.haml | |
parent | f1ecf53c1e55fbbc66cb2d7d12fb411cbfc2ace8 (diff) |
Broadcast messages scaffold in admin area
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/admin/broadcast_messages/index.html.haml')
-rw-r--r-- | app/views/admin/broadcast_messages/index.html.haml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml new file mode 100644 index 00000000000..22f7b71912c --- /dev/null +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -0,0 +1,41 @@ +%h3.page-title + Broadcast Messages +%p.light + Broadcast messages displayed for every user and can be used to notify application about scheduled maintenance. +%hr + += form_for [:admin, @broadcast_message] do |f| + -if @broadcast_message.errors.any? + .alert.alert-error + - @broadcast_message.errors.full_messages.each do |msg| + %p= msg + .control-group + = f.label :message + .controls + = f.text_area :message, class: "input-xxlarge", rows: 2, required: true + .control-group + = f.label :starts_at + .controls.datetime-controls + = f.datetime_select :starts_at + .control-group + = f.label :ends_at + .controls.datetime-controls + = f.datetime_select :ends_at + .form-actions + = f.submit "Add broadcast message", class: "btn btn-create" + +-if @broadcast_messages.any? + %ul.bordered-list + - @broadcast_messages.each do |broadcast_message| + %li + .pull-right + - if broadcast_message.starts_at + %strong + #{broadcast_message.starts_at.to_s(:short)} + \... + - if broadcast_message.ends_at + %strong + #{broadcast_message.ends_at.to_s(:short)} + .message= broadcast_message.message + + = paginate @broadcast_messages |