Mercurial > kallithea
changeset 3087:a797ada9d2ad beta
added option to ini file to define lightweight dashboard items per page before pagination
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 12 Dec 2012 23:38:10 +0100 |
parents | f9c44f3ed4c6 |
children | 304e4e3e2990 |
files | development.ini production.ini rhodecode/config/deployment.ini_tmpl rhodecode/lib/base.py rhodecode/templates/index_base.html |
diffstat | 5 files changed, 26 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/development.ini Wed Dec 12 23:26:30 2012 +0100 +++ b/development.ini Wed Dec 12 23:38:10 2012 +0100 @@ -29,6 +29,7 @@ #smtp_auth = [server:main] +## PASTE ##nr of threads to spawn #threadpool_workers = 5 @@ -39,7 +40,11 @@ #use_threadpool = true #use = egg:Paste#http + +#WAITRESS +threads = 5 use = egg:waitress#main + host = 0.0.0.0 port = 5000 @@ -54,7 +59,7 @@ full_stack = true static_files = true # Optional Languages -# en, fr, ja, pt_BR, zh_CN, zh_TW +# en, fr, ja, pt_BR, zh_CN, zh_TW, pl lang = en cache_dir = %(here)s/data index_dir = %(here)s/data/index @@ -63,6 +68,8 @@ vcs_full_cache = True force_https = false commit_parse_limit = 25 +# number of items displayed in lightweight dashboard before paginating +dashboard_items = 100 use_gravatar = true ## RSS feed options
--- a/production.ini Wed Dec 12 23:26:30 2012 +0100 +++ b/production.ini Wed Dec 12 23:38:10 2012 +0100 @@ -29,6 +29,7 @@ #smtp_auth = [server:main] +## PASTE ##nr of threads to spawn #threadpool_workers = 5 @@ -39,7 +40,11 @@ #use_threadpool = true #use = egg:Paste#http + +#WAITRESS +threads = 5 use = egg:waitress#main + host = 127.0.0.1 port = 8001 @@ -54,7 +59,7 @@ full_stack = true static_files = true # Optional Languages -# en, fr, ja, pt_BR, zh_CN, zh_TW +# en, fr, ja, pt_BR, zh_CN, zh_TW, pl lang = en cache_dir = %(here)s/data index_dir = %(here)s/data/index @@ -63,6 +68,8 @@ vcs_full_cache = True force_https = false commit_parse_limit = 50 +# number of items displayed in lightweight dashboard before paginating +dashboard_items = 100 use_gravatar = true ## RSS feed options
--- a/rhodecode/config/deployment.ini_tmpl Wed Dec 12 23:26:30 2012 +0100 +++ b/rhodecode/config/deployment.ini_tmpl Wed Dec 12 23:38:10 2012 +0100 @@ -29,6 +29,7 @@ #smtp_auth = [server:main] +## PASTE ##nr of threads to spawn #threadpool_workers = 5 @@ -39,7 +40,11 @@ #use_threadpool = true #use = egg:Paste#http + +#WAITRESS +threads = 5 use = egg:waitress#main + host = 127.0.0.1 port = 5000 @@ -63,6 +68,8 @@ vcs_full_cache = True force_https = false commit_parse_limit = 50 +# number of items displayed in lightweight dashboard before paginating +dashboard_items = 100 use_gravatar = true ## RSS feed options
--- a/rhodecode/lib/base.py Wed Dec 12 23:26:30 2012 +0100 +++ b/rhodecode/lib/base.py Wed Dec 12 23:38:10 2012 +0100 @@ -18,7 +18,7 @@ from rhodecode import __version__, BACKENDS from rhodecode.lib.utils2 import str2bool, safe_unicode, AttributeDict,\ - safe_str + safe_str, safe_int from rhodecode.lib.auth import AuthUser, get_container_username, authfunc,\ HasPermissionAnyMiddleware, CookieStoreWrapper from rhodecode.lib.utils import get_repo_slug, invalidate_cache @@ -248,6 +248,7 @@ c.visual.show_private_icon = str2bool(rc_config.get('rhodecode_show_private_icon')) c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags')) c.visual.lightweight_dashboard = str2bool(rc_config.get('rhodecode_lightweight_dashboard')) + c.visual.lightweight_dashboard_items = safe_int(config.get('dashboard_items', 100)) c.repo_name = get_repo_slug(request) c.backends = BACKENDS.keys()
--- a/rhodecode/templates/index_base.html Wed Dec 12 23:26:30 2012 +0100 +++ b/rhodecode/templates/index_base.html Wed Dec 12 23:38:10 2012 +0100 @@ -274,7 +274,7 @@ var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ sortedBy:{key:"name",dir:"asc"}, paginator: new YAHOO.widget.Paginator({ - rowsPerPage: 15, + rowsPerPage: ${c.visual.lightweight_dashboard_items}, alwaysVisible: false, template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", pageLinks: 5,