Sha256: 32a3f37a455c1100f9e4d66db72dbf30575aa660dd53aa32979b3081d973e91f

Contents?: true

Size: 1.83 KB

Versions: 4

Compression:

Stored size: 1.83 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">
    <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>

  <% end %>

</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lato_core-2.1.3 app/cells/lato_core/elements/button/views/link.html.erb
lato_core-2.1.2 app/cells/lato_core/elements/button/views/link.html.erb
lato_core-2.1.1 app/cells/lato_core/elements/button/views/link.html.erb
lato_core-2.1 app/cells/lato_core/elements/button/views/link.html.erb