Commit 6fceeed3 authored by azul's avatar azul

cleanup: unused group link functions

parent 1fa218ff
......@@ -5,20 +5,6 @@
module Group::LinksHelper
protected
##
## HOME LINKS
##
def more_info_link
link_to('More Info', '#')
end
def edit_group_profile_link
if may_admin?(@group)
link_to :edit_profile_link.t, edit_group_profile_path(@group)
end
end
##
## MY MEMBERSHIP
##
......@@ -62,24 +48,6 @@ module Group::LinksHelper
end
end
##
## MEMBERSHIPS
##
def list_memberships_link
if policy(@group).may_list_memberships?
link_to(:see_all_link.t, group_memberships_path(@group))
end
end
def invite_link
link_to(:send_invites.t, new_group_invite_path(@group)) if may_admin?(@group)
end
def requests_link
link_to(:view_requests.t, group_requests_path(@group)) if may_admin?(@group)
end
def destroy_group_link
if logged_in?
if RequestToDestroyOurGroup.already_exists?(group: @group)
......@@ -103,12 +71,6 @@ module Group::LinksHelper
RequestToDestroyOurGroup.new(recipient: @group, requestable: @group)
end
def create_committee_link
if policy(@group).may_create_committee?
link_to :create_button.t, new_group_committee_path(@group)
end
end
def create_council_link
if logged_in?
if req = RequestToCreateCouncil.existing(group: @group)
......@@ -164,30 +126,4 @@ module Group::LinksHelper
RequestToRemoveUser
klass.for_membership(membership).first_or_initialize
end
##
## AVATARS
##
def edit_avatar_link
url = @group.avatar ? edit_group_avatar_path(@group, @group.avatar) : new_group_avatar_path(@group)
link_to_modal :upload_image.t, url, icon: 'picture_edit'
end
##
## TAGGING
##
def link_to_group_tag(tag, options)
options[:class] ||= ''
path = (params[:path] || []).dup
name = tag.name.tr(' ', '+')
if path.delete(name)
options[:class] += ' invert'
else
path << name
end
options[:title] = tag.name
link_to tag.name, groups_url(action: 'tags') + '/' + path.join('/'), options
end
end
-# i don't approve of all these being in the helper.
#permissions_area
= formy(:simple_form) do |f|
- f.label :visibility.t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment