From 76a64666451835976c97f57ae594cbea9d81cf8f Mon Sep 17 00:00:00 2001 From: Michael Kohl Date: Tue, 11 Jan 2022 10:10:21 +0700 Subject: [PATCH] Use crayons_icon_tag for user and org views (#16014) --- app/views/organizations/_header.html.erb | 10 +++++----- app/views/users/_account.html.erb | 2 +- app/views/users/_additional_authentication.html.erb | 2 +- app/views/users/_main_feed.html.erb | 2 +- app/views/users/_org_admin.html.erb | 2 +- app/views/users/_sidebar.html.erb | 2 +- app/views/users/edit.html.erb | 2 +- app/views/users/show.html.erb | 12 ++++++------ 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/views/organizations/_header.html.erb b/app/views/organizations/_header.html.erb index 2cee56444..609c9a01e 100644 --- a/app/views/organizations/_header.html.erb +++ b/app/views/organizations/_header.html.erb @@ -36,30 +36,30 @@
<% if @organization.location.present? %> - <%= inline_svg_tag("location.svg", aria: true, class: "crayons-icon mr-2 shrink-0", title: t("views.organizations.location.icon")) %> + <%= crayons_icon_tag(:location, css_class: "mr-2 shrink-0", title: t("views.organizations.location.icon")) %> <%= sanitize @organization.location %> <% end %> - <%= inline_svg_tag("cake.svg", aria: true, class: "crayons-icon mr-2 shrink-0", title: t("views.organizations.joined.icon")) %> + <%= crayons_icon_tag(:cake, css_class: "mr-2 shrink-0", title: t("views.organizations.joined.icon")) %> <%= t("views.organizations.joined.text_html", date: local_date(@user.created_at)) %> <% if @user.twitter_username.present? %> - <%= inline_svg_tag("twitter.svg", class: "crayons-icon", aria: true, title: t("views.organizations.twitter.icon")) %> + <%= crayons_icon_tag(:twitter, title: t("views.organizations.twitter.icon")) %> <% end %> <% if @user.github_username.present? %> - <%= inline_svg_tag("github.svg", class: "crayons-icon", aria: true, title: t("views.organizations.github.icon")) %> + <%= crayons_icon_tag(:github, title: t("views.organizations.github.icon")) %> <% end %> <% if @user.profile.website_url.present? %> - <%= inline_svg_tag("external-link.svg", class: "crayons-icon", aria: true, title: t("views.organizations.external.icon")) %> + <%= crayons_icon_tag("external-link", title: t("views.organizations.external.icon")) %> <% end %> diff --git a/app/views/users/_account.html.erb b/app/views/users/_account.html.erb index 1085fbc45..18ae90ded 100644 --- a/app/views/users/_account.html.erb +++ b/app/views/users/_account.html.erb @@ -95,7 +95,7 @@ <%= hidden_field_tag :provider, provider.provider_name %> <% end %> diff --git a/app/views/users/_additional_authentication.html.erb b/app/views/users/_additional_authentication.html.erb index 2e38b4e1a..5332e3ad4 100644 --- a/app/views/users/_additional_authentication.html.erb +++ b/app/views/users/_additional_authentication.html.erb @@ -10,7 +10,7 @@ <% unless @user.authenticated_through?(provider.provider_name) %> <%= form_with url: provider.sign_in_path(state: "profile"), class: "flex w-100", local: true do |f| %> <%= f.button type: :submit, class: "crayons-btn crayons-btn--icon-left crayons-btn--brand-#{provider.provider_name} m-1" do %> - <%= inline_svg_tag("#{provider.provider_name}.svg", aria: true, class: "crayons-icon", title: provider.provider_name) %> + <%= crayons_icon_tag(provider.provider_name, title: provider.official_name) %> <%= t("views.settings.account.connect", provider: provider.official_name) %> <% end %> <% end %> diff --git a/app/views/users/_main_feed.html.erb b/app/views/users/_main_feed.html.erb index 27f6f6a7c..a76dcf0a4 100644 --- a/app/views/users/_main_feed.html.erb +++ b/app/views/users/_main_feed.html.erb @@ -2,7 +2,7 @@

- <%= inline_svg_tag("pin.svg", aria: true, class: "crayons-icon mr-2", title: t("views.users.pin_icon")) %> + <%= crayons_icon_tag(:pin, css_class: "mr-2", title: t("views.users.pin_icon")) %> <%= t("views.users.pinned") %>

diff --git a/app/views/users/_org_admin.html.erb b/app/views/users/_org_admin.html.erb index dc5c574cc..895112898 100644 --- a/app/views/users/_org_admin.html.erb +++ b/app/views/users/_org_admin.html.erb @@ -59,7 +59,7 @@ <%= t("views.settings.org.admin.secret_code") %> "> - <%= inline_svg_tag("copy.svg", aria: true, class: "crayons-icon", title: t("views.settings.org.admin.copy.icon")) %> + <%= crayons_icon_tag(:copy, title: t("views.settings.org.admin.copy.icon")) %>
diff --git a/app/views/users/_sidebar.html.erb b/app/views/users/_sidebar.html.erb index 993fe3a99..e42ecf1c7 100644 --- a/app/views/users/_sidebar.html.erb +++ b/app/views/users/_sidebar.html.erb @@ -50,7 +50,7 @@ <% cache "user-profile-sidebar-stats-#{@user.id}-#{@user.last_article_at&.rfc3339}-#{@user.last_comment_at&.rfc3339}-#{@user.following_tags_count}-#{@user.last_followed_at&.rfc3339}", expires_in: 10.days do %>
- <%= inline_svg_tag("post.svg", aria: true, class: "crayons-icon mr-3 color-base-50", title: t("views.users.side.post.icon")) %> + <%= crayons_icon_tag(:post, css_class: "mr-3 color-base-50", title: t("views.users.side.post.icon")) %> <%= t "views.users.side.post.text", count: @user.articles.published.size %>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 265d6759b..ccfe77c58 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -43,7 +43,7 @@