You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/02/14 00:19:46 UTC

[1/3] git commit: [#7097] Switch user project name to summary for better tagline implementation

Updated Branches:
  refs/heads/cj/7097 cab098a1b -> 1c10ec496


[#7097] Switch user project name to summary for better tagline implementation

Signed-off-by: Cory Johns <cj...@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/55ff78b6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/55ff78b6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/55ff78b6

Branch: refs/heads/cj/7097
Commit: 55ff78b6fe21764885da9c7ab044490fca134f24
Parents: cab098a
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Feb 13 21:31:47 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Feb 13 21:31:57 2014 +0000

----------------------------------------------------------------------
 Allura/allura/ext/admin/admin_main.py                            | 2 +-
 .../allura/ext/admin/templates/admin_widgets/metadata_admin.html | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/55ff78b6/Allura/allura/ext/admin/admin_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index 0c79fea..e19572b 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -386,7 +386,7 @@ class ProjectAdminController(BaseController):
             plugin.ProjectRegistrationProvider.get().undelete_project(
                 c.project, c.user)
             redirect('overview')
-        if name != c.project.name:
+        if name and name != c.project.name:
             h.log_action(log, 'change project name').info('')
             M.AuditLog.log('change project name to %s', name)
             c.project.name = name

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/55ff78b6/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html b/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
index 16b303b..f894be5 100644
--- a/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
+++ b/Allura/allura/ext/admin/templates/admin_widgets/metadata_admin.html
@@ -19,10 +19,10 @@
 {% import 'allura:templates/jinja_master/lib.html' as lib with context %}
 <form method="POST" action="update" enctype="multipart/form-data" id="metadata_form">
   <div class="grid-9">
+    {%if not c.project.is_user_project %}
     {{ widget.display_label(widget.fields.name) }}
     <br>
     {{widget.display_field(widget.fields.name) }}
-    {%if c.project.neighborhood.name != 'Users'%}
     <label for="shortname">Unixname</label>
     <br>
     <input id="shortname" type="text" disabled="disabled"
@@ -35,12 +35,14 @@
     {{ widget.display_label(widget.fields.video_url) }}
     <br>
     {{widget.display_field(widget.fields.video_url) }}
+    {% endif %}
 
     {{ widget.display_label(widget.fields.summary) }}
     <br>
     {{widget.display_field(widget.fields.summary) }}
     <br>
 
+    {%if not c.project.is_user_project %}
     {{ widget.display_label(widget.fields.short_description) }}
     <br>
     {{widget.display_field(widget.fields.short_description) }}


[3/3] git commit: [#7097] Show only 5 projects on User Profile with Show More button

Posted by jo...@apache.org.
[#7097] Show only 5 projects on User Profile with Show More button

Signed-off-by: Cory Johns <cj...@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/1c10ec49
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1c10ec49
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1c10ec49

Branch: refs/heads/cj/7097
Commit: 1c10ec4969862bbb23f1ae8e9646a4676f1ae020
Parents: f1db054
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Feb 13 23:17:35 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Feb 13 23:17:35 2014 +0000

----------------------------------------------------------------------
 .../templates/sections/projects.html            | 20 +++++++++++++-------
 Allura/allura/ext/user_profile/user_main.py     |  7 +++++++
 Allura/allura/nf/allura/css/site_style.css      |  6 ++++++
 3 files changed, 26 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1c10ec49/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 3f517de..e690748 100644
--- a/Allura/allura/ext/user_profile/templates/sections/projects.html
+++ b/Allura/allura/ext/user_profile/templates/sections/projects.html
@@ -32,20 +32,26 @@
 
 {% block content %}
     <ul>
-        {% for project in user.my_projects() %}
-        {% if project != c.project and not project.is_nbhd_project %}
-        <li>
+    {% for project in projects %}
+        <li{% if loop.index > 5 %} class="hidden"{% endif %}>
             {% if project.icon -%}
-                <img src="{{project.url()}}/icon?{{project.icon._id.generation_time}}" alt="Project Logo"/>
+                <img src="{{project.url()}}/icon?{{project.icon._id.generation_time}}" alt="Project Logo" width="48" height="48"/>
             {%- else -%}
-                <img src="{{g.forge_static('images/project_default.png')}}" alt="Project Logo"/>
+                <img src="{{g.forge_static('images/project_default.png')}}" alt="Project Logo" width="48" height="48"/>
             {%- endif -%}
             <span class="project-info">
                 <a href="{{project.url()}}">{{project.name}}</a>
                 {{project.summary}}
             </span>
         </li>
-        {% endif %}
-        {% endfor %}
+    {% endfor %}
     </ul>
+    {% if projects|length > 5 %}
+    <div class="show-more-projects">
+        <button onclick="$(this).hide().closest('.section-body').find('li.hidden').show()">
+            Show More
+            <b data-icon="{{g.icons['plus'].char}}" class="ico {{g.icons['plus'].css}}"></b>
+        </button>
+    </div>
+    {% endif %}
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1c10ec49/Allura/allura/ext/user_profile/user_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/user_main.py b/Allura/allura/ext/user_profile/user_main.py
index 01bb6b8..7065a32 100644
--- a/Allura/allura/ext/user_profile/user_main.py
+++ b/Allura/allura/ext/user_profile/user_main.py
@@ -284,6 +284,13 @@ class PersonalDataSection(ProfileSectionBase):
 class ProjectsSection(ProfileSectionBase):
     template = 'allura.ext.user_profile:templates/sections/projects.html'
 
+    def prepare_context(self, context):
+        context['projects'] = [
+            project
+            for project in self.user.my_projects()
+            if project != c.project and (self.user == c.user or h.has_access(project, 'read'))]
+        return context
+
 
 class SkillsSection(ProfileSectionBase):
     template = 'allura.ext.user_profile:templates/sections/skills.html'

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1c10ec49/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 d018945..a35d4a2 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -3383,6 +3383,12 @@ ul.dropdown ul li a:hover {
   content: '\A';
   white-space: pre;
 }
+.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;
 }


[2/3] git commit: [#7097] Better display of User Profile Tools section items

Posted by jo...@apache.org.
[#7097] Better display of User Profile Tools section items

Signed-off-by: Cory Johns <cj...@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/f1db0542
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/f1db0542
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/f1db0542

Branch: refs/heads/cj/7097
Commit: f1db0542485f5eccd94b023030160cbec1a23312
Parents: 55ff78b
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Feb 13 21:43:08 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Feb 13 21:43:08 2014 +0000

----------------------------------------------------------------------
 .../ext/user_profile/templates/sections/tools.html   | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f1db0542/Allura/allura/ext/user_profile/templates/sections/tools.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/templates/sections/tools.html b/Allura/allura/ext/user_profile/templates/sections/tools.html
index 4427c8b..edcdbb9 100644
--- a/Allura/allura/ext/user_profile/templates/sections/tools.html
+++ b/Allura/allura/ext/user_profile/templates/sections/tools.html
@@ -32,8 +32,17 @@
 
 {% block content %}
     <ul>
-        {% for tool in c.project.ordered_mounts() %}
-        <li><a href="{{tool['ac'].url()}}">{{ tool['ac'].options.mount_label }}</a></li>
-        {% endfor %}
+    {% for tool in c.project.grouped_navbar_entries() %}
+        <li>
+            <a href="{{tool.url}}">{{ tool.label }}</a>
+            {% if tool.children %}
+            <ul>
+            {% for child in tool.children %}
+                <li><a href="{{child.url}}">{{ child.label }}</a></li>
+            {% endfor %}
+            </ul>
+            {% endif %}
+        </li>
+    {% endfor %}
     </ul>
 {% endblock %}