Move plugins to separate directory.
This commit is contained in:
parent
6e990fed4c
commit
6aa8ee7968
59 changed files with 4 additions and 4 deletions
14
plugins/messages/app/views/messages/_messages.html.haml
Normal file
14
plugins/messages/app/views/messages/_messages.html.haml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
- if pagination
|
||||
- if Message.pub.count > 20
|
||||
= items_per_page
|
||||
= pagination_links_remote messages
|
||||
|
||||
- unless messages.empty?
|
||||
%table.table.table-striped
|
||||
%tbody
|
||||
- for message in messages
|
||||
%tr
|
||||
%td= format_subject(message, 130)
|
||||
%td= h(message.sender_name)
|
||||
%td= format_time(message.created_at)
|
||||
%td= link_to t('.reply'), new_message_path(:message => {:reply_to => message.id}), class: 'btn'
|
||||
6
plugins/messages/app/views/messages/index.html.haml
Normal file
6
plugins/messages/app/views/messages/index.html.haml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
- title t('.title')
|
||||
|
||||
- content_for :actionbar do
|
||||
= link_to t('.new'), new_message_path, class: 'btn btn-primary'
|
||||
#messages
|
||||
= render 'messages', messages: @messages, pagination: true
|
||||
1
plugins/messages/app/views/messages/index.js.haml
Normal file
1
plugins/messages/app/views/messages/index.js.haml
Normal file
|
|
@ -0,0 +1 @@
|
|||
$('#messages').html('#{j(render('messages', messages: @messages, pagination: true))}');
|
||||
46
plugins/messages/app/views/messages/new.haml
Normal file
46
plugins/messages/app/views/messages/new.haml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
- content_for :javascript do
|
||||
:javascript
|
||||
$(function() {
|
||||
$('#message_recipient_tokens').tokenInput("#{users_path(:format => :json)}", {
|
||||
crossDomain: false,
|
||||
prePopulate: $('#message_recipient_tokens').data('pre'),
|
||||
hintText: '#{t '.search_user'}',
|
||||
noResultText: '#{t '.no_user_found'}',
|
||||
searchingText: '#{t '.search'}',
|
||||
theme: 'facebook'
|
||||
});
|
||||
|
||||
$('#message_sent_to_all').on('touchclick', function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$('#recipients').slideUp();
|
||||
} else {
|
||||
$('#recipients').slideDown();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
- title t('.title')
|
||||
|
||||
= simple_form_for @message do |f|
|
||||
- if FoodsoftConfig[:mailing_list].blank?
|
||||
= f.input :sent_to_all, :as => :boolean
|
||||
- else
|
||||
%b= t('.list.desc', list: mail_to(FoodsoftConfig[:mailing_list])).html_safe
|
||||
%br/
|
||||
%small{:style => "color:grey"}
|
||||
= t '.list.subscribe_msg'
|
||||
%br/
|
||||
- if FoodsoftConfig[:mailing_list_subscribe].blank?
|
||||
= t('.list.subscribe', link: link_to(t('.list.wiki'), wiki_page_path('MailingListe'))).html_safe
|
||||
- else
|
||||
= t('.list.mail', email: mail_to(FoodsoftConfig[:mailing_list_subscribe])).html_safe
|
||||
|
||||
#recipients
|
||||
= f.input :recipient_tokens, :input_html => { 'data-pre' => User.where(id: @message.recipients_ids).map(&:token_attributes).to_json }
|
||||
= f.input :group_id, :as => :select, :collection => Group.undeleted.order('type DESC', 'name ASC').reject { |g| g.memberships.empty? }
|
||||
= f.input :private
|
||||
= f.input :subject, input_html: {class: 'input-xxlarge'}
|
||||
= f.input :body, input_html: {class: 'input-xxlarge', rows: 13}
|
||||
.form-actions
|
||||
= f.submit class: 'btn btn-primary'
|
||||
= link_to t('ui.or_cancel'), :back
|
||||
21
plugins/messages/app/views/messages/show.haml
Normal file
21
plugins/messages/app/views/messages/show.haml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
- title t('.title')
|
||||
|
||||
%div{:style => "width:40em"}
|
||||
%table{:style => "width:25em"}
|
||||
%tr
|
||||
%td= t '.from'
|
||||
%td=h @message.sender_name
|
||||
%tr
|
||||
%td= t '.subject'
|
||||
%td
|
||||
%b=h @message.subject
|
||||
%tr
|
||||
%td= t '.sent_on'
|
||||
%td= format_time(@message.created_at)
|
||||
%hr/
|
||||
%p= simple_format(h(@message.body))
|
||||
%hr/
|
||||
%p
|
||||
= link_to t('.reply'), new_message_path(:message => {:reply_to => @message.id}), class: 'btn'
|
||||
|
|
||||
= link_to t('.all_messages'), messages_path
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
= raw @message.body
|
||||
======================================================================
|
||||
\
|
||||
= raw t '.footer', reply_url: new_message_url('message[reply_to]' => @message.id), msg_url: message_url(@message), profile_url: my_profile_url
|
||||
Loading…
Add table
Add a link
Reference in a new issue