Skip to content

Instantly share code, notes, and snippets.

@ruprict
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruprict/0920893c0bf3616809e3 to your computer and use it in GitHub Desktop.
Save ruprict/0920893c0bf3616809e3 to your computer and use it in GitHub Desktop.
def staff_tab(base_url)
sublinks = []
sublinks << {title: 'View All Staff', href: "#{base_url}/staff"}
sublinks << {title: 'Add New Staff', href: "#{base_url}/staff/new"} if current_user.can_manage?(org, [PermissionsSet::MANAGE_STAFF])
{ title: 'Staff', href: "#{base_url}/staff", icon:'icon-home', sublinks: sublinks }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment