Add messagegroup
Messagegroups are a new kind of group. Every user can join and leave such a group on her own. They are useful to create topics for mails. E.g. if there is a weekly newsletter we can create a new messagegroup for it and every user which is interested in receiving the newsletter can join the corresponding group.
This commit is contained in:
parent
b30b4e46d8
commit
01cf6431a9
15 changed files with 172 additions and 9 deletions
|
|
@ -0,0 +1,8 @@
|
|||
%section.well
|
||||
%h3= messagegroup.name
|
||||
= render :partial => 'shared/group', :locals => { :group => messagegroup }
|
||||
= link_to_new_message(message_params: {group_id: messagegroup.id})
|
||||
- if messagegroup.member?(current_user)
|
||||
= link_to t('.leave'), leave_messagegroup_path(messagegroup), class: 'btn', method: :post
|
||||
- else
|
||||
= link_to t('.join'), join_messagegroup_path(messagegroup), class: 'btn', method: :post
|
||||
5
plugins/messages/app/views/messagegroups/index.html.haml
Normal file
5
plugins/messages/app/views/messagegroups/index.html.haml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
- title t('.title')
|
||||
|
||||
= t('.body').html_safe
|
||||
|
||||
= render :partial => "messagegroup", :collection => @messagegroups
|
||||
Loading…
Add table
Add a link
Reference in a new issue