Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed test-digest-button for Users other than Admins and Moderators #4293

Merged
merged 12 commits into from Dec 16, 2018
13 changes: 9 additions & 4 deletions app/views/users/profile.html.erb
Expand Up @@ -233,12 +233,17 @@
</div>
</div>
<% end %>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a <br /> here to add some space between buttons. And, please remove the extra spaces like line #239, 243, 245, 256. Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uzorjchibuzor the functionality is working great, please do the above changes to optimize design a little. Also, if you have idea for more clean design than you can try.

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will implement the changes suggested and also thoroughly look at the code to what can be refactored


<% if @profile_user && current_user && current_user.can_moderate? && @profile_user == current_user %>

<%= form_tag "/users/test_digest_email", method: :post do %>
<%= submit_tag "Test Digest Email", class: "btn btn-primary" %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<%= submit_tag "Test Digest Email", class: "btn btn-primary" %>
<%= submit_tag "Test Digest Email", class: "btn btn-secondary" %>

As secondary would look little lighter. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the btn-secondary bootstrap class is grayish, but the btn-info in a bit lighter than the primary. I have gone with that.

<% end %>

<% if @profile_user && current_user && @profile_user == current_user %>
<%= form_tag "/users/test_digest_email", method: :post do %>
<%= submit_tag "Test Digest Email" %>
<% end %>
<% end %>



<hr />

Expand Down