finish messages i18n + controller + model

This commit is contained in:
wvengen 2013-02-09 10:13:56 +01:00
parent 5941bbbf4f
commit 36b18bcfbd
7 changed files with 60 additions and 28 deletions

View file

@ -11,4 +11,4 @@
%td= format_subject(message, 130)
%td= h(message.sender_name)
%td= format_time(message.created_at)
%td= link_to 'Antworten', new_message_path(:message => {:reply_to => message.id}), class: 'btn'
%td= link_to t('.reply'), new_message_path(:message => {:reply_to => message.id}), class: 'btn'

View file

@ -1,6 +1,6 @@
- title "Nachrichten"
- title t('.title')
- content_for :actionbar do
= link_to 'Neue Nachricht', new_message_path, class: 'btn btn-primary'
= link_to t('.new'), new_message_path, class: 'btn btn-primary'
#messages
= render 'messages', messages: @messages, pagination: true
= render 'messages', messages: @messages, pagination: true

View file

@ -4,9 +4,9 @@
$('#message_recipient_tokens').tokenInput("#{users_path(:format => :json)}", {
crossDomain: false,
prePopulate: $('#message_recipient_tokens').data('pre'),
hintText: 'Nach Nutzerin suchen',
noResultText: 'Keine Nutzerin gefunden',
searchingText: 'Suche ...',
hintText: '#{t '.search_user'}',
noResultText: '#{t '.no_user_found'}',
searchingText: '#{t '.search'}',
theme: 'facebook'
});
@ -19,25 +19,21 @@
});
});
- title "Neue Nachricht"
- title t('.title')
= simple_form_for @message do |f|
- if FoodsoftConfig[:mailing_list].blank?
= f.input :sent_to_all, :as => :boolean
- else
%b Nachrichten an alle
verschickst Du bitte über den Verteiler:
= mail_to FoodsoftConfig[:mailing_list]
%b= t '.list.desc', list: mail_to(FoodsoftConfig[:mailing_list])
%br/
%small{:style => "color:grey"}
Eventuell musst Du Dich dem Verteiler erst bekannt machen.
= t '.list.subscribe_msg'
%br/
- if FoodsoftConfig[:mailing_list_subscribe].blank?
Erklärungen zum Verteiler findest Du im
= link_to 'Wiki (Abschnitt Mailing-Liste)', wiki_page_path('MailingListe')
= t '.list.subscribe', link: link_to(t('.list.wiki'), wiki_page_path('MailingListe'))
- else
z.b. mit einer Mail an
= mail_to FoodsoftConfig[:mailing_list_subscribe]
= t '.list.mail', email: mail_to(FoodsoftConfig[:mailing_list_subscribe])
#recipients
= f.input :recipient_tokens, :input_html => { 'data-pre' => User.find_all_by_id(@message.recipients_ids).map { |u| u.token_attributes }.to_json }
@ -47,4 +43,4 @@
= f.input :body, input_html: {class: 'input-xxlarge'}
.form-actions
= f.submit class: 'btn btn-primary'
= link_to 'oder abbrechen', :back
= link_to t('.cancel'), :back

View file

@ -1,21 +1,21 @@
- title "Nachricht anzeigen"
- title t('.title')
%div{:style => "width:40em"}
%table{:style => "width:25em"}
%tr
%td Von:
%td= t '.from'
%td=h @message.sender_name
%tr
%td Betreff:
%td= t '.subject'
%td
%b=h @message.subject
%tr
%td Gesendet:
%td= t '.sent_on'
%td= format_time(@message.created_at)
%hr/
%p= simple_format(h(@message.body))
%hr/
%p
= link_to 'Antworten', new_message_path(:message => {:reply_to => @message.id}), class: 'btn'
= link_to t('.reply'), new_message_path(:message => {:reply_to => @message.id}), class: 'btn'
|
= link_to 'Nachricht im Überblick', messages_path
= link_to t('.all_messages'), messages_path