You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2016/08/08 21:47:55 UTC
[2/6] allura git commit: Made projects count a lazy property and made
no neighbors found a div
Made projects count a lazy property and made no neighbors found a div
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/eb0d955a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/eb0d955a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/eb0d955a
Branch: refs/heads/master
Commit: eb0d955aed6ce9eb1eead8df4a55ec245024a1af
Parents: 6149a3f
Author: Rohan Verma <ro...@gmail.com>
Authored: Mon Aug 8 19:51:19 2016 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Mon Aug 8 17:41:38 2016 -0400
----------------------------------------------------------------------
Allura/allura/model/neighborhood.py | 1 +
Allura/allura/templates/neighborhood_list.html | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/eb0d955a/Allura/allura/model/neighborhood.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/neighborhood.py b/Allura/allura/model/neighborhood.py
index 7144b90..5695fd1 100644
--- a/Allura/allura/model/neighborhood.py
+++ b/Allura/allura/model/neighborhood.py
@@ -117,6 +117,7 @@ class Neighborhood(MappedClass):
else:
return url
+ @LazyProperty
def projects_count(self):
from allura import model as M
from allura.lib import helpers as h
http://git-wip-us.apache.org/repos/asf/allura/blob/eb0d955a/Allura/allura/templates/neighborhood_list.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/neighborhood_list.html b/Allura/allura/templates/neighborhood_list.html
index 14db8db..90e70f9 100644
--- a/Allura/allura/templates/neighborhood_list.html
+++ b/Allura/allura/templates/neighborhood_list.html
@@ -27,6 +27,7 @@
.no-nbhds {
text-align: center;
font-style: italic;
+ margin: 5px;
}
</style>
{% endblock %}
@@ -43,11 +44,11 @@
</div>
<div class="nbhd_details">
<div class="nbhd_name"><a href="{{nbhd.url()}}">{{nbhd.name}}</a></div>
- <div class="nbhd_count">{{nbhd.projects_count()}}{% if nbhd.projects_count() == 100 %}+{% endif %} Projects</div>
+ <div class="nbhd_count">{{nbhd.projects_count}}{% if nbhd.projects_count == 100 %}+{% endif %} Projects</div>
</div>
</div>
{% else %}
- <tr><td class="no-nbhds">No neighborhoods found</td></tr>
+ <div class="no-nbhds">No neighborhoods found</div>
{% endfor %}
</div>
{% endblock %}