Skip to content

Commit

Permalink
Merge pull request #3203 from BTWS2/mail-to
Browse files Browse the repository at this point in the history
Make email address on user profiles a mailto link
  • Loading branch information
chvp authored Nov 19, 2021
2 parents a979e5c + a834d25 commit 238e0a6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/course_members/_members_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<%= link_to user.full_name, course_member_path(@course, user), title: user.full_name, class: "ellipsis-overflow" %>
<% end %>
</td>
<td><%= user.email %></td>
<td><%= mail_to(user.email, nil, { title: t('.send_mail') }) %></td>
<td><%= user.institution&.name %></td>
<td class="d-none d-sm-table-cell">
<%= render partial: 'application/progress_chart',
Expand Down
2 changes: 1 addition & 1 deletion app/views/course_members/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<% if @user.institution&.name.present? and @user.email.present? %>
&middot;
<% end %>
<%= @user.email %>
<%= mail_to(@user.email, nil, { title: t('.send_mail'), class: 'text-muted' }) %>
</span>
</div>
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<% if @user.institution&.name.present? and @user.email.present? %>
&middot;
<% end %>
<%= @user.email %>
<%= mail_to(@user.email, nil, { class: 'text-muted', title: t('course_members.show.send_mail') }) %>
</span>
<p class="timezone">
<%= t ".timezone" %> <b><%= @user.time_zone %></b>.
Expand Down
2 changes: 2 additions & 0 deletions config/locales/views/course_members/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ en:
close: "Close"
save: "Save"
course_overview: "Course overview for "
send_mail: "Send an email to this user."
form:
course_labels: "Labels"
labels_delimiter: "Use a comma to delimit labels"
Expand All @@ -19,6 +20,7 @@ en:
member_progress_chart_info_correct:
one: "Solved one exercise."
other: "Solved %{count} exercises."
send_mail: "Send an email to this user."
index:
close: "Close"
upload: "Upload changes"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/views/course_members/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ nl:
close: "Sluiten"
save: "Opslaan"
course_overview: "Cursusoverzicht voor "
send_mail: "Stuur een e-mail naar deze gebruiker."
form:
course_labels: "Labels"
labels_delimiter: "Gebruik een komma om labels te scheiden"
Expand All @@ -19,6 +20,7 @@ nl:
member_progress_chart_info_correct:
one: "Één oefening correct opgelost."
other: "%{count} oefeningen correct opgelost."
send_mail: "Stuur een e-mail naar deze gebruiker."
index:
close: "Sluiten"
upload: "Aanpassingen uploaden"
Expand Down

0 comments on commit 238e0a6

Please sign in to comment.