Sha256: 418ab5e5bae829fd10924768e1371890dd3e3266353751e9b2832d64fb329c97

Contents?: true

Size: 1.7 KB

Versions: 8

Compression:

Stored size: 1.7 KB

Contents

# -*- encoding : utf-8 -*-
class Card; module Set; class All; module Bridge;
# Set: All cards (Bridge, FollowSection)
#
module FollowSection;
extend Card::Set
def self.source_location; "/Users/ethan/dev/decko/gem/card-mod-edit/set/all/bridge/follow_section.rb"; end
module HtmlFormat; module_parent.send :register_set_format, Card::Format::HtmlFormat, self; extend Card::Set::AbstractFormat
  def follow_section
    return unless show_follow?

    wrap_with :div, class: "mb-3" do
      [follow_button_group, followers_bridge_link, follow_overview_button]
    end
  end

  def follow_button_group
    wrap_with :div, class: "btn-group btn-group-sm follow-btn-group" do
      [follow_button, follow_advanced]
    end
  end

  def follow_overview_button
    link_to_card [Auth.current, :follow], "all followed cards",
                 bridge_link_opts(class: "btn btn-sm btn-secondary",
                                  "data-cy": "follow-overview")
  end

  def follow_advanced
    opts = bridge_link_opts(class: "btn btn-sm btn-primary",
                            path: { view: :overlay_rule },
                            "data-cy": "follow-advanced")
    opts[:path].delete :layout
    link_to_card card.follow_rule_card(Auth.current.name, new: {}),
                 icon_tag("more_horiz"), opts
  end

  def followers_bridge_link
    cnt = card.followers_count
    link_to_card card.name.field(:followers), "#{cnt} follower#{'s' unless cnt == 1}",
                 bridge_link_opts(class: "btn btn-sm ml-2 btn-secondary slotter",
                                  remote: true, "data-cy": "followers")
  end
end
end;end;end;end;end;
# ~~ generated from /Users/ethan/dev/decko/gem/card-mod-edit/set/all/bridge/follow_section.rb ~~

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
card-1.101.7 tmpsets/set/mod011-card-mod-edit/all/bridge/follow_section.rb
card-1.101.6 tmpsets/set/mod011-card-mod-edit/all/bridge/follow_section.rb
card-1.101.5 tmpsets/set/mod012-card-mod-edit/all/bridge/follow_section.rb
card-1.101.4 tmpsets/set/mod012-card-mod-edit/all/bridge/follow_section.rb
card-1.101.3 tmpsets/set/mod012-card-mod-edit/all/bridge/follow_section.rb
card-1.101.2 tmpsets/set/mod012-card-mod-edit/all/bridge/follow_section.rb
card-1.101.1 tmpsets/set/mod012-card-mod-edit/all/bridge/follow_section.rb
card-1.101.0 tmpsets/set/mod012-card-mod-edit/all/bridge/follow_section.rb