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.

32 lines
1022 B

  1. # frozen_string_literal: true
  2. class AboutController < ApplicationController
  3. before_action :set_body_classes
  4. def index
  5. @description = Setting.site_description
  6. @open_registrations = Setting.open_registrations
  7. @closed_registrations_message = Setting.closed_registrations_message
  8. @user = User.new
  9. @user.build_account
  10. end
  11. def more
  12. @description = Setting.site_description
  13. @extended_description = Setting.site_extended_description
  14. @contact_account = Account.find_local(Setting.site_contact_username)
  15. @contact_email = Setting.site_contact_email
  16. @user_count = Rails.cache.fetch('user_count') { User.count }
  17. @status_count = Rails.cache.fetch('local_status_count') { Status.local.count }
  18. @domain_count = Rails.cache.fetch('distinct_domain_count') { Account.distinct.count(:domain) }
  19. end
  20. def terms; end
  21. private
  22. def set_body_classes
  23. @body_classes = 'about-body'
  24. end
  25. end