2016-06-16 23:09:34 +05:30
|
|
|
- member = source.members.find_by(user_id: current_user.id)
|
2016-06-22 15:30:34 +05:30
|
|
|
- group_member = source.group.members.find_by(user_id: current_user.id) if source.respond_to?(:group) && source.group
|
2016-06-16 23:09:34 +05:30
|
|
|
|
2016-06-22 15:30:34 +05:30
|
|
|
- unless group_member
|
|
|
|
- if member
|
|
|
|
- if member.request?
|
|
|
|
= link_to 'Withdraw Access Request', polymorphic_path([:leave, source, :members]),
|
|
|
|
method: :delete,
|
|
|
|
data: { confirm: remove_member_message(member) },
|
|
|
|
class: 'btn access-request-button hidden-xs'
|
|
|
|
- else
|
|
|
|
= link_to 'Request Access', polymorphic_path([:request_access, source, :members]),
|
|
|
|
method: :post,
|
2016-06-16 23:09:34 +05:30
|
|
|
class: 'btn access-request-button hidden-xs'
|