Sha256: 67533e0cee0b659176c21ddda2e06b0d4fafaec149c61e8edd54a02b8d999c31

Contents?: true

Size: 1.97 KB

Versions: 1

Compression:

Stored size: 1.97 KB

Contents

<div class="elements-button <%= @block_class %>">

  <a
    class="
    button elements-button__element
    elements-button__element--<%= @args[:style] %>
    elements-button__link"
    title="<%= @args[:label] %>"
    id="<%= @args[:id] %>"
    <% if !@show_confirmation %>
      href="<%= @args[:url] %>"
    <% end %>
    <% if @show_method && !@show_confirmation %>
      data-method="<%= @args[:method] %>"
    <% end %>
    <% if @args[:remote] && !@show_confirmation %>
      data-remote="true"
    <% end %>
    <% if @args[:onclick] && !@show_confirmation %>
      onclick="<%= @args[:onclick] %>"
    <% end %>
    <% if @show_confirmation %>
      data-confirmation="true"
    <% end %>
  >
    <% if @show_icon && @icon_left %>
      <i class="fa fa-<%= @args[:icon] %> icon-left" aria-hidden="true"></i>
    <% end %>
    
    <%= @args[:label] %>

    <% if @show_icon && @icon_right %>
      <i class="fa fa-<%= @args[:icon] %> icon-right" aria-hidden="true"></i>
    <% end %>
  </a>

  <% if @show_confirmation %>

  <div class="elements-button__confirmation">
    <div class="elements-button__confirmation-content">
      <span class="message"><%= @args[:confirmation][:message] %></span>

      <a
        class="button popup true"
        href="<%= @args[:url] %>"
        title="<%= @args[:confirmation][:positive_response] %>"
        <% if @show_method %>
          data-method="<%= @args[:method] %>"
        <% end %>
        <% if @args[:remote] %>
          data-remote="true"
        <% end %>
        <% if @args[:onclick] %>
          onclick="<%= @args[:onclick] %>"
        <% end %>
      >
        <i class="fa fa-check" aria-hidden="true"></i> <%= @args[:confirmation][:positive_response] %>
      </a>
      <button
        class="button popup false"
        title="<%= @args[:confirmation][:negative_response] %>"
      >
        <i class="fa fa-ban" aria-hidden="true"></i> <%= @args[:confirmation][:negative_response] %>
      </button>
    </div>
  </div>

  <% end %>

</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lato_core-2.2.2 app/cells/lato_core/elements/button/views/link.html.erb