changeset 6373:e54f4d943d4a

settings: fix saving of visual settings of page size After 19f15cde2cdb it was no longer to save page_size because formfill didn't match. Back out a part of that changeset.
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 03 Jan 2017 02:06:41 +0100
parents 16234f629cfb
children d02c715e2805
files kallithea/controllers/admin/settings.py kallithea/model/forms.py kallithea/templates/admin/settings/settings_visual.html
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/admin/settings.py	Tue Oct 11 18:49:16 2016 +0200
+++ b/kallithea/controllers/admin/settings.py	Tue Jan 03 02:06:41 2017 +0100
@@ -260,7 +260,7 @@
                     ('show_private_icon', 'show_private_icon', 'bool'),
                     ('stylify_metatags', 'stylify_metatags', 'bool'),
                     ('repository_fields', 'repository_fields', 'bool'),
-                    ('dashboard_items', 'page_size', 'int'),
+                    ('dashboard_items', 'dashboard_items', 'int'),
                     ('admin_grid_items', 'admin_grid_items', 'int'),
                     ('show_version', 'show_version', 'bool'),
                     ('use_gravatar', 'use_gravatar', 'bool'),
--- a/kallithea/model/forms.py	Tue Oct 11 18:49:16 2016 +0200
+++ b/kallithea/model/forms.py	Tue Jan 03 02:06:41 2017 +0100
@@ -360,7 +360,7 @@
 
         repository_fields = v.StringBoolean(if_missing=False)
         lightweight_journal = v.StringBoolean(if_missing=False)
-        page_size = v.Int(min=5, not_empty=True)
+        dashboard_items = v.Int(min=5, not_empty=True)
         admin_grid_items = v.Int(min=5, not_empty=True)
         show_version = v.StringBoolean(if_missing=False)
         use_gravatar = v.StringBoolean(if_missing=False)
--- a/kallithea/templates/admin/settings/settings_visual.html	Tue Oct 11 18:49:16 2016 +0200
+++ b/kallithea/templates/admin/settings/settings_visual.html	Tue Jan 03 02:06:41 2017 +0100
@@ -54,9 +54,9 @@
             </div>
 
             <div class="form-group">
-                <label class="control-label" for="page_size">${_('Repository page size')}:</label>
+                <label class="control-label" for="dashboard_items">${_('Repository page size')}:</label>
                 <div>
-                    ${h.text('page_size',size=5,class_='form-control')}
+                    ${h.text('dashboard_items',size=5,class_='form-control')}
                     <span class="help-block">${_('Number of items displayed in the repository pages before pagination is shown.')}</span>
                 </div>
             </div>