Sha256: 80cf0fb80d029b87ef6589dbfcda9307e29a30d4c5d0ff4ce63693a5c0adf751

Contents?: true

Size: 1.37 KB

Versions: 19

Compression:

Stored size: 1.37 KB

Contents

<div id="follow-resource">
  <% if current_user %>
    <% if current_user.follows?(followable) %>
      <%= button_to decidim.follow_path, class: "button secondary hollow expanded small button--icon follow-button", params: { follow: { followable_gid: followable.to_sgid.to_s }}, data: { disable: true }, method: :delete, remote: true do %>
        <%= icon "bell" %>
        <span>
          <%= t("follows.destroy.button", scope: "decidim") %>
        </span>
      <% end %>
    <% else %>
      <%= button_to decidim.follow_path, class: "button secondary hollow expanded small button--icon follow-button", params: { follow: { followable_gid: followable.to_sgid.to_s }}, data: { disable: true }, remote: true do %>
        <%= icon "bell" %>
        <span>
          <%= t("follows.create.button", scope: "decidim") %>
        </span>
      <% end %>
    <% end %>
  <% else %>
    <%= button_to(
      decidim.follow_path,
      class: "button secondary hollow expanded small button--icon follow-button",
      params: { follow: { followable_gid: followable.to_sgid.to_s }},
      data: { tooltip: true, disable_hover: false },
      :'aria-haspopup' => true,
      title: t(".sign_in_before_follow"),
      disabled: true,
      remote: true) do %>
      <%= icon "bell" %>
      <span>
        <%= t("follows.create.button", scope: "decidim") %>
      </span>
    <% end %>
  <% end %>
</div>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
decidim-core-0.11.2 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.11.1 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.11.0.pre1 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.10.1 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.10.0 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.9.3 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.9.2 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.9.1 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.9.0 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.8.4 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.8.3 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.8.2 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.8.1 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.8.0 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.7.4 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.7.3 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.7.2 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.7.1 app/views/decidim/shared/_follow_button.html.erb
decidim-core-0.7.0 app/views/decidim/shared/_follow_button.html.erb