changeset 1229:29301b8a2718

Hide search box in modify views.
author Sam Toyer <samATqxcvDOTnet>
date Mon, 09 Jan 2012 10:18:10 +1000
parents c6ab64b8399a
children 4899314f049a c1be8bf42b7e
files MoinMoin/items/__init__.py MoinMoin/templates/layout.html
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Sun Jan 08 20:18:06 2012 +1000
+++ b/MoinMoin/items/__init__.py	Mon Jan 09 10:18:10 2012 +1000
@@ -725,6 +725,7 @@
                                rows_meta=str(ROWS_META), cols=str(COLS),
                                help=self.modify_help,
                                form=form,
+                               search_form=None,
                               )
 
     def _render_data_diff(self, oldrev, newrev):
@@ -1203,6 +1204,7 @@
                                rows_data=str(ROWS_DATA), rows_meta=str(ROWS_META), cols=str(COLS),
                                help=self.modify_help,
                                form=form,
+                               search_form=None,
                               )
 
 item_registry.register(Text._factory, Type('text/*'))
@@ -1362,6 +1364,7 @@
                                rows_meta=str(ROWS_META), cols=str(COLS),
                                help=self.modify_help,
                                form=form,
+                               search_form=None,
                               )
 
     def _render_data(self):
@@ -1457,6 +1460,7 @@
                                help=self.modify_help,
                                drawing_exists=drawing_exists,
                                form=form,
+                               search_form=None,
                               )
 
     def _render_data(self):
@@ -1538,6 +1542,7 @@
                                rows_meta=str(ROWS_META), cols=str(COLS),
                                help=self.modify_help,
                                form=form,
+                               search_form=None,
                               )
 
     def _render_data(self):
--- a/MoinMoin/templates/layout.html	Sun Jan 08 20:18:06 2012 +1000
+++ b/MoinMoin/templates/layout.html	Mon Jan 09 10:18:10 2012 +1000
@@ -18,6 +18,7 @@
 
 <div id="moin-header">
 {% block header %}
+    {% if search_form %}
     {{ gen.form.open(search_form, id='moin-searchform', method='get', action=url_for('frontend.search')) }}
         <div>
             {{ gen.input(search_form['q'], type='search', id='moin-search-query', size='40') }}
@@ -25,6 +26,7 @@
             {{ forms.render_errors(search_form) }}
         </div>
     {{ gen.form.close() }}
+    {% endif %}
 
     {% if logo %}
     <div id="moin-logo">