foodsoft/app/views/messages/new.haml

44 lines
1.3 KiB
Text
Raw Normal View History

2009-01-06 11:49:19 +01:00
%h1 Neue Nachricht
- form_for @message do |f|
= f.error_messages
2009-01-06 11:49:19 +01:00
%p
%fieldset
= f.check_box :sent_to_all, :onchange => "Element.toggle('recipients')"
2009-01-06 11:49:19 +01:00
gesamte Foodcoop
%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/
= 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()')
#user-list.auto_complete
2009-01-06 11:49:19 +01:00
%tr
%td
%b Gruppe:
%br/
= f.select :group_id, groups_for_select, :prompt => " -- Gruppe auswählen --"
2009-01-06 11:49:19 +01:00
%p
= f.label :subject, "Betreff"
2009-01-06 11:49:19 +01:00
%br/
= f.text_field :subject
2009-01-06 11:49:19 +01:00
%p
= f.label :body, "Nachricht"
2009-01-06 11:49:19 +01:00
%br/
~ f.text_area :body, :cols => '80', :rows => '20'
2009-01-06 11:49:19 +01:00
= submit_tag "Senden"