diff --git a/app/assets/javascripts/shareable_links/date_formatting.js b/app/assets/javascripts/shareable_links/date_formatting.js index c9d423662..5b0604606 100644 --- a/app/assets/javascripts/shareable_links/date_formatting.js +++ b/app/assets/javascripts/shareable_links/date_formatting.js @@ -2,12 +2,13 @@ (function() { $('.iso-formatted-date').each(function() { + const userLang = navigator.language || navigator.userLanguage || 'en-US'; let text = $(this).text().trim(); if (!text) { return; } - $(this).text(moment(text).local().format()); + $(this).text(moment(text).local(userLang).format('LLL')); }); }()); diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 292a0435f..825cf25cc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -181,7 +181,8 @@ module ApplicationHelper File.open(file_path) do |file| Base64.strict_encode64(file.read) end - "data:#{avatar_link.split('.').last};base64,#{encoded_data}" + + "data:image/svg+xml;base64,#{encoded_data}" else avatar_link end diff --git a/app/views/shareable_links/my_modules/_comments_list.html.erb b/app/views/shareable_links/my_modules/_comments_list.html.erb index 445422d65..38245a948 100644 --- a/app/views/shareable_links/my_modules/_comments_list.html.erb +++ b/app/views/shareable_links/my_modules/_comments_list.html.erb @@ -3,7 +3,7 @@
<% unless user == comment.user%>
- <%= image_tag avatar_path(comment.user, :icon_small), class: 'user-avatar' %> + <%= image_tag user_avatar_absolute_url(comment.user, :icon_small, true), class: 'user-avatar' %>
<%= comment.user.full_name %>
diff --git a/app/views/shareable_links/my_modules/_my_module_details.html.erb b/app/views/shareable_links/my_modules/_my_module_details.html.erb index 62a59836f..28f75975a 100644 --- a/app/views/shareable_links/my_modules/_my_module_details.html.erb +++ b/app/views/shareable_links/my_modules/_my_module_details.html.erb @@ -1,5 +1,3 @@ -<% my_module_editable = false %> -
@@ -31,7 +29,7 @@ <% if @my_module.completed? %>
- +
diff --git a/app/views/shareable_links/my_modules/_user_my_modules.html.erb b/app/views/shareable_links/my_modules/_user_my_modules.html.erb index 0eb8f8ac5..82c536305 100644 --- a/app/views/shareable_links/my_modules/_user_my_modules.html.erb +++ b/app/views/shareable_links/my_modules/_user_my_modules.html.erb @@ -2,7 +2,7 @@ <% my_module.user_my_modules.each do |um| %> <% user = um.user %>
- <%= user.full_name %> + <%= user.full_name %> <%= user.full_name %>
<% end %>