_footer.html.erb 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <footer>
  2. <hr id='footer_separator'/>
  3. <table id='footer_table'>
  4. <tr>
  5. <td id='footer_left'>
  6. <span id='footer_follow' class='desktop'>
  7. <%= t("footer.follow") %>
  8. </span>
  9. <% @user.user_social_links.each do |link| %>
  10. <%=
  11. link_to(
  12. image_tag(
  13. link.social_link.logo,
  14. class: "footer_social_icon",
  15. alt: link.social_link.i18n_link_title),
  16. link.generate_link,
  17. target: "_blank",
  18. title: link.social_link.i18n_link_title
  19. )
  20. %>
  21. <% end %>
  22. </td>
  23. <td id='footer_center'>
  24. <%= t("footer.copy", name: @user.full_name, year: Date.today.year) %>
  25. </td>
  26. <td id='footer_right'>
  27. <%= link_to(
  28. t("footer.help"),
  29. help_path,
  30. id: "footer_help",
  31. title: t("footer.help")
  32. ) %>
  33. <br/><br/>
  34. <%
  35. path = request.fullpath
  36. if path.to_s[0..4] =~ /[a-z]{2}/ then
  37. path = path[3..] + "/"
  38. end
  39. %>
  40. <% I18n.available_locales.each do |locale| %>
  41. <%=
  42. link_to(
  43. image_tag(
  44. "lang/#{locale.to_s}.svg",
  45. alt: t("footer.lang_#{locale.to_s}")
  46. ),
  47. request.protocol +
  48. request.host_with_port +
  49. "/" +
  50. locale.to_s +
  51. path,
  52. class: "lang",
  53. title: t("footer.lang_#{locale.to_s}")
  54. )
  55. %>
  56. <% end %>
  57. </td>
  58. </tr>
  59. </table>
  60. </footer>