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
|
2009-03-17 18:28:09 +01:00
|
|
|
Empfängerinnen
|
2009-01-06 11:49:19 +01:00
|
|
|
%fieldset
|
2009-03-17 18:13:00 +01:00
|
|
|
- if APP_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 APP_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 APP_CONFIG[:mailing_list_subscribe]
|
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-03-17 18:28:09 +01:00
|
|
|
|
|
|
|
%p
|
|
|
|
Privat
|
|
|
|
= f.check_box :private
|
|
|
|
%small{:style => "color:grey"} (Nachricht taucht nicht im Foodsoft-Nachrichteneingang auf)
|
|
|
|
|
2009-01-06 11:49:19 +01:00
|
|
|
%p
|
2009-03-17 18:28:09 +01:00
|
|
|
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-03-17 18:28:09 +01:00
|
|
|
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"
|