2011-10-30 23:02:41 +00:00
|
|
|
module Locomotive::AccountsHelper
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
def admin_on?(site = current_site)
|
2011-11-04 15:55:51 +00:00
|
|
|
site.memberships.detect { |m| m.admin? && m.account == current_locomotive_account }
|
2010-05-10 22:39:52 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2011-12-22 00:31:33 +00:00
|
|
|
def options_for_account
|
|
|
|
current_site.accounts.collect { |a| ["#{a.name} <#{a.email}>", a.id] }
|
|
|
|
end
|
|
|
|
|
2010-05-10 22:39:52 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|