<% # formstrap/shared/popup # # ==== Options # * +id - Identifier for this popup # # ==== Examples # To trigger this popup create an element with a data attribute like this # # # <%= render "formstrap/shared/popup", id: "popupId" do %#> # popup Content # <% end %#> # # If you want to pass a click event to an element inside the popup without opening the popup you can use the # "data-popup-pass-thru" attribute. # # # <%= render "formstrap/shared/popup", id: "popupId" do %#> # # <% end %#> data = local_assigns.has_key?(:data) ? data : {} options = { class: ["formstrap-popup", "closed"], data: data.merge("popup-target": "popup", "popup-id": id) } %> <%= content_tag(:div, options) do %> <%= yield %> <% end %>