28 lines
699 B
Ruby
28 lines
699 B
Ruby
module ApplicationHelper
|
|
def sidenav_files_nav_link_active?(project)
|
|
release_controller_names = available_release_types_model_names.map(&:plural)
|
|
|
|
current_page?(project_path(project)) || controller_name.in?(release_controller_names) || controller_name == "reports"
|
|
end
|
|
|
|
def project_feature(project, name)
|
|
if project.feature_enabled?(name)
|
|
yield
|
|
end
|
|
end
|
|
|
|
def options_for_predefined_client_name_select
|
|
[
|
|
["Discovery", :discovery],
|
|
["Nat Geo", :nat_geo],
|
|
["Other", :other],
|
|
]
|
|
end
|
|
|
|
def options_for_graphic_types_select
|
|
[
|
|
"Titlecard", "Logo", "Lower Third", "Upper Third", "Subtitle", "Graphic", "Credits", "Other",
|
|
]
|
|
end
|
|
end
|