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 2013/05/17 00:30:13 UTC

[22/50] [abbrv] git commit: [#6212] omit LOC data from templates, when disabled

[#6212] omit LOC data from templates, when disabled


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/b20122df
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b20122df
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b20122df

Branch: refs/heads/db/6208
Commit: b20122df3e5b2ef6040fcaf62571b205eab3b47e
Parents: c7d03b3
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon May 13 21:56:02 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Mon May 13 21:56:19 2013 +0000

----------------------------------------------------------------------
 .../forgeuserstats/templates/commits.html          |   14 +++++++++-----
 ForgeUserStats/forgeuserstats/templates/index.html |    2 ++
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b20122df/ForgeUserStats/forgeuserstats/templates/commits.html
----------------------------------------------------------------------
diff --git a/ForgeUserStats/forgeuserstats/templates/commits.html b/ForgeUserStats/forgeuserstats/templates/commits.html
index 6f8c2b1..b7ee786 100644
--- a/ForgeUserStats/forgeuserstats/templates/commits.html
+++ b/ForgeUserStats/forgeuserstats/templates/commits.html
@@ -40,15 +40,19 @@
           <tr>
             <th>Category</th>
             <th>Number of commits</th>
-            <th>Lines of code</th>
+            {% if h.asbool(config.get('userstats.count_lines_of_code', True)) %}
+                <th>Lines of code</th>
+            {% endif %}
           </tr>
         </thead>
-        <tbody> 
+        <tbody>
           {% for cat, el in data.items() %}
             <tr>
               <td>{% if cat %}{{cat.fullname}}{% else %}All categories{% endif %}</td>
               <td>{{el.number}}</td>
-              <td>{{el.lines}}</td>
+              {% if h.asbool(config.get('userstats.count_lines_of_code', True)) %}
+                <td>{{el.lines}}</td>
+              {% endif %}
             {% endfor %}
           </tr>
         </tbody>
@@ -58,13 +62,13 @@
   {% else %}
     {% if user %}
       <h2>Statistics not available</h2>
-      <div class="grid-20"> 
+      <div class="grid-20">
         This user has set his or her preferences so that personal statistics are not visible
         to other users of the forge.
       </div>
     {% else %}
       <h2>Invalid user</h2>
-      <div class="grid-20"> 
+      <div class="grid-20">
         You are looking for personal statistics of a user which doesn't exist on this forge. Check your url.
       </div>
     {% endif %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b20122df/ForgeUserStats/forgeuserstats/templates/index.html
----------------------------------------------------------------------
diff --git a/ForgeUserStats/forgeuserstats/templates/index.html b/ForgeUserStats/forgeuserstats/templates/index.html
index d171677..08fd14c 100644
--- a/ForgeUserStats/forgeuserstats/templates/index.html
+++ b/ForgeUserStats/forgeuserstats/templates/index.html
@@ -118,6 +118,7 @@
             </td>
           {% endif %}
         </tr>
+        {% if h.asbool(config.get('userstats.count_lines_of_code', True)) %}
         <tr>
           <td>
             {% if totcommits.lines > 0 %}
@@ -141,6 +142,7 @@
             </td>
           {% endif %}
         </tr>
+        {% endif %}
         <tr>
           <td>
             {% if totartifacts.created > 0 %}