incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rjol...@apache.org
Subject svn commit: r1442029 - in /incubator/bloodhound/trunk: bloodhound_theme/bhtheme/templates/bh_search.html bloodhound_theme/bhtheme/templates/bloodhound_theme.html installer/bloodhound_setup.py
Date Mon, 04 Feb 2013 05:51:52 GMT
Author: rjollos
Date: Mon Feb  4 05:51:52 2013
New Revision: 1442029

URL: http://svn.apache.org/viewvc?rev=1442029&view=rev
Log:
Refs #320:
 * Don't show a 'Search too short' message when 'Search' is pressed with no text entered.
  * Hide the redundant 'Search' entry from the mainnav.
  * Hide the 'Apps' context menu when there are no entries present.

Modified:
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_search.html
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
    incubator/bloodhound/trunk/installer/bloodhound_setup.py

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_search.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_search.html?rev=1442029&r1=1442028&r2=1442029&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_search.html (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_search.html Mon Feb 
4 05:51:52 2013
@@ -40,66 +40,60 @@
     </script>
   </head>
   <body>
-    <py:choose>
-      <div py:when="query" id="content" class="row">
-  
-        <h2 py:if="results">
-          Results <small>(${results.displayed_items()})</small>
-        </h2>
-
-        <form id="fullsearch" action="${href.search()}" method="get">
-          <input type="hidden" name="q" value="${query}" />
-          <input type="hidden" name="noquickjump" value="1" />
-          <div class="span2">
-            <input class="btn" type="submit" value="${_('Apply filters')}" />
-          </div>
-          <div class="span10 filters">
-            <py:for each="filter in filters">
-              <input type="checkbox" id="${filter.name}" name="${filter.name}"
-                     checked="${filter.active or None}" />
-              <label for="${filter.name}">
-                <span class="label">${filter.label}</span>
-              </label>
-            </py:for>
-          </div>
-        </form>
-  
-        <div class="span12" py:if="results or quickjump">
-          <div>
-            <dl id="results">
-              <py:if test="quickjump">
-                <dt id="quickjump">
-                  <a href="${quickjump.href}" i18n:msg="name">Quickjump to ${quickjump.name}</a>
-                </dt>
-                <dd>${quickjump.description}</dd>
-              </py:if>
-              <py:for each="result in results">
-                <dt><a href="${result.href}" class="searchable">${result.title}</a></dt>
-                <dd class="searchable">${result.excerpt}</dd>
-                <dd>
-                  <py:if test="result.author"><span class="author" i18n:msg="author">By
${format_author(result.author)}</span> &mdash;</py:if>
-                  <span class="date">${result.date}</span>
-                </dd>
-              </py:for>
-            </dl>
-          </div>
-          <xi:include py:with="paginator = results" href="bh_page_index.html" />
+    <div id="content" class="row">
+
+      <h2 py:if="results">
+        Results <small>(${results.displayed_items()})</small>
+      </h2>
+
+      <form id="fullsearch" action="${href.search()}" method="get">
+        <input type="hidden" name="q" value="${query}" />
+        <input type="hidden" name="noquickjump" value="1" />
+        <div class="span2">
+          <input class="btn" type="submit" value="${_('Apply filters')}" />
         </div>
-  
-        <div class="span12"
-            py:if="query and not (results or quickjump)">
-          <p id="notfound" class="alert">
-            No matches found.
-          </p>
+        <div class="span10 filters">
+          <py:for each="filter in filters">
+            <input type="checkbox" id="${filter.name}" name="${filter.name}"
+                   checked="${filter.active or None}" />
+            <label for="${filter.name}">
+              <span class="label">${filter.label}</span>
+            </label>
+          </py:for>
+        </div>
+      </form>
+
+      <div class="span12" py:if="results or quickjump">
+        <div>
+          <dl id="results">
+            <py:if test="quickjump">
+              <dt id="quickjump">
+                <a href="${quickjump.href}" i18n:msg="name">Quickjump to ${quickjump.name}</a>
+              </dt>
+              <dd>${quickjump.description}</dd>
+            </py:if>
+            <py:for each="result in results">
+              <dt><a href="${result.href}" class="searchable">${result.title}</a></dt>
+              <dd class="searchable">${result.excerpt}</dd>
+              <dd>
+                <py:if test="result.author"><span class="author" i18n:msg="author">By
${format_author(result.author)}</span> &mdash;</py:if>
+                <span class="date">${result.date}</span>
+              </dd>
+            </py:for>
+          </dl>
         </div>
-  
+        <xi:include py:with="paginator = results" href="bh_page_index.html" />
       </div>
-      <p py:otherwise="" class="alert">
-        <span class="label label-warning">Warning</span>
-        Search query too short. Query must be at least 3 characters long.
-        Please type your query string in search box and try again.
-      </p>
-    </py:choose>
+
+      <div class="span12"
+          py:if="query and not (results or quickjump)">
+        <p id="notfound" class="alert">
+          No matches found.
+        </p>
+      </div>
+
+    </div>
+
     <div id="help" class="help-block pull-right" i18n:msg="">
       <span class="label label-info">Note:</span>
       See <a href="${href.wiki('TracSearch')}">TracSearch</a>

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html?rev=1442029&r1=1442028&r2=1442029&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html Mon
Feb  4 05:51:52 2013
@@ -197,16 +197,19 @@
                 class="nav nav-tabs pull-right"
                 id="mainnav"
                 py:with="mainnav_show = ('wiki', 'tickets', 'browser');
-                        metanav_hide = ('login', 'logout', 'prefs', 'help', 'about')">
+                         metanav_hide = ('login', 'logout', 'prefs', 'help', 'about')">
               <!-- TODO: Parameterize visible mainnav items in trac.ini -->
               <li py:if="chrome.nav.mainnav"
                   py:for="idx, item in enumerate(i for i in chrome.nav.mainnav if i.name
in mainnav_show)" 
                   class="${classes(first_last(idx, chrome.nav.mainnav), active=item.active)}">${item.label}</li>
-              <li class="dropdown ${all(not i.active for i in chrome.nav.mainnav if i.name
in mainnav_show) and 'active' or None}">
-                <a class="dropdown-toggle" data-toggle="dropdown" href="#">Apps<b
class="caret"></b></a>
+              <li class="dropdown ${all(not i.active for i in chrome.nav.mainnav if i.name
in mainnav_show) and 'active' or None}"
+                  py:if="len([i for i in chrome.nav.metanav if i.name not in metanav_hide]
+
+                             [i for i in chrome.nav.mainnav if i.name not in mainnav_show])">
+                <a class="dropdown-toggle" data-toggle="dropdown" href="#">Apps
+                  <b class="caret"></b></a>
                 <ul class="dropdown-menu">
                   <li py:if="chrome.nav.mainnav"
-                      py:for="idx, item in enumerate(i for i in chrome.nav.mainnav if i.name
not in mainnav_show)" 
+                      py:for="idx, item in enumerate(i for i in chrome.nav.mainnav if i.name
not in mainnav_show)"
                       class="${classes(first_last(idx, chrome.nav.mainnav), active=item.active)}">${item.label}</li>
                   <py:if test="chrome.nav.metanav">
                     <li py:if="len([i for i in chrome.nav.metanav if i.name not in metanav_hide])"

Modified: incubator/bloodhound/trunk/installer/bloodhound_setup.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/installer/bloodhound_setup.py?rev=1442029&r1=1442028&r2=1442029&view=diff
==============================================================================
--- incubator/bloodhound/trunk/installer/bloodhound_setup.py (original)
+++ incubator/bloodhound/trunk/installer/bloodhound_setup.py Mon Feb  4 05:51:52 2013
@@ -68,6 +68,7 @@ BASE_CONFIG = {'components': {'bhtheme.*
                               },
                'header_logo': {'src': '',},
                'mainnav': {'roadmap': 'disabled',
+                           'source': 'disabled',
                            'timeline': 'disabled',
                            'browser.label': 'Source',
                            'tickets.label': 'Tickets',},



Mime
View raw message