You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2021/03/26 18:54:36 UTC

[allura] 01/01: Small tweaks to controls around user messaging

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/user_msg_tweaks
in repository https://gitbox.apache.org/repos/asf/allura.git

commit df96a859312c6a5d57c9caa2a81df20b39a2a220
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Fri Mar 26 14:48:59 2021 -0400

    Small tweaks to controls around user messaging
---
 Allura/allura/ext/user_profile/templates/user_index.html | 2 +-
 Allura/allura/templates/user_prefs.html                  | 9 +++------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/Allura/allura/ext/user_profile/templates/user_index.html b/Allura/allura/ext/user_profile/templates/user_index.html
index c55196d..eeda770 100644
--- a/Allura/allura/ext/user_profile/templates/user_index.html
+++ b/Allura/allura/ext/user_profile/templates/user_index.html
@@ -36,7 +36,7 @@
 {% endblock %}
 
 {% block nav_menu %}
-    {% if user != c.user %}
+    {% if user != c.user and not c.user.is_anonymous() %}
     {{ g.icons['mail'].render(
         title='Send Message',
         show_title=True,
diff --git a/Allura/allura/templates/user_prefs.html b/Allura/allura/templates/user_prefs.html
index a64062e..6610ad1 100644
--- a/Allura/allura/templates/user_prefs.html
+++ b/Allura/allura/templates/user_prefs.html
@@ -149,14 +149,11 @@
         <fieldset class="preferences">
           <legend>User Messages</legend>
           <form method="POST" action="user_message">
-          <div class="grid-10">
               <input type="checkbox" id="allow_user_messages" name="allow_user_messages" {% if not c.user.get_pref('disable_user_messages') %} checked {% endif %}>
-              <label for="allow_user_messages">Allow another user to send me direct email messages</label>
-          </div>
-          <div class="grid-2">
+              <label for="allow_user_messages">Allow users to send me messages</label>
+              <br><br>
               <input class="submit" type="submit" value="Save">
-          </div>
-          {{ lib.csrf_token() }}
+              {{ lib.csrf_token() }}
           </form>
         </fieldset>
       {% endif %}