feature/add-email-visibilty-toggle: Updated email visibility settings and conditions in UI

Added hint for email visibility to logged-in users and adjusted conditions for email display to users who have opted to show their email.
This commit is contained in:
Joan Nyambura 2023-11-08 19:32:13 +03:00
parent c8692b1ea8
commit 5e60757ebe
2 changed files with 4 additions and 1 deletions

View File

@ -185,6 +185,9 @@
<%= f.label :show_email, "Show Email Address:",
:class => "required" %>
<%= f.check_box :show_email %>
<span class="hint indent">
Only shown to logged-in users
</span>
</div>
<div class="boxline">

View File

@ -100,7 +100,7 @@
<div style="clear: both;"></div>
<% end %>
<% if @user.is_admin? && @user.show_email? %>
<% if @user&.is_admin? || @user&.show_email? %>
<label class="required">E-Mail:</label>
<span class="d">
<%= @showing_user.email %>