incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [8/8] git commit: [#7097] Changes for new User Profile
Date Thu, 13 Feb 2014 20:21:36 GMT
[#7097] Changes for new User Profile

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/cab098a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cab098a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cab098a1

Branch: refs/heads/cj/7097
Commit: cab098a1bd7903e664cff844715534c1a96aa389
Parents: 3726e3c
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Feb 12 04:01:38 2014 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu Feb 13 20:21:10 2014 +0000

----------------------------------------------------------------------
 .../templates/sections/personal-data.html       |  12 +-
 .../templates/sections/projects.html            |   2 +
 .../ext/user_profile/templates/user_index.html  |  23 +-
 Allura/allura/model/auth.py                     |   2 +-
 Allura/allura/model/project.py                  |   5 +-
 Allura/allura/nf/allura/css/site_style.css      | 220 +++++++++++++++----
 .../allura/templates/jinja_master/master.html   |   2 +
 .../allura/templates/jinja_master/nav_menu.html |   2 +
 .../templates/widgets/profile_section.html      |   2 +-
 9 files changed, 205 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cab098a1/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 94b0421..3d2f2ef 100644
--- a/Allura/allura/ext/user_profile/templates/sections/personal-data.html
+++ b/Allura/allura/ext/user_profile/templates/sections/personal-data.html
@@ -32,14 +32,16 @@
 
 {% block content %}
     <dl class="personal-data">
-        <dt>Joined:</dt><dd>{{auth.user_registration_date(user)}}</dd>
+        <dt>Username:</dt><dd>
+            {{user.username}}
+        </dd>
+        <dt>Joined:</dt><dd>
+            {{auth.user_registration_date(user)}}
+        </dd>
         <dt>Location:</dt><dd>
             {% set loc = user.get_pref('localization') %}
             {{ [loc.city, loc.country, timezone]|filter|join(' / ') }}
         </dd>
-        <dt>Username:</dt><dd>
-            {{user.username}}
-        </dd>
         <dt>Gender:</dt><dd>
             {{user.get_pref('sex')}}
         </dd>
@@ -52,7 +54,7 @@
         <dt>Web Site{% if user.get_pref('webpages')|length > 1 %}s{% endif %}:</dt><dd>
             {{user.get_pref('webpages')|filter|map('urlize', 20, true)|join(', ')}}
         </dd>
-        <dt>Availability:</dt><dd>
+        <dt>Availability (UTC):</dt><dd>
             <ol>
             {% for slot in user.get_localized_availability('utc') %}
                 <li>{{ slot.week_day }}: {{ slot.start_time.strftime('%H:%M') }} to
{{ slot.end_time.strftime('%H:%M') }}</li>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cab098a1/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 4fc5eda..3f517de 100644
--- a/Allura/allura/ext/user_profile/templates/sections/projects.html
+++ b/Allura/allura/ext/user_profile/templates/sections/projects.html
@@ -33,6 +33,7 @@
 {% block content %}
     <ul>
         {% for project in user.my_projects() %}
+        {% if project != c.project and not project.is_nbhd_project %}
         <li>
             {% if project.icon -%}
                 <img src="{{project.url()}}/icon?{{project.icon._id.generation_time}}"
alt="Project Logo"/>
@@ -44,6 +45,7 @@
                 {{project.summary}}
             </span>
         </li>
+        {% endif %}
         {% endfor %}
     </ul>
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cab098a1/Allura/allura/ext/user_profile/templates/user_index.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/templates/user_index.html b/Allura/allura/ext/user_profile/templates/user_index.html
index 30e4ea3..3e4ed44 100644
--- a/Allura/allura/ext/user_profile/templates/user_index.html
+++ b/Allura/allura/ext/user_profile/templates/user_index.html
@@ -32,23 +32,20 @@
   <a href="{{c.app.url}}feed.rss" title="Follow"><b data-icon="{{g.icons['feed'].char}}"
class="ico {{g.icons['feed'].css}}"></b></a>
 {% endblock %}
 
-{% block nav_menu %}{{super()}}{% endblock %}
+{% block nav_menu %}
+    {% if user != c.user %}
+    <a id="user-message" href="send_message" class="btn">
+        <b data-icon="{{g.icons['mail'].char}}" class="ico {{g.icons['mail'].css}}"></b>
+        <span>Send Message</span>
+    </a>
+    {% endif %}
+    {{super()}}
+{% endblock %}
 
 {% block top_nav %}{# disabled #}{% endblock %}
 
-{% block content %}
+{% block content_base %}
   {% for section in sections %}
     {{ section.display() }}
   {% endfor %}
 {% endblock %}
-
-{% block extra_js %}
-  <script type="text/javascript">
-     function changeTimezone(opt){
-       $("#timeslotslocal").hide();
-       $("#timeslotsutc").hide();
-       $("#timeslotsconverted").hide();
-       $("#timeslots" + opt).show();
-     }
-  </script>
-{% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cab098a1/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 54dcbc3..6bd7cc1 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -513,7 +513,7 @@ class User(MappedClass, ActivityNode, ActivityObject):
         week_day = ['Monday', 'Tuesday', 'Wednesday', 'Thursday',
                     'Friday', 'Saturday', 'Sunday']
         avail = self.get_availability_timeslots()
-        usertimezone = timezone(self.get_pref('timezone'))
+        usertimezone = timezone(self.get_pref('timezone') or 'UTC')
         chosentimezone = timezone(tz_name)
         retlist = []
         for t in avail:

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cab098a1/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 21b4792..e2707f7 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -746,7 +746,10 @@ class Project(MappedClass, ActivityNode, ActivityObject):
         MappedClass.delete(self)
 
     def breadcrumbs(self):
-        entry = (self.name, self.url())
+        if self.is_user_project:
+            entry = (self.user_project_of.display_name, self.url())
+        else:
+            entry = (self.name, self.url())
         if self.parent_project:
             return self.parent_project.breadcrumbs() + [entry]
         else:

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cab098a1/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 94f5d09..d018945 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -2211,6 +2211,7 @@ nav .ico {
 #nav_menu_holder h2.project_summary {
   line-height: 1em;
   font-size: 16px;
+  height: 16px;
   font-weight: normal;
   margin-bottom: 0;
 }
@@ -3241,56 +3242,187 @@ ul.dropdown ul li a:hover {
     display: inline;
 }
 
-.user-activity {
-    position: absolute;
-    top: 60px;
-    right: 0px;
-    border: 1px solid #ccc;
-    border-radius: 4px;
+/* User Profile styles generated from _user_profile.scss */
+.profile-section {
+  width: 660px;
+  display: inline;
+  float: left;
+  overflow: hidden;
+  *zoom: 1;
+  margin: 0 10px;
+  margin: 0 0 10px 10px;
+  border: 1px solid #aaaaaa;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  -ms-border-radius: 4px;
+  -o-border-radius: 4px;
+  border-radius: 4px;
 }
-.user-activity h3 {
-    background-color: #555555;
-    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #666666), color-stop(100%,
#555555));
-    background-image: -moz-linear-gradient(top, #666666 0%, #555555 100%);
-    background-image: linear-gradient(top, #666666 0%, #555555 100%);
-    border: 1px solid #333333;
-    color: #fff;
-    padding: 10px;
-    font-weight: normal;
-    font-size: 14px;
-}
-.user-activity h3 a {
-    float: right;
-    margin-left: 8px;
-}
-.user-activity h3 b.ico {
-    background-image: url('../images/neo-icon-set-ffffff-256x350.png');
+.profile-section > h3 {
+  background-color: #555555;
+  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #666666), color-stop(100%,
#555555));
+  background-image: -webkit-linear-gradient(#666666, #555555);
+  background-image: -moz-linear-gradient(#666666, #555555);
+  background-image: -o-linear-gradient(#666666, #555555);
+  background-image: linear-gradient(#666666, #555555);
+  border: 1px solid #333333;
+  color: #fff;
+  font-weight: normal;
+  font-size: 16px;
+  padding: 10px;
 }
-.user-activity .empty {
-    padding: 10px;
-    font-style: italic;
+.profile-section > h3 hr {
+  border: 1px solid #000;
+  background-color: #111;
+  opacity: .4;
 }
-.user-activity ul {
-    margin: 0px;
-    list-style: none;
+.profile-section > h3 .actions {
+  float: right;
+  color: #fff;
+  font-size: 14px;
 }
-.user-activity ul li {
-    padding: 10px;
-    border-bottom: 1px solid #ccc;
+.profile-section > h3 .actions a {
+  color: #fff;
+  text-decoration: underline;
 }
-.user-activity ul li img {
-    vertical-align: text-bottom;
+.profile-section > h3 .actions a.icon {
+  text-decoration: none;
 }
-.user-activity ul li p {
-    padding: 5px 0 0 0;
+.profile-section > h3 .actions.active {
+  color: #cccccc !important;
 }
-.user-activity ul li time {
-    display: block;
-    text-align: right;
-    font-size: 10px;
+.profile-section .section-body {
+  background-color: #fff;
 }
-.user-activity a.view-all {
-    display: block;
-    text-align: right;
-    padding: 5px 10px 5px 0;
+
+.profile-section.activity {
+  width: 260px;
+  display: inline;
+  float: left;
+  overflow: hidden;
+  *zoom: 1;
+  margin: 0 10px;
+  float: right;
+  margin: 10px 10px 0 0;
+}
+.profile-section.activity .empty {
+  padding: 10px;
+  font-style: italic;
+  margin-bottom: 0;
+}
+.profile-section.activity ul {
+  margin: 0;
+  list-style: none;
+}
+.profile-section.activity ul li {
+  padding: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #cccccc;
+}
+.profile-section.activity ul li img {
+  vertical-align: text-bottom;
+}
+.profile-section.activity ul li p {
+  padding: 5px 0 0 0;
+}
+.profile-section.activity ul li time {
+  display: block;
+  text-align: right;
+  font-size: 10px;
+}
+.profile-section.activity a.view-all {
+  display: block;
+  text-align: right;
+  padding: 5px 10px;
+}
+.profile-section.personal-data {
+  margin-top: 10px;
+}
+.profile-section.personal-data .section-body {
+  padding: 10px;
+}
+.profile-section.personal-data dl dt {
+  display: inline-block;
+  font-weight: bold;
+  margin-right: 4px;
+  width: 130px;
+  vertical-align: top;
+}
+.profile-section.personal-data dl dd {
+  display: inline;
+}
+.profile-section.personal-data dl dd:after {
+  content: '\A';
+  white-space: pre;
+}
+.profile-section.personal-data dl dd ol {
+  list-style: none;
+  display: inline-block;
+  margin-left: 0;
+}
+.profile-section.projects ul, .profile-section.projects ol {
+  list-style: none;
+  margin: 0;
+}
+.profile-section.projects ul li, .profile-section.projects ol li {
+  clear: both;
+  border-top: 1px solid #e5e5e5;
+  padding: 10px;
+}
+.profile-section.projects ul img, .profile-section.projects ol img {
+  vertical-align: top;
+  margin-right: 10px;
+}
+.profile-section.projects ul .project-info, .profile-section.projects ol .project-info {
+  display: inline-block;
+}
+.profile-section.projects ul .project-info a, .profile-section.projects ol .project-info
a {
+  font-weight: bold;
+}
+.profile-section.projects ul .project-info a:after, .profile-section.projects ol .project-info
a:after {
+  content: '\A';
+  white-space: pre;
+}
+.profile-section.skills .section-body {
+  padding: 10px 0;
+}
+
+.profile-section.tools .section-body {
+  padding: 10px 0;
+}
+#user-message {
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  -ms-border-radius: 4px;
+  -o-border-radius: 4px;
+  border-radius: 4px;
+  color: #fff;
+  text-shadow: #333333 0 1px 0 !important;
+  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0099cc), color-stop(100%,
#0077aa));
+  background-image: -webkit-linear-gradient(#0099cc 0%, #0077aa 100%);
+  background-image: -moz-linear-gradient(#0099cc 0%, #0077aa 100%);
+  background-image: -o-linear-gradient(#0099cc 0%, #0077aa 100%);
+  background-image: linear-gradient(#0099cc 0%, #0077aa 100%);
+  float: right;
+  display: block;
+  font-size: 15px;
+}
+#user-message b.ico {
+  font-size: 26px;
+  width: 26px;
+  height: 26px;
+}
+#user-message span {
+  display: block;
+}
+/* end of User Profile styles from _user_profile.scss */
+/* Use the right icon set for the User Activity and Send Message action buttons on User Profile
*/
+.profile-section.activity h3 b.ico,
+#user-message b.ico {
+    background-image: url('../images/neo-icon-set-ffffff-256x350.png');
+    width: 16px;
+    height: 16px;
+}
+#user-message {
+    top: 10px;
 }

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cab098a1/Allura/allura/templates/jinja_master/master.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/master.html b/Allura/allura/templates/jinja_master/master.html
index dd9c313..0c4d188 100644
--- a/Allura/allura/templates/jinja_master/master.html
+++ b/Allura/allura/templates/jinja_master/master.html
@@ -99,6 +99,7 @@
         {% endblock %}
       </div>
       <div id="content_base">
+      {% block content_base %}
 			  {% if not hide_left_bar %}
 			    {% block sidebar_menu %}
           {% include g.theme.sidebar_menu %}
@@ -132,6 +133,7 @@
           {% endif %}
           {% block after_content %}{% endblock %}
         </div>
+      {% endblock %}
       </div>
     </section>
     {{theme_macros.footer(g.year(), g.theme_href(''))}}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cab098a1/Allura/allura/templates/jinja_master/nav_menu.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/nav_menu.html b/Allura/allura/templates/jinja_master/nav_menu.html
index b29d566..520267e 100644
--- a/Allura/allura/templates/jinja_master/nav_menu.html
+++ b/Allura/allura/templates/jinja_master/nav_menu.html
@@ -22,7 +22,9 @@
 {% if not c.project or (n.neighborhood_project == c.project and not n.show_title) %}
   <div id="nav_menu_missing"></div>
 {% else %}
+    {% if not c.project.is_user_project %}
     {{ theme_macros.breadcrumbs(c.project, c.app) }}
+    {% endif %}
     {{ theme_macros.project_header_right(c.project, c.app) }}
     {% if c.project.is_user_project %}
       {{lib.gravatar(c.project.user_project_of, size=48, className='project_icon')}}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cab098a1/ForgeActivity/forgeactivity/templates/widgets/profile_section.html
----------------------------------------------------------------------
diff --git a/ForgeActivity/forgeactivity/templates/widgets/profile_section.html b/ForgeActivity/forgeactivity/templates/widgets/profile_section.html
index 5f2230e..28ba645 100644
--- a/ForgeActivity/forgeactivity/templates/widgets/profile_section.html
+++ b/ForgeActivity/forgeactivity/templates/widgets/profile_section.html
@@ -31,7 +31,7 @@
     <a href="feed.rss" title="RSS"><b data-icon="{{g.icons['feed'].char}}" class="ico
{{g.icons['feed'].css}}" title="Feed"></b></a>
 {% endblock %}
 
-{% block section_class %}user-activity{% endblock %}
+{% block section_class %}activity{% endblock %}
 
 {% block content %}
     {% if not timeline %}


Mime
View raw message