# frozen_string_literal: true module ApplicationHelper include ActionView::Helpers::AssetTagHelper include ActionView::Helpers::UrlHelper include InputSanitizeHelper def module_page? controller_name == 'my_modules' || controller_name == 'my_module_repositories' end def experiment_page? controller_name == 'experiments' end def project_page? controller_name == 'projects' && action_name.in?(%w(show experiment_archive)) end def all_projects_page? controller_name == 'projects' && action_name.in?(%w(index archive)) end def display_tooltip(message, len = Constants::NAME_TRUNCATION_LENGTH) return '' unless message if message.strip.length > len sanitize_input("
#{user.email}
) if user_still_in_team user_team_assignment = user.user_assignments.find_by(assignable: team) user_description += %(#{I18n.t('atwho.users.popover_html', role: user_team_assignment.user_role.name.capitalize, team: user_team_assignment.assignable.name, time: I18n.l(user_team_assignment.created_at, format: :full_date))}