def auth_button(provider, options = {})
link_to(
- image_tag("#{provider}.svg",
+ image_tag("auth_providers/#{provider}.svg",
:alt => t("application.auth_providers.#{provider}.alt"),
:class => "rounded-1",
:size => "36"),
def auth_button_preferred(provider, options = {})
link_to(
- image_tag("#{provider}.svg",
+ image_tag("auth_providers/#{provider}.svg",
:alt => t("application.auth_providers.#{provider}.alt"),
:class => "rounded-1 me-3",
:size => "36") + t("application.auth_providers.#{provider}.title"),
<div class="col justify-content-center d-flex align-items-center flex-wrap gap-2">
<% Auth.providers.each_value do |provider| %>
<% if provider == "openid" %>
- <%= button_tag image_tag("openid.svg",
+ <%= button_tag image_tag("auth_providers/openid.svg",
:alt => t(".openid.alt"),
:size => "36"),
:type => "button",
<%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
<div class="mb-3">
<label for="openid_url" class="form-label">
- <%= image_tag "openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
+ <%= image_tag "auth_providers/openid.svg", :size => "36", :alt => "", :class => "align-text-bottom" %>
<%= t ".openid_url" %>
</label>
<%= hidden_field_tag("referer", params[:referer], :autocomplete => "off") %>
def test_auth_button
button = auth_button("google")
- img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/google.svg\" width=\"36\" height=\"36\" />"
+ img_tag = "<img alt=\"Google logo\" class=\"rounded-1\" src=\"/images/auth_providers/google.svg\" width=\"36\" height=\"36\" />"
assert_equal("<a class=\"auth_button btn btn-light p-2\" title=\"Log in with Google\" rel=\"nofollow\" data-method=\"post\" href=\"/auth/google\">#{img_tag}</a>", button)
end