A corporation manager and dashboard for EVE Online
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 lines
620 B

  1. require 'calefaction/eve'
  2. require 'calefaction/version'
  3. module ApplicationHelper
  4. def get_title(title = '')
  5. base = AdminSetting.get(:site_name)
  6. title.empty? ? base : "#{title} : #{base}"
  7. end
  8. def corp_logo_url(size = 256)
  9. corp_id = AdminSetting.get(:corp_id)
  10. "https://image.eveonline.com/Corporation/#{corp_id}_#{size}.png"
  11. end
  12. def corp_logo_tag
  13. corp_name = AdminSetting.get(:corp_name)
  14. image_tag(corp_logo_url, title: corp_name, alt: "#{corp_name} Logo")
  15. end
  16. def copyright_year
  17. start = 2015
  18. year = Time.now.year
  19. year > start ? "#{start}–#{year}" : start
  20. end
  21. end