foodsoft/app/views/messages/new.haml

61 lines
1.8 KiB
Plaintext

%h1 Neue Nachricht
- form_for @message do |f|
= f.error_messages
%p
Empfängerinnen
%fieldset
- if Foodsoft.config[:mailing_list].blank?
= f.check_box :sent_to_all, :onchange => "Element.toggle('recipients')"
gesamte Foodcoop
- else
%b Nachrichten an alle
verschickst Du bitte über den Verteiler:
= mail_to Foodsoft.config[:mailing_list]
%br/
%small{:style => "color:grey"}
Eventuell musst Du Dich dem Verteiler erst bekannt machen.
%br/
z.b. mit einer Mail an
= mail_to Foodsoft.config[:mailing_list_subscribe]
%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
Privat
= f.check_box :private
%small{:style => "color:grey"} (Nachricht taucht nicht im Foodsoft-Nachrichteneingang auf)
%p
Betreff
%br/
= f.text_field :subject
%p
Nachricht
%br/
~ f.text_area :body, :cols => '80', :rows => '20'
= submit_tag "Senden"