allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#7097] Changes for new User Profile
Date Wed, 12 Feb 2014 21:07:57 GMT
Updated Branches:
  refs/heads/cj/7097 b7ae92e92 -> fdbc326a0 (forced update)


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

Branch: refs/heads/cj/7097
Commit: fdbc326a0bd3671e068c1664da255dae22288b18
Parents: 6d61d30
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Feb 12 04:01:38 2014 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Feb 12 21:07:45 2014 +0000

----------------------------------------------------------------------
 .../templates/sections/personal-data.html       |  2 +-
 .../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/templates/jinja_master/master.html   |  2 ++
 .../templates/widgets/profile_section.html      |  2 +-
 7 files changed, 21 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fdbc326a/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..81ad62c 100644
--- a/Allura/allura/ext/user_profile/templates/sections/personal-data.html
+++ b/Allura/allura/ext/user_profile/templates/sections/personal-data.html
@@ -52,7 +52,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/fdbc326a/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/fdbc326a/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..dea696a 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>
+        Send Message
+    </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/fdbc326a/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 542b1f6..7014e2e 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/fdbc326a/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index eaec993..96bbf67 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -745,7 +745,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/fdbc326a/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/fdbc326a/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