diff options
Diffstat (limited to 'app/helpers/members_helper.rb')
-rw-r--r-- | app/helpers/members_helper.rb | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index 877c77050be..f1b8962eb36 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -11,17 +11,17 @@ module MembersHelper text = 'Are you sure you want to ' action = - if member.request? - if member.user == user - 'withdraw your access request for' + if member.request? + if member.user == user + 'withdraw your access request for' + else + "deny #{member.user.name}'s request to join" + end + elsif member.invite? + "revoke the invitation for #{member.invite_email} to join" else - "deny #{member.user.name}'s request to join" + "remove #{member.user.name} from" end - elsif member.invite? - "revoke the invitation for #{member.invite_email} to join" - else - "remove #{member.user.name} from" - end text << action << " the #{member.source.human_name} #{member.real_source_type.humanize(capitalize: false)}?" end @@ -36,4 +36,16 @@ module MembersHelper "Are you sure you want to leave the " \ "\"#{member_source.human_name}\" #{member_source.class.to_s.humanize(capitalize: false)}?" end + + def filter_group_project_member_path(options = {}) + exist_opts = { + search: params[:search], + sort: params[:sort] + } + + options = exist_opts.merge(options) + path = request.path + path << "?#{options.to_param}" + path + end end |