Sha256: 8cc4c56b50affd7c9baaad904e59c09b64767744ad33df0c7238445ef7651074

Contents?: true

Size: 683 Bytes

Versions: 7

Compression:

Stored size: 683 Bytes

Contents

module ActiveAdmin
  module Views
    class Footer < Component

      def build(namespace)
        super id: "footer"
        @namespace = namespace

        if footer?
          para footer_text
        else
          para powered_by_message
        end
      end

      def footer?
        @namespace.footer.present?
      end

      private

      def footer_text
        helpers.render_or_call_method_or_proc_on(self, @namespace.footer)
      end

      def powered_by_message
        I18n.t('active_admin.powered_by',
          active_admin: link_to("Active Admin", "http://www.activeadmin.info"),
          version: ActiveAdmin::VERSION).html_safe
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
activeadmin-1.3.1 lib/active_admin/views/footer.rb
activeadmin-1.3.0 lib/active_admin/views/footer.rb
activeadmin-1.2.1 lib/active_admin/views/footer.rb
activeadmin-1.2.0 lib/active_admin/views/footer.rb
activeadmin-1.1.0 lib/active_admin/views/footer.rb
activeadmin-1.0.0 lib/active_admin/views/footer.rb
activeadmin-1.0.0.pre5 lib/active_admin/views/footer.rb