mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-02 13:41:00 -05:00
Haml clean up for notifications
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
= form_for @notification do |f|
|
||||
- if @notification.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@post.errors.size, "error")} prohibited this message from being sent:"
|
||||
%h2
|
||||
= pluralize(@post.errors.size, "error")
|
||||
prohibited this message from being sent:
|
||||
%ul
|
||||
- @notification.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.field
|
||||
= f.hidden_field :recipient_id, :value => @recipient.id
|
||||
= f.hidden_field :recipient_id, value: @recipient.id
|
||||
|
||||
%p
|
||||
To:
|
||||
= link_to @recipient, @recipient
|
||||
= label_tag :notification, "Subject:"
|
||||
= f.text_field :subject, :value => @subject, :class => 'form-control', :maxlength => 255
|
||||
= f.text_field :subject, value: @subject, class: 'form-control', maxlength: 255
|
||||
= label_tag :body, "Type your message here:"
|
||||
= f.text_area :body, :rows => 12, :class => 'form-control'
|
||||
= f.text_area :body, rows: 12, class: 'form-control'
|
||||
%span.help-block
|
||||
= render :partial => "shared/markdown_help"
|
||||
= render partial: "shared/markdown_help"
|
||||
|
||||
= f.submit "Send", :class => 'btn btn-primary'
|
||||
= f.submit "Send", class: 'btn btn-primary'
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
- content_for :title, "Inbox"
|
||||
|
||||
- if @notifications.size > 0
|
||||
- if @notifications.empty?
|
||||
You have no messages.
|
||||
- else
|
||||
= paginate @notifications, theme: 'twitter-bootstrap-3'
|
||||
%table.table.table-striped
|
||||
%tr
|
||||
@@ -28,7 +30,5 @@
|
||||
- else
|
||||
%strong= n.created_at
|
||||
%td
|
||||
= link_to 'Delete', n, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs'
|
||||
= link_to 'Delete', n, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-default btn-xs'
|
||||
= paginate @notifications, theme: 'twitter-bootstrap-3'
|
||||
- else
|
||||
You have no messages.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
= content_for :title, "Send a message to #{@recipient}"
|
||||
|
||||
=render 'form'
|
||||
= render 'form'
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
= render @sender_notification
|
||||
|
||||
=render 'form'
|
||||
= render 'form'
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
= render @notification
|
||||
|
||||
%p
|
||||
=link_to 'Delete', @notification, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default'
|
||||
=link_to 'Reply', @reply_link, :class => 'btn btn-primary'
|
||||
= link_to 'Delete', @notification, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-default'
|
||||
= link_to 'Reply', @reply_link, class: 'btn btn-primary'
|
||||
|
||||
Reference in New Issue
Block a user