Initial commit
This commit is contained in:
27
app/helpers/application_helper.rb
Normal file
27
app/helpers/application_helper.rb
Normal file
@@ -0,0 +1,27 @@
|
||||
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
|
||||
Reference in New Issue
Block a user