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 2012/10/26 22:32:54 UTC

[9/16] git commit: [#3883] Make it possible to run Allura with SCM tools uninstalled.

[#3883] Make it possible to run Allura with SCM tools uninstalled.

Signed-off-by: Peter Hartmann <ma...@gmail.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/3ecbe1d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3ecbe1d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3ecbe1d3

Branch: refs/heads/cj/5145
Commit: 3ecbe1d31560858af8baf48a4042f3e523cc8776
Parents: 0231935
Author: Peter Hartmann <ma...@gmail.com>
Authored: Tue Oct 2 18:55:07 2012 +0200
Committer: Cory Johns <jo...@geek.net>
Committed: Fri Oct 26 20:32:02 2012 +0000

----------------------------------------------------------------------
 .../allura/ext/admin/templates/project_admin.html  |   25 +++++++--------
 Allura/allura/lib/plugin.py                        |    2 +
 Allura/allura/lib/repository.py                    |    2 +-
 .../widgets/neighborhood_add_project.html          |    4 +--
 Allura/allura/tests/functional/test_admin.py       |    2 +-
 5 files changed, 17 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3ecbe1d3/Allura/allura/ext/admin/templates/project_admin.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/templates/project_admin.html b/Allura/allura/ext/admin/templates/project_admin.html
index 519fac2..4f140fd 100644
--- a/Allura/allura/ext/admin/templates/project_admin.html
+++ b/Allura/allura/ext/admin/templates/project_admin.html
@@ -39,21 +39,20 @@
     {% endfor %}
   </div>
   <div style="clear:both"></div>
-
-  <div class="grid-2">
-    <img src="{{ g.theme.app_icon_url('Git', 48) }}" alt="">
-  </div>
-  <div class="grid-13">
-    <h3>Code</h3>
-    <p>Source Control Management will help you keep track of code changes over time. A repository has already been created, checkout, add files and upload code.</p>
-  </div>
-  <div class="grid-4">
-    {% if scm_tools %}
-      {% set tool = scm_tools[0] %}
+  {% if scm_tools %}
+    {% set tool = scm_tools[0] %}
+    <div class="grid-2">
+        <img src="{{ g.theme.app_icon_url(tool.tool_name, 48) }}" alt="">
+    </div>
+    <div class="grid-13">
+      <h3>Code</h3>
+      <p>Source Control Management will help you keep track of code changes over time. A repository has already been created, checkout, add files and upload code.</p>
+    </div>
+    <div class="grid-4">
       <a href="{{c.project.url()}}{{tool.options.mount_point}}/fork">Checkout repo</a><br>
       <a href="{{c.project.url()}}{{tool.options.mount_point}}/">View source</a>
-    {% endif %}
-  </div>
+    </div>
+  {% endif %}
   <div style="clear:both"></div>
 
   <div class="grid-2">

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3ecbe1d3/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 13356b1..cbbcb99 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -629,6 +629,8 @@ class ThemeProvider(object):
             Takes an instance of class Application, or else a string.
             Expected to be overriden by derived Themes.
         """
+        if isinstance(app, unicode):
+            app = str(app)
         if isinstance(app, str):
             if app in self.icons and size in self.icons[app]:
                 return g.theme_href(self.icons[app][size])

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3ecbe1d3/Allura/allura/lib/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/repository.py b/Allura/allura/lib/repository.py
index 9d3528c..feffad5 100644
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -55,7 +55,7 @@ class RepositoryApp(Application):
         :return: a list of :class:`SitemapEntries <allura.app.SitemapEntry>`
         '''
         return [ SitemapEntry(
-                self.config.options.mount_label.title(),
+                self.tool_label,
                 '.')]
 
     @property

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3ecbe1d3/Allura/allura/templates/widgets/neighborhood_add_project.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/neighborhood_add_project.html b/Allura/allura/templates/widgets/neighborhood_add_project.html
index ad3fbd8..6efe0f8 100644
--- a/Allura/allura/templates/widgets/neighborhood_add_project.html
+++ b/Allura/allura/templates/widgets/neighborhood_add_project.html
@@ -44,10 +44,8 @@
     {% endif %}
     {% if h.has_access(neighborhood, 'admin') and not neighborhood.project_template and neighborhood.features['private_projects'] %}
     <div style="margin-top:20px">
-        <div class="grid-1" style="text-align: right">
+        <div class="grid-16" style="padding-top:4px; padding-left:4px">
           {{widget.display_field(widget.fields.private_project)}}
-        </div>
-        <div class="grid-16">
             <label for="{{ widget.context_for(widget.fields.private_project)['id'] }}">
             Private? Private projects will be unreadable to non-project members and will
             not show up in search results.

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3ecbe1d3/Allura/allura/tests/functional/test_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py
index bbc879b..40cb984 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -165,13 +165,13 @@ class TestProjectAdmin(TestController):
         tool_strings = [ ' '.join(opt.find('span').string.strip().split()) for opt in new_ep_opts ]
         expected_tools = [
             'External Link',
-            'Mercurial',
             'Wiki',
             'Tickets',
             'Discussion',
             'Chat (alpha)',
             'Blog',
             'Subproject']
+        print tool_strings
         # check using sets, because their may be more tools installed by default
         # that we don't know about
         assert len(set(expected_tools) - set(tool_strings)) == 0, tool_strings