Sha256: 0c1db1ef1ce84f5ca8f993b3f25a34e855b38f890c00abc61a0a4e9858d1be18

Contents?: true

Size: 732 Bytes

Versions: 7

Compression:

Stored size: 732 Bytes

Contents

module Sufia
  module PermissionsHelper

    def visibility_help
      help_link('generic_files/visibility', 'Visibility', 'Useage information for visibility')
    end

    def share_with_help
      help_link('generic_files/share_with', 'Share With', 'Useage information for sharing')
    end

    private

      def help_link(file, title, aria_label)
        link_to help_icon, '#', rel: 'popover', :'data-content' => capture_content(file),
          :'data-original-title' => title, :'aria-label' => aria_label
      end

      def capture_content(file)
        capture do
          render file
        end
      end

      def help_icon
        content_tag 'i', '', :'aria-hidden' => true, class: 'help-icon'
      end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sufia-6.2.0 app/helpers/sufia/permissions_helper.rb
sufia-6.1.0 app/helpers/sufia/permissions_helper.rb
sufia-6.0.0 app/helpers/sufia/permissions_helper.rb
sufia-6.0.0.rc4 app/helpers/sufia/permissions_helper.rb
sufia-6.0.0.rc3 app/helpers/sufia/permissions_helper.rb
sufia-6.0.0.rc2 app/helpers/sufia/permissions_helper.rb
sufia-6.0.0.rc1 app/helpers/sufia/permissions_helper.rb