Sha256: 6a0bf9666a5eeda6fc6a013c49eb120827219e23a1ca58447de98c4f8150b475

Contents?: true

Size: 1.94 KB

Versions: 2

Compression:

Stored size: 1.94 KB

Contents

<div class="elements-button">

  <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

2 entries across 2 versions & 1 rubygems

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