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?
|
- if FoodsoftMessages.enabled?
|
||||||
= s.simple_fields_for :messages, defaults: { inline_label: true, label: false } do |messages|
|
= 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'] }
|
= 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
|
- content_for :sidebar do
|
||||||
%p= t('.first_paragraph', url: link_to(t('.new_messagegroups'), new_admin_messagegroup_path)).html_safe
|
%p= t('.first_paragraph', url: link_to(t('.new_messagegroups'), new_admin_messagegroup_path)).html_safe
|
||||||
|
%p= t '.second_paragraph'
|
||||||
.well.well-small
|
.well.well-small
|
||||||
= form_tag admin_messagegroups_path, :method => :get, :remote => true,
|
= form_tag admin_messagegroups_path, :method => :get, :remote => true,
|
||||||
'data-submit-onchange' => true, class: 'form-search' do
|
'data-submit-onchange' => true, class: 'form-search' do
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
- title t('.title')
|
- title t('.title')
|
||||||
|
|
||||||
- content_for :actionbar do
|
= render 'messages/actionbar', active: 'message_threads'
|
||||||
= link_to t('.messages'), messages_path, class: 'btn'
|
|
||||||
= link_to t('.new'), new_message_path, class: 'btn btn-primary'
|
|
||||||
|
|
||||||
= render 'groupmessage_threads', group: nil, name: t('.other'), id: 0
|
= render 'groupmessage_threads', group: nil, name: t('.other'), id: 0
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- title t('.title')
|
- title t('.title')
|
||||||
|
|
||||||
= t('.body').html_safe
|
%p= t('.body')
|
||||||
|
|
||||||
= render :partial => "messagegroup", :collection => @messagegroups
|
= 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')
|
- title t('.title')
|
||||||
|
|
||||||
- content_for :actionbar do
|
= render 'actionbar', active: 'messages'
|
||||||
= link_to t('.message_threads'), message_threads_path, class: 'btn'
|
|
||||||
= link_to t('.new'), new_message_path, class: 'btn btn-primary'
|
|
||||||
#messages
|
#messages
|
||||||
= render 'messages', messages: @messages, pagination: true
|
= render 'messages', messages: @messages, pagination: true
|
||||||
|
|
|
@ -18,6 +18,7 @@ de:
|
||||||
first_paragraph: Hier kannst du %{url} anlegen, Gruppen bearbeiten und löschen.
|
first_paragraph: Hier kannst du %{url} anlegen, Gruppen bearbeiten und löschen.
|
||||||
new_messagegroup: Neue Nachrichtengruppe anlegen
|
new_messagegroup: Neue Nachrichtengruppe anlegen
|
||||||
new_messagegroups: neue Nachrichtengruppe
|
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
|
title: Nachrichtengruppen
|
||||||
new:
|
new:
|
||||||
title: Nachrichtengruppe anlegen
|
title: Nachrichtengruppe anlegen
|
||||||
|
@ -47,6 +48,12 @@ de:
|
||||||
join: Nachrichtengruppe beitreten
|
join: Nachrichtengruppe beitreten
|
||||||
leave: Nachrichtengruppe verlassen
|
leave: Nachrichtengruppe verlassen
|
||||||
messages:
|
messages:
|
||||||
|
actionbar:
|
||||||
|
message_threads:
|
||||||
|
messagegroups:
|
||||||
|
messages:
|
||||||
|
create:
|
||||||
|
notice: Message is saved and will be sent.
|
||||||
index:
|
index:
|
||||||
message_threads: Nachrichtenverläufe
|
message_threads: Nachrichtenverläufe
|
||||||
thread:
|
thread:
|
||||||
|
@ -56,7 +63,6 @@ de:
|
||||||
groupmessage_threads:
|
groupmessage_threads:
|
||||||
show_message_threads: Alle Nachrichtenverläufe anzeigen
|
show_message_threads: Alle Nachrichtenverläufe anzeigen
|
||||||
index:
|
index:
|
||||||
messages: Nachrichten
|
|
||||||
new: Neue Nachricht
|
new: Neue Nachricht
|
||||||
other: Allgemeine Nachrichten
|
other: Allgemeine Nachrichten
|
||||||
title: Nachrichtenverläufe
|
title: Nachrichtenverläufe
|
||||||
|
@ -67,7 +73,7 @@ de:
|
||||||
started_by: Gestartet von
|
started_by: Gestartet von
|
||||||
show:
|
show:
|
||||||
other: Allgemeine Nachrichten
|
other: Allgemeine Nachrichten
|
||||||
|
reply: Antworten
|
||||||
navigation:
|
navigation:
|
||||||
admin:
|
admin:
|
||||||
messagegroups: Nachrichtengruppen
|
messagegroups: Nachrichtengruppen
|
||||||
messagegroups: Nachrichtengruppen
|
|
||||||
|
|
|
@ -14,26 +14,27 @@ en:
|
||||||
user_tokens: Members
|
user_tokens: Members
|
||||||
models:
|
models:
|
||||||
message: Message
|
message: Message
|
||||||
messagegroup: Messagegroup
|
messagegroup: Message group
|
||||||
admin:
|
admin:
|
||||||
messagegroups:
|
messagegroups:
|
||||||
destroy:
|
destroy:
|
||||||
error: 'Messagegroup could not be deleted: %{error}'
|
error: 'Message group could not be deleted: %{error}'
|
||||||
notice: Messagegroup was deleted
|
notice: Message group was deleted
|
||||||
edit:
|
edit:
|
||||||
title: Edit messagegroup
|
title: Edit message group
|
||||||
index:
|
index:
|
||||||
first_paragraph: Here you can create %{url}, edit and delete them.
|
first_paragraph: Here you can create %{url}, edit and delete them.
|
||||||
new_messagegroup: Create new messagegroup
|
new_messagegroup: Create new message group
|
||||||
new_messagegroups: new messagegroups
|
new_messagegroups: new message groups
|
||||||
title: Messagegroups
|
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:
|
new:
|
||||||
title: Create messagegroup
|
title: Create message group
|
||||||
show:
|
show:
|
||||||
confirm: Are you sure?
|
confirm: Are you sure?
|
||||||
edit: Edit group/members
|
edit: Edit group/members
|
||||||
send_message: Send message
|
send_message: Send message
|
||||||
title: Messagegroup %{name}
|
title: Message group %{name}
|
||||||
messagegroups:
|
messagegroups:
|
||||||
members: Members
|
members: Members
|
||||||
name: Name
|
name: Name
|
||||||
|
@ -61,28 +62,31 @@ en:
|
||||||
home:
|
home:
|
||||||
index:
|
index:
|
||||||
messages:
|
messages:
|
||||||
title: Newest Messages
|
title: Newest messages
|
||||||
view_all: See all messages
|
view_all: See all messages
|
||||||
start_nav:
|
start_nav:
|
||||||
write_message: Write message
|
write_message: Write message
|
||||||
messagegroups:
|
messagegroups:
|
||||||
index:
|
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: Messagegroups
|
title: Message groups
|
||||||
join:
|
join:
|
||||||
error: 'Messagegroup could not be joined: %{error}'
|
error: 'Could not join message group: %{error}'
|
||||||
notice: Messagegroup was joined
|
notice: Joined message group
|
||||||
leave:
|
leave:
|
||||||
error: 'Messagegroup could not be left: %{error}'
|
error: 'Messagegroup could not be left: %{error}'
|
||||||
notice: Messagegroup was left
|
notice: Left message group
|
||||||
messagegroup:
|
messagegroup:
|
||||||
join: Join messagegroup
|
join: Join message group
|
||||||
leave: Leave messagegroup
|
leave: Leave message group
|
||||||
messages:
|
messages:
|
||||||
|
actionbar:
|
||||||
|
message_threads: Show as threads
|
||||||
|
messagegroups: Subscribe to groups
|
||||||
|
messages: Show as list
|
||||||
create:
|
create:
|
||||||
notice: Message is saved and will be sent.
|
notice: Message is saved and will be sent.
|
||||||
index:
|
index:
|
||||||
message_threads: View as threads
|
|
||||||
new: New message
|
new: New message
|
||||||
title: Messages
|
title: Messages
|
||||||
messages:
|
messages:
|
||||||
|
@ -116,11 +120,11 @@ en:
|
||||||
title: Show message
|
title: Show message
|
||||||
thread:
|
thread:
|
||||||
all_message_threads: All message threads
|
all_message_threads: All message threads
|
||||||
|
reply: Reply
|
||||||
message_threads:
|
message_threads:
|
||||||
groupmessage_threads:
|
groupmessage_threads:
|
||||||
show_message_threads: show all
|
show_message_threads: show all
|
||||||
index:
|
index:
|
||||||
messages: View as messages
|
|
||||||
new: New message
|
new: New message
|
||||||
other: General
|
other: General
|
||||||
title: Message threads
|
title: Message threads
|
||||||
|
@ -139,6 +143,8 @@ en:
|
||||||
'
|
'
|
||||||
navigation:
|
navigation:
|
||||||
admin:
|
admin:
|
||||||
messagegroups: Messagegroups
|
messagegroups: Message groups
|
||||||
messagegroups: Messagegroups
|
|
||||||
messages: Messages
|
messages: Messages
|
||||||
|
shared:
|
||||||
|
user_form_fields:
|
||||||
|
messagegroups: Join or leave message groups
|
||||||
|
|
|
@ -5,9 +5,7 @@ module FoodsoftMessages
|
||||||
unless primary[:foodcoop].nil?
|
unless primary[:foodcoop].nil?
|
||||||
sub_nav = primary[:foodcoop].sub_navigation
|
sub_nav = primary[:foodcoop].sub_navigation
|
||||||
sub_nav.items <<
|
sub_nav.items <<
|
||||||
SimpleNavigation::Item.new(primary, :messagegroups, I18n.t('navigation.messagegroups'), context.messagegroups_path)
|
SimpleNavigation::Item.new(primary, :messages, I18n.t('navigation.messages'), context.message_threads_path)
|
||||||
sub_nav.items <<
|
|
||||||
SimpleNavigation::Item.new(primary, :messages, I18n.t('navigation.messages'), context.messages_path)
|
|
||||||
# move to right before tasks item
|
# move to right before tasks item
|
||||||
if i = sub_nav.items.index(sub_nav[:tasks])
|
if i = sub_nav.items.index(sub_nav[:tasks])
|
||||||
sub_nav.items.insert(i, sub_nav.items.delete_at(-1))
|
sub_nav.items.insert(i, sub_nav.items.delete_at(-1))
|
||||||
|
|
Loading…
Reference in a new issue