Sha256: a9054119d3977517572b8f0602d2a3b011ae14110df6f6126c54a16fdb0e0d43

Contents?: true

Size: 1.21 KB

Versions: 32

Compression:

Stored size: 1.21 KB

Contents

format :html do
  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

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
card-mod-edit-0.14.2 set/all/bridge/follow_section.rb
card-mod-edit-0.14.1 set/all/bridge/follow_section.rb
card-mod-edit-0.14.0 set/all/bridge/follow_section.rb
card-mod-edit-0.13.4 set/all/bridge/follow_section.rb
card-mod-edit-0.13.3 set/all/bridge/follow_section.rb
card-mod-edit-0.13.2 set/all/bridge/follow_section.rb
card-mod-edit-0.13.1 set/all/bridge/follow_section.rb
card-mod-edit-0.13.0 set/all/bridge/follow_section.rb
card-mod-edit-0.11.7 set/all/bridge/follow_section.rb
card-mod-edit-0.12.0 set/all/bridge/follow_section.rb
card-mod-edit-0.11.6 set/all/bridge/follow_section.rb
card-mod-edit-0.11.5 set/all/bridge/follow_section.rb
card-mod-edit-0.11.4 set/all/bridge/follow_section.rb
card-mod-edit-0.11.3 set/all/bridge/follow_section.rb
card-mod-edit-0.11.2 set/all/bridge/follow_section.rb
card-mod-edit-0.11.1 set/all/bridge/follow_section.rb
card-mod-edit-0.11.0 set/all/bridge/follow_section.rb
card-mod-edit-0.1 set/all/bridge/follow_section.rb
card-1.100.0 mod/edit/set/all/bridge/follow_section.rb
card-1.99.6 mod/edit/set/all/bridge/follow_section.rb