From e2ea171fe3728c106ca898075ee7e1a8d0404189 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Fri, 27 Jan 2012 16:20:21 +0000 Subject: [PATCH 1/7] [bugfix,user/edit][xs]: correct template so that we show user name of person being edited not user doing the editing. --- ckan/templates/user/edit.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckan/templates/user/edit.html b/ckan/templates/user/edit.html index 81fb771d7c9..198f5470cfd 100644 --- a/ckan/templates/user/edit.html +++ b/ckan/templates/user/edit.html @@ -5,7 +5,7 @@ ${c.user} - Edit - User - Edit User: ${c.userobj.display_name} + Edit User: ${c.user_name}
From 7602134e2908cb1f6100349daac39a61b23f572e Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Fri, 27 Jan 2012 16:22:56 +0000 Subject: [PATCH 2/7] [bugfix,routing][xs]: ensure /user/ redirects to /user rather than displaying current user's home page. --- ckan/config/routing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ckan/config/routing.py b/ckan/config/routing.py index 98d6b0f223d..a230b63fd47 100644 --- a/ckan/config/routing.py +++ b/ckan/config/routing.py @@ -276,6 +276,7 @@ def make_map(): map.connect('/tag/{id}', controller='tag', action='read') # users map.redirect("/users/{url:.*}", "/user/{url}") + map.redirect("/user/", "/user") map.connect('/user/edit', controller='user', action='edit') # Note: openid users have slashes in their ids, so need the wildcard # in the route. From 344ff3e28e451eb7c2f6a669c97e4c489de33d80 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Sat, 28 Jan 2012 08:16:48 +0000 Subject: [PATCH 3/7] [#1602,vendor/recline][xs]: integrate some very minor improvements from recline upstream. --- .../scripts/vendor/recline/css/data-explorer.css | 10 +++++----- ckan/public/scripts/vendor/recline/recline.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ckan/public/scripts/vendor/recline/css/data-explorer.css b/ckan/public/scripts/vendor/recline/css/data-explorer.css index 2705d14a63c..c66839545bd 100644 --- a/ckan/public/scripts/vendor/recline/css/data-explorer.css +++ b/ckan/public/scripts/vendor/recline/css/data-explorer.css @@ -25,11 +25,6 @@ width: 30px; } -.doc-count { - font-weight: bold; - font-size: 120%; -} - .data-view-container { display: block; clear: both; @@ -132,6 +127,11 @@ * Data Table *********************************************************/ +.data-table-container { + overflow: auto; + height: 550px; +} + .data-table { border: 1px solid #ccc; font-size: 12px; diff --git a/ckan/public/scripts/vendor/recline/recline.js b/ckan/public/scripts/vendor/recline/recline.js index ca0e9a28368..177236b4120 100644 --- a/ckan/public/scripts/vendor/recline/recline.js +++ b/ckan/public/scripts/vendor/recline/recline.js @@ -1045,7 +1045,7 @@ my.DataExplorer = Backbone.View.extend({ \ \
\ @@ -1067,7 +1067,7 @@ my.DataExplorer = Backbone.View.extend({ var self = this; this.el = $(this.el); this.config = _.extend({ - displayCount: 10 + displayCount: 50 , readOnly: false }, options.config); From ec733cd1f7c8c11c0b7e889e4b719ba2275be077 Mon Sep 17 00:00:00 2001 From: Tom Rees Date: Mon, 30 Jan 2012 13:26:36 +0000 Subject: [PATCH 4/7] [#1574][xs]: Experimental hotfix for test.ckan.net uploader --- ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js b/ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js index 977d7bfe2b3..571365308bc 100755 --- a/ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js +++ b/ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js @@ -200,7 +200,7 @@ this.CKAN.Client = (function (CKAN, $, _, Backbone, undefined) { // params and returns value are as for that API // key is file label/path getStorageAuthForm: function(key, options) { - options.offset = '/storage/auth/form/' + key; + options.offset = '/api/storage/auth/form/' + key; this.apiCall(options); } }); From b21f4cc3992ef8b091fdf3ac9088d7e29653b465 Mon Sep 17 00:00:00 2001 From: Tom Rees Date: Mon, 30 Jan 2012 13:39:40 +0000 Subject: [PATCH 5/7] [#1574][s]: Hotfix #2 for text.ckan.net. Can be reverted. --- ckan/config/routing.py | 4 ++++ ckan/controllers/storage.py | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ckan/config/routing.py b/ckan/config/routing.py index a230b63fd47..069b9ac2330 100644 --- a/ckan/config/routing.py +++ b/ckan/config/routing.py @@ -320,6 +320,10 @@ def make_map(): '/api/storage/auth/form/{label:.*}', controller='ckan.controllers.storage:StorageAPIController', action='auth_form') + map.connect('storage_api_test', + '/api/storage/test/{label:.*}', + controller='ckan.controllers.storage:StorageAPIController', + action='test') map.connect('storage_upload', '/storage/upload', controller='ckan.controllers.storage:StorageController', action='upload') diff --git a/ckan/controllers/storage.py b/ckan/controllers/storage.py index 35aba2822da..f1562681b52 100644 --- a/ckan/controllers/storage.py +++ b/ckan/controllers/storage.py @@ -397,3 +397,17 @@ def auth_form(self, label): data = self._get_form_data(label) return data + @jsonpify + def test(self, label): + '''Provide fields for a form upload to storage including + authentication. + + :param label: label. + :return: json-encoded dictionary with action parameter and fields list. + ''' + headers = dict(request.params) + + data = { 'message': 'hello world', 'headers.keys()': headers.keys(), 'label': label } + + return data + From 71c7d79637a544903ea233b48d60f60ee22e4a54 Mon Sep 17 00:00:00 2001 From: Tom Rees Date: Mon, 30 Jan 2012 14:09:46 +0000 Subject: [PATCH 6/7] Revert "[#1574][xs]: Experimental hotfix for test.ckan.net uploader" This reverts commit ec733cd1f7c8c11c0b7e889e4b719ba2275be077. --- ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js b/ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js index 571365308bc..977d7bfe2b3 100755 --- a/ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js +++ b/ckan/public/scripts/vendor/ckanjs/1.0.0/ckanjs.js @@ -200,7 +200,7 @@ this.CKAN.Client = (function (CKAN, $, _, Backbone, undefined) { // params and returns value are as for that API // key is file label/path getStorageAuthForm: function(key, options) { - options.offset = '/api/storage/auth/form/' + key; + options.offset = '/storage/auth/form/' + key; this.apiCall(options); } }); From e7e5c05a0f92725a74d9209ab42b0ec54e952332 Mon Sep 17 00:00:00 2001 From: Tom Rees Date: Mon, 30 Jan 2012 14:20:14 +0000 Subject: [PATCH 7/7] Revert "[#1574][s]: Hotfix #2 for text.ckan.net. Can be reverted." This reverts commit b21f4cc3992ef8b091fdf3ac9088d7e29653b465. --- ckan/config/routing.py | 4 ---- ckan/controllers/storage.py | 14 -------------- 2 files changed, 18 deletions(-) diff --git a/ckan/config/routing.py b/ckan/config/routing.py index 069b9ac2330..a230b63fd47 100644 --- a/ckan/config/routing.py +++ b/ckan/config/routing.py @@ -320,10 +320,6 @@ def make_map(): '/api/storage/auth/form/{label:.*}', controller='ckan.controllers.storage:StorageAPIController', action='auth_form') - map.connect('storage_api_test', - '/api/storage/test/{label:.*}', - controller='ckan.controllers.storage:StorageAPIController', - action='test') map.connect('storage_upload', '/storage/upload', controller='ckan.controllers.storage:StorageController', action='upload') diff --git a/ckan/controllers/storage.py b/ckan/controllers/storage.py index f1562681b52..35aba2822da 100644 --- a/ckan/controllers/storage.py +++ b/ckan/controllers/storage.py @@ -397,17 +397,3 @@ def auth_form(self, label): data = self._get_form_data(label) return data - @jsonpify - def test(self, label): - '''Provide fields for a form upload to storage including - authentication. - - :param label: label. - :return: json-encoded dictionary with action parameter and fields list. - ''' - headers = dict(request.params) - - data = { 'message': 'hello world', 'headers.keys()': headers.keys(), 'label': label } - - return data -