Small message group improvements
This commit is contained in:
parent
01cf6431a9
commit
179f442a87
9 changed files with 55 additions and 34 deletions
|
@ -1,4 +1,9 @@
|
|||
/ insert_before 'erb:contains("simple_fields_for :notify")'
|
||||
/ insert_after 'erb:contains("notify.input \'upcoming_tasks\'")'
|
||||
- if FoodsoftMessages.enabled?
|
||||
= s.simple_fields_for :messages, defaults: { inline_label: true, label: false } do |messages|
|
||||
= messages.input 'send_as_email', as: :boolean, input_html: { checked: f.object.settings.messages['send_as_email'] }
|
||||
- if Messagegroup.any?
|
||||
.controls
|
||||
= link_to messagegroups_path do
|
||||
= t('shared.user_form_fields.messagegroups')
|
||||
%i.icon.icon-chevron-right
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
- content_for :sidebar do
|
||||
%p= t('.first_paragraph', url: link_to(t('.new_messagegroups'), new_admin_messagegroup_path)).html_safe
|
||||
%p= t '.second_paragraph'
|
||||
.well.well-small
|
||||
= form_tag admin_messagegroups_path, :method => :get, :remote => true,
|
||||
'data-submit-onchange' => true, class: 'form-search' do
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
- title t('.title')
|
||||
|
||||
- content_for :actionbar do
|
||||
= link_to t('.messages'), messages_path, class: 'btn'
|
||||
= link_to t('.new'), new_message_path, class: 'btn btn-primary'
|
||||
= render 'messages/actionbar', active: 'message_threads'
|
||||
|
||||
= render 'groupmessage_threads', group: nil, name: t('.other'), id: 0
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- title t('.title')
|
||||
|
||||
= t('.body').html_safe
|
||||
%p= t('.body')
|
||||
|
||||
= render :partial => "messagegroup", :collection => @messagegroups
|
||||
|
|
8
plugins/messages/app/views/messages/_actionbar.haml
Normal file
8
plugins/messages/app/views/messages/_actionbar.haml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- content_for :actionbar do
|
||||
.btn-group
|
||||
= link_to message_threads_path, class: "btn #{'active' if active == 'message_threads'}" do
|
||||
%i.icon.icon-align-left{title: t('.message_threads')}
|
||||
= link_to messages_path, class: "btn #{'active' if active == 'messages'}" do
|
||||
%i.icon.icon-align-justify{title: t('.messages')}
|
||||
= link_to t('.messagegroups'), messagegroups_path, class: 'btn'
|
||||
= link_to t('.new'), new_message_path, class: 'btn btn-primary'
|
|
@ -1,7 +1,6 @@
|
|||
- title t('.title')
|
||||
|
||||
- content_for :actionbar do
|
||||
= link_to t('.message_threads'), message_threads_path, class: 'btn'
|
||||
= link_to t('.new'), new_message_path, class: 'btn btn-primary'
|
||||
= render 'actionbar', active: 'messages'
|
||||
|
||||
#messages
|
||||
= render 'messages', messages: @messages, pagination: true
|
||||
|
|
|
@ -18,6 +18,7 @@ de:
|
|||
first_paragraph: Hier kannst du %{url} anlegen, Gruppen bearbeiten und löschen.
|
||||
new_messagegroup: Neue Nachrichtengruppe anlegen
|
||||
new_messagegroups: neue Nachrichtengruppe
|
||||
second_paragraph: Eine Nachrichtengruppe ist wie ein Mail-Verteilen. Mitglieder können Verteiler in ihrem Profil abonnieren (und auch wieder abbestellen) an denen sie interessiert sind.
|
||||
title: Nachrichtengruppen
|
||||
new:
|
||||
title: Nachrichtengruppe anlegen
|
||||
|
@ -47,6 +48,12 @@ de:
|
|||
join: Nachrichtengruppe beitreten
|
||||
leave: Nachrichtengruppe verlassen
|
||||
messages:
|
||||
actionbar:
|
||||
message_threads:
|
||||
messagegroups:
|
||||
messages:
|
||||
create:
|
||||
notice: Message is saved and will be sent.
|
||||
index:
|
||||
message_threads: Nachrichtenverläufe
|
||||
thread:
|
||||
|
@ -56,7 +63,6 @@ de:
|
|||
groupmessage_threads:
|
||||
show_message_threads: Alle Nachrichtenverläufe anzeigen
|
||||
index:
|
||||
messages: Nachrichten
|
||||
new: Neue Nachricht
|
||||
other: Allgemeine Nachrichten
|
||||
title: Nachrichtenverläufe
|
||||
|
@ -67,7 +73,7 @@ de:
|
|||
started_by: Gestartet von
|
||||
show:
|
||||
other: Allgemeine Nachrichten
|
||||
reply: Antworten
|
||||
navigation:
|
||||
admin:
|
||||
messagegroups: Nachrichtengruppen
|
||||
messagegroups: Nachrichtengruppen
|
||||
|
|
|
@ -26,6 +26,7 @@ en:
|
|||
first_paragraph: Here you can create %{url}, edit and delete them.
|
||||
new_messagegroup: Create new message group
|
||||
new_messagegroups: new message groups
|
||||
second_paragraph: "A message group is like a mailing-list. Members can subscribe to (and unsubscribe from) the lists they're interested in, from their profile."
|
||||
title: Message groups
|
||||
new:
|
||||
title: Create message group
|
||||
|
@ -61,28 +62,31 @@ en:
|
|||
home:
|
||||
index:
|
||||
messages:
|
||||
title: Newest Messages
|
||||
title: Newest messages
|
||||
view_all: See all messages
|
||||
start_nav:
|
||||
write_message: Write message
|
||||
messagegroups:
|
||||
index:
|
||||
body: You can join or leave any of the messagegroups.
|
||||
body: 'A message group is like a mailing-list: you can join (or leave) any of them to receive the updates sent to that group.'
|
||||
title: Message groups
|
||||
join:
|
||||
error: 'Messagegroup could not be joined: %{error}'
|
||||
notice: Messagegroup was joined
|
||||
error: 'Could not join message group: %{error}'
|
||||
notice: Joined message group
|
||||
leave:
|
||||
error: 'Messagegroup could not be left: %{error}'
|
||||
notice: Messagegroup was left
|
||||
notice: Left message group
|
||||
messagegroup:
|
||||
join: Join message group
|
||||
leave: Leave message group
|
||||
messages:
|
||||
actionbar:
|
||||
message_threads: Show as threads
|
||||
messagegroups: Subscribe to groups
|
||||
messages: Show as list
|
||||
create:
|
||||
notice: Message is saved and will be sent.
|
||||
index:
|
||||
message_threads: View as threads
|
||||
new: New message
|
||||
title: Messages
|
||||
messages:
|
||||
|
@ -116,11 +120,11 @@ en:
|
|||
title: Show message
|
||||
thread:
|
||||
all_message_threads: All message threads
|
||||
reply: Reply
|
||||
message_threads:
|
||||
groupmessage_threads:
|
||||
show_message_threads: show all
|
||||
index:
|
||||
messages: View as messages
|
||||
new: New message
|
||||
other: General
|
||||
title: Message threads
|
||||
|
@ -140,5 +144,7 @@ en:
|
|||
navigation:
|
||||
admin:
|
||||
messagegroups: Message groups
|
||||
messagegroups: Messagegroups
|
||||
messages: Messages
|
||||
shared:
|
||||
user_form_fields:
|
||||
messagegroups: Join or leave message groups
|
||||
|
|
|
@ -5,9 +5,7 @@ module FoodsoftMessages
|
|||
unless primary[:foodcoop].nil?
|
||||
sub_nav = primary[:foodcoop].sub_navigation
|
||||
sub_nav.items <<
|
||||
SimpleNavigation::Item.new(primary, :messagegroups, I18n.t('navigation.messagegroups'), context.messagegroups_path)
|
||||
sub_nav.items <<
|
||||
SimpleNavigation::Item.new(primary, :messages, I18n.t('navigation.messages'), context.messages_path)
|
||||
SimpleNavigation::Item.new(primary, :messages, I18n.t('navigation.messages'), context.message_threads_path)
|
||||
# move to right before tasks item
|
||||
if i = sub_nav.items.index(sub_nav[:tasks])
|
||||
sub_nav.items.insert(i, sub_nav.items.delete_at(-1))
|
||||
|
|
Loading…
Reference in a new issue