diff --git a/conf/defaults.py b/conf/defaults.py index 7ea0251..9701549 100644 --- a/conf/defaults.py +++ b/conf/defaults.py @@ -10,7 +10,8 @@ 'PRESET_PATHS': ([], "list of paths where to look for presets definition"), 'AGHERANT_DESCRIPTIONS': (None, "list of description urls of nodes to aggregate"), 'BOOTSTRAP_SERVE_LOCAL': (True, "decide to serve bootstrap related files as local content"), - 'MAX_RESULTS_PER_PAGE': (50, "number of max results for one request"), + 'RESULTS_PER_PAGE': (30, "number of results displayed per page"), + 'MAX_RESULTS_PER_PAGE': (100, "maximum number of results that can be delivered to one request"), 'USERS_DATABASE': (None, "url of the database used for users managment"), 'PWD_SALT_SIZE': (16, "size of the salt used by password hashing algorithm"), 'PWD_ROUNDS': (pbkdf2_sha256.default_rounds, "number of rounds runs by password hashing algorithm") diff --git a/webant/api/archivant_api.py b/webant/api/archivant_api.py index 66b6dd6..82b8d88 100644 --- a/webant/api/archivant_api.py +++ b/webant/api/archivant_api.py @@ -24,7 +24,7 @@ def get_volumes(): size = int(request.args.get('size', 10)) except ValueError: raise ApiError("Bad Request", 400, details="could not covert 'size' parameter to number") - if size > current_app.config.get('MAX_RESULTS_PER_PAGE', 50): + if size > current_app.config['MAX_RESULTS_PER_PAGE']: raise ApiError("Request Entity Too Large", 413, details="'size' parameter is too high") q_res = current_app.archivant._db.get_books_querystring(query=q, from_=from_, size=size) diff --git a/webant/static/item_list.css b/webant/static/item_list.css index 5ac230c..fa2bae9 100644 --- a/webant/static/item_list.css +++ b/webant/static/item_list.css @@ -26,10 +26,15 @@ .meta-list .glyphicon{ margin-right: 4px; } -#item-list .item-div:first-of-type{ +#item-list > a:nth-child(1) > .item-div:nth-child(1) { border-top: 1px solid #EEE; } +#item-list > a, #item-list > a:hover { + color: #232323; + text-decoration: none; +} + #item-list .item-div{ border-bottom: 1px solid #EEE; margin: 0px; diff --git a/webant/static/js/ui-main.js b/webant/static/js/ui-main.js deleted file mode 100644 index e64bfd9..0000000 --- a/webant/static/js/ui-main.js +++ /dev/null @@ -1,3 +0,0 @@ -$( ".dyn-href" ).click(function() { - window.location.href = $(this).attr('href'); -}); diff --git a/webant/templates/pagination.html b/webant/templates/pagination.html new file mode 100644 index 0000000..184c27c --- /dev/null +++ b/webant/templates/pagination.html @@ -0,0 +1,27 @@ +{% macro pagination(prev, first, current, last, next, target_url) %} + +{% endmacro %} diff --git a/webant/templates/recents.html b/webant/templates/recents.html index c47e7e0..34b7712 100644 --- a/webant/templates/recents.html +++ b/webant/templates/recents.html @@ -45,20 +45,19 @@