incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [1/4] git commit: [#6088] ticket:457 Add cstom fields list to all sections in help
Date Thu, 24 Oct 2013 20:28:31 GMT
Updated Branches:
  refs/heads/master 5da3d1f30 -> f70c6b9dd


[#6088] ticket:457 Add cstom fields list to all sections in help

Also, simplify url construction in templates a bit.


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

Branch: refs/heads/master
Commit: f70c6b9dde134c12ef40eb3a5cecc6eb64027f0b
Parents: 9509310
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Tue Oct 22 15:54:47 2013 +0300
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu Oct 24 20:22:58 2013 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/templates/tracker/bin.html  |  4 ++--
 .../forgetracker/templates/tracker/search_help.html   | 14 +++++++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f70c6b9d/ForgeTracker/forgetracker/templates/tracker/bin.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/bin.html b/ForgeTracker/forgetracker/templates/tracker/bin.html
index 43dfc91..42121b7 100644
--- a/ForgeTracker/forgetracker/templates/tracker/bin.html
+++ b/ForgeTracker/forgetracker/templates/tracker/bin.html
@@ -50,7 +50,7 @@
             <td class="edit" style="{% if not bin.error %}display:none{% else %}vertical-align:top{%
endif %}"><input type="text" name="bins-{{loop.index0}}.summary" value="{{bin.summary}}"></td>
             <td class="edit" {% if not bin.error %}style="display:none"{% endif %}>
                 <input class="grid-8" type="text" name="bins-{{loop.index0}}.terms" value="{{bin.terms}}">
-                <span class="grid-3"><a href="{{tg.url(c.project.url() + app.config.options.mount_point
+ '/search_help/')}}" target="_blank" class="btn search_help_modal"><b data-icon="{{g.icons['help'].char}}"
class="ico {{g.icons['help'].css}}"></b> Help</a></span>
+                <span class="grid-3"><a href="{{tg.url(app.url + 'search_help/')}}"
target="_blank" class="btn search_help_modal"><b data-icon="{{g.icons['help'].char}}"
class="ico {{g.icons['help'].css}}"></b> Help</a></span>
                 {% if bin.error %}<br/><span style="color:red">{{bin.error}}</span>{%
endif %}
             </td>
             <td style="width:40px;">
@@ -70,7 +70,7 @@
           </td>
           <td>
             <input class="grid-8" type="text" name="bins-{{num_bins}}.terms" placeholder="Terms"
{% if new_bin %}value="{{new_bin.terms}}"{% endif %}>
-            <span class="grid-3"><a href="{{tg.url(c.project.url() + app.config.options.mount_point
+ '/search_help/')}}" target="_blank" class="btn search_help_modal"><b data-icon="{{g.icons['help'].char}}"
class="ico {{g.icons['help'].css}}"></b> Help</a></span>
+            <span class="grid-3"><a href="{{tg.url(app.url + 'search_help/')}}"
target="_blank" class="btn search_help_modal"><b data-icon="{{g.icons['help'].char}}"
class="ico {{g.icons['help'].css}}"></b> Help</a></span>
             {% if new_bin and new_bin.error %}<br/><span class="err" style="color:red">{{new_bin.error}}</span>{%
endif %}
           </td>
           <td>&nbsp;</td>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f70c6b9d/ForgeTracker/forgetracker/templates/tracker/search_help.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/search_help.html b/ForgeTracker/forgetracker/templates/tracker/search_help.html
index c5e3f48..8ec03bb 100644
--- a/ForgeTracker/forgetracker/templates/tracker/search_help.html
+++ b/ForgeTracker/forgetracker/templates/tracker/search_help.html
@@ -48,7 +48,17 @@
     <li>Votes up/down of the ticket - votes_up/votes_down (if enabled in tool options)</li>
     <li>Votes total of the ticket - votes_total</li>
     <li>Imported legacy id - import_id</li>
-    <li>Custom field - the field name with an underscore in front, like _custom</li>
+    {% if c.app.globals.custom_fields %}
+    <li>Custom fields:
+        <ul>
+        {% for field in c.app.globals.custom_fields or [] %}
+            {% if field.name != '_milestone' %}
+                <li>{{field.name}}</li>
+            {% endif %}
+        {% endfor %}
+        </ul>
+    </li>
+    {% endif %}
     </ul>
 
     <h2>Example searches</h2>
@@ -80,6 +90,7 @@
     <li>Status of the ticket - status_s</li>
     <li>Title of the ticket - snippet_s</li>
     <li>Private ticket - private_b</li>
+    {% if c.app.globals.custom_fields %}
     <li>Custom fields:
         <ul>
         {% for field in c.app.globals.custom_fields or [] %}
@@ -89,6 +100,7 @@
         {% endfor %}
         </ul>
     </li>
+    {% endif %}
     </ul>
     <p>You can use these properties by appending them to the url (only one sort allowed
at a time) like this:</p>
     <div class="codehilite"><pre>/p/yourproject/tickets/search/?q=_milestone:1.0&amp;sort=snippet_s+asc</pre></div></div>


Mime
View raw message