2009-01-06 11:49:19 +01:00
|
|
|
%h1 Neue Nachricht
|
|
|
|
|
2009-01-15 18:26:37 +01:00
|
|
|
- form_for @message do |f|
|
|
|
|
= f.error_messages
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
%p
|
|
|
|
%fieldset
|
2009-01-15 18:26:37 +01:00
|
|
|
= f.check_box :sent_to_all, :onchange => "Element.toggle('recipients')"
|
2009-01-06 11:49:19 +01:00
|
|
|
gesamte Foodcoop
|
2009-01-15 18:26:37 +01:00
|
|
|
%table#recipients
|
2009-01-06 11:49:19 +01:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b BenutzerInnen:
|
|
|
|
%br/
|
|
|
|
%small{:style => "color:grey"} (Mehrere Benutzerinnen mit Komma trennen)
|
|
|
|
%br/
|
2009-01-15 18:26:37 +01:00
|
|
|
= text_field_with_auto_complete(:message, :recipients_nicks, {:value => @message.recipients_nicks}, {:tokens => ","})
|
2009-01-06 11:49:19 +01:00
|
|
|
: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()')
|
2009-01-15 18:26:37 +01:00
|
|
|
#user-list.auto_complete
|
2009-01-06 11:49:19 +01:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b Gruppe:
|
|
|
|
%br/
|
2009-01-15 18:26:37 +01:00
|
|
|
= f.select :group_id, groups_for_select, :prompt => " -- Gruppe auswählen --"
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
%p
|
2009-01-15 18:26:37 +01:00
|
|
|
= f.label :subject, "Betreff"
|
2009-01-06 11:49:19 +01:00
|
|
|
%br/
|
2009-01-15 18:26:37 +01:00
|
|
|
= f.text_field :subject
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
%p
|
2009-01-15 18:26:37 +01:00
|
|
|
= f.label :body, "Nachricht"
|
2009-01-06 11:49:19 +01:00
|
|
|
%br/
|
2009-01-15 18:26:37 +01:00
|
|
|
~ f.text_area :body, :cols => '80', :rows => '20'
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
= submit_tag "Senden"
|