_footer.html.erb 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. <%=
  10. link_to(
  11. image_tag(
  12. "social/email.svg",
  13. class: "footer_social_icon",
  14. alt: t("social.mail")
  15. ),
  16. "javascript:showContactForm();",
  17. title: + t("index.email")
  18. )
  19. %>
  20. <% @user.user_social_links.each do |link| %>
  21. <%=
  22. link_to(
  23. image_tag(
  24. link.social_link.logo,
  25. class: "footer_social_icon",
  26. alt: link.social_link.i18n_link_title
  27. ),
  28. link.generate_link,
  29. target: "_blank",
  30. title: link.social_link.i18n_link_title
  31. )
  32. %>
  33. <% end %>
  34. </td>
  35. <td id='footer_center'>
  36. <%= t("footer.copy", name: @user.full_name, year: Date.today.year) %>
  37. </td>
  38. <td id='footer_right'>
  39. <%= link_to(
  40. t("footer.help"),
  41. help_path,
  42. id: "footer_help",
  43. title: t("footer.help")
  44. ) %>
  45. <br/><br/>
  46. <%
  47. path = request.fullpath
  48. if path.to_s[0..4] =~ /[a-z]{2}/ then
  49. path = path[3..] + "/"
  50. end
  51. %>
  52. <% I18n.available_locales.each do |locale| %>
  53. <%=
  54. link_to(
  55. image_tag(
  56. "lang/#{locale.to_s}.svg",
  57. alt: t("footer.lang_#{locale.to_s}")
  58. ),
  59. request.protocol +
  60. request.host_with_port +
  61. "/" +
  62. locale.to_s +
  63. path,
  64. class: "lang",
  65. title: t("footer.lang_#{locale.to_s}")
  66. )
  67. %>
  68. <% end %>
  69. </td>
  70. </tr>
  71. </table>
  72. </footer>