incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#7097] Tweaks per discussion for empty item display, and showing more activities
Date Fri, 14 Feb 2014 17:30:58 GMT
Updated Branches:
  refs/heads/cj/7097 242f34bbf -> 150d908af


[#7097] Tweaks per discussion for empty item display, and showing more activities

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/150d908a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/150d908a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/150d908a

Branch: refs/heads/cj/7097
Commit: 150d908af18e03be2761f28998e5126de1f82fff
Parents: 242f34b
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Fri Feb 14 17:30:45 2014 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Fri Feb 14 17:30:45 2014 +0000

----------------------------------------------------------------------
 .../templates/sections/personal-data.html       | 14 +++++++++-
 .../templates/sections/projects.html            |  2 ++
 .../user_profile/templates/sections/skills.html |  6 +++--
 Allura/allura/nf/allura/css/site_style.css      | 28 +++++++++++++++++---
 ForgeActivity/forgeactivity/main.py             |  2 +-
 5 files changed, 45 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/150d908a/Allura/allura/ext/user_profile/templates/sections/personal-data.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/templates/sections/personal-data.html b/Allura/allura/ext/user_profile/templates/sections/personal-data.html
index 81b9f69..4637a5d 100644
--- a/Allura/allura/ext/user_profile/templates/sections/personal-data.html
+++ b/Allura/allura/ext/user_profile/templates/sections/personal-data.html
@@ -38,19 +38,28 @@
         <dt>Joined:</dt><dd>
             {{auth.user_registration_date(user)}}
         </dd>
+        {% set loc = user.get_pref('localization') %}
+        {% if loc.city or loc.country or timezone %}
         <dt>Location:</dt><dd>
-            {% set loc = user.get_pref('localization') %}
             {{ [loc.city, loc.country, timezone]|filter|join(' / ') }}
         </dd>
+        {% endif %}
+        {% if user.get_pref('sex') not in (None, 'Unknown') %}
         <dt>Gender:</dt><dd>
             {{user.get_pref('sex')}}
         </dd>
+        {% endif %}
+        {% if user.get_pref('telnumbers') %}
         <dt>Phone Number:</dt><dd>
             {{user.get_pref('telnumbers')|join(', ')}}
         </dd>
+        {% endif %}
+        {% if user.get_pref('skypeaccount') %}
         <dt>Skype:</dt><dd>
             {{user.get_pref('skypeaccount')}}
         </dd>
+        {% endif %}
+        {% if user.get_pref('webpages') %}
         <dt>Web Site{% if user.get_pref('webpages')|length > 1 %}s{% endif %}:</dt><dd>
             <ol>
             {% for webpage in user.get_pref('webpages') %}
@@ -58,6 +67,8 @@
             {% endfor %}
             </ol>
         </dd>
+        {% endif %}
+        {% if user.get_pref('availability') %}
         <dt>Availability (UTC):</dt><dd>
             <ol>
             {% for slot in user.get_localized_availability('utc') %}
@@ -65,5 +76,6 @@
             {% endfor %}
             </ol>
         </dd>
+        {% endif %}
     </dl>
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/150d908a/Allura/allura/ext/user_profile/templates/sections/projects.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/templates/sections/projects.html b/Allura/allura/ext/user_profile/templates/sections/projects.html
index e690748..4f9fbc2 100644
--- a/Allura/allura/ext/user_profile/templates/sections/projects.html
+++ b/Allura/allura/ext/user_profile/templates/sections/projects.html
@@ -44,6 +44,8 @@
                 {{project.summary}}
             </span>
         </li>
+    {% else %}
+        <li class="empty">No projects to display.</li>
     {% endfor %}
     </ul>
     {% if projects|length > 5 %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/150d908a/Allura/allura/ext/user_profile/templates/sections/skills.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/templates/sections/skills.html b/Allura/allura/ext/user_profile/templates/sections/skills.html
index 104cc7a..966ce0a 100644
--- a/Allura/allura/ext/user_profile/templates/sections/skills.html
+++ b/Allura/allura/ext/user_profile/templates/sections/skills.html
@@ -32,8 +32,10 @@
 
 {% block content %}
     <ul>
-        {% for skill in user.get_skills() %}
+    {% for skill in user.get_skills() %}
         <li>{{ skill.skill.fullname }}</li>
-        {% endfor %}
+    {% else %}
+        <li class="empty">No skills entered.</li>
+    {% endfor %}
     </ul>
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/150d908a/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index a35d4a2..e616ef0 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -3294,6 +3294,10 @@ ul.dropdown ul li a:hover {
 .profile-section .section-body {
   background-color: #fff;
 }
+.profile-section .section-body .empty {
+    font-style: italic;
+    list-style: none;
+}
 
 .profile-section.activity {
   width: 260px;
@@ -3307,7 +3311,6 @@ ul.dropdown ul li a:hover {
 }
 .profile-section.activity .empty {
   padding: 10px;
-  font-style: italic;
   margin-bottom: 0;
 }
 .profile-section.activity ul {
@@ -3385,17 +3388,36 @@ ul.dropdown ul li a:hover {
 }
 .profile-section.projects .show-more-projects {
       text-align: center;
-  }
+}
 .profile-section.projects .show-more-projects button {
     float: none;
 }
 .profile-section.skills .section-body {
   padding: 10px 0;
 }
-
+.profile-section.skills .section-body ul {
+  margin-bottom: 0;
+  margin-left: 0;
+}
+.profile-section.skills .section-body li {
+  margin-left: 25px;
+}
+.profile-section.skills .section-body li.empty {
+  margin-left: 10px;
+}
 .profile-section.tools .section-body {
   padding: 10px 0;
 }
+.profile-section.tools .section-body ul {
+  margin-bottom: 0;
+  margin-left: 0;
+}
+.profile-section.tools .section-body li {
+  margin-left: 25px;
+}
+.profile-section.tools .section-body li.empty {
+  margin-left: 10px;
+}
 #user-message {
   -webkit-border-radius: 4px;
   -moz-border-radius: 4px;

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/150d908a/ForgeActivity/forgeactivity/main.py
----------------------------------------------------------------------
diff --git a/ForgeActivity/forgeactivity/main.py b/ForgeActivity/forgeactivity/main.py
index e82cca7..ca6ceaf 100644
--- a/ForgeActivity/forgeactivity/main.py
+++ b/ForgeActivity/forgeactivity/main.py
@@ -253,7 +253,7 @@ class ForgeActivityProfileSection(ProfileSectionBase):
             actor_only=True,
         )
         filtered_timeline = list(islice(ifilter(perm_check(c.user), full_timeline),
-                                        0, 5))
+                                        0, 8))
         context.update({
             'follow_toggle': W.follow_toggle,
             'following': g.director.is_connected(c.user, self.user),


Mime
View raw message