module Teamster
module Core
module GeneralHelper
def title
App.title
end
def current_user
session[:current_user]
end
def use_included_bootstrap_css?
true
end
def use_included_bootstrap_js?
true
end
def include_bootstrap_css
%q~
~
end
def include_bootstrap_js
%q~
~
end
def navbar
erb :navbar
end
def footer
erb :footer
end
def available_modules(shuffle = false)
available_modules = [].tap do |arr|
App.modules.each do |mod|
module_name = mod.to_s.split("::").last
arr << ['/' + module_name.downcase, module_name] unless mod.under_development?
end
end
shuffle ? available_modules.shuffle : available_modules
end
def developing_modules
[].tap do |arr|
App.modules.each do |mod|
module_name = mod.to_s.split("::").last
arr << ['/' + module_name.downcase, module_name] if mod.under_development?
end
end
end
def all_modules(shuffle = false)
all_modules = [].tap do |arr|
App.modules.each do |mod|
module_name = mod.to_s.split("::").last
arr << ['/' + module_name.downcase, module_name]
end
end
shuffle ? all_modules.shuffle : all_modules
end
def find_template(views, name, engine, &block)
App.views.each {|v| super(v, name, engine, &block)}
end
end
end
end