foodsoft/app/views/messages/new.haml

44 lines
No EOL
1.3 KiB
Text

%h1 Neue Nachricht
- form_for @message do |f|
= f.error_messages
%p
%fieldset
= f.check_box :sent_to_all, :onchange => "Element.toggle('recipients')"
gesamte Foodcoop
%table#recipients
%tr
%td
%b BenutzerInnen:
%br/
%small{:style => "color:grey"} (Mehrere Benutzerinnen mit Komma trennen)
%br/
= text_field_with_auto_complete(:message, :recipients_nicks, {:value => @message.recipients_nicks}, {:tokens => ","})
:javascript
var userListLoaded = false;
function checkUserList() {
if (userListLoaded) {
$('user-list').toggle();
}
return !userListLoaded;
}
= link_to_remote('Liste', :update => 'user-list', :url => {:action => 'user_list'}, :complete => 'userListLoaded = true', :condition => 'checkUserList()')
#user-list.auto_complete
%tr
%td
%b Gruppe:
%br/
= f.select :group_id, groups_for_select, :prompt => " -- Gruppe auswählen --"
%p
= f.label :subject, "Betreff"
%br/
= f.text_field :subject
%p
= f.label :body, "Nachricht"
%br/
~ f.text_area :body, :cols => '80', :rows => '20'
= submit_tag "Senden"