[ckan-changes] commit/ckan: 15 new changesets
Bitbucket
commits-noreply at bitbucket.org
Mon Sep 5 17:22:42 UTC 2011
15 new changesets in ckan:
http://bitbucket.org/okfn/ckan/changeset/437f599cc9ac/
changeset: 437f599cc9ac
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 11:20:24
summary: [merge,from-default][l]: Updating to get new theme from default.
affected #: 71 files (77.6 KB)
--- a/ckan/config/deployment.ini_tmpl Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/config/deployment.ini_tmpl Mon Sep 05 10:20:24 2011 +0100
@@ -126,7 +126,7 @@
ckan.site_title = CKAN
## Logo image to use (replaces site_title string on front page if defined)
-ckan.site_logo = http://assets.okfn.org/p/ckan/img/ckan_logo_largetext.png
+ckan.site_logo = http://assets.okfn.org/p/ckan/img/ckan_logo_box.png
## Site tagline / description (used on front page)
ckan.site_description =
--- a/ckan/config/routing.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/config/routing.py Mon Sep 05 10:20:24 2011 +0100
@@ -26,6 +26,8 @@
for plugin in routing_plugins:
map = plugin.before_map(map)
+ map.connect('*url', controller='home', action='cors_options',
+ conditions=dict(method=['OPTIONS']))
map.connect('home', '/', controller='home', action='index')
map.connect('guide', config.get('guide_url', 'http://wiki.okfn.org/ckan/doc/'), _static=True)
map.connect('license', '/license', controller='home', action='license')
--- a/ckan/controllers/home.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/controllers/home.py Mon Sep 05 10:20:24 2011 +0100
@@ -64,9 +64,8 @@
order_by=None)
c.fields = []
c.package_count = query.count
- c.latest_packages = get_action('current_package_list_with_resources')({'model': model,
- 'user': c.user},
- {'limit': 5})
+ q = model.Session.query(model.Group).filter_by(state='active')
+ c.groups = sorted(q.all(), key=lambda g: len(g.packages), reverse=True)[:6]
return render('home/index.html', cache_key=cache_key,
cache_expire=cache_expires)
@@ -113,3 +112,7 @@
cache_.clear()
return 'Cleared caches: %s' % ', '.join(wui_caches)
+ def cors_options(self, url=None):
+ # just return 200 OK and empty data
+ return ''
+
--- a/ckan/lib/base.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/lib/base.py Mon Sep 05 10:20:24 2011 +0100
@@ -134,7 +134,7 @@
def _set_cors(self):
response.headers['Access-Control-Allow-Origin'] = "*"
- response.headers['Access-Control-Allow-Methods'] = "POST, PUT, GET, OPTIONS"
+ response.headers['Access-Control-Allow-Methods'] = "POST, PUT, GET, DELETE"
response.headers['Access-Control-Allow-Headers'] = "X-CKAN-API-KEY, Content-Type"
def _get_user(self, reference):
--- a/ckan/logic/action/create.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/logic/action/create.py Mon Sep 05 10:20:24 2011 +0100
@@ -227,14 +227,6 @@
model.Session.rollback()
raise ValidationError(errors, group_error_summary(errors))
- rev = model.repo.new_revision()
- rev.author = user
-
- if 'message' in context:
- rev.message = context['message']
- else:
- rev.message = _(u'REST API: Create user %s') % data.get('name')
-
user = user_dict_save(data, context)
model.repo.commit()
--- a/ckan/logic/action/update.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/logic/action/update.py Mon Sep 05 10:20:24 2011 +0100
@@ -360,14 +360,6 @@
model.Session.rollback()
raise ValidationError(errors, group_error_summary(errors))
- if not preview:
- rev = model.repo.new_revision()
- rev.author = user
- if 'message' in context:
- rev.message = context['message']
- else:
- rev.message = _(u'REST API: Update user %s') % data.get('name')
-
user = user_dict_save(data, context)
if not preview:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ckan/public/css/blueprint/ie.css Mon Sep 05 10:20:24 2011 +0100
@@ -0,0 +1,36 @@
+/* -----------------------------------------------------------------------
+
+
+ Blueprint CSS Framework 1.0.1
+ http://blueprintcss.org
+
+ * Copyright (c) 2007-Present. See LICENSE for more info.
+ * See README for instructions on how to use Blueprint.
+ * For credits and origins, see AUTHORS.
+ * This is a compressed file. See the sources in the 'src' directory.
+
+----------------------------------------------------------------------- */
+
+/* ie.css */
+body {text-align:center;}
+.container {text-align:left;}
+* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;}
+* html legend {margin:0px -8px 16px 0;padding:0;}
+sup {vertical-align:text-top;}
+sub {vertical-align:text-bottom;}
+html>body p code {*white-space:normal;}
+hr {margin:-8px auto 11px;}
+img {-ms-interpolation-mode:bicubic;}
+.clearfix, .container {display:inline-block;}
+* html .clearfix, * html .container {height:1%;}
+fieldset {padding-top:0;}
+legend {margin-top:-0.2em;margin-bottom:1em;margin-left:-0.5em;}
+textarea {overflow:auto;}
+label {vertical-align:middle;position:relative;top:-0.25em;}
+input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;}
+input.text:focus, input.title:focus {border-color:#666;}
+input.text, input.title, textarea, select {margin:0.5em 0;}
+input.checkbox, input.radio {position:relative;top:.25em;}
+form.inline div, form.inline p {vertical-align:middle;}
+form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;}
+button, input.button {position:relative;top:0.25em;}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ckan/public/css/blueprint/print.css Mon Sep 05 10:20:24 2011 +0100
@@ -0,0 +1,29 @@
+/* -----------------------------------------------------------------------
+
+
+ Blueprint CSS Framework 1.0.1
+ http://blueprintcss.org
+
+ * Copyright (c) 2007-Present. See LICENSE for more info.
+ * See README for instructions on how to use Blueprint.
+ * For credits and origins, see AUTHORS.
+ * This is a compressed file. See the sources in the 'src' directory.
+
+----------------------------------------------------------------------- */
+
+/* print.css */
+body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
+.container {background:none;}
+hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
+hr.space {background:#fff;color:#fff;visibility:hidden;}
+h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
+code {font:.9em "Courier New", Monaco, Courier, monospace;}
+a img {border:none;}
+p img.top {margin-top:0;}
+blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
+.small {font-size:.9em;}
+.large {font-size:1.1em;}
+.quiet {color:#999;}
+.hide {display:none;}
+a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
+a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ckan/public/css/blueprint/screen.css Mon Sep 05 10:20:24 2011 +0100
@@ -0,0 +1,265 @@
+/* -----------------------------------------------------------------------
+
+
+ Blueprint CSS Framework 1.0.1
+ http://blueprintcss.org
+
+ * Copyright (c) 2007-Present. See LICENSE for more info.
+ * See README for instructions on how to use Blueprint.
+ * For credits and origins, see AUTHORS.
+ * This is a compressed file. See the sources in the 'src' directory.
+
+----------------------------------------------------------------------- */
+
+/* reset.css */
+html {margin:0;padding:0;border:0;}
+body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}
+article, aside, details, figcaption, figure, dialog, footer, header, hgroup, menu, nav, section {display:block;}
+body {line-height:1.5;background:white;}
+table {border-collapse:separate;border-spacing:0;}
+caption, th, td {text-align:left;font-weight:normal;float:none !important;}
+table, th, td {vertical-align:middle;}
+blockquote:before, blockquote:after, q:before, q:after {content:'';}
+blockquote, q {quotes:"" "";}
+a img {border:none;}
+:focus {outline:0;}
+
+/* typography.css */
+html {font-size:100.01%;}
+body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
+h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
+h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
+h2 {font-size:2em;margin-bottom:0.75em;}
+h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
+h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
+h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
+h6 {font-size:1em;font-weight:bold;}
+h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
+p {margin:0 0 1.5em;}
+.left {float:left !important;}
+p .left {margin:1.5em 1.5em 1.5em 0;padding:0;}
+.right {float:right !important;}
+p .right {margin:1.5em 0 1.5em 1.5em;padding:0;}
+a:focus, a:hover {color:#09f;}
+a {color:#06c;text-decoration:underline;}
+blockquote {margin:1.5em;color:#666;font-style:italic;}
+strong, dfn {font-weight:bold;}
+em, dfn {font-style:italic;}
+sup, sub {line-height:0;}
+abbr, acronym {border-bottom:1px dotted #666;}
+address {margin:0 0 1.5em;font-style:italic;}
+del {color:#666;}
+pre {margin:1.5em 0;white-space:pre;}
+pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
+li ul, li ol {margin:0;}
+ul, ol {margin:0 1.5em 1.5em 0;padding-left:1.5em;}
+ul {list-style-type:disc;}
+ol {list-style-type:decimal;}
+dl {margin:0 0 1.5em 0;}
+dl dt {font-weight:bold;}
+dd {margin-left:1.5em;}
+table {margin-bottom:1.4em;width:100%;}
+th {font-weight:bold;}
+thead th {background:#c3d9ff;}
+th, td, caption {padding:4px 10px 4px 5px;}
+tbody tr:nth-child(even) td, tbody tr.even td {background:#e5ecf9;}
+tfoot {font-style:italic;}
+caption {background:#eee;}
+.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
+.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
+.hide {display:none;}
+.quiet {color:#666;}
+.loud {color:#000;}
+.highlight {background:#ff0;}
+.added {background:#060;color:#fff;}
+.removed {background:#900;color:#fff;}
+.first {margin-left:0;padding-left:0;}
+.last {margin-right:0;padding-right:0;}
+.top {margin-top:0;padding-top:0;}
+.bottom {margin-bottom:0;padding-bottom:0;}
+
+/* forms.css */
+label {font-weight:bold;}
+fieldset {padding:0 1.4em 1.4em 1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
+legend {font-weight:bold;font-size:1.2em;margin-top:-0.2em;margin-bottom:1em;}
+fieldset, #IE8#HACK {padding-top:1.4em;}
+legend, #IE8#HACK {margin-top:0;margin-bottom:0;}
+input[type=text], input[type=password], input[type=url], input[type=email], input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;color:#000;}
+input[type=text]:focus, input[type=password]:focus, input[type=url]:focus, input[type=email]:focus, input.text:focus, input.title:focus, textarea:focus {border-color:#666;}
+select {background-color:#fff;border-width:1px;border-style:solid;}
+input[type=text], input[type=password], input[type=url], input[type=email], input.text, input.title, textarea, select {margin:0.5em 0;}
+input.text, input.title {width:300px;padding:5px;}
+input.title {font-size:1.5em;}
+textarea {width:390px;height:250px;padding:5px;}
+form.inline {line-height:3;}
+form.inline p {margin-bottom:0;}
+.error, .alert, .notice, .success, .info {padding:0.8em;margin-bottom:1em;border:2px solid #ddd;}
+.error, .alert {background:#fbe3e4;color:#8a1f11;border-color:#fbc2c4;}
+.notice {background:#fff6bf;color:#514721;border-color:#ffd324;}
+.success {background:#e6efc2;color:#264409;border-color:#c6d880;}
+.info {background:#d5edf8;color:#205791;border-color:#92cae4;}
+.error a, .alert a {color:#8a1f11;}
+.notice a {color:#514721;}
+.success a {color:#264409;}
+.info a {color:#205791;}
+
+/* grid.css */
+.container {width:950px;margin:0 auto;}
+.showgrid {background:url(src/grid.png);}
+.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20, .span-21, .span-22, .span-23, .span-24 {float:left;margin-right:10px;}
+.last {margin-right:0;}
+.span-1 {width:30px;}
+.span-2 {width:70px;}
+.span-3 {width:110px;}
+.span-4 {width:150px;}
+.span-5 {width:190px;}
+.span-6 {width:230px;}
+.span-7 {width:270px;}
+.span-8 {width:310px;}
+.span-9 {width:350px;}
+.span-10 {width:390px;}
+.span-11 {width:430px;}
+.span-12 {width:470px;}
+.span-13 {width:510px;}
+.span-14 {width:550px;}
+.span-15 {width:590px;}
+.span-16 {width:630px;}
+.span-17 {width:670px;}
+.span-18 {width:710px;}
+.span-19 {width:750px;}
+.span-20 {width:790px;}
+.span-21 {width:830px;}
+.span-22 {width:870px;}
+.span-23 {width:910px;}
+.span-24 {width:950px;margin-right:0;}
+input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px;border-right-width:1px;padding-left:5px;padding-right:5px;}
+input.span-1, textarea.span-1 {width:18px;}
+input.span-2, textarea.span-2 {width:58px;}
+input.span-3, textarea.span-3 {width:98px;}
+input.span-4, textarea.span-4 {width:138px;}
+input.span-5, textarea.span-5 {width:178px;}
+input.span-6, textarea.span-6 {width:218px;}
+input.span-7, textarea.span-7 {width:258px;}
+input.span-8, textarea.span-8 {width:298px;}
+input.span-9, textarea.span-9 {width:338px;}
+input.span-10, textarea.span-10 {width:378px;}
+input.span-11, textarea.span-11 {width:418px;}
+input.span-12, textarea.span-12 {width:458px;}
+input.span-13, textarea.span-13 {width:498px;}
+input.span-14, textarea.span-14 {width:538px;}
+input.span-15, textarea.span-15 {width:578px;}
+input.span-16, textarea.span-16 {width:618px;}
+input.span-17, textarea.span-17 {width:658px;}
+input.span-18, textarea.span-18 {width:698px;}
+input.span-19, textarea.span-19 {width:738px;}
+input.span-20, textarea.span-20 {width:778px;}
+input.span-21, textarea.span-21 {width:818px;}
+input.span-22, textarea.span-22 {width:858px;}
+input.span-23, textarea.span-23 {width:898px;}
+input.span-24, textarea.span-24 {width:938px;}
+.append-1 {padding-right:40px;}
+.append-2 {padding-right:80px;}
+.append-3 {padding-right:120px;}
+.append-4 {padding-right:160px;}
+.append-5 {padding-right:200px;}
+.append-6 {padding-right:240px;}
+.append-7 {padding-right:280px;}
+.append-8 {padding-right:320px;}
+.append-9 {padding-right:360px;}
+.append-10 {padding-right:400px;}
+.append-11 {padding-right:440px;}
+.append-12 {padding-right:480px;}
+.append-13 {padding-right:520px;}
+.append-14 {padding-right:560px;}
+.append-15 {padding-right:600px;}
+.append-16 {padding-right:640px;}
+.append-17 {padding-right:680px;}
+.append-18 {padding-right:720px;}
+.append-19 {padding-right:760px;}
+.append-20 {padding-right:800px;}
+.append-21 {padding-right:840px;}
+.append-22 {padding-right:880px;}
+.append-23 {padding-right:920px;}
+.prepend-1 {padding-left:40px;}
+.prepend-2 {padding-left:80px;}
+.prepend-3 {padding-left:120px;}
+.prepend-4 {padding-left:160px;}
+.prepend-5 {padding-left:200px;}
+.prepend-6 {padding-left:240px;}
+.prepend-7 {padding-left:280px;}
+.prepend-8 {padding-left:320px;}
+.prepend-9 {padding-left:360px;}
+.prepend-10 {padding-left:400px;}
+.prepend-11 {padding-left:440px;}
+.prepend-12 {padding-left:480px;}
+.prepend-13 {padding-left:520px;}
+.prepend-14 {padding-left:560px;}
+.prepend-15 {padding-left:600px;}
+.prepend-16 {padding-left:640px;}
+.prepend-17 {padding-left:680px;}
+.prepend-18 {padding-left:720px;}
+.prepend-19 {padding-left:760px;}
+.prepend-20 {padding-left:800px;}
+.prepend-21 {padding-left:840px;}
+.prepend-22 {padding-left:880px;}
+.prepend-23 {padding-left:920px;}
+.border {padding-right:4px;margin-right:5px;border-right:1px solid #ddd;}
+.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #ddd;}
+.pull-1 {margin-left:-40px;}
+.pull-2 {margin-left:-80px;}
+.pull-3 {margin-left:-120px;}
+.pull-4 {margin-left:-160px;}
+.pull-5 {margin-left:-200px;}
+.pull-6 {margin-left:-240px;}
+.pull-7 {margin-left:-280px;}
+.pull-8 {margin-left:-320px;}
+.pull-9 {margin-left:-360px;}
+.pull-10 {margin-left:-400px;}
+.pull-11 {margin-left:-440px;}
+.pull-12 {margin-left:-480px;}
+.pull-13 {margin-left:-520px;}
+.pull-14 {margin-left:-560px;}
+.pull-15 {margin-left:-600px;}
+.pull-16 {margin-left:-640px;}
+.pull-17 {margin-left:-680px;}
+.pull-18 {margin-left:-720px;}
+.pull-19 {margin-left:-760px;}
+.pull-20 {margin-left:-800px;}
+.pull-21 {margin-left:-840px;}
+.pull-22 {margin-left:-880px;}
+.pull-23 {margin-left:-920px;}
+.pull-24 {margin-left:-960px;}
+.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
+.push-1 {margin:0 -40px 1.5em 40px;}
+.push-2 {margin:0 -80px 1.5em 80px;}
+.push-3 {margin:0 -120px 1.5em 120px;}
+.push-4 {margin:0 -160px 1.5em 160px;}
+.push-5 {margin:0 -200px 1.5em 200px;}
+.push-6 {margin:0 -240px 1.5em 240px;}
+.push-7 {margin:0 -280px 1.5em 280px;}
+.push-8 {margin:0 -320px 1.5em 320px;}
+.push-9 {margin:0 -360px 1.5em 360px;}
+.push-10 {margin:0 -400px 1.5em 400px;}
+.push-11 {margin:0 -440px 1.5em 440px;}
+.push-12 {margin:0 -480px 1.5em 480px;}
+.push-13 {margin:0 -520px 1.5em 520px;}
+.push-14 {margin:0 -560px 1.5em 560px;}
+.push-15 {margin:0 -600px 1.5em 600px;}
+.push-16 {margin:0 -640px 1.5em 640px;}
+.push-17 {margin:0 -680px 1.5em 680px;}
+.push-18 {margin:0 -720px 1.5em 720px;}
+.push-19 {margin:0 -760px 1.5em 760px;}
+.push-20 {margin:0 -800px 1.5em 800px;}
+.push-21 {margin:0 -840px 1.5em 840px;}
+.push-22 {margin:0 -880px 1.5em 880px;}
+.push-23 {margin:0 -920px 1.5em 920px;}
+.push-24 {margin:0 -960px 1.5em 960px;}
+.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:left;position:relative;}
+div.prepend-top, .prepend-top {margin-top:1.5em;}
+div.append-bottom, .append-bottom {margin-bottom:1.5em;}
+.box {padding:1.5em;margin-bottom:1.5em;background:#e5eCf9;}
+hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:1px;margin:0 0 17px;border:none;}
+hr.space {background:#fff;color:#fff;visibility:hidden;}
+.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
+.clearfix, .container {display:block;}
+.clear {clear:both;}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ckan/public/css/boilerplate.css Mon Sep 05 10:20:24 2011 +0100
@@ -0,0 +1,111 @@
+/* HTML5 â° Boilerplate */
+
+html, body, div, span, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
+small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+
+blockquote, q { quotes: none; }
+blockquote:before, blockquote:after,
+q:before, q:after { content: ""; content: none; }
+ins { background-color: #ff9; color: #000; text-decoration: none; }
+mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
+del { text-decoration: line-through; }
+abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
+table { border-collapse: collapse; border-spacing: 0; }
+hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
+input, select { vertical-align: middle; }
+
+body { font:13px/1.231 sans-serif; *font-size:small; }
+select, input, textarea, button { font:99% sans-serif; }
+pre, code, kbd, samp { font-family: monospace, sans-serif; }
+
+html { overflow-y: scroll; }
+a:hover, a:active { outline: none; }
+ul, ol { margin-left: 2em; }
+ol { list-style-type: decimal; }
+nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
+small { font-size: 85%; }
+strong, th { font-weight: bold; }
+td { vertical-align: top; }
+sub, sup { font-size: 75%; line-height: 0; position: relative; }
+sup { top: -0.5em; }
+sub { bottom: -0.25em; }
+
+pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 15px; }
+textarea { overflow: auto; }
+.ie6 legend, .ie7 legend { margin-left: -7px; }
+input[type="radio"] { vertical-align: text-bottom; }
+input[type="checkbox"] { vertical-align: bottom; }
+.ie7 input[type="checkbox"] { vertical-align: baseline; }
+.ie6 input { vertical-align: text-bottom; }
+label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
+button, input, select, textarea { margin: 0; }
+input:valid, textarea:valid { }
+input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
+.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
+
+
+a:link { -webkit-tap-highlight-color: #FF5E99; }
+button { width: auto; overflow: visible; }
+.ie7 img { -ms-interpolation-mode: bicubic; }
+
+body, select, input, textarea { color: #444; }
+h1, h2, h3, h4, h5, h6 { font-weight: bold; }
+a, a:active, a:visited { color: #607890; }
+a:hover { color: #036; }
+
+.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
+.hidden { display: none; visibility: hidden; }
+.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
+.visuallyhidden.focusable:active,
+.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
+.invisible { visibility: hidden; }
+.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
+.clearfix:after { clear: both; }
+.clearfix { zoom: 1; }
+
+
+ at media all and (orientation:portrait) {
+}
+
+ at media all and (orientation:landscape) {
+}
+
+ at media screen and (max-device-width: 480px) {
+ /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
+}
+
+
+ at media print {
+ * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
+ -ms-filter: none !important; }
+ a, a:visited { color: #444 !important; text-decoration: underline; }
+ a[href]:after { content: " (" attr(href) ")"; }
+ abbr[title]:after { content: " (" attr(title) ")"; }
+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
+ thead { display: table-header-group; }
+ tr, img { page-break-inside: avoid; }
+ @page { margin: 0.5cm; }
+ p, h2, h3 { orphans: 3; widows: 3; }
+ h2, h3{ page-break-after: avoid; }
+}
+
--- a/ckan/public/css/buttons.css Thu Sep 01 20:30:24 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-.buttons {
- display: inline-block;
-}
-
-.buttons:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
-
-* html .buttons {
- height: 1px;
-}
-
-.buttons img {
- vertical-align: baseline;
- float: none;
-}
-
-.buttons a, button {
- display: block;
- margin: 0 7px 0 0;
- background-color: #f0f0f0;
- border: 1px solid #dedede;
- border-top: 1px solid #eee;
- border-left: 1px solid #eee;
- -moz-border-radius: 0.5em;
- -webkit-border-radius: 0.5em;
- font-size: 100%;
- line-height: 1.4;
- text-decoration: none;
- font-weight: bold;
- color: #565656;
- cursor: pointer;
- padding: 5px 10px 6px 7px;
- background-image: url(/images/button-shadow.png);
- background-repeat: no-repeat;
- background-position: left top;
-}
-
-button {
- width: auto;
- overflow: visible;
- padding: 4px 10px 3px 7px;
-}
-
-button[type] {
- padding: 5px 10px 5px 7px;
- line-height: 17px;
-}
-
-*:first-child+html button[type] {
- padding: 4px 10px 3px 7px;
-}
-
-.buttons a.secondary, button.secondary {
- float: right;
-}
-
-button img, .buttons a img {
- margin: 0 3px -3px 0 !important;
- padding: 0;
- border: none;
- width: 16px;
- height: 16px;
-}
-
-button:hover, .buttons a:hover {
- border: 1px solid #ccc;
- color: #333;
- background-color: #f0f0f0;
-}
-
-button:active, .buttons a:active {
- background-image: none;
- background-color: #888;
- border: 1px solid #444;
- /* override position indicator */
- color: #fff ! important;
-}
-
-button.positive, .buttons a.positive {
- color: #529214;
-}
-
-.buttons a.positive:hover, button.positive:hover {
- background-image: none;
- background-color: #e6efc2;
- border: 1px solid #c6d880;
- color: #529214;
-}
-
-.buttons a.positive:active {
- background-image: none;
- background-color: #529214;
- border: 1px solid #529214;
- color: #fff;
-}
-
-/* negative (cancel, delete) */
-
-.buttons a.negative, button.negative {
- color: #d12f19;
-}
-
-.buttons a.negative:hover, button.negative:hover {
- background-image: none;
- background: #fbe3e4;
- border: 1px solid #fbc2c4;
- color: #d12f19;
-}
-
-.buttons a.negative:active {
- background-image: none;
- background-color: #d12f19;
- border: 1px solid #d12f19;
- color: #fff;
-}
--- a/ckan/public/css/ckan.css Thu Sep 01 20:30:24 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1052 +0,0 @@
-/* The main css styles for CKAN (specific UI elements may have thier own css linked via style.css) */
-
-body, input, textarea, .page-title span, .pingback a.url {
- font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
-}
-
-#content, #content input, #content textarea {
- font-size: 14px;
- line-height: 20px;
-}
-
-a {
- color: #b00;
- text-decoration: none;
-}
-a:link {
- color: #b22;
- text-decoration: none;
-}
-a:visited {
- color: #b22;
- text-decoration: none;
-}
-#main a:visited {
- text-decoration: none;
-}
-
-a:active {
- color: #f22;
- text-decoration: none;
-}
-a:hover {
- text-decoration: underline;
-}
-
-#content p, #content ul, #content ol, #content dd, #content pre, #content hr, #content dl {
- margin-bottom: 14px;
-}
-
-/* ===========================
- * Flash messages
-*/
-
-.flash-banner-box {
- margin-top: -20px;
- margin-bottom: 10px;
-}
-
-.flash-banner {
- width: auto;
- line-height: 1em;
- font-size: 14px;
- padding: 0.8em 1.5%;
- font-weight: bold;
- text-align: center;
- border-bottom: solid 1px #9f9f9f;
- color: #133362;
-}
-
-.flash-banner.notice {
- background: #f4a83d;
- border-bottom-color: #dddddd;
-}
-
-.flash-banner.success {
- background-color: #e7f9e0;
- border-bottom-color: #ccc;
- color: #2d6b00;
-}
-
-.flash-banner.error {
- background-color: #ffeae8;
- border-bottom-color: #ccc;
- color: #b50000;
-}
-
-/* ===========================
- * Masthead
-*/
-
-#header {
- padding-top: 15px;
- padding-bottom: 5px;
-}
-
-#site-title {
- line-height: normal;
- width: auto;
- float: left;
- font-size: 40px;
- margin: 0;
- padding: 0 0 5px 0;
- font-weight: normal;
- letter-spacing: -0.032em;
-}
-
-#site-title a,
-#site-title a:link, #site-title a:visited {
- font-weight:normal;
- color: #333;
-}
-
-/* hide the main twentyten image */
-#branding img {
- display:none;
-}
-
-#site-title a img {
- background: transparent;
- display: block;
- border: none;
- margin: 0;
- max-height: 50px;
-}
-
-#site-description {
- width:auto;
- float: left;
- clear: left;
- color: #000;
- font-style: normal;
- font-size: 13px;
- letter-spacing: normal;
- text-transform: none;
- margin: -5px 0 10px 3px;
- padding: 0;
- font-family: 'Lucida Grande', 'Lucida Sans Unicode', Lucida, Arial, Helvetica, sans-serif;
- font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif;
-}
-
-/* ===========================
- * Top Bar
-*/
-
-#top-bar {
- text-align: right;
-}
-
-#top-bar-login {
- max-width: 150px;
- display: inline-block;
-}
-
-#top-bar .search-form, #top-bar .search-form form {
-}
-
-#top-bar .search-form input.search {
- width: 120px;
-}
-
-#top-bar-login .ckan-logged-in img {
- margin-bottom: -3px;
-}
-
-
-/* =Menu
--------------------------------------------------------------- */
-
-#access {
- border-top: 1px solid #aaa;
- border-bottom: 1px solid #aaa;
- background: transparent;
-}
-
-#access ul li a {
- color: #b22;
- text-decoration: none;
- font-weight: bold;
-}
-
-#access ul li a.active {
- color: black;
- font-weight: bold;
-}
-
-#access ul li a:hover {
- color: #333;
-}
-
-#access ul ul a {
- background: #fff;
-}
-#access li:hover > a,
-#access ul ul :hover > a {
- background: #fff;
- color: #333;
-}
-#access ul li.current_page_item > a,
-#access ul li.current-menu-ancestor > a,
-#access ul li.current-menu-item > a,
-#access ul li.current-menu-parent > a {
- color: #333;
-}
-* html #access ul li.current_page_item a,
-* html #access ul li.current-menu-ancestor a,
-* html #access ul li.current-menu-item a,
-* html #access ul li.current-menu-parent a,
-* html #access ul li a:hover {
- color: #333;
- cursor: default;
- font-weight: bold;
-}
-
-/* ===========================
- * Main
- */
-
-#main {
- padding-top: 20px;
-}
-
-#container {
-}
-
-.entry-content {
- padding-top: 0;
-}
-
-/* ===========================
- * Sidebar
- */
-#primary
-{
- padding-top:40px;
-}
-#primary .widget-container
-{
- background: #f9f2ce;
- color: #333;
- margin: 0 0 1em 0;
- padding: 10px;
- border: 1px solid #ebd897;
- border-left: none;
- border-top: none;
- border-radius: 0.5em;
- -moz-border-radius: 0.5em;
- -webkit-border-radius: 0.5em;
-}
-
-#primary .widget-container h2 {
- margin-bottom: 10px;
-}
-
-#primary .widget-container h4 {
- margin-bottom: 10px;
- font-weight:bold;
-}
-
-#primary .widget-container .widget_action{
- text-align:right;
- margin:18px 0 0 0;
- font-weight:bold;
-}
-
-.hide-sidebar #primary {
- display: none;
-}
-
-.hide-sidebar #content {
- margin: 0 20px 0 20px;
-}
-
-/* ==========================
- * Facets
- */
-
-.facet-box {
-
-}
-
-.facet-box h2 {
- color: #000;
- font-size: 1.2em;
- font-weight: bold;
- margin-top: 1em;
-}
-
-.facet-options {
- margin-top: 0.5em;
-}
-
-.facet-options li {
- padding-top: 0.2em;
- font-size: 1.2em;
- color: #000;
-}
-
-.register-link {
- padding-top: 10px;
-}
-
-.register-link a {
- color: white;
- background: #199150;
- font-weight: bold;
- padding: 5px;
- width: 100%;
- font-size: 1.3em;
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
- border-radius: 2px;
-
-}
-
-.package-search-filters {
- margin-top: 15px;
-}
-
-.search-field {
- display: inline-block;
- margin-right: 5px;
- margin-bottom: 10px;
- padding: 1px 1px 3px 2px;
- font-size: 14px;
- background-color: #eee;
- line-height: 16px;
- -moz-box-shadow: 1px 1px 3px #bbb;
- -webkit-box-shadow: 1px 1px 3px #bbb;
- box-shadow: 1px 1px 3px #bbb;
-
-}
-
-.search-field-name::after {
- content: ":";
-}
-
-.search-field-value {
- font-weight: bold;
-}
-
-
-/* ===========================
- * Footer
- */
-
-#footer {
- border-top: 1px solid;
- margin: 1em auto 0 auto;
- overflow: auto;
-}
-
-#footer ul {
- margin-top: 0;
-}
-
-#footer-widget-area .widget-area {
- float: none;
- width: 100%;
- margin: 0;
-}
-
-#footer-widget-area .widget-container {
- margin-bottom: 0;
-}
-
-#footer-widget-area .widget-container h3 {
- display: inline-block;
- margin-top: 0;
- margin-right: 10px;
- /*
- * IE 6 & 7 don't support inline-block, but we can use the hasLayout
- * magical property.
- * http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
- */
- zoom: 1;
- *display: inline;
-}
-
-#footer-widget-area .widget-container .textwidget {
- display: inline;
-}
-
-
-#footer-widget-area .widget-container ul {
- display: inline;
- margin: 0.3em 0 0 0;
-}
-
-#footer ul li abbr {
- border-bottom: none;
-}
-
-#footer-widget-area .widget-container ul li {
- margin: 0 1em 0 0;
- padding: 0;
- display: inline-block;
- /*
- * IE 6 & 7 don't support inline-block, but we can use the hasLayout
- * magical property.
- * http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
- */
- zoom: 1;
- *display: inline;
-}
-
-#footer-widget-area #fourth {
- margin-right: 0;
-}
-
-#site-info {
-}
-
-#site-generator {
- width: auto;
-}
-
-#site-generator a {
- background-image: none;
-}
-
-img#footer-okf-logo {
- margin-bottom: -4px;
-}
-
-
-/* ===========================
- * Forms
- */
-
-#content input, #content textarea {
- line-height: 14px;
- font-size: 14px;
-}
-
-form #log_message {
- width: 80%;
- height: 30px;
-}
-
-.entry-content label {
- font-size: 14px;
-}
-
-#content form.ckan.package_create_form dt {
- clear: both;
-}
-
-#content form.ckan.package_create_form dl, #content form.ckan.package_create_form dd {
- margin-bottom: 0;
-}
-
-#content form.ckan.package_create_form select {
- margin-bottom: 12px;
-}
-
-form.simple-form label {
- display: inline-block;
- float: left;
- min-width: 40%;
-}
-
-form.simple-form fieldset input {
- border: 1px solid #E7E7E7;
- padding: 0.3em;
- width: 40%;
-}
-
-form.simple-form textarea {
- width: 99%;
-}
-
-.purge-button {
- border: none;
- background: none;
- background-color: #b33a3a;
- color: white;
- display: block;
- margin-bottom: 1em;
-}
-
-.purge-button:hover {
- border: none;
-}
-
-/* ===========================
- * Tables
- */
-
-#content tr td {
- padding: 6px 10px;
-}
-
-#content tr th, #content thead th {
- padding: 6px 12px;
-}
-
-caption {
- caption-side:bottom;
- text-align:left;
- font-size:0.85em;
- line-height:1.4em;
- padding-top:0.5em;
- color:#888;
- padding-left:0.8em;
-}
-
-
-
-/* ============= */
-/* = Utilities = */
-/* ============= */
-
-.clearfix:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
-
-.clearfix { display: inline-block; } /* for IE/Mac */
-
-.cleared { clear: both; }
-hr.cleared {
- height: 0 ! important;
- visibility: hidden;
-}
-
-hr.nomargin { margin: 0; }
-
-/* ======================= */
-/* = Fixes to KForge CSS = */
-/* ======================= */
-
-table {
- border-collapse: collapse;
- border: none;
- border-radius: 1em;
- margin: 0 0 1.2em 0;
-}
-
-table th, table td {
- border: 1px solid #ccc;
- border-top-color: #eee;
- border-left-color: #eee;
- padding: 0.3em;
-}
-
-table td {
- background: #f0f0f0;
-}
-
-table th {
- background: #fff;
-}
-
-h1, h2, h3, h4, h5, h6 {
- font-family: 'Lucida Grande', 'Lucida Sans Unicode', Lucida, Arial, Helvetica, sans-serif;
- letter-spacing: -0.02em;
-}
-
-/* ================ */
-/* = Search boxes = */
-/* ================ */
-
-form.package-search input.search {
- width: 99%;
- padding: 5px;
- font-size: 1.1em;
- margin: 0px;
- -webkit-appearance: textfield;
-}
-
-.package-search input.button {
- display: inline-block;
- float: right;
- margin-top: 5px;
- margin-right: 10px !important;
- margin-bottom: 1px !important;
-}
-
-/* ========================================= */
-/* = Changes/additions to kforge forms.css = */
-/* ========================================= */
-
-input.openid {
- background: transparent url(../images/icons/openid.png) 2px 2px no-repeat;
- padding-left: 22px;
-}
-
-input.openid:focus {
- background-position: 1px 1px;
- padding-left: 21px;
-}
-
-/* ============== */
-/* = Pagination = */
-/* ============== */
-
-.pager {
- width: 100%;
- text-align: center;
- margin: 0 0 1.2em 0;
- clear: both;
-}
-
-.pager span, .pager a {
- text-decoration: none;
- margin: 0em;
- border: none;
- padding: 0.3em 0.1em;
-}
-
-.pager a:hover, .pager a:active {
- color: #fff;
- background-color: #c22;
-}
-
-.pager span.pager_dotdot {
- color: #aaa;
-}
-
-.pager span.pager_curpage {
- font-weight: bold;
- border: 1px solid #ddd;
-}
-
-/* ======================= */
-/* = Various iconography = */
-/* ======================= */
-
-img.icon {
- height: 25px;
-}
-
-a.icon {
- display: block;
- height: 0;
- overflow: hidden;
- padding-top: 20px;
- width: 20px;
-}
-
-table.no-margin { margin: 0; }
-
-div.extras-new-field label {
- display: inline;
- line-height: 2.6em;
-}
-
-label.inline {
- display:inline;
- margin: 1em 0 0 1em;
-}
-
-dl.icons dt {
- float: left;
- clear: both;
- margin: 0.4em 0 0 0;
- height: 16px;
- width: 16px;
-}
-
-dl.icons dt img {
- vertical-align: middle;
-}
-
-dl.icons dd {
- float: left;
- margin: 0.4em 0 0 10px;
-}
-
-dl.icons dd.tiny {
- font-size: 75%;
- color: #888;
- line-height: 1.2em;
- margin: 0 0 0 26px;
-}
-
-/* ========================= */
-/* = Tag and Group listing = */
-/* ========================= */
-
-.item-list {
- border-top: solid 1px #cbcbcb;
- border-bottom: solid 1px #cbcbcb;
- margin-top: 5px;
-}
-
-.item-list ul, ul.tags {
- margin: 0 0 0.75em 0;
- padding:0;
- list-style: none;
-}
-
-.item-list ul li, ul.tags li {
- padding-left: 0;
- padding-right: 3px;
-}
-
-.tags a {
- text-decoration: none;
- color: #b00;
-}
-
-.tags a:hover {
-}
-
-/* tags small is for autocomplete list in package editor */
-.tags.small a {
- padding-left: 6px;
- padding-right: 6px;
-}
-
-/* =================== */
-/* = Package listing = */
-/* =================== */
-
-ul.packages {
- padding-left: 0;
- margin: 0 0 18px 0;
-}
-
-.packages .header {
- font-weight: bold;
-}
-
-.packages .extract {
- font-size: 0.9em;
- padding-top:10px;
-}
-
-.packages li {
- list-style: none;
- padding: 0.4em 0 0.4em 0.0em;
- border-left: 0.5em solid #fff;
- border-bottom: 1px solid #ececec;
- overflow: hidden;
- /*white-space: nowrap;*/
-}
-
-.packages li a {
- text-decoration: none;
-}
-
-.packages li img {
- margin-bottom: -2px;
-}
-
-.search_meta {
- float:right;
-}
-
-ul.package_formats {
- float:right;
- padding:0 0 3px 0; margin:0;
-}
-
-ul.package_formats li {
- display:inline;
- margin:0;
- padding:0 5px 0 5px;
- border:none;
- font-weight:normal;
- font-size:0.8em;
- color:#808080;
- background:#ececec;
-}
-
-.openness {
- clear:right;
- float:right;
- font-size:0.8em;
-}
-
-.openness img {
- vertical-align:top;
-}
-
-.openness li {
- margin:0;
- padding:0;
- border:none;
-}
-
-/*
-.packages li.fullyopen {
- border-left: 0.5em solid #AFC6E9;
-}
-*/
-
-.packages li .tags {
- margin: 0 0 0 0.5em;
- font-size: 80%;
- opacity: 0.3;
-}
-
-.packages li:hover .tags {
- opacity: 1;
-}
-
-.packages .name,
-.packages .license {
- color: #666;
- font-weight: normal;
- font-size: 0.9em;
-}
-
-/* ==================== */
-/* = Extra RHS styles = */
-/* ==================== */
-
-.sidebar dl {
- margin: 0 1em 0.8em 1em;
- padding: 0;
-}
-
-.sidebar hr {
- width: 90%;
- color: #EBDBA7;
- background-color: #EBDBA7;
- border: none;
- height: 1px;
-}
-
-.sidebar .buttons {
- margin-top: 0;
-}
-
-.sidebar .buttons a, .sidebar .buttons button {
- margin-bottom: 0.3em;
-}
-
-.okdstripe {
- /* Amusingly, this has to be a slightly different color to look the same
- as the stripe on a white background */
- border-left: 0.5em solid #8FB0DE;
- padding-left: 0.4em ! important;
-}
-
-/* ===================== */
-/* = Package read view = */
-/* ===================== */
-
-#primary .widget-container .formats ul {
- background: transparent;
-}
-
-#primary .widget-container .formats ul li {
- background: transparent;
- display: inline;
-}
-
-#content .package .subsection h3,
-#content #comments h3, #content #comments h4 {
- background-color: #444;
- padding: 10px;
- color: white;
-}
-
-.package h3, .package h4 {
- font-weight: bold;
- margin: 1em 0 0.6em 0;
-}
-
-.package div.tags {
- margin: 20px 0;
-}
-
-.package .resources {
- margin-bottom: 2em;
-}
-
-.package .resources table {
- width: 100%;
-}
-
-.package h2.head {
- margin-bottom: 0.3em!important;
- line-height: 1.0;
-}
-
-.package .name, .group .name {
- color: #888;
- font-family: monospace;
-}
-
-.package div.url {
- margin: 0 ;
-}
-
-.package .url a {
- text-decoration: none;
-}
-
-.package .notes, .group .description {
- padding: 0.2em 0 0.2em 0;
- margin: 0 3% 0.5 0 ! important;
-}
-
-.package .notes span.nonegiven {
- opacity: 0.5;
-}
-.package .notes span.nonegiven:hover {
- opacity: 1;
-}
-
-.package .details table {
- border-collapse: collapse;
- background: transparent;
- border-color: grey;
- border-spacing: 2px 2px;
-}
-
-.package .details table tr {
- border: none;
- border-bottom: solid 1px #888;
-}
-
-.package .details td {
- background: transparent;
- border: none;
-}
-
-.package .details td.package-label {
- width: 150px;
-}
-
-.package .api div {
- background:#f0f0f0;
- padding:10px;
-}
-
-.package .api h5 {
- font-weight:bold;
- margin-bottom:1em!important;
- font-size:1em;
-}
-
-.package .api code {
- background:#444;
- color:#fff;
- padding:3px 10px ;
- margin-bottom:1em;
- display:block;
-}
-.package .api code a {
- color:#fff;
-}
-
-.relationship_comment {
- font-style: italic;
-}
-
-p.atom-feed-link {
- float: right;
- display: inline;
- font-size: 14px;
-}
-
-p.atom-feed-link a {
- background: url('../images/icons/atom_feed.png') no-repeat;
- padding-left: 20px;
-}
-
-p.atom-feed-link.package-history-link {
- float: none;
-}
-
-#revision.widget-container
-{
- background: #f9f2ce;
- color: #333;
- margin: 0 0 1em 0;
- padding: 10px;
- border: 1px solid #ebd897;
- border-left: none;
- border-top: none;
- border-radius: 0.5em;
- -moz-border-radius: 0.5em;
- -webkit-border-radius: 0.5em;
-}
-
-/* ===================== */
-/* = User Listing = */
-/* ===================== */
-
-body.user-list #content {
- margin-right: 20px;
-}
-
-ul.userlist, ul.userlist ul {
- list-style-type: none;
- margin: 0;
-}
-
-ul.userlist li.user {
- display: inline-block;
- width: 200px;
- padding: 5px;
- font-size: 90%;
- margin-bottom: 15px;
-}
-
-ul.userlist li ul span.edits {
- color: #333;
- font-size: 110%;
- font-weight: bold;
- margin-left: 3px;
-}
-
-ul.userlist li.user .username {
-}
-
-#content ul.userlist .username img {
- margin-bottom: -3px;
-}
-
-ul.userlist .created {
- font-size: 80%;
-}
-
-ul.userlist .badge {
- color: #fc0;
-}
-
-body.user-list .sort {
- float: right;
-}
-
-body.user-list .sort a {
- font-size: 85%;
- background: #eee;
- padding: 5px;
- border-bottom: 1px solid #ccc;
- border-right: 1px solid #ccc;
-}
-
-/* ===================== */
-/* = Stateful stuff = */
-/* ===================== */
-
-.state-deleted, .state-deleted a, .state-deleted * {
- color: rgba(0, 0, 0, 0.4);
-}
-
-.state-deleted {
- padding-left: 3px;
-}
-
-.state-deleted:hover * {
- color: rgba(0, 0, 0, 0.8);
-}
-
-.state-notice {
- text-transform: uppercase;
- font-size: 120%;
- background: #f4a83d;
- padding: 15px;
- text-align: center;
- color: #fff;
-}
--- a/ckan/public/css/forms.css Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/public/css/forms.css Mon Sep 05 10:20:24 2011 +0100
@@ -3,7 +3,7 @@
fieldset {
padding: 1em;
margin: 0 0 1.5em 0;
- border: 1px solid #ccc; }
+ border-bottom: 1px solid #ccc; }
legend {
font-weight: bold;
@@ -46,9 +46,13 @@
input.title {
font-size: 1.5em; }
input.short {
- width: 10em; }
+ width: 15em; }
+table input.short {
+ width: 12em; }
input.medium-width {
width: 25em; }
+table input.medium-width {
+ width: 20em; }
input.long {
width: 100%; }
@@ -61,7 +65,7 @@
textarea.short {
height: 1em; }
textarea.wide {
- width: 62.5em;
+ width: 55;
height: 1em; }
select[multiple], select.multiple {
@@ -176,3 +180,11 @@
#preview {
margin-bottom: 30px;
}
+
+#openid_form {
+ width: 100%;
+}
+
+#openid_input_area {
+ padding: 0px;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ckan/public/css/handheld.css Mon Sep 05 10:20:24 2011 +0100
@@ -0,0 +1,8 @@
+* {
+ float: none;
+ background: #fff;
+ color: #000;
+}
+
+
+body { font-size: 80%; }
\ No newline at end of file
--- a/ckan/public/css/ie.css Thu Sep 01 20:30:24 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-.clearfix {
- zoom: 1; /* triggers hasLayout */
- display: block; /* resets display for IE/Win */
-}
\ No newline at end of file
--- a/ckan/public/css/jquery.autocomplete.css Thu Sep 01 20:30:24 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-.ac_results {
- padding: 0px;
- border: 1px solid black;
- background-color: white;
- overflow: hidden;
- z-index: 99999;
-}
-
-.ac_results ul {
- width: 100%;
- list-style-position: outside;
- list-style: none;
- padding: 0;
- margin: 0;
-}
-
-.ac_results li {
- margin: 0px;
- padding: 2px 5px;
- cursor: default;
- display: block;
- /*
- if width will be 100% horizontal scrollbar will apear
- when scroll mode will be used
- */
- /*width: 100%;*/
- font: menu;
- font-size: 12px;
- /*
- it is very important, if line-height not setted or setted
- in relative units scroll will be broken in firefox
- */
- line-height: 16px;
- overflow: hidden;
-}
-
-.ac_loading {
- background: white url('indicator.gif') right center no-repeat;
-}
-
-.ac_odd {
- background-color: #eee;
-}
-
-.ac_over {
- background-color: #0A246A;
- color: white;
-}
--- a/ckan/public/css/stars.css Thu Sep 01 20:30:24 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/* based on http://www.pmob.co.uk/temp/star-rating.htm */
-
-div.inline-rating{
- display:-moz-inline-block;
- display:-moz-inline-box;
- display:inline-block;
- /* vertical-align:middle; */
- margin-bottom: -1px;
-}
-
-.stars{
- width:80px;
- height:16px;
- margin: 0;
- padding:0;
- list-style:none;
- clear:both;
- position:relative;
- background: url(/images/stars.png) no-repeat 0 0;
-}
-
-.default0star {background-position:0 0}
-.default1star {background-position:0 -16px}
-.default2star {background-position:0 -32px}
-.default3star {background-position:0 -48px}
-.default4star {background-position:0 -64px}
-.default5star {background-position:0 -80px}
-
-ul.stars li {
- cursor: pointer;
- float:left;
- text-indent:-999em;
-}
-
-ul.stars li a {
- position:absolute;
- left:0;
- top:0;
- width:16px;
- height:16px;
- text-decoration:none;
- z-index: 200;
-}
-
-ul.stars li.one a {left:0}
-ul.stars li.two a {left:16px;}
-ul.stars li.three a {left:32px;}
-ul.stars li.four a {left:48px;}
-ul.stars li.five a {left:64px;}
-
-ul.stars li a:hover {
- z-index:2;
- width:80px;
- height:16px;
- overflow:hidden;
- left:0;
- background: url(/images/stars.png) no-repeat 0 0
-}
-
-ul.stars li.one a:hover {background-position:0 -96px;}
-ul.stars li.two a:hover {background-position:0 -112px;}
-ul.stars li.three a:hover {background-position:0 -128px}
-ul.stars li.four a:hover {background-position:0 -144px}
-ul.stars li.five a:hover {background-position:0 -160px}
--- a/ckan/public/css/style.css Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/public/css/style.css Mon Sep 05 10:20:24 2011 +0100
@@ -1,8 +1,684 @@
-/* This file is just for importing other css files */
- at import url(http://assets.okfn.org/themes/twentyten/style.css);
- at import url(ckan.css);
- at import url(buttons.css);
- at import url(stars.css);
- at import url(tabs.css);
- at import url(forms.css);
+.header.outer {
+ background-color: #e2e2e2;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#e2e2e2), to(#cccccc));
+ background-image: -webkit-linear-gradient(top, #e2e2e2, #cccccc);
+ background-image: -moz-linear-gradient(top, #e2e2e2, #cccccc);
+ background-image: -ms-linear-gradient(top, #e2e2e2, #cccccc);
+ background-image: -o-linear-gradient(top, #e2e2e2, #cccccc);
+ background-image: linear-gradient(top, #e2e2e2, #cccccc);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#e2e2e2', EndColorStr='#cccccc');
+
+ margin-bottom: 20px;
+ -moz-box-shadow: 0px 2px 15px #dddddd;
+ -webkit-box-shadow: 0px 2px 15px #dddddd;
+ box-shadow: 0px 2px 15px #dddddd;
+ border-bottom: 1px solid #ccc;
+}
+
+header {
+ padding: 5px 0px 2px 0px;
+}
+
+header #logo {
+ float: left;
+}
+
+header #site-name {
+ font-size: 1.4em;
+ font-family: Ubuntu, sans-serif;
+ padding: 5px;
+ padding-left: 82px;
+ padding-bottom: 2px;
+ /*font-weight: bold;*/
+ color: #333;
+ text-shadow: 1px 1px 3px #ccc;
+}
+
+header #site-name a {
+ color: #000;
+}
+
+header .menu form {
+ display: inline;
+}
+
+header .menu input {
+ width: 200px;
+ margin-top: -1px;
+}
+
+header .menu a {
+ display: inline-block;
+ padding-top: 5px;
+ font-size: 1.1em;
+ text-decoration: none;
+ font-weight: bold;
+ margin-left: 1.5em;
+ text-shadow: 1px 1px 3px #ccc;
+}
+
+header .menu #menusearch {
+ float: right;
+}
+
+header .menu #mainmenu {
+ display: inline;
+}
+
+header .account {
+ float: right;
+}
+
+header .account img {
+ margin-bottom: -3px;
+}
+
+
+header .search {
+ margin: 1px;
+ margin-left: 1em;
+ border: 1px solid #ccc;
+ font-size: 1.1em;
+ padding: 0.4em;
+ font-weight: bold;
+
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
+}
+
+.footer.outer {
+ border-top: 2px solid #ccc;
+ background-color: #dbdbdb;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#ffffff));
+ background-image: -webkit-linear-gradient(top, #dbdbdb, #ffffff);
+ background-image: -moz-linear-gradient(top, #dbdbdb, #ffffff);
+ background-image: -ms-linear-gradient(top, #dbdbdb, #ffffff);
+ background-image: -o-linear-gradient(top, #dbdbdb, #ffffff);
+ background-image: linear-gradient(top, #dbdbdb, #ffffff);
+ fromilter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#dbdbdb', EndColorStr='#ffffff');
+}
+
+html, body {
+ height: 100%;
+}
+
+#wrap {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -230px;
+}
+
+footer, #push {
+ height: 205px;
+}
+
+footer {
+ margin-top: 5px;
+ padding-top: 1em;
+}
+
+footer a {
+ text-decoration: none;
+}
+
+footer #footer-okf-logo {
+ margin-bottom: -4px;
+}
+
+footer .xoxo h3 {
+ font-size: 1.2em;
+}
+
+h1, h2, h3, h4, h5 {
+ font-family: 'Ubuntu', Georgia;
+}
+
+a, a:visited {
+ color: #bb2222;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #183661;
+}
+
+
+/* Basic page elements */
+
+.page_heading {
+ margin-top: 1em;
+ margin-bottom: 1em;
+ font-size: 2.2em;
+ font-weight: normal;
+}
+
+#minornavigation {
+ border: 1px solid #e0e0e0;
+ background-color: #e2e2e2;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#e2e2e2));
+ background-image: -webkit-linear-gradient(top, #f0f0f0, #e2e2e2);
+ background-image: -moz-linear-gradient(top, #f0f0f0, #e2e2e2);
+ background-image: -ms-linear-gradient(top, #f0f0f0, #e2e2e2);
+ background-image: -o-linear-gradient(top, #f0f0f0, #e2e2e2);
+ background-image: linear-gradient(top, #f0f0f0, #e2e2e2);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f0f0f0', EndColorStr='#e2e2e2');
+
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
+}
+
+#minornavigation ul.tabbed li.action {
+ float: right;
+}
+
+/* Side bar widgets */
+ul.widget-list {
+ list-style: none;
+ padding-left: 0px;
+}
+
+ul.widget-list li.widget-container {
+ border-bottom: 1px solid #e0e0e0;
+ margin-bottom: 1em;
+}
+
+ul.widget-list li.widget-container.boxed {
+ border-bottom: 0;
+ background-color: #FFF7C0;
+ padding: 15px;
+ padding-top: 10px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+ border-radius: 15px;
+}
+
+/* Hints */
+
+.hint {
+ font-size: 0.8em;
+ color: #888;
+ margin-bottom: 0;
+}
+
+/* Tables */
+table th {
+ border: 1px solid #e0e0e0;
+ background-color: #e2e2e2;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#e2e2e2));
+ background-image: -webkit-linear-gradient(top, #f0f0f0, #e2e2e2);
+ background-image: -moz-linear-gradient(top, #f0f0f0, #e2e2e2);
+ background-image: -ms-linear-gradient(top, #f0f0f0, #e2e2e2);
+ background-image: -o-linear-gradient(top, #f0f0f0, #e2e2e2);
+ background-image: linear-gradient(top, #f0f0f0, #e2e2e2);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f0f0f0', EndColorStr='#e2e2e2');
+}
+
+table caption {
+ caption-side: bottom;
+ color: #888;
+ font-size: 0.9em;
+ background-color: white;
+}
+
+tbody tr:nth-child(even) td, tbody tr.even td {
+ background-color: #fff7c0;
+}
+
+/* ============== */
+/* = Navigation = */
+/* ============== */
+
+#minornavigation {
+ margin-bottom: 1em;
+}
+
+.nominor #minornavigation {
+ display: none;
+}
+
+#minornavigation ul {
+ list-style: none;
+ padding: 7px;
+ margin: 0;
+}
+
+#minornavigation ul li {
+ display: inline-block;
+ margin-right: 2em;
+}
+
+#minornavigation ul li a {
+ text-decoration: none;
+ font-weight: bold;
+}
+
+#minornavigation ul li a img {
+ margin-bottom: -4px;
+ padding-right: 5px;
+}
+
+#sidebar {
+ margin-right: -10px;
+ padding-left: 9px;
+ overflow: hidden;
+}
+
+#sidebar h2, #sidebar h3 {
+ font-size: 1.3em;
+}
+
+#sidebar ul.property-list li ul {
+ margin-left: -2em;
+}
+
+#content {
+ border-right: 1px solid #e0e0e0;
+}
+
+/* ============== */
+/* = Pagination = */
+/* ============== */
+
+.pager {
+ width: 100%;
+ text-align: center;
+ margin: 0 0 1.2em 0;
+ clear: both;
+}
+
+.pager span, .pager a {
+ text-decoration: none;
+ margin: 0em;
+ border: none;
+ padding: 0.3em 0.1em;
+}
+
+.pager a:hover, .pager a:active {
+ color: #fff;
+ background-color: #c22;
+}
+
+.pager span.pager_dotdot {
+ color: #aaa;
+}
+
+.pager span.pager_curpage {
+ font-weight: bold;
+ border: 1px solid #ddd;
+}
+
+
+/* ==========================
+ * Facets
+ */
+
+.facet-box {
+
+}
+
+#sidebar .facet-box h2 {
+ color: #000;
+ font-size: 1.2em;
+}
+
+.facet-options {
+ margin-top: 0.5em;
+}
+
+.facet-options li {
+ padding-top: 0.2em;
+ color: #000;
+}
+
+.register-link {
+ padding-top: 10px;
+}
+
+.package-search-filters {
+ margin-top: 15px;
+}
+
+.search-field {
+ display: inline-block;
+ margin-right: 5px;
+ margin-bottom: 10px;
+ padding: 2px 2px 4px 3px;
+ font-size: 14px;
+ background-color: #FFF7C0;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ line-height: 16px;
+ /*
+ -moz-box-shadow: 1px 1px 3px #bbb;
+ -webkit-box-shadow: 1px 1px 3px #bbb;
+ box-shadow: 1px 1px 3px #bbb;
+ */
+}
+
+.search-field img {
+ margin-bottom: -3px;
+}
+
+.search-field-name::after {
+ content: ":";
+}
+
+.search-field-value {
+ font-weight: bold;
+}
+
+/* ================ */
+/* = Forms common = */
+/* ================ */
+
+fieldset {
+ border: 0px;
+ border-bottom: 1px solid #e0e0e0;
+}
+
+
+/* ============== */
+/* = Login Form = */
+/* ============== */
+
+form.simple-form label {
+ display: inline-block;
+ float: left;
+ min-width: 40%;
+ padding-top: 0.5em;
+ padding-bottom: 1em;
+}
+
+form.simple-form fieldset input {
+ border: 1px solid #E7E7E7;
+ padding: 0.5em;
+ width: 40%;
+ margin-bottom: 1em
+}
+
+form.simple-form textarea {
+ width: 99%;
+}
+
+.purge-button {
+ border: none;
+ background: none;
+ background-color: #b33a3a;
+ color: white;
+ display: block;
+ margin-bottom: 1em;
+}
+
+.purge-button:hover {
+ border: none;
+}
+
+
+/* ===================== */
+/* = Package read view = */
+/* ===================== */
+
+.property-list {
+ list-style: none;
+ padding-left: 3em;
+}
+
+#sidebar .property-list li h3 {
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-bottom: 0.5em;
+ margin-left: -2em;
+}
+
+#sidebar .property-list li {
+ margin-bottom: 0.2em;
+}
+
+.package .api div {
+ background:#f0f0f0;
+ padding:10px;
+}
+
+.package .api h5 {
+ font-weight:bold;
+ margin-bottom:1em!important;
+ font-size:1em;
+}
+
+.package .api code {
+ background:#444;
+ color:#fff;
+ padding:3px 10px ;
+ margin-bottom:1em;
+ display:block;
+}
+.package .api code a {
+ color:#fff;
+}
+
+/* ===================== */
+/* = User Listing = */
+/* ===================== */
+
+body.user-list #content {
+}
+
+ul.userlist, ul.userlist ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+
+ul.userlist li.user {
+ display: inline-block;
+ width: 200px;
+ margin-bottom: 15px;
+}
+
+ul.userlist li ul span.edits {
+ color: #333;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-left: 3px;
+}
+
+ul.userlist li.user .username {
+}
+
+#content ul.userlist .username img {
+ margin-bottom: -3px;
+}
+
+ul.userlist .created {
+ color: #888;
+}
+
+ul.userlist .badge {
+ color: #fc0;
+}
+
+body.user-list .sort {
+ float: right;
+}
+
+body.user-list .sort a {
+ background: #eee;
+ padding: 5px;
+ border-bottom: 1px solid #ccc;
+ border-right: 1px solid #ccc;
+}
+
+/* ===================== */
+/* = Stateful stuff = */
+/* ===================== */
+
+.state-deleted, .state-deleted a, .state-deleted * {
+ color: rgba(0, 0, 0, 0.4);
+}
+
+.state-deleted {
+ padding-left: 3px;
+}
+
+.state-deleted:hover * {
+ color: rgba(0, 0, 0, 0.8);
+}
+
+.state-notice {
+ text-transform: uppercase;
+ font-size: 120%;
+ background: #f4a83d;
+ padding: 15px;
+ text-align: center;
+ color: #fff;
+}
+
+/* ================ */
+/* = Search boxes = */
+/* ================ */
+
+form.package-search input.search {
+ width: 99%;
+ font-size: 1.2em;
+ margin: 0px;
+ -webkit-appearance: textfield;
+
+ border: 1px solid #ccc;
+ padding: 0.5em;
+ font-weight: bold;
+
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
+}
+
+.package-search input.button {
+ display: inline-block;
+ float: right;
+ margin-top: 5px;
+ margin-right: 10px !important;
+ margin-bottom: 1px !important;
+}
+
+.package-search-filters {
+ margin-top: 1em;
+ margin-bottom: 1em;
+ color: #888;
+}
+
+.package-search-filters label {
+ padding-left: 1em;
+}
+
+/* =================== */
+/* = Package listing = */
+/* =================== */
+
+ul.packages {
+ padding-left: 0;
+ margin: 0 0 1em 0;
+}
+
+.packages .header {
+ padding-top: 0.5em;
+ font-weight: bold;
+ font-size: 1.1em;
+}
+
+.packages .extract {
+ padding-top: 0.3em;
+}
+
+.packages li {
+ list-style: none;
+ padding: 1em 0 0.2em 0.0em;
+ border-bottom: 1px solid #ececec;
+ overflow: hidden;
+ /*white-space: nowrap;*/
+}
+
+.packages li a {
+ text-decoration: none;
+}
+
+.packages li img {
+ margin-bottom: -2px;
+}
+
+.search_meta {
+ float:right;
+}
+
+ul.package_formats {
+ float: right;
+ padding: 0 0 3px 0;
+ margin: 0;
+ font-family: monospace;
+}
+
+ul.package_formats li {
+ display: inline;
+ margin: 0;
+ padding: 0 5px 0 5px;
+ border: none;
+ font-weight: normal;
+ font-size: 0.9em;
+ color: #808080;
+ background:#ececec;
+}
+
+.openness {
+ clear:right;
+ float:right;
+ font-size:0.8em;
+}
+
+.openness img {
+ vertical-align:top;
+}
+
+.openness li {
+ margin:0;
+ padding:0;
+ border:none;
+}
+
+
+.signup {
+ color: white;
+ border-bottom: 0;
+ background-color: #FFF7C0;
+ padding: 15px;
+ padding-top: 10px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+ border-radius: 15px;
+ padding-bottom: 10px;
+}
+
+.signup h2 {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: 1.2em;
+}
+
+.subscribe {
+ float: right;
+ margin-top: -6px;
+ margin-bottom: -10px;
+}
+
+.subscribe input[type='text'] {
+ border: 1px solid #ccc;
+ padding: 4px;
+ margin-right: 10px;
+}
+
--- a/ckan/public/css/tabs.css Thu Sep 01 20:30:24 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/* @override http://localhost:5000/style/tabs.css */
-
-ul.tabbed {
- position: relative;
- float: left;
- width: 100%;
- padding: 0;
- margin: 0 0 1em 0;
- list-style: none;
- line-height: 1em;
- border-bottom: 1px solid #aaa;
-}
-
-ul.tabbed li {
- float: left;
- margin: 0 0 0 0.5em;
- border-left: 1px solid #eaeaea;
- border-top: 1px solid #eaeaea;
- border-right: 1px solid #eaeaea;
- -moz-border-radius: 0.4em 0.4em 0 0;
- -webkit-border-top-left-radius: 0.4em;
- -webkit-border-top-right-radius: 0.4em;
-}
-
-ul.tabbed a {
- display: block;
- color: #bbb;
- text-decoration: none;
- font-weight: bold;
- background: #fff;
- margin: 0;
- padding: 4px 0.6em;
-}
-
-ul.tabbed li a:hover,
-ul.tabbed li a:active {
- color: #444;
- background: #fff;
- border-color: #aaa;
- border-bottom-color: #fff;
-}
-
-ul.tabbed .hidden a {
- display: none;
-}
-
-ul.tabbed a.active,
-ul.tabbed a.active:link,
-ul.tabbed a.active:visited
-{
- position: relative;
- top: 1px;
- z-index: 102;
- color: #444;
- background: #fff;
- border-color: #aaa;
- border-bottom-color: #fff;
- display: block;
-}
-
-ul.tabbed a img {
- margin-bottom: -2px;
-}
--- a/ckan/public/css/tagcomplete.css Thu Sep 01 20:30:24 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-.tags a.active {
- background: #2B69C6;
- color: #fff;
- text-decoration: none;
- padding: 0.2em;
- margin: 0 0.2em;
-}
Binary file ckan/public/img/collaborate.png has changed
Binary file ckan/public/img/find.png has changed
Binary file ckan/public/img/lod2.png has changed
Binary file ckan/public/img/logo.png has changed
Binary file ckan/public/img/share.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ckan/public/scripts/vendor/modernizr/1.7/modernizr.min.js Mon Sep 05 10:20:24 2011 +0100
@@ -0,0 +1,2 @@
+// Modernizr v1.7 www.modernizr.com
+window.Modernizr=function(a,b,c){function G(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=!!(a[b]in l);return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return!!E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c&&(!b||b(a[d],j)))return!0}function D(a,b){return(""+a).indexOf(b)!==-1}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="1.7",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v,w=function(a){var c=b.createElement("style"),d=b.createElement("div"),e;c.textContent=a+"{#modernizr{height:3px}}",h.appendChild(c),d.id="modernizr",g.appendChild(d),e=d.offsetHeight===3,c.parentNode.removeChild(c),d.parentNode.removeChild(d);return!!e},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div");var f=(d="on"+d)in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y=({}).hasOwnProperty,z;C(y,c)||C(y.call,c)?z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)}:z=function(a,b){return y.call(a,b)},r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return a.getContext&&a.getContext("2d")},r.canvastext=function(){return e.canvas&&C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return"ontouchstart"in a||w("@media ("+o.join("touch-enabled),(")+"modernizr)")},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;){var d=p[b].toLowerCase();if(a[d+"_indexedDB"]||a[d+"IndexedDB"])return!0}return!1},r.hashchange=function(){return x("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return !!(a.history&&history.pushState)},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(//:),url(//:),red url(//:)");return(new RegExp("(url\\s*\\(.*?){3}")).test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius","",function(a){return D(a,"orderRadius")})},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){var a,c,d=h||g,e=b.createElement("style"),f=b.implementation||{hasFeature:function(){return!1}};e.type="text/css",d.insertBefore(e,d.firstChild),a=e.sheet||e.styleSheet;var i=f.hasFeature("CSS2","")?function(b){if(!a||!b)return!1;var c=!1;try{a.insertRule(b,0),c=/src/i.test(a.cssRules[0].cssText),a.deleteRule(a.cssRules.length-1)}catch(d){}return c}:function(b){if(!a||!b)return!1;a.cssText=b;return a.cssText.length!==0&&/src/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};c=i('@font-face { font-family: "font"; src: url(data:,); }'),d.removeChild(e);return c},r.video=function(){var a=b.createElement("video"),c=!!a.canPlayType;if(c){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return c},r.audio=function(){var a=b.createElement("audio"),c=!!a.canPlayType;c&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;"));return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webWorkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c<d)e=a[c],(b=e.media||b)!="screen"&&f.push(p(e.imports,b),e.cssText);return f.join("")}function o(a){var b=-1;while(++b<e)a.createElement(d[b])}var c="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",d=c.split("|"),e=d.length,f=new RegExp("(^|\\s)("+c+")","gi"),g=new RegExp("<(/*)("+c+")","gi"),h=new RegExp("(^|[^\\n]*?\\s)("+c+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),i=b.createDocumentFragment(),j=b.documentElement,k=j.firstChild,l=b.createElement("body"),m=b.createElement("style"),n;o(b),o(i),k.insertBefore(m,k.firstChild),m.media="print",a.attachEvent("onbeforeprint",function(){var a=-1,c=p(b.styleSheets,"all"),k=[],o;n=n||b.body;while((o=h.exec(c))!=null)k.push((o[1]+o[2]+o[3]).replace(f,"$1.iepp_$2")+o[4]);m.styleSheet.cssText=k.join("\n");while(++a<e){var q=b.getElementsByTagName(d[a]),r=q.length,s=-1;while(++s<r)q[s].className.indexOf("iepp_")<0&&(q[s].className+=" iepp_"+d[a])}i.appendChild(n),j.appendChild(l),l.className=n.className,l.innerHTML=n.innerHTML.replace(g,"<$1font")}),a.attachEvent("onafterprint",function(){l.innerHTML="",j.removeChild(l),j.appendChild(n),m.styleSheet.cssText=""})}(a,b),e._enableHTML5=f,e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+" js "+u.join(" ");return e}(this,this.document)
\ No newline at end of file
--- a/ckan/public/scripts/vendor/openid-selector/js/openid-jquery.js Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/public/scripts/vendor/openid-selector/js/openid-jquery.js Mon Sep 05 10:20:24 2011 +0100
@@ -75,7 +75,7 @@
cookie_name: 'openid_provider',
cookie_path: '/',
- img_path: '/scripts/openid-selector/images/',
+ img_path: '/scripts/vendor/openid-selector/images/',
input_id: null,
provider_url: null,
--- a/ckan/templates/authorization_group/authz.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/authorization_group/authz.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,14 +3,10 @@
py:strip=""><py:def function="page_title">${c.authorization_group_name} - Authorization - AuthorizationGroups</py:def>
+ <py:def function="page_heading">Authorization: ${c.authorization_group_name}</py:def><div py:match="content">
- <h2>
- Authorization for authorization group: ${c.authorization_group_name}
- </h2>
-
-
- <h2>Update Existing Roles</h2>
+ <h3>Update Existing Roles</h3><form id="theform" method="POST">
${authz_form_table('theform', c.roles, c.users, c.user_role_dict)}
@@ -19,7 +15,7 @@
</button></form>
- <h2>Add Roles for Any User</h2>
+ <h3>Add Roles for Any User</h3><form id="addform" method="POST">
${authz_add_table(c.roles)}
@@ -28,7 +24,7 @@
<hr/>
- <h2>Existing Roles for Authorization Groups</h2>
+ <h3>Existing Roles for Authorization Groups</h3><form id="authzgroup_form" method="POST">
${authz_form_group_table('authzgroup_form', c.roles, c.authz_groups, c.authz_groups_role_dict)}
@@ -37,7 +33,7 @@
</button></form>
- <h2>Add Roles for Any Authorization Group</h2>
+ <h3>Add Roles for Any Authorization Group</h3><form id="authzgroup_addform" method="POST">
${authz_add_group_table(c.roles)}
--- a/ckan/templates/authorization_group/edit.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/authorization_group/edit.html Mon Sep 05 10:20:24 2011 +0100
@@ -2,13 +2,10 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.authorization_group_name} - Edit - AuthorizationGroups</py:def>
+ <py:def function="page_title">${c.authorization_group_name} - Edit - Authorization Groups</py:def>
+ <py:def function="page_heading">Edit: ${c.authorization_group.name}</py:def><div py:match="content">
- <h2>
- Edit Authorization Group: ${c.authorization_group_name}
- </h2>
-
${Markup(c.form)}
</div>
--- a/ckan/templates/authorization_group/index.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/authorization_group/index.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,10 +4,9 @@
py:strip=""><py:def function="page_title">Authorization Groups</py:def>
+ <py:def function="page_heading">Authorization Groups</py:def><div py:match="content">
- <h2>Authorization Groups</h2>
-
<p i18n:msg="item_count">There are <strong>${c.page.item_count}</strong> authorization groups.</p>
${c.page.pager()}
--- a/ckan/templates/authorization_group/new.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/authorization_group/new.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,12 +3,9 @@
py:strip=""><py:def function="page_title">New - Authorization Groups</py:def>
+ <py:def function="page_heading">New Authorization Group</py:def><div py:match="content">
- <h2>
- New Authorization Group
- </h2>
-
${Markup(c.form)}
</div>
--- a/ckan/templates/authorization_group/read.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/authorization_group/read.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,26 +4,14 @@
py:strip=""><py:def function="page_title">${c.authorization_group.name} - Authorization Groups</py:def>
+ <py:def function="page_heading">${c.authorization_group.name}</py:def><div py:match="content">
- <div class="group">
- <h2 class="head">
- <span class="name">${c.authorization_group.name}</span>
- </h2>
-
- <py:if test="c.group_admins">
- <h3>Administrators:</h3>
- <py:for each="admin in c.authorization_group_admins">
- <a href="${h.url_for(controller='user',action='read',id=admin.id)}">${admin.name}</a>
- </py:for>
- </py:if>
-
- <h3>Users:</h3>
+ <h3>Members</h3>
+ <p i18n:msg="item_count">There are ${c.page.item_count} users in this authorization group.</p>
${c.page.pager()}
${user_list(c.page.items)}
${c.page.pager()}
- <p i18n:msg="item_count">There are ${c.page.item_count} users in this authorization group.</p>
- </div></div><xi:include href="layout.html" />
--- a/ckan/templates/group/authz.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/group/authz.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,13 +3,10 @@
py:strip=""><py:def function="page_title">${c.grouptitle or c.groupname} - Authorization - Groups</py:def>
+ <py:def function="page_heading">Authorization: ${c.grouptitle or c.groupname}</py:def><div py:match="content">
- <h2>
- Authorization for group: ${c.grouptitle or c.groupname}
- </h2>
-
- <h2>Update Existing Roles</h2>
+ <h3>Update Existing Roles</h3><form id="theform" method="POST">
${authz_form_table('theform', c.roles, c.users, c.user_role_dict)}
@@ -18,7 +15,7 @@
</button></form>
- <h2>Add Roles for Any User</h2>
+ <h3>Add Roles for Any User</h3><form id="addform" method="POST">
${authz_add_table(c.roles)}
@@ -27,7 +24,7 @@
<hr/>
- <h2>Existing Roles for Authorization Groups</h2>
+ <h3>Update Existing Roles for Authorization Groups</h3><form id="authzgroup_form" method="POST">
${authz_form_group_table('authzgroup_form', c.roles, c.authz_groups, c.authz_groups_role_dict)}
@@ -36,7 +33,7 @@
</button></form>
- <h2>Add Roles for Any Authorization Group</h2>
+ <h3>Add Roles for Any Authorization Group</h3><form id="authzgroup_addform" method="POST">
${authz_add_group_table(c.roles)}
--- a/ckan/templates/group/edit.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/group/edit.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,12 +3,18 @@
py:strip=""><py:def function="page_title">${c.grouptitle or c.groupname} - Edit - Groups</py:def>
+ <py:def function="page_heading">Edit: ${c.grouptitle or c.groupname}</py:def>
+
+ <py:def function="optional_head">
+ <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
+
+ <!-- Package autocomplete -->
+ <script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script>
+ <script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script>
+ <link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" />
+ </py:def><div py:match="content">
- <h2>
- Edit Group: ${c.groupname}
- </h2>
-
${Markup(c.form)}
</div>
--- a/ckan/templates/group/index.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/group/index.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,11 +4,13 @@
py:strip=""><py:def function="page_title">Groups of Data Packages</py:def>
+ <py:def function="page_heading">Groups of Data Packages</py:def>
+ <py:def function="optional_head">
+ <style>#minornavigation { visibility: hidden; }</style>
+ </py:def>
+
<div py:match="content">
- <h2>Groups</h2>
-
- <p i18n:msg="item_count">There are <strong>${c.page.item_count}</strong> groups.</p>
${c.page.pager()}
${group_list_from_dict(c.page.items)}
--- a/ckan/templates/group/layout.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/group/layout.html Mon Sep 05 10:20:24 2011 +0100
@@ -7,8 +7,8 @@
><py:match path="primarysidebar">
- <li class="widget-container widget_text">
- <h2>Groups section</h2>
+ <li class="widget-container boxed widget_text">
+ <h3>Groups section</h3><p i18n:msg="">Whilst tags are great at collecting packages together, there are occasions when you want to restrict users from editing a collection. A <strong>group</strong> can be set-up to specify which users have permission to add or remove packages from it.</p><p><span class="ckan_logged_in" style="display: none;">
@@ -31,6 +31,10 @@
<li py:if="h.check_access('group_edit_permissions',{'id':c.group.id})">
${h.subnav_link(c, h.icon('lock') + _('Authorization'), controller='group', action='authz', id=c.group.name)}
</li>
+ <li class="action">
+ ${h.subnav_link(c, h.icon('atom_feed') + _('Subscribe'),
+ controller='group', action='history', id=c.group.name, format='atom', days=7)}
+ </li></ul></py:match>
--- a/ckan/templates/group/new.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/group/new.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,12 +3,18 @@
py:strip=""><py:def function="page_title">New - Groups</py:def>
+ <py:def function="page_heading">New Group</py:def>
+
+ <py:def function="optional_head">
+ <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
+
+ <!-- Package autocomplete and rack-up -->
+ <script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script>
+ <script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script>
+ <link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" />
+ </py:def><div py:match="content">
- <h2>
- New Group
- </h2>
-
${Markup(c.form)}
</div>
--- a/ckan/templates/group/read.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/group/read.html Mon Sep 05 10:20:24 2011 +0100
@@ -5,36 +5,39 @@
<py:def function="page_title">${c.group.display_name} - Groups</py:def>
- <div py:match="content">
- <div class="group">
- <h2 class="head">
+ <py:def function="page_heading"><py:if test="not c.group.title"><em>No Title</em></py:if>
+ ${c.group.title}
+ </py:def>
+
+ <py:match path="primarysidebar">
+
+ <li class="widget-container widget_text">
+ <div class="description">
+ ${c.group_description_formatted}
+ </div>
+ <ul class="property-list">
+ <py:if test="c.group_admins">
+ <li>
+ <h3>Administrators</h3>
+ <ul py:for="admin in c.group_admins">
+ <li>${h.linked_user(admin)}</li>
+ </ul>
+ </li>
+ </py:if>
+ </ul>
+ </li>
+ </py:match>
- ${c.group.title}
- <span class="name">(${c.group.name})</span>
- </h2>
-
- <div class="description">
- ${c.group_description_formatted}
- </div>
-
- <py:if test="c.group_admins">
- <h3>Administrators:</h3>
- <py:for each="admin in c.group_admins">
- ${h.linked_user(admin)}
- </py:for>
- </py:if>
-
+ <py:match path="content"><h3>Packages:</h3><p i18n:msg="item_count">There are ${c.page.item_count} packages in this group.</p>
${c.page.pager()}
${package_list(c.page.items)}
${c.page.pager()}
-
- </div>
- </div>
+ </py:match><xi:include href="layout.html" /></html>
--- a/ckan/templates/home/index.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/home/index.html Mon Sep 05 10:20:24 2011 +0100
@@ -2,29 +2,168 @@
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
+
+ <py:def function="page_title">Welcome</py:def>
+ <py:def function="body_class">hide-sidebar</py:def>
- <py:def function="page_title">Home</py:def>
+ <py:def function="optional_head">
+ <style>
+ #minornavigation {
+ display: none;
+ }
+
+ #sidebar {
+ display: none;
+ }
- <div py:match="content">
- <h2>Welcome to ${g.site_title}</h2>
- <p i18n:msg="title">
- ${g.site_title} is an
- <a href="http://www.opendefinition.org/ossd/">open registry</a>
- of data and content packages. Harnessing the CKAN software, this
- site makes it easy to find, share and reuse content and data,
- especially in ways that are machine automatable.
- </p>
-
- <p i18n:msg="package_count"><strong>${c.package_count} registered data packages</strong> available.</p>
+ .front-page .action-box h1 {
+ padding-top: 0.6em;
+ padding-bottom: 0.5em;
+ font-size: 2.1em;
+ }
- <xi:include href="../package/search_form.html" />
-
- <h4>Recently changed packages</h4>
- ${package_list_from_dict(c.latest_packages)}
+ .front-page .action-box {
+ border-radius: 20px;
+ background: #FFF7C0;
+ }
+
+ .front-page .action-box-inner {
+ margin: 20px;
+ margin-bottom: 5px;
+ min-height: 15em;
+ }
+ .front-page .action-box-inner.collaborate {
+ background:url(/img/collaborate.png) no-repeat right top;
+ }
+
+ .front-page .action-box-inner.share {
+ background:url(/img/share.png) no-repeat right top;
+ }
+
+ .front-page .action-box-inner.find {
+ background:url(/img/find.png) no-repeat right top;
+ }
+
+ .front-page .action-box-inner a {
+ font-weight: bold;
+ }
+
+ .front-page .action-box-inner input {
+ font-family: 'Ubuntu';
+ border-radius: 10px;
+ background-color: #fff;
+ border: 0px;
+ font-size: 1.3em;
+ width: 90%;
+ border: 1px solid #999;
+ color: #666;
+ padding: 0.5em;
+ }
+
+ .front-page .action-box-inner .create-button {
+ display: block;
+ float: right;
+ font-weight: normal;
+ font-family: 'Ubuntu';
+ margin-top: 1.5em;
+ border-radius: 10px;
+ background-color: #B22;
+ border: 0px;
+ font-size: 1.3em;
+ color: #fff;
+ padding: 0.5em;
+ }
+
+ .front-page .action-box-inner .create-button:hover {
+ background-color: #822;
+ }
+
+ .front-page .action-box-inner ul {
+ margin-top: 1em;
+ margin-bottom: 0;
+ }
- <p><a href="${h.url_for(controller='revision', action='index',
- id=None)}">View revision log »</a></p>
+ .front-page .whoelse {
+ margin-top: 1em;
+ }
+
+ .front-page .group {
+ overflow: hidden;
+ }
+
+ .front-page .group h3 {
+ margin-bottom: 0.5em;
+ }
+
+ .front-page .group p {
+ margin-bottom: 0em;
+ min-height: 6em;
+ }
+
+ .front-page .group strong {
+ display: block;
+ margin-bottom: 1.5em;
+ }
+
+ </style>
+ </py:def>
+
+ <div py:match="//div[@id='content']" class="front-page">
+ <div class="span-24 last">
+ <h1>Welcome to ${g.site_title}!</h1>
+ </div>
+ <div class="span-8 action-box">
+ <div class="action-box-inner find">
+ <h1>Find data</h1>
+
+ <form action="/package" method="GET">
+ <input name="q" value="" class="search-field" placeholder="Find data packages" />
+ </form>
+ ${g.site_title} contains <a href="/package">${c.package_count} data packages</a> that you can
+ browse, learn about and download.
+ </div>
+ </div>
+ <div class="span-8 action-box">
+ <div class="action-box-inner share">
+ <h1>Share data</h1>
+
+ Add your own datasets to share them with others and
+ to find other people interested in your data.
+
+ <py:choose test="h.am_authorized(c, actions.PACKAGE_CREATE)">
+ <a py:when="" href="/package/new" class="create-button">Create a data package »</a>
+ <py:otherwise>
+ <a href="/user/login" class="create-button">Sign up »</a>
+ </py:otherwise>
+ </py:choose>
+ </div>
+ </div>
+ <div class="span-8 last action-box">
+ <div class="action-box-inner collaborate">
+ <h1>Collaborate</h1>
+
+ Find out more about working with open data by exploring
+ these resources:
+ <ul>
+ <li><a href="http://getthedata.org">GetTheData.org</a></li>
+ <li><a href="http://datapatterns.org">DataPatterns.org</a></li>
+ <li><a href="http://opendatamanual.org">Open Data Manual</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="span-24 last whoelse">
+ <h2>Who else is here?</h2>
+ </div>
+ <py:for each="i, group in enumerate(c.groups)">
+ <div class="span-8 group ${'last' if i % 3 == 2 else ''}">
+ <h3><a href="${h.url_for(controller='group', action='read', id=group.name)}">${group.title}</a></h3>
+ <p>
+ ${h.markdown_extract(group.description)}
+ </p>
+ <strong>${group.title} has ${len(group.packages)} data packages.</strong>
+ </div>
+ </py:for></div>
-
<xi:include href="layout.html" /></html>
+
--- a/ckan/templates/home/license.html Thu Sep 01 20:30:24 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<html xmlns:py="http://genshi.edgewall.org/"
- xmlns:i18n="http://genshi.edgewall.org/i18n"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- py:strip="">
-
- <py:def function="page_title">License</py:def>
-
- <div py:match="content">
- <h2>${g.site_title} License</h2>
-
- <p i18n:msg="">All material on this site is <a
- href="http://opendefinition.org/">open</a> and can be freely used, reused
- and redistributed. Formally, the data/database is licensed under the <a
- href="http://opendatacommons.org/licenses/odbl/">Open Data Commons Open
- Database License v1.0</a>, with all copyrightable content in that
- database plus any additional content on this site licensed under a <a
- href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons
- Attribution Share-Alike v3.0 license</a>.</p>
- </div>
-
- <xi:include href="layout.html" />
-</html>
--- a/ckan/templates/layout_base.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/layout_base.html Mon Sep 05 10:20:24 2011 +0100
@@ -1,18 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:i18n="http://genshi.edgewall.org/i18n"
- xmlns:py="http://genshi.edgewall.org/"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- >
+<!--[if IE 8 ]><html class="no-js ie8" lang="en"><![endif]-->
+ <!--[if (gte IE 9)|!(IE)]><!--><html class="no-js" lang="en"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:i18n="http://genshi.edgewall.org/i18n"
+ xmlns:py="http://genshi.edgewall.org/"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ ><!--<![endif]-->
+<xi:include href="_util.html" />
+<head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
-<xi:include href="_util.html" />
+ <title>${page_title()} - ${g.site_title}</title>
+ <meta name="description" content="" />
+ <meta name="author" content="" />
-<head>
- <title>${page_title()} - ${g.site_title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="shortcut icon" href="${g.favicon}" type="image/x-icon" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link rel="shortcut icon" href="${g.site_url}/favicon.ico" />
+
<py:choose><py:when test="defined('optional_feed')">
${optional_feed()}
@@ -21,21 +27,28 @@
<link rel="alternate" type="application/atom+xml" title="${g.site_title} - Recent Revision History" href="${h.url_for(controller='revision', action='list', id=None, format='atom', days=1)}" /></py:otherwise></py:choose>
+ <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css' /><link rel="stylesheet" href="${g.site_url}/scripts/vendor/jqueryui/1.8.11/css/ui-lightness/jquery-ui.css" type="text/css" media="screen, print" />
- <link rel="stylesheet" href="${g.site_url}/css/style.css" type="text/css" media="screen, print" />
-
- <!--[if IE]>
- <link rel="stylesheet" href="${g.site_url}/css/ie.css" type="text/css" media="screen, print" />
+ <link rel="stylesheet" href="${g.site_url}/css/boilerplate.css?v=2" />
+ <link rel="stylesheet" href="${g.site_url}/css/blueprint/screen.css" type="text/css" media="screen, projection" />
+ <link rel="stylesheet" href="${g.site_url}/css/blueprint/print.css" type="text/css" media="print" />
+ <!--[if lt IE 8]>
+ <link rel="stylesheet" href="${g.site_url}/css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
+ <link rel="stylesheet" href="${g.site_url}/css/style.css?v=2" />
+ <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" /><script type="text/javascript" src="${g.site_url}/language.js"></script>
+ <script type="text/javascript" src="${g.site_url}/language.js"></script><script type="text/javascript" src="${g.site_url}/scripts/vendor/jquery/1.5.2/jquery.min.js"></script><script type="text/javascript" src="${g.site_url}/scripts/vendor/jquery.cookie/jquery.cookie.min.js"></script><script type="text/javascript" src="${g.site_url}/scripts/vendor/jquery.placeholder/jquery.placeholder.js"></script><script type="text/javascript" src="${g.site_url}/scripts/vendor/jqueryui/1.8.11/jquery-ui.min.js"></script><script type="text/javascript" src="${g.site_url}/scripts/application.js?lang=${c.locale}"></script>
-
+
+ <script src="${g.site_url}/scripts/vendor/modernizr/1.7/modernizr.min.js"></script>
+
<script type="text/javascript">
$(document).ready(function() {
var ckan_user = $.cookie("ckan_display_name");
@@ -46,177 +59,135 @@
$('input[placeholder], textarea[placeholder]').placeholder();
});
</script>
+
<py:if test="defined('optional_head')">
${optional_head()}
</py:if>
+
</head>
-<body class="${value_of('body_class', default=lambda: c.body_class)()}
- ${request.environ.get('pylons.routes_dict', {}).get('action')}
+<body class="${request.environ.get('pylons.routes_dict', {}).get('action')}
${request.environ.get('pylons.routes_dict', {}).get('controller').split(':')[-1]}">
-<div id="wrapper" class="hfeed">
- <div id="header">
- <div id="masthead">
- <div id="branding" role="banner">
- <h1 id="site-title">
- <a href="${url('home')}" title="${g.site_title} Home">
- <py:if test="g.site_logo">
- <img src="${g.site_logo}" alt="${g.site_title} Logo" title="${g.site_title} Logo" style="display: inline;" />
- </py:if>
- <py:if test="not g.site_logo">
- ${g.site_title}
- </py:if>
+ <div id="wrap">
+ <div class="header outer">
+ <header class="container">
+ <div class="menu account">
+ <span class="ckan-logged-in" style="display: none;">
+ <a href="${h.url_for(controller='user',action='me',id=None)}">${h.icon('user')} My account</a>
+ <a href="${h.url_for('/user/logout')}">Logout</a>
+ </span>
+ <span class="ckan-logged-out">
+ <a href="${h.url_for(controller='user',action='login', id=None)}">Login</a>
+ <a href="${h.url_for(controller='user',action='register', id=None)}">Register</a>
+ </span>
+ </div>
+ <a href="${url('home')}">
+ <img width="64" src="${g.site_logo}" alt="${g.site_title} Logo" title="${g.site_title} Logo" id="logo" /></a>
- </h1>
- <div id="site-description">${g.site_description}</div>
- </div><!-- /branding -->
+ <div id="site-name">
+ <a href="${url('home')}">${g.site_title} — ${g.site_description}</a>
+ </div>
+ <div class="menu">
+ <span id="menusearch">
+ <form action="${url(controller='package', action='search')}" method="GET">
+ <input name="q" value="${c.q if hasattr(c, 'q') else ''}" class="search" placeholder="Find data packages" />
+ </form>
+ </span>
+ <div id="mainmenu">
+ <span py:if="h.check_access('package_create')">${h.nav_link(c, _('Add a package'), controller='package', action='new', id=None)}</span>
+ ${h.nav_link(c, _('Search'), controller='package', action='index', id=None, highlight_actions = 'new index')}
+ ${h.nav_link(c, _('Groups'), controller='group', action='index', id=None)}
+ </div>
+ ${h.nav_link(c, _('About'), controller='home', action='about', id=None)}
+ </div>
+ </header>
+ </div>
+ <py:with vars="messages = list(h._flash.pop_messages())">
+ <div class="class container flash-banner-box" py:if="len(messages)">
+ <div class="flash-banner ${m.category}" py:for="m in messages">
+ ${m.message}
+ </div>
+ </div>
+ </py:with>
- <div id="top-bar">
- <div id="top-bar-login">
- <span class="ckan-logged-in" style="display: none;">
- <a href="${h.url_for(controller='user',action='me',id=None)}">${h.icon('user')} My account</a>
- · <a href="${h.url_for('/user/logout')}">Logout</a>
- </span>
- <span class="ckan-logged-out">
- <a href="${h.url_for(controller='user',action='login', id=None)}">Login</a> ·
- <a href="${h.url_for(controller='user',action='register', id=None)}">Register</a>
- </span>
+ <div id="main" class="container" role="main">
+ <h1 py:if="defined('page_heading')" class="page_heading">${page_heading()}</h1>
+ <div id="minornavigation" class="span-24 last">
+ <minornavigation></minornavigation></div>
- <div class="search-form">
- <form action="${url(controller='package', action='search')}" method="GET">
- <input type="search" class="search" name="q" value="" autocomplete="off" results="5" placeholder="Search..."/>
- </form>
+ <div id="content" class="span-16 append-1">
+ <py:if test="defined('content')">
+ ${content()}
+ </py:if>
+ <content>
+ <p>Master content template placeholder … please replace me.</p>
+ </content></div>
- </div><!-- /top-bar -->
-
- <div id="access" role="navigation">
- <div class="skip-link screen-reader-text">
- <a href="#content" title="Skip to content">Skip to content</a>
- </div>
- <div class="menu">
- <ul>
- <li>${h.nav_link(c, _('Home'), controller='home', action='index', id=None)}</li>
- <li>${h.nav_link(c, _('Search'), controller='package', action='index', id=None, highlight_actions = 'search index')}</li>
-<?python
-access_package_create = h.check_access('package_create')
-?>
- <li py:if="access_package_create">${h.nav_link(c, _('Add a package'), controller='package', action='new', id=None)}</li>
- <li>${h.nav_link(c, _('Tags'), controller='tag', action='index', id=None)}</li>
- <li>${h.nav_link(c, _('Groups'), controller='group', action='index', id=None, highlight_actions = 'new index')}</li>
- <li>${h.nav_link(c, _('About'), controller='home', action='about', id=None)}</li>
- </ul>
- </div><!-- .menu -->
- </div><!-- #access -->
-
- </div><!-- #masthead -->
- </div><!-- #header -->
-
- <div id="main">
- <py:with vars="messages = list(h._flash.pop_messages())">
- <div class="flash-banner-box" py:if="len(messages)">
- <div class="flash-banner ${m.category}" py:for="m in messages">
- ${m.message}
+ <div id="sidebar" class="span-7 last">
+ <ul class="widget-list">
+ <py:if test="defined('primary_sidebar_extras')">
+ ${primary_sidebar_extras()}
+ </py:if>
+ <primarysidebar>
+ <!-- Primary Side Bar Goes Here -->
+ </primarysidebar>
+ </ul>
+ </div></div>
+ <br/><br/>
+ <div id="push"></div></div>
- </py:with>
-
- <div id="container">
- <div id="minornavigation">
- <minornavigation></minornavigation>
- </div>
- <div id="content" role="main">
- <div class="page type-page hentry">
- <div class="entry-content">
- <!-- support both options for defining content -->
- <py:if test="defined('content')">
- ${content()}
- </py:if>
- <content>
- <p>Master content template placeholder … please replace me.</p>
- </content>
- </div><!-- .entry-content -->
- </div>
-
- <div id="comments">
- </div><!-- #comments -->
-
- </div><!-- #content -->
- </div><!-- #container -->
-
- <div id="primary" class="widget-area" role="complementary">
- <ul class="xoxo">
- <py:if test="defined('primary_sidebar_extras')">
- ${primary_sidebar_extras()}
- </py:if>
- <primarysidebar>
- <!-- Primary Side Bar Goes Here -->
- </primarysidebar>
- </ul>
- </div><!-- #primary .widget-area -->
-
- </div><!-- #main -->
-
-<div id="footer" role="contentinfo">
- <div id="colophon">
- <div id="footer-widget-area" role="complementary">
-
- <div id="first" class="widget-area">
- <ul class="xoxo">
- <li class="widget-container widget_text">
- <h3 class="widget-title">Packages</h3>
+ <div class="footer outer">
+ <footer class="container">
+ <div class="xoxo span-6">
+ <h3 class="widget-title">About ${g.site_title}</h3><div class="textwidget"><ul>
- <li>${h.nav_link(c, _('Search'), controller='package', action='search', id=None)}</li>
- <li py:if="access_package_create">${h.nav_link(c, _('Register a new Package'), controller='package', action='new', id=None)}</li>
- <li>${h.nav_link(c, _('Revision History'), controller='revision', action='index', id=None)}</li>
+ <li>${h.link_to(_('About'), h.url_for(controller='home', action='about', id=None))}</li>
+ <li>
+ <a href="http://twitter.com/ckanproject">Twitter @ckanproject</a>
+ </li><li>${h.link_to(_('API'), h.url_for(controller='api', action='get_api', id=None))}</li><li>${h.link_to(_('API Docs'), 'http://wiki.ckan.net/API')}</li>
-<?python
- from pylons import config
- dumps_url = config.get('ckan.dumps_url')
- dumps_format = config.get('ckan.dumps_format', '')
-?>
- <li py:if="dumps_url">${h.link_to(_('Full %s dump') % dumps_format, dumps_url)}</li>
+ <li>
+ <a href="http://okfn.org/contact/">Contact Us</a>
+ </li>
+ <li>
+ <a href="http://okfn.org/privacy-policy/">Privacy Policy</a>
+ </li></ul></div>
- </li>
- </ul>
- <ul class="xoxo">
- <li class="widget-container widget_text">
- <h3 class="widget-title">Groups & Tags</h3>
- <div class="textwidget">
- <ul>
- <li>${h.nav_link(c, _('Tags'), controller='tag', action='index', id=None)}</li>
- <li>${h.nav_link(c, _('Groups'), controller='group', action='index', id=None)}</li>
- <li py:if="h.check_access('group_create')">${h.nav_link(c, _('Create a new Group'), controller='group', action='new', id=None)}</li>
- <li>${h.nav_link(c, _('Authorization Groups'), controller='authorization_group', action='index', id=None)}</li>
- <li class="page_item" py:if="h.check_access('authorization_group_create')">${h.nav_link(c, _('Create a new Authorization Group'), controller='authorization_group', action='new', id=None)}</li>
- </ul>
- </div>
- </li>
- </ul>
- <ul class="xoxo">
- <li class="widget-container widget_text">
- <h3 class="widget-title">About</h3>
+ </div>
+ <div class="xoxo span-6">
+ <h3 class="widget-title">Sections</h3><div class="textwidget"><ul><li>
- <a href="http://ckan.org/">Project Home Page</a>
+ <a href="${url(controller='tag', action='index')}">
+ Tags
+ </a></li><li>
- <a href="http://www.okfn.org/contact/">Contact Us</a>
+ <a href="${url(controller='revision', action='index')}">
+ Revisions
+ </a></li><li>
- <a href="http://www.okfn.org/privacy-policy/">Privacy Policy</a>
+ <a href="${url(controller='authorization_group', action='index')}">
+ Authorization Groups
+ </a>
+ </li>
+ <li>
+ <a href="${url('/ckan-admin')}">
+ Site Admin
+ </a></li></ul></div>
- </li>
- </ul>
- <ul class="xoxo">
- <li class="widget-container widget_text">
- <h3 class="widget-title">Language</h3>
+ </div>
+ <div class="xoxo span-6">
+ <h3 class="widget-title">Languages</h3><div class="textwidget"><ul><?python
@@ -229,66 +200,36 @@
locale=str(locale),
return_to=current_url,
hash=current_url_hash)}">
- ${locale.display_name}
+ ${locale.display_name or locale.english_name}
</a></li></ul></div>
- </li>
- </ul>
- </div><!-- #first .widget-area -->
+ </div>
+ <div class="xoxo span-6 last">
+ <h3 class="widget-title">Meta</h3>
+ <p id="credits">
+ © 2011
+ <img src="http://assets.okfn.org/images/logo/okf_logo_white_and_green_tiny.png" id="footer-okf-logo" />
+ <a href="http://okfn.org/">Open Knowledge Foundation</a>
+ Licensed under the <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open Database License</a>
+ <a href="http://opendefinition.org/"><img alt="This Content and Data is Open" src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" style="border: none ; margin-bottom: -4px;"/></a>
+
+ <br/><br/>
+ Powered by <a href="http://ckan.org">CKAN</a>.<br/>
+ </p>
+ </div>
+ </footer>
+ </div><!-- eo #container -->
- <div id="fourth" class="widget-area">
- <ul class="xoxo">
- <li class="widget-container widget_text">
- <h3 class="widget-title">Credits</h3>
- <div class="textwidget">
- <ul>
- <li i18n:msg="">
- <img src="http://assets.okfn.org/images/logo/okf_logo_white_and_green_tiny.png" id="footer-okf-logo" />
- An
- <a href="http://www.okfn.org/">Open Knowledge Foundation</a> Project
- </li>
- <li>
- © <a href="http://www.okfn.org/">Open Knowledge Foundation</a>
- </li>
- <li>
- <a href="http://www.opendefinition.org/okd/">
- <img alt="This Content and Data is Open" src="http://assets.okfn.org/images/ok_buttons/oc_80x15_blue.png" style="border: none ; margin-bottom: -4px;"/>
- </a>
- </li>
- <li>
- <a href="http://www.opendefinition.org/okd/">
- <img alt="This Content and Data is Open" src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" style="border: none ; margin-bottom: -4px;"/>
- </a>
- </li>
- </ul>
- </div>
- </li>
- </ul>
- </div><!-- #fourth .widget-area -->
- </div><!-- #footer-widget-area -->
-
- <div id="site-info">
- <a href="${url('/')}" title="${g.site_title}" rel="home">
- ${g.site_title}</a>
- </div><!-- #site-info -->
-
- <div id="site-generator">
- <a href="http://ckan.org/"
- title="CKAN" rel="generator">
- Powered by CKAN
- <span i18n:msg="version">
- v${c.__version__}
- </span>
- </a>
- </div><!-- #site-generator -->
- </div><!-- #colophon -->
-</div><!-- #footer -->
-
-</div><!-- #wrapper -->
+ <py:if test="defined('optional_footer')">
+ ${optional_footer()}
+ </py:if>
${h.literal(getattr(g, 'template_footer_end', ''))}
</body></html>
+
+
+
--- a/ckan/templates/package/authz.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/package/authz.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,13 +3,10 @@
py:strip=""><py:def function="page_title">${c.pkgtitle or c.pkgname} - Authorization - Data Packages</py:def>
+ <py:def function="page_heading">Authorization: ${c.pkgtitle or c.pkgname}</py:def><div py:match="content">
- <h2>
- Authorization for Data Package: ${c.pkgname}
- </h2>
-
- <h2>Update Existing Roles</h2>
+ <h3>Update Existing Roles</h3><form id="theform" method="POST">
${authz_form_table('theform', c.roles, c.users, c.user_role_dict)}
@@ -18,7 +15,7 @@
</button></form>
- <h2>Add Roles for Any User</h2>
+ <h3>Add Roles for Any User</h3><form id="addform" method="POST">
${authz_add_table(c.roles)}
@@ -27,7 +24,7 @@
<hr/>
- <h2>Existing Roles for Authorization Groups</h2>
+ <h3>Update Existing Roles for Authorization Groups</h3><form id="authzgroup_form" method="POST">
${authz_form_group_table('authzgroup_form', c.roles, c.authz_groups, c.authz_groups_role_dict)}
@@ -36,7 +33,7 @@
</button></form>
- <h2>Add Roles for Any Authorization Group</h2>
+ <h3>Add Roles for Any Authorization Group</h3><form id="authzgroup_addform" method="POST">
${authz_add_group_table(c.roles)}
--- a/ckan/templates/package/edit.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/package/edit.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,7 +3,8 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.pkgtitle or c.pkgname} - Edit - Data Packages</py:def>
+ <py:def function="page_title">${c.pkg.title or c.pkg.name} - Edit - Data Packages</py:def>
+ <py:def function="page_heading">Edit: ${c.pkg.title or c.pkg.name}</py:def><py:def function="body_class">hide-sidebar</py:def>
@@ -14,10 +15,6 @@
</py:def><div py:match="content" class="package">
- <h2>
- Edit Data Package: ${c.pkgname}
- </h2>
-
<div id="preview" style="margin-left: 20px;" py:if="c.preview"><hr /><h2>Preview</h2>
--- a/ckan/templates/package/history.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/package/history.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,6 +4,7 @@
py:strip=""><py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Data Packages - History</py:def>
+ <py:def function="page_heading">History: ${c.pkg.title or c.pkg.name}</py:def><!-- Sidebar --><py:match path="primarysidebar">
@@ -19,12 +20,6 @@
</py:match><div py:match="content" class="package">
-
- <!-- Title -->
- <h2 class="head">
- ${c.pkg_dict.get('title', c.pkg_dict['name'])} - History
- </h2>
-
<h3>Revisions</h3><form id="package-revisions" action="diff" method="post"
xmlns:py="http://genshi.edgewall.org/"
@@ -39,7 +34,7 @@
<table><tr>
- <th></th><th>Revision ID</th><th>Package with timestamp</th><th>Author</th><th>Log Message</th>
+ <th></th><th>Revision</th><th>Timestamp</th><th>Author</th><th>Log Message</th></tr><py:for each="index, rev in enumerate(c.pkg_revisions)"><tr>
--- a/ckan/templates/package/layout.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/package/layout.html Mon Sep 05 10:20:24 2011 +0100
@@ -16,6 +16,10 @@
<li py:if="h.check_access('package_edit_permissions',{'id':c.pkg.id})">
${h.subnav_link(c, h.icon('lock') + _('Authorization'), controller='package', action='authz', id=c.pkg.name)}
</li>
+ <li class="action">
+ ${h.subnav_link(c, h.icon('atom_feed') + _('Subscribe'),
+ controller='package', action='history', id=c.pkg.name, format='atom', days=7)}
+ </li></ul></py:if></py:match>
--- a/ckan/templates/package/new.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/package/new.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,6 +4,7 @@
py:strip=""><py:def function="page_title">New - Data Packages</py:def>
+ <py:def function="page_heading">Register a New Data Package</py:def><py:def function="body_class">hide-sidebar</py:def>
@@ -15,7 +16,8 @@
<!-- Flexitable --><script type="text/javascript" src="${g.site_url}/scripts/flexitable.js"></script><link rel="stylesheet" href="${g.site_url}/css/flexitable.css" />
-
+
+ <!-- Auto-generate 'name' field --><script type="text/javascript">
jQuery(document).ready(function($) {
CKAN.Utils.PackageSlugCreator.create($('#title'), $('#name'));
@@ -27,8 +29,6 @@
</py:def><div py:match="content">
- <h2>Register a New Data Package</h2>
-
<div id="preview" style="margin-left: 20px;" py:if="c.preview"><hr /><h2>Preview</h2>
--- a/ckan/templates/package/read.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/package/read.html Mon Sep 05 10:20:24 2011 +0100
@@ -1,13 +1,25 @@
<html xmlns:py="http://genshi.edgewall.org/"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/"
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:dc="http://purl.org/dc/terms/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:dcat="http://www.w3.org/ns/dcat#"
+ typeof="dcat:Dataset"
+ about=""
py:strip="">
- <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Data Packages</py:def>
+ <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])}
+ - Data Packages</py:def>
+
+ <py:def function="page_heading" property="dc:title">${c.pkg_dict['title']}</py:def>
+
<py:match path="primarysidebar">
- <li class="widget-container widget_text" py:if="not c.hide_welcome_message">
+ <li class="widget-container boxed widget_text" py:if="not c.hide_welcome_message"><h3>First time at ${g.site_title}?</h3><p>
${g.site_title} is a catalogue for data. ${h.subnav_link(c, _('Click here to find out more ...'), controller='home', action='about', id=None)}
@@ -15,47 +27,79 @@
</li><li class="widget-container widget_text">
- <h3>Tags</h3>
- ${tag_list(c.pkg_dict.get('tags', ''))}
- <p class="widget_action" py:if="h.check_access('package_update',{'id':c.pkg.id})">
- ${h.subnav_link(c, 'Add a new Tag', controller='package', action='edit', id=c.pkg.name)}
- </p>
+ <ul class="property-list">
+ <li py:if="c.pkg.url">
+ <h3>Source</h3>
+ <span property="foaf:homepage">${c.pkg_url_link}</span>
+ </li>
+ <li py:if="c.pkg_author_link">
+ <h3>Author</h3>
+ <span property="dc:creator">${c.pkg_author_link}</span>
+ </li>
+ <li py:if="c.pkg_maintainer_link">
+ <h3>Maintainer</h3>
+ <span property="dc:contributor">${c.pkg_maintainer_link}</span>
+ </li>
+ <li py:if="c.pkg.version">
+ <h3>Version</h3>
+ ${c.pkg.version}
+ </li>
+ <li py:if="c.eu_country">
+ <h3>Country</h3> ${h.code_to_country(c.eu_country)}
+ </li>
+ <li>
+ <h3>Tags</h3>
+ ${tag_list(c.pkg_dict.get('tags', ''))}
+ <span class="widget_action" py:if="h.check_access('package_update',{'id':c.pkg.id})">
+ ${h.subnav_link(c, 'add tags »', controller='package', action='edit', id=c.pkg.name)}
+ </span>
+ </li>
+ <li>
+ <h3>Groups</h3>
+ <py:if test="c.pkg.groups">
+ <ul>
+ <li py:for="group in sorted(c.pkg.groups, key=lambda g: g.display_name)">
+ <a href="${h.url_for(controller='group', action='read', id=group.name)}">${group.display_name}</a>
+ </li>
+ </ul>
+ </py:if>
+ <p class="hint">
+ <py:if test="not c.pkg.groups">
+ Groups are collections of packages maintained by users of ${g.site_title}. This package has not been added to any groups yet.
+ </py:if>
+
+
+ <p class="widget_action" py:if="h.check_access('package_update',{'id':c.pkg.id})">
+ ${h.subnav_link(c, 'add to a group »', controller='package', action='edit', id=c.pkg.name)}
+ </p>
+ </p>
+ </li>
+ <li py:if="h.check_access('package_update',{'id':c.pkg.id})">
+ <li><h3>State</h3> ${c.pkg.state}</li>
+ </li>
+ <li py:if="c.harvest_catalogue_name">
+ <h3>Source</h3><a href="${c.harvest_dataset_url}">Source
+ page</a> on <a
+ href="${c.harvest_catalogue_url}">${c.harvest_catalogue_name}</a>
+ </li>
+ <li py:if="c.package_relationships">
+ <h3>Related packages</h3>
+ <ul>
+ <py:for each="pkg, relationship_str, comment in c.package_relationships">
+ <li>
+ ${h.literal(relationship_str % (h.link_to(pkg.name, h.url_for(controller="package", action="read", id=pkg.name))))}
+ <span py:if="comment is not None and len(comment)" class="relationship_comment">
+ (${comment})
+ </span>
+ </li>
+ </py:for>
+ </ul>
+ </li>
+ </ul></li>
- <li class="widget-container widget_text">
- <h3>Groups</h3>
- <py:if test="c.pkg.groups">
- <ul>
- <li py:for="group in sorted(c.pkg.groups, key=lambda g: g.display_name)">
- <a href="${h.url_for(controller='group', action='read', id=group.name)}">${group.display_name}</a>
- </li>
- </ul>
- </py:if>
- <py:if test="not c.pkg.groups">
- Groups are collections of packages maintained by users of ${g.site_title}. This package has not been added to any groups yet.
- </py:if>
- <p class="widget_action" py:if="h.check_access('package_update',{'id':c.pkg.id})">
- ${h.subnav_link(c, 'Add to a Group', controller='package', action='edit', id=c.pkg.name)}
- </p>
- </li>
- <py:if test="c.package_relationships">
- <li class="widget-container widget_text">
- <h3>Related packages</h3>
- <ul>
- <py:for each="pkg, relationship_str, comment in c.package_relationships">
- <li>
- ${h.literal(relationship_str % (h.link_to(pkg.name, h.url_for(controller="package", action="read", id=pkg.name))))}
- <span py:if="comment is not None and len(comment)" class="relationship_comment">
- (${comment})
- </span>
- </li>
- </py:for>
- </ul>
- </li>
- </py:if>
-
- <li class="widget-container widget_text">
+ <li class="widget-container boxed widget_text"><py:if test="c.pkg.isopen() and c.pkg.resources"><h3>
This Package is Open
@@ -63,9 +107,10 @@
<p py:if="c.pkg.license_id">
License:
<py:choose test="">
- <strong py:when="c.pkg.license and c.pkg.license.url"><br /><a href="${c.pkg.license.url}">${c.pkg.license.title}</a></strong>
- <strong py:when="c.pkg.license"><br />${c.pkg.license.title}</strong>
- <strong py:when="c.pkg.license_id"><br />${c.pkg.license_id}</strong>
+ <strong py:when="c.pkg.license and c.pkg.license.url"><a
+ href="${c.pkg.license.url}" rel="dc:rights">${c.pkg.license.title.split('::')[-1]}</a></strong>
+ <strong py:when="c.pkg.license" property="dc:rights">${c.pkg.license.title}</strong>
+ <strong py:when="c.pkg.license_id" property="dc:rights">${c.pkg.license_id}</strong></py:choose></p><p class="okd">
@@ -73,10 +118,6 @@
href="http://www.opendefinition.org/okd/"
title="This package satisfies the Open Knowledge Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a>
- <a
- href="http://www.opendefinition.org/okd/"
- title="This package satisfies the Open Knowledge Definition.">
- <img src="http://assets.okfn.org/images/ok_buttons/oc_80x15_blue.png" alt="[Open Content]" /></a></p></py:if>
@@ -95,20 +136,20 @@
<div py:match="content"><py:if test="c.pkg_revision_id"><div id="revision" class="widget-container">
- <p py:if="c.pkg_revision_not_latest">This is an old revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}. It may differ significantly from the <a href="${url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
- <p py:if="not c.pkg_revision_not_latest">This is the current revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}.</p>
+ <p py:if="c.pkg_revision_not_latest">This is an old revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}. It may differ significantly from the <a href="${url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
+ <p py:if="not c.pkg_revision_not_latest">This is the current revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}.</p></div></py:if><xi:include href="read_core.html" /></div>
- <py:if test="config.get('rdf_packages')">
- <py:def function="optional_head">
+ <py:def function="optional_head">
+ <py:if test="config.get('rdf_packages')"><link rel="alternate" type="application/rdf+xml" title="RDF/XML" href="${config['rdf_packages'] + '/' + c.pkg.id + '.rdf' }" /><link rel="alternate" type="application/turtle" title="RDF/Turtle" href="${config['rdf_packages'] + '/' + c.pkg.id + '.ttl' }" />
- </py:def>
- </py:if>
+ </py:if>
+ </py:def><py:def function="optional_feed"><link rel="alternate" type="application/atom+xml" title="Package History"
--- a/ckan/templates/package/read_core.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/package/read_core.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,24 +4,6 @@
><xi:include href="../_util.html" /><div id="package" class="package">
- <!-- Title -->
- <h2 class="head">
- ${c.pkg_dict.get('title','')}
- <p class="atom-feed-link package-history-link">
- <a
- href="${url(controller='package', action='history', id=c.pkg.name, format='atom', days=7)}"
- title="${g.site_title} - Package History - ${c.pkg.name}">
- Subscribe »</a>
- </p>
- </h2>
-
- <!-- Source URL -->
- <div class="url" py:if="c.pkg_dict.get('url')">
- <p>
- Source: ${c.pkg_url_link}
- </p>
- </div>
-
<!-- About package --><div class="notes" py:if="str(c.pkg_notes_formatted).strip()">
${c.pkg_notes_formatted}
@@ -35,22 +17,22 @@
<tr><th>Description</th><th>Format</th>
- <th>Hash</th></tr><py:for each="res in c.pkg_dict.get('resources', [])">
- <tr>
+ <tr rel="dcat:distribution" resource="_:res${res.id}"
+ typeof="dcat:Distribution"><td><py:choose test=""><py:when test="res.get('description')">
- <a href="${res.get('url', '')}" target="_blank">${res.description}</a>
+ <a href="${res.get('url', '')}" rel="dcat:accessURL" target="_blank"><span
+ property="rdfs:label">${res.description}</span></a></py:when><py:otherwise test=""><a href="${res.get('url', '')}" target="_blank">Download <em>(no description)</em></a></py:otherwise></py:choose></td>
- <td>${res.get('format', '')}</td>
- <td>${res.get('hash', '')}</td>
+ <td property="dc:format">${res.get('format', '')}</td></tr></py:for><caption>
@@ -75,32 +57,19 @@
</py:def><div class="details subsection">
- <h3>About this package</h3>
+ <h3>Additional Information</h3><table>
+ <thead>
+ <tr>
+ <th>Field</th>
+ <th>Value</th>
+ </tr>
+ </thead><tbody>
- ${details_item('Author', c.pkg_author_link)}
- ${details_item('Maintainer', c.pkg_maintainer_link)}
- ${details_item('Version', c.pkg_dict.get('version', ''))}
- <tr>
- <td class="package-label">
- License
- </td>
- <td class="package-details">
- <py:choose test="">
- <py:when test="c.pkg.license and c.pkg.license.url">
- <a href="${c.pkg.license.url}">${c.pkg.license.title}</a>
- </py:when>
- <py:when test="c.pkg.license">${c.pkg.license.title}</py:when>
- <py:when test="c.pkg.license_id">${c.pkg.license_id}</py:when>
- <py:otherwise test="">
- -
- </py:otherwise>
- </py:choose>
- </td>
- </tr>
- <tr py:for="key, value in c.pkg_extras">
- <td class="package-label">${_(key)}</td>
- <td class="package-details">${value}</td>
+ <tr py:for="i, (key, value) in enumerate(c.pkg_extras)"
+ rel="dc:relation" resource="_:extra${i}">
+ <td class="package-label" property="rdfs:label">${_(key)}</td>
+ <td class="package-details" property="rdf:value">${value}</td></tr></tbody><caption py:if="not c.is_preview and h.check_access('package_update',{'id':c.pkg.id})">
@@ -109,49 +78,6 @@
</table></div>
- <div class="api subsection" py:if="not c.is_preview">
- <h3>${g.site_title} API / datapkg</h3>
- <div>
- <p>
- This information on this page (the package metadata) is also
- available programatically via this site's <a
- href="${h.url_for(controller='api', action='get_api', id=None)}">CKAN API</a>.
- </p>
- <h5>JSON</h5>
- <code>
- <py:if test="config.get('ckan.api_url')">
- <a href="${config.get('ckan.api_url') + h.url_for(controller='api', register='package', action='show', id=c.pkg.name)}">
- ${config.get('ckan.api_url') + h.url_for(controller='api', register='package', action='show', id=c.pkg.name)}</a>
- </py:if>
- <py:if test="not config.get('ckan.api_url')">
- <a href="${h.url_for(controller='api', register='package', action='show', id=c.pkg.name)}">
- ${h.url_for(controller='api', register='package', action='show', id=c.pkg.name)}</a>
- </py:if>
- </code>
- <py:if test="config.get('rdf_packages')">
- <h5>RDF</h5>
- <code><a href="${config.get('rdf_packages') + '/' + c.pkg.id + '.rdf'}">RDF/XML</a></code>
- <code><a href="${config.get('rdf_packages') + '/' + c.pkg.id + '.ttl'}">Turtle</a></code>
- <code><a href="${config.get('rdf_packages') + '/' + c.pkg.id + '.nt'}">N-Triples</a></code>
- </py:if>
- <p>
- The information on this page and the downloads / resources are also available using the
- <a href="http://blog.okfn.org/2010/02/23/introducing-datapkg/">datapkg command line utility</a>.
- </p>
- <h5>Information about this package:</h5>
- <code>$ datapkg info ckan://${c.pkg.name}</code>
- <h5>Download:</h5>
- <code>$ datapkg download ckan://${c.pkg.name} .</code>
- </div>
- </div>
-
- <ul>
- <py:if test="not c.is_preview and h.check_access('package_change_state',{'id':c.pkg.id})">
- <li><strong>State:</strong> ${c.pkg_dict.get('state', '')}</li>
- </py:if>
- </ul>
-
- <hr class="cleared" /></div><!-- /package --></html>
--- a/ckan/templates/package/search.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/package/search.html Mon Sep 05 10:20:24 2011 +0100
@@ -7,11 +7,21 @@
<xi:include href="facets.html" /><py:def function="page_title">Search - ${g.site_title}</py:def>
+ <py:def function="page_heading">Search - ${g.site_title}</py:def>
+
+ <py:def function="optional_head">
+ <style>
+ #minornavigation { visibility: hidden; }
+ #menusearch {
+ display: none;
+ }
+ </style>
+ </py:def><py:match path="primarysidebar">
- <li class="widget-container widget_text" py:if="h.check_access('package_create')">
- <h4>Add a package</h4>
+ <li class="widget-container boxed widget_text" py:if="h.check_access('package_create')">
+ <h3>Add a package</h3><p>
Do you know of a dataset that should be added to ${g.site_title}?
<br/>
@@ -20,10 +30,9 @@
</p></li>
- ${facet_sidebar('groups', label=h.group_name_to_title)}
${facet_sidebar('tags')}
${facet_sidebar('res_format')}
- ${facet_sidebar('license')}
+ ${facet_sidebar('groups', label=h.group_name_to_title)}
<li class="widget-container widget_text"><h4>Other access</h4>
@@ -44,8 +53,6 @@
</py:match><div py:match="content">
- <h2>Search ${g.site_title}</h2>
-
<xi:include href="search_form.html" />
${field_list()}
--- a/ckan/templates/revision/layout.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/revision/layout.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,6 +4,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip=""
>
+
<xi:include href="../layout.html" /></html>
--- a/ckan/templates/revision/list.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/revision/list.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,16 +3,22 @@
py:strip=""><py:def function="page_title">Revision History</py:def>
+ <py:def function="page_heading">Revision History</py:def>
+
+ <py:match path="minornavigation">
+ <ul class="tabbed">
+ <li>
+ ${h.subnav_link(c,_('Home'), controller='revision', action='index')}</li>
+ <li class="action">
+ ${h.subnav_link(c, h.icon('atom_feed') + _('Subscribe'),
+ controller='revision', action='index', format='atom', days=1)}
+ </li>
+ </ul>
+ </py:match><div py:match="content">
- <h2>
- Revision History
- <p class="atom-feed-link revision-history-link">
- <a href="?format=atom&days=5" title="${g.site_title} - Revision History">Subscribe »</a>
- </p>
- </h2>
- <p>This page lists all changes to package database, with most recent
- changes first. </p>
+ <p>Track the most recent changes to the system, with most recent
+ changes first.</p>
${c.page.pager()}
--- a/ckan/templates/revision/purge.html Thu Sep 01 20:30:24 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-<html xmlns:py="http://genshi.edgewall.org/"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- py:strip="">
-
- <py:def function="page_title">Purge - Revisions</py:def>
-
- <div py:match="content" py:choose="">
- <h2>Revision Purge</h2>
- <p py:when="c.error"><strong>There was an error: ${c.error}</strong></p>
- <p py:otherwise="">Purge successful.</p>
- </div>
-
- <xi:include href="layout.html" />
-</html>
-
-
--- a/ckan/templates/revision/read.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/revision/read.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,7 +3,7 @@
py:strip=""><py:def function="page_title">Revision ${c.revision.id}</py:def>
- <py:def function="body_class">revision</py:def>
+ <py:def function="page_heading">Revision: ${c.revision.id}</py:def><py:match path="primarysidebar"><li class="widget-container widget_text">
@@ -29,9 +29,6 @@
</py:match><div py:match="content" class="revision state-${c.revision.state}">
- <h2>
- Revision: ${c.revision.id}
- </h2><p py:if="c.revision.state != 'active'" class="state-notice">
${c.revision.state}
</p>
--- a/ckan/templates/tag/read.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/tag/read.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,9 +4,9 @@
py:strip=""><py:def function="page_title">${c.tag['name']} - Tags</py:def>
+ <py:def function="page_heading">Tag: ${c.tag['name']}</py:def><div py:match="content">
- <h2>Tag: ${c.tag['name']}</h2><p i18n:msg="package_count, tagname">There are ${len(c.tag['packages'])} packages tagged with <strong>${c.tag['name']}</strong>:</p>
${package_list_from_dict(c.tag['packages'])}
</div>
--- a/ckan/templates/user/edit.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/user/edit.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,18 +4,53 @@
py:strip=""><py:def function="page_title">${c.user} - Edit - User</py:def>
+ <py:def function="page_heading">
+ Edit User: ${c.userobj.display_name}
+ </py:def>
+
+ <py:def function="optional_head">
+ <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
+ </py:def><div py:match="content">
- <h2>
- Edit User: ${c.display_name} (${c.user_name})
- <a href="#preview" py:if="c.preview">(skip to preview)</a>
- </h2>
+ <a href="#preview" py:if="c.preview">(skip to preview)</a>
+
+ <form id="user-edit" action="" method="post" class="simple-form"
+ xmlns:py="http://genshi.edgewall.org/"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ >
+ <fieldset>
+ <legend>Base details</legend>
+ <label for="fullname">Full name:</label>
+ <input name="fullname" value="${c.user_fullname}" /><br/>
+
+ <label for="email">E-Mail:</label>
+ <input name="email" value="${c.user_email}" /><br/>
+ </fieldset>
+ <fieldset>
+ <legend>Change your password</legend>
+ <label for="password1">Password:</label>
+ <input type="password" name="password1" value="" />
+ <br/>
+ <label for="password2">Password (repeat):</label>
+ <input type="password" name="password2" value="" />
+ <br/>
+ </fieldset>
+ <label for="about">About user:</label>
+ <textarea id="about" rows="5" name="about" cols="60">${c.user_about}</textarea>
+ <p class="small" i18n:msg="">You can use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown formatting</a> here.</p>
+
+ <div>
+ <input name="preview" type="submit" value="Preview" />
+ ${h.submit('save', _('Save'))}
+ </div>
+ </form>
+
<div id="preview" style="margin-left: 20px;" py:if="c.preview"><hr /><h2>Preview</h2><h4>Full name: ${c.full_name}</h4>
- <h4>Email: ${c.email}</h4><div style="border: 2px dashed red; padding: 5px;">
${c.preview}
</div>
--- a/ckan/templates/user/list.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/user/list.html Mon Sep 05 10:20:24 2011 +0100
@@ -4,28 +4,38 @@
py:strip=""><py:def function="page_title">Users</py:def>
+ <py:def function="page_heading">Users</py:def><py:def function="body_class">user-list</py:def>
+
+ <py:match path="primarysidebar">
+ <li class="widget-container widget_text" py:if="not c.hide_welcome_message">
+ <form id="user-search" action="" method="GET">
+ <input type="text" id="q" name="q" value="${c.q}" />
+ <input type="submit" name="" value="Search »" />
+ </form>
+ <p i18n:msg="item_count">
+ <strong>${c.page.item_count}</strong> users found.
+ </p>
+ </li>
+
+
+ </py:match>
+
+ <py:match path="minornavigation">
+ <ul class="tabbed">
+ <li>
+ <a href="?q=${c.q}&order_by=edits" rel="nofollow">Sort by edits</a>
+ </li>
+ <li>
+ <a href="?q=${c.q}&order_by=name" rel="nofollow">Sort by name</a>
+ </li>
+ </ul>
+ </py:match>
+
<div py:match="content">
- <h2>Users</h2>
- <div class="sort">
- <a href="?q=${c.q}&order_by=edits" rel="nofollow">Sort by edits</a>
- <a href="?q=${c.q}&order_by=name" rel="nofollow">Sort by name</a>
- </div>
-
- <form id="user-search" action="" method="GET">
- <input type="text" id="q" name="q" value="${c.q}" />
- <input type="submit" name="" value="Search »" />
- </form>
-
- <p i18n:msg="item_count">
- <strong>${c.page.item_count}</strong> users found.
- </p>
-
- <hr />
-
<ul class="userlist">
- <li py:for="user in c.page.items" class="user">
+ <li py:for="user in c.page.items" class="user"><ul><li class="username">
${h.linked_user(user['name'], maxlength=20)}
--- a/ckan/templates/user/login.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/user/login.html Mon Sep 05 10:20:24 2011 +0100
@@ -15,7 +15,7 @@
</py:def><py:match path="primarysidebar">
- <li class="widget-container widget_text">
+ <li class="widget-container boxed widget_text"><h2>Not a member?</h2><p>
Join CKAN to contribute packages under your own name.
@@ -29,9 +29,9 @@
</py:match><py:def function="page_title">Login - User</py:def>
+ <py:def function="page_heading">Login to ${g.site_title}</py:def><div py:match="content">
- <h2>Login</h2><form action="/login_generic" method="post" class="simple-form" id="generic_form"><fieldset>
@@ -49,9 +49,10 @@
${h.submit('s', _('Login'))} —
<a href="${h.url_for('reset')}">Forgot your password?</a></form>
-
+ <br/><!-- Simple OpenID Selector -->
- <form py:if="g.openid_enabled" action="/login_openid" method="post" id="openid_form">
+ <form py:if="g.openid_enabled" action="/login_openid" method="post"
+ class="simple-form" id="openid_form"><input type="hidden" name="action" value="verify" /><fieldset><legend i18n:msg="site_title">Login using Open ID</legend>
@@ -60,27 +61,23 @@
<div id="openid_btns"></div></div><div id="openid_input_area">
- <input id="openid_identifier" name="openid_identifier" size="30" type="text" value="http://" />
- <input id="openid_submit" type="submit" value="Log in »"/>
+ <label for="openid_identifier">OpenID Identifier:</label>
+ <input id="openid_identifier" name="openid_identifier" type="text" value="http://" /></div>
- <noscript>
- <p i18n:msg="">OpenID is service that allows you to log-on to many different websites using a single identity.
- Find out <a href="http://openid.net/what/">more about OpenID</a> and <a href="http://openid.net/get/">how to get an OpenID enabled account</a>.</p>
- </noscript>
+ <div py:if="g.openid_enabled">
+ <h3>Don't have an OpenID?</h3>
+ <p i18n:msg="">
+ OpenID is service that allows you to log-on to many different websites
+ using a single identity. Find out <a href="http://openid.net/what/">more
+ about OpenID</a> and <a href="http://openid.net/get/">how to get an
+ OpenID enabled account</a>. Probably the simplest way is sign up with a
+ free OpenID provider such as <a
+ href="https://www.myopenid.com/">https://www.myopenid.com/</a>.
+ </p>
+ </div></fieldset>
+ <input id="openid_submit" type="submit" value="Sign in"/></form>
-
- <div py:if="g.openid_enabled">
- <h3>Don't have an OpenID?</h3>
- <p i18n:msg="">
- OpenID is service that allows you to log-on to many different websites
- using a single identity. Find out <a href="http://openid.net/what/">more
- about OpenID</a> and <a href="http://openid.net/get/">how to get an
- OpenID enabled account</a>. Probably the simplest way is sign up with a
- free OpenID provider such as <a
- href="https://www.myopenid.com/">https://www.myopenid.com/</a>.
- </p>
- </div></div><xi:include href="layout.html" /></html>
--- a/ckan/templates/user/new.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/user/new.html Mon Sep 05 10:20:24 2011 +0100
@@ -1,13 +1,14 @@
<html xmlns:py="http://genshi.edgewall.org/"
-
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">Register - User</py:def>
+ <py:def function="optional_head">
+ <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
+ </py:def><py:match path="primarysidebar"><li class="widget-container widget_text">
- <h2>Have an OpenID?</h2>
+ <h3>Have an OpenID?</h3><p>
If you have an account with Google, Yahoo or one of many other
OpenID providers, you can log in without signing up.
@@ -17,12 +18,12 @@
</ul></li></py:match>
+
+ <py:def function="page_title">Register - User</py:def>
+ <py:def function="page_heading">Join the community</py:def>
+
<div py:match="content">
- <h2>
- Join the community
- </h2>
-
${Markup(c.form)}
</div>
--- a/ckan/templates/user/read.html Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/templates/user/read.html Mon Sep 05 10:20:24 2011 +0100
@@ -3,19 +3,33 @@
py:strip=""><py:def function="page_title">${c.user_dict['display_name']} - User</py:def>
+ <py:def function="page_heading">${c.user_dict['display_name']}</py:def><py:def function="body_class">user-view</py:def>
+
+ <py:match path="minornavigation">
+ <ul class="tabbed" py:if="c.is_myself">
+ <li><a href="${h.url_for(controller='user', action='edit')}">Edit your profile</a></li>
+ <li><a href="${h.url_for('/user/logout')}">Log out</a></li>
+ </ul>
+ </py:match>
+
+ <py:match path="primarysidebar">
+ <li class="widget-container widget_text" py:if="not c.hide_welcome_message">
+ <h3>Activity</h3>
+ <ul>
+ <li><strong>Number of edits:</strong> ${c.user_dict['number_of_edits']}</li>
+ <li><strong>Number of packages administered:</strong> ${c.user_dict['number_administered_packages']}</li>
+ </ul>
+ </li>
+ </py:match><div py:match="content">
-
- <h2>${c.user_dict['display_name']}</h2><py:if test="c.is_myself"><h3>My Account</h3><p>You are logged in.</p><ul><li>Your API key is: ${c.user_dict['apikey']}</li>
- <li><a href="${h.url_for(controller='user', action='edit')}">Edit your profile</a></li>
- <li><a href="${h.url_for('/user/logout')}">Log out</a></li></ul></py:if>
@@ -23,14 +37,6 @@
${c.about_formatted}
</div>
- <div class="activity">
- <h3>Activity</h3>
- <ul>
- <li><strong>Number of edits:</strong> ${c.user_dict['number_of_edits']}</li>
- <li><strong>Number of packages administered:</strong> ${c.user_dict['number_administered_packages']}</li>
- </ul>
- </div>
-
<div class="changes"><h3>Recent changes</h3>
${revision_list_from_dict(c.user_dict['activity'])}
--- a/ckan/tests/functional/test_authorization_group.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/tests/functional/test_authorization_group.py Mon Sep 05 10:20:24 2011 +0100
@@ -28,15 +28,6 @@
model.repo.rebuild_db()
model.Session.remove()
- @search_related
- def test_mainmenu(self):
- offset = url_for(controller='home', action='index')
- res = self.app.get(offset)
- assert 'Authorization Groups' in res, res
- assert 'Authorization Groups</a>' in res, res
- res = res.click(href='/authorizationgroup')
- assert '<h2>Authorization Groups</h2>' in res, res
-
def test_index(self):
offset = url_for(controller='authorization_group')
res = self.app.get(offset, extra_environ={'REMOTE_USER': 'russianfan'})
--- a/ckan/tests/functional/test_authz.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/tests/functional/test_authz.py Mon Sep 05 10:20:24 2011 +0100
@@ -602,8 +602,6 @@
def test_home(self):
self._check_logged_in_users_authorized_only('/')
- self._check_logged_in_users_authorized_only('/about')
- self._check_logged_in_users_authorized_only('/license')
def test_tags_pages(self):
self._check_logged_in_users_authorized_only('/tag')
--- a/ckan/tests/functional/test_cors.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/tests/functional/test_cors.py Mon Sep 05 10:20:24 2011 +0100
@@ -8,12 +8,14 @@
self.ourapp = webtest.TestApp(self.wsgiapp)
out = self.ourapp.request('/', method='OPTIONS')
assert out.status_int == 200, out
+ print out
+ assert len(str(out.body)) == 0, 'OPTIONS must return no content'
def test_headers(self):
out = self.app.get('/')
headers = dict(out.headers)
print headers
assert headers['Access-Control-Allow-Origin'] == '*'
- assert headers['Access-Control-Allow-Methods'] == "POST, PUT, GET, OPTIONS"
+ assert headers['Access-Control-Allow-Methods'] == "POST, PUT, GET, DELETE"
assert headers['Access-Control-Allow-Headers'] == "X-CKAN-API-KEY, Content-Type"
--- a/ckan/tests/functional/test_edit_authz.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/tests/functional/test_edit_authz.py Mon Sep 05 10:20:24 2011 +0100
@@ -95,7 +95,7 @@
res = self.app.get(offset, status=[200], extra_environ={'REMOTE_USER':u})
# the name of the object should appear in the page
assert i in res
- assert "Authorization for" in res
+ assert "Authorization" in res, res
def roles_list(self, authzobj):
@@ -121,8 +121,8 @@
('authorization_group', self.authzgroup, self.authzgroup_roles)]:
offset = url_for(controller=c, action='authz', id=i)
res = self.app.get(offset, extra_environ={'REMOTE_USER': self.admin})
- assert i in res
- assert "Authorization for" in res
+ assert i in res, res
+ assert "Authorization" in res, res
# all the package's users and roles should appear in tables
assert '<tr' in res
--- a/ckan/tests/functional/test_group.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/tests/functional/test_group.py Mon Sep 05 10:20:24 2011 +0100
@@ -42,21 +42,20 @@
def teardown_class(self):
model.repo.rebuild_db()
- @search_related
+ # TODO: remove test (?)
+ # why: very fragile and overly detailed checking of main menu:w
def test_mainmenu(self):
offset = url_for(controller='home', action='index')
res = self.app.get(offset)
assert 'Groups' in res, res
assert 'Groups</a>' in res, res
res = res.click(href='/group', index=0)
- assert '<h2>Groups</h2>' in res, res
+ assert 'Groups of' in res, res
def test_index(self):
offset = url_for(controller='group')
res = self.app.get(offset)
- assert '<h2>Groups</h2>' in res, res
- group_count = model.Session.query(model.Group).count()
- assert 'There are %s groups.' % group_count in self.strip_tags(res)
+ assert '<h1 class="page_heading">Groups' in res, res
groupname = 'david'
group = model.Group.by_name(unicode(groupname))
group_title = group.title
@@ -77,7 +76,7 @@
main_res = self.main_div(res)
assert title in res, res
#assert 'edit' not in main_res, main_res
- assert 'Administrators:' in main_res, main_res
+ assert 'Administrators' in res, res
assert 'russianfan' in main_res, main_res
assert name in res, res
assert 'There are 2 packages in this group' in self.strip_tags(main_res), main_res
@@ -111,12 +110,12 @@
class TestEdit(FunctionalTestCase):
- groupname = u'david'
@classmethod
def setup_class(self):
model.Session.remove()
CreateTestData.create()
+ self.groupname = u'david'
self.packagename = u'testpkg'
model.repo.new_revision()
model.Session.add(model.Package(name=self.packagename))
@@ -135,22 +134,14 @@
res = res.follow()
assert res.request.url.startswith('/user/login')
- def test_1_read_allowed_for_admin(self):
- offset = url_for(controller='group', action='edit', id=self.groupname)
- res = self.app.get(offset, status=200, extra_environ={'REMOTE_USER': 'russianfan'})
- assert 'Edit Group: %s' % self.groupname in res, res
-
def test_2_edit(self):
+ group = model.Group.by_name(self.groupname)
offset = url_for(controller='group', action='edit', id=self.groupname)
print offset
res = self.app.get(offset, status=200, extra_environ={'REMOTE_USER': 'russianfan'})
- assert 'Edit Group: %s' % self.groupname in res, res
-
- print res
-
+ assert 'Edit: %s' % group.title in res, res
form = res.forms['group-edit']
- group = model.Group.by_name(self.groupname)
titlefn = 'title'
descfn = 'description'
newtitle = 'xxxxxxx'
--- a/ckan/tests/functional/test_home.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/tests/functional/test_home.py Mon Sep 05 10:20:24 2011 +0100
@@ -23,7 +23,8 @@
def test_home_page(self):
offset = url_for('home')
res = self.app.get(offset)
- assert 'Packages' in res
+ print res
+ assert 'Add a package' in res
def test_calculate_etag_hash(self):
c.user = 'test user'
@@ -48,49 +49,19 @@
res = self.app.get(offset)
res.click('Search', index=0)
- def test_tags_link(self):
- offset = url_for('home')
- res = self.app.get(offset)
- res.click('Tags', index=0)
-
def test_404(self):
offset = '/some_nonexistent_url'
res = self.app.get(offset, status=404)
- def test_license(self):
- offset = url_for('license')
- res = self.app.get(offset)
- assert 'License' in res
-
def test_guide(self):
url = url_for('guide')
assert url == 'http://wiki.okfn.org/ckan/doc/'
- @search_related
- def test_search_packages(self):
- offset = url_for('home')
- res = self.app.get(offset)
- form = res.forms['package-search']
- form['q'] = 'anna'
- results_page = form.submit()
- assert 'Search - ' in results_page, results_page
- assert '>0<' in results_page, results_page
-
def test_template_footer_end(self):
offset = url_for('home')
res = self.app.get(offset)
assert '<strong>TEST TEMPLATE_FOOTER_END TEST</strong>'
- # DISABLED because this is not on home page anymore
- def _test_register_new_package(self):
- offset = url_for('home')
- res = self.app.get(offset)
- form = res.forms[1]
- form['title'] = 'test title'
- results_page = form.submit()
- assert 'Register a New Package' in results_page, results_page
- assert '<input id="Package--title" name="Package--title" size="40" type="text" value="test title">' in results_page, results_page
-
def test_locale_change(self):
offset = url_for('home')
res = self.app.get(offset)
--- a/ckan/tests/functional/test_package.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/tests/functional/test_package.py Mon Sep 05 10:20:24 2011 +0100
@@ -308,7 +308,6 @@
assert anna.url in res
assert cgi.escape(anna.resources[0].url) in res
assert anna.resources[0].description in res
- assert anna.resources[0].hash in res
assert 'Some test notes' in res
self.check_named_element(res, 'a',
'http://ckan.net/',
@@ -321,18 +320,12 @@
assert 'russian' in res
assert 'david' in res
assert 'roger' in res
- assert 'State:' not in res
+ assert 'State' in res
assert 'genre' in res, res
assert 'romantic novel' in res, res
assert 'original media' in res, res
assert 'book' in res, res
- def test_read_as_admin(self):
- name = u'annakarenina'
- offset = url_for(controller='package', action='read', id=name)
- res = self.app.get(offset, extra_environ={'REMOTE_USER':'annafan'})
- assert 'State:' in res, res
-
def test_read_nonexistentpackage(self):
name = 'anonexistentpackage'
offset = url_for(controller='package', action='read', id=name)
@@ -480,9 +473,9 @@
def test_read_normally(self):
res = self.app.get(self.offset, status=200)
pkg_html = self.named_div('package', res)
- side_html = self.named_div('primary', res)
+ side_html = self.named_div('sidebar', res)
print 'PKG', pkg_html
- assert 'title3' in pkg_html
+ assert 'title3' in res
assert 'key2' in pkg_html
assert 'value3' in pkg_html
print 'SIDE', side_html
@@ -493,23 +486,21 @@
offset = self.offset + self.date1.strftime('@%Y-%m-%d')
res = self.app.get(offset, status=200)
pkg_html = self.named_div('package', res)
- side_html = self.named_div('primary', res)
- print 'PKG', pkg_html
- assert 'title1' in pkg_html
- assert 'key2' not in pkg_html
- assert 'value3' not in pkg_html
- print 'SIDE', side_html
- assert 'tag3' not in side_html
- assert 'tag2' not in side_html
+ side_html = self.named_div('sidebar', res)
+ assert 'title1' in res, res
+ assert 'key2' not in pkg_html, pkg_html
+ assert 'value3' not in pkg_html, pkg_html
+ assert 'tag3' not in side_html, side_html
+ assert 'tag2' not in side_html, side_html
def test_read_date2(self):
date2_plus_3h = self.date2 + datetime.timedelta(hours=3)
offset = self.offset + date2_plus_3h.strftime('@%Y-%m-%d')
res = self.app.get(offset, status=200)
pkg_html = self.named_div('package', res)
- side_html = self.named_div('primary', res)
+ side_html = self.named_div('sidebar', res)
print 'PKG', pkg_html
- assert 'title2' in pkg_html
+ assert 'title2' in res
assert 'key2' in pkg_html
assert 'value2' in pkg_html
print 'SIDE', side_html
@@ -520,9 +511,9 @@
offset = self.offset + self.date3.strftime('@%Y-%m-%d-%H-%M')
res = self.app.get(offset, status=200)
pkg_html = self.named_div('package', res)
- side_html = self.named_div('primary', res)
+ side_html = self.named_div('sidebar', res)
print 'PKG', pkg_html
- assert 'title3' in pkg_html
+ assert 'title3' in res
assert 'key2' in pkg_html
assert 'value3' in pkg_html
print 'SIDE', side_html
@@ -546,13 +537,13 @@
res = self.app.get(offset, status=200)
main_html = self.main_div(res)
pkg_html = self.named_div('package', res)
- side_html = self.named_div('primary', res)
+ side_html = self.named_div('sidebar', res)
print 'MAIN', main_html
assert 'This is an old revision of this package' in main_html
assert 'at 2011-01-01 00:00' in main_html
self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
print 'PKG', pkg_html
- assert 'title1' in pkg_html
+ assert 'title1' in res
assert 'key2' not in pkg_html
assert 'value3' not in pkg_html
print 'SIDE', side_html
@@ -564,13 +555,13 @@
res = self.app.get(offset, status=200)
main_html = self.main_div(res)
pkg_html = self.named_div('package', res)
- side_html = self.named_div('primary', res)
+ side_html = self.named_div('sidebar', res)
print 'MAIN', main_html
assert 'This is an old revision of this package' in main_html
assert 'at 2011-01-02 00:00' in main_html
self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
print 'PKG', pkg_html
- assert 'title2' in pkg_html
+ assert 'title2' in res
assert 'key2' in pkg_html
assert 'value2' in pkg_html
print 'SIDE', side_html
@@ -582,14 +573,14 @@
res = self.app.get(offset, status=200)
main_html = self.main_div(res)
pkg_html = self.named_div('package', res)
- side_html = self.named_div('primary', res)
+ side_html = self.named_div('sidebar', res)
print 'MAIN', main_html
assert 'This is an old revision of this package' not in main_html
assert 'This is the current revision of this package' in main_html
assert 'at 2011-01-03 00:00' in main_html
self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
print 'PKG', pkg_html
- assert 'title3' in pkg_html
+ assert 'title3' in res
assert 'key2' in pkg_html
assert 'value3' in pkg_html
print 'SIDE', side_html
@@ -892,12 +883,15 @@
extra_new,
('key3', extras['key3'], True))
- self._check_preview(res, name=name, title=title, version=version,
- url=url,
- download_url='',
- resources=resources, notes=notes, license_id=license_id,
- tags=tags, extras=extras,
- state=state)
+ # 2011-09-02: rgrp disabling preview checks as do not work now some
+ # stuff in sidebar. Also IMO preview is pretty pointless (only use
+ # is for notes and we can do that in a nice javascripty way).
+ # self._check_preview(res, name=name, title=title, version=version,
+ # url=url,
+ # download_url='',
+ # resources=resources, notes=notes, license_id=license_id,
+ # tags=tags, extras=extras,
+ # state=state)
# Check form is correctly filled
self.check_form_filled_correctly(res, id=pkg.id, name=name,
@@ -914,15 +908,6 @@
# Check package page
assert not 'Error' in res, res
- res = res.follow(extra_environ={'REMOTE_USER':'testadmin'})
- self._check_package_read(res, name=name, title=title,
- version=version, url=url,
- resources=resources, notes=notes,
- license_id=license_id,
- tags=tags,
- extras=extras,
- state=state,
- )
# Check package object
pkg = model.Package.by_name(name)
@@ -1219,12 +1204,13 @@
extras_list = [(key, value, False) for key, value in sorted(extras.items())]
- self._check_preview(res, name=name, title=title, version=version,
- url=url,
- resources=resources_escaped, notes=notes,
- license_id=license_id,
- tags=tags, extras=extras_list,
- )
+ # see comment in edit test re disabling preview tests
+ # self._check_preview(res, name=name, title=title, version=version,
+ # url=url,
+ # resources=resources_escaped, notes=notes,
+ # license_id=license_id,
+ # tags=tags, extras=extras_list,
+ # )
# Check form is correctly filled
self.check_form_filled_correctly(res, id='', name=name,
@@ -1242,15 +1228,6 @@
# Check package page
assert not 'Error' in res, res
- res = res.follow()
- self._check_package_read(res, name=name, title=title,
- version=version, url=url,
- resources=[download_url], notes=notes,
- license_id=license_id,
- tags=tags,
- extras=extras,
-# state=state,
- )
# Check package object
pkg = model.Package.by_name(name)
--- a/ckan/tests/functional/test_revision.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/tests/functional/test_revision.py Mon Sep 05 10:20:24 2011 +0100
@@ -22,13 +22,6 @@
rev.author = "Test Revision %s" % i
model.repo.commit()
- @search_related
- def test_link_major_navigation(self):
- offset = url_for(controller='home')
- res = self.app.get(offset)
- res = res.click('Revision History')
- assert 'Revision History' in res
-
def test_paginated_list(self):
# Ugh. Why is the number of items per page hard-coded? A designer might
# decide that 20 is the right number of revisions to display per page,
--- a/ckan/tests/functional/test_user.py Thu Sep 01 20:30:24 2011 +0100
+++ b/ckan/tests/functional/test_user.py Mon Sep 05 10:20:24 2011 +0100
@@ -523,8 +523,7 @@
# comes back as a params like this:
# e.g. /user/login?error=Error%20in%20discovery:%20Error%20fetching%20XRDS%20document:%20(6,%20%22Couldn't%20resolve%20host%20'mysite.myopenid.com'%22)
res = self.app.get("/user/login?error=Error%20in%20discovery:%20Error%20fetching%20XRDS%20document:%20(6,%20%22Couldn't%20resolve%20host%20'mysite.myopenid.com'%22")
- main_res = self.main_div(res)
- assert "Couldn't resolve host" in main_res, main_res
+ assert "Couldn't resolve host" in res, res
############
# Disabled
@@ -581,8 +580,7 @@
fv = res.forms['user-password-reset']
fv['user'] = 'unknown'
res = fv.submit()
- main_res = self.main_div(res)
- assert 'No such user: unknown' in main_res, main_res # error
+ assert 'No such user: unknown' in res, res # error
def test_request_reset_user_password_using_search(self):
CreateTestData.create_user(name='larry1', email='kittens at john.com')
@@ -600,24 +598,21 @@
fv = res.forms['user-password-reset']
fv['user'] = 'kittens'
res = fv.submit()
- main_res = self.main_div(res)
- assert '"kittens" matched several users' in main_res, main_res
- assert 'larry1' not in main_res, main_res
- assert 'larry2' not in main_res, main_res
+ assert '"kittens" matched several users' in res, res
+ assert 'larry1' not in res, res
+ assert 'larry2' not in res, res
res = self.app.get(offset)
fv = res.forms['user-password-reset']
fv['user'] = ''
res = fv.submit()
- main_res = self.main_div(res)
- assert 'No such user:' in main_res, main_res
+ assert 'No such user:' in res, res
res = self.app.get(offset)
fv = res.forms['user-password-reset']
fv['user'] = 'l'
res = fv.submit()
- main_res = self.main_div(res)
- assert 'No such user:' in main_res, main_res
+ assert 'No such user:' in res, res
def test_reset_user_password_link(self):
# Set password
--- a/test-core.ini Thu Sep 01 20:30:24 2011 +0100
+++ b/test-core.ini Mon Sep 05 10:20:24 2011 +0100
@@ -51,3 +51,37 @@
# mailer
test_smtp_server = localhost:6675
ckan.mail_from = info at test.ckan.net
+
+
+# Logging configuration
+[loggers]
+keys = root, ckan, sqlalchemy
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = WARN
+handlers = console
+
+[logger_ckan]
+qualname = ckan
+handlers =
+level = INFO
+
+[logger_sqlalchemy]
+handlers =
+qualname = sqlalchemy.engine
+level = WARN
+
+[handler_console]
+class = StreamHandler
+args = (sys.stdout,)
+level = NOTSET
+formatter = generic
+
+[formatter_generic]
+format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s
http://bitbucket.org/okfn/ckan/changeset/54374d03011e/
changeset: 54374d03011e
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 12:21:34
summary: [rename][m]: Updated all templates and css to use 'dataset' in page content and css classes/ids.
affected #: 31 files (101 bytes)
--- a/ckan/public/css/style.css Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/public/css/style.css Mon Sep 05 11:21:34 2011 +0100
@@ -340,7 +340,7 @@
padding-top: 10px;
}
-.package-search-filters {
+.dataset-search-filters {
margin-top: 15px;
}
@@ -422,7 +422,7 @@
/* ===================== */
-/* = Package read view = */
+/* = Dataset read view = */
/* ===================== */
.property-list {
@@ -441,25 +441,25 @@
margin-bottom: 0.2em;
}
-.package .api div {
+.dataset .api div {
background:#f0f0f0;
padding:10px;
}
-.package .api h5 {
+.dataset .api h5 {
font-weight:bold;
margin-bottom:1em!important;
font-size:1em;
}
-.package .api code {
+.dataset .api code {
background:#444;
color:#fff;
padding:3px 10px ;
margin-bottom:1em;
display:block;
}
-.package .api code a {
+.dataset .api code a {
color:#fff;
}
@@ -579,25 +579,25 @@
}
/* =================== */
-/* = Package listing = */
+/* = Dataset listing = */
/* =================== */
-ul.packages {
+ul.datasets {
padding-left: 0;
margin: 0 0 1em 0;
}
-.packages .header {
+.datasets .header {
padding-top: 0.5em;
font-weight: bold;
font-size: 1.1em;
}
-.packages .extract {
+.datasets .extract {
padding-top: 0.3em;
}
-.packages li {
+.datasets li {
list-style: none;
padding: 1em 0 0.2em 0.0em;
border-bottom: 1px solid #ececec;
@@ -605,11 +605,11 @@
/*white-space: nowrap;*/
}
-.packages li a {
+.datasets li a {
text-decoration: none;
}
-.packages li img {
+.datasets li img {
margin-bottom: -2px;
}
@@ -617,14 +617,14 @@
float:right;
}
-ul.package_formats {
+ul.dataset_formats {
float: right;
padding: 0 0 3px 0;
margin: 0;
font-family: monospace;
}
-ul.package_formats li {
+ul.dataset_formats li {
display: inline;
margin: 0;
padding: 0 5px 0 5px;
--- a/ckan/templates/_util.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/_util.html Mon Sep 05 11:21:34 2011 +0100
@@ -47,9 +47,9 @@
</li></ul>
- <!--! List of packages: pass in a collection of tags and this renders the
- standard package listing -->
- <ul py:def="package_list(packages)" class="packages">
+ <!--! List of datasets: pass in a collection of tags and this renders the
+ standard dataset listing -->
+ <ul py:def="package_list(packages)" class="datasets"><li py:for="package in packages"
class="${'fullyopen' if (package.isopen() and package.resources) else None}"><div class="header">
@@ -59,7 +59,7 @@
<div class="search_meta"><py:if test="package.resources">
- <ul class="package_formats">
+ <ul class="dataset_formats"><py:for each="resource in package.resources"><py:if test="resource.format and not resource.format == ''"><li><a href="${resource.url}"
@@ -71,7 +71,7 @@
<ul class="openness"><py:if test="package.isopen()"><li>
- <a href="http://opendefinition.org/okd/" title="This package satisfies the Open Definition.">
+ <a href="http://opendefinition.org/okd/" title="This dataset satisfies the Open Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a></li>
@@ -95,7 +95,7 @@
</li></ul>
- <ul py:def="package_list_from_dict(packages)" class="packages">
+ <ul py:def="package_list_from_dict(packages)" class="datasets"><li py:for="package in packages"
class="${'fullyopen' if (package.isopen and package.get('resources')) else None}"><div class="header">
@@ -105,7 +105,7 @@
<div class="search_meta"><py:if test="package.resources">
- <ul class="package_formats">
+ <ul class="dataset_formats"><py:for each="resource in package.resources"><py:if test="resource.get('format')"><li><a href="${resource.get('url')}"
@@ -117,7 +117,7 @@
<ul class="openness"><py:if test="package.isopen"><li>
- <a href="http://opendefinition.org/okd/" title="This package satisfies the Open Definition.">
+ <a href="http://opendefinition.org/okd/" title="This dataset satisfies the Open Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a></li>
@@ -141,10 +141,10 @@
</li></ul>
- <!--! List of data package groups: pass in a collection of data package groups
+ <!--! List of dataset groups: pass in a collection of dataset groups
and this renders the standard group listing --><table py:def="group_list(groups)" class="groups">
- <tr><th>Title</th><th>Number of packages</th><th>Description</th></tr>
+ <tr><th>Title</th><th>Number of datasets</th><th>Description</th></tr><py:for each="group in groups"><tr><td><a href="${h.url_for(controller='group', action='read', id=group.name)}">${group.display_name}</a></td>
@@ -154,10 +154,10 @@
</py:for></table>
- <!--! List of data package groups: pass in a collection of data package groups
+ <!--! List of dataset groups: pass in a collection of dataset groups
and this renders the standard group listing. Same as the above, but using dictionaries --><table py:def="group_list_from_dict(groups)" class="groups">
- <tr><th>Title</th><th>Number of packages</th><th>Description</th></tr>
+ <tr><th>Title</th><th>Number of datasets</th><th>Description</th></tr><py:for each="group in groups"><tr><td><a href="${h.url_for(controller='group', action='read', id=group['name'])}">${group['display_name']}</a></td>
@@ -181,7 +181,7 @@
</py:for></table>
- <!--! Package openness icons -->
+ <!--! Dataset openness icons --><img py:def="package_license_icon(package)"
src="${g.site_url}/images/icons/door_${'open' if package.isopen() else 'grey'}.png"
title="License: ${package.license.title if hasattr(package.license, 'title') else '?'}"
@@ -190,7 +190,7 @@
<py:def function="package_resources_icon(package)" py:choose=""><a py:when="package.resources"
href="${h.url_for(controller='package', action='read', id=package.name, anchor='resources')}">
- <img src="${h.icon_url('arrow_down')}" title="View package resources" alt="DOWNLOAD" />
+ <img src="${h.icon_url('arrow_down')}" title="View dataset resources" alt="DOWNLOAD" /></a><img py:otherwise="" src="${h.icon_url('arrow_down_grey')}" title="No downloadable resources." alt="" />
--- a/ckan/templates/authorization_group/layout.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/authorization_group/layout.html Mon Sep 05 11:21:34 2011 +0100
@@ -21,7 +21,7 @@
<py:match path="primarysidebar"><li class="widget-container widget_text"><h2>Authorization Groups</h2>
- <p i18n:msg="">Instead of specifying the privileges of specific users on a package or group,
+ <p i18n:msg="">Instead of specifying the privileges of specific users on a dataset or group,
you can also specify a set of users that will share the same rights. To do that, an
<strong>authorization group</strong> can be set-up and users can be added to it.</p><p>
--- a/ckan/templates/group/edit.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/group/edit.html Mon Sep 05 11:21:34 2011 +0100
@@ -8,7 +8,7 @@
<py:def function="optional_head"><link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
- <!-- Package autocomplete -->
+ <!-- Dataset autocomplete --><script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script><script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script><link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" />
--- a/ckan/templates/group/edit_form.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/group/edit_form.html Mon Sep 05 11:21:34 2011 +0100
@@ -7,14 +7,14 @@
${h.literal(c.fieldset.render())}
<fieldset>
- <legend>Packages</legend>
+ <legend>Datasets</legend><ul py:for="pkg in c.fieldset.model.packages"><li>
- <input checked="checked" id="Group-packages-current" name="Group-packages-current" type="checkbox" value="${pkg.name}" />
- <label for="Group-packages_${pkg.name}" style="display: inline;">${pkg.name}</label>
+ <input checked="checked" id="Group-datasets-current" name="Group-datasets-current" type="checkbox" value="${pkg.name}" />
+ <label for="Group-datasets_${pkg.name}" style="display: inline;">${pkg.name}</label></li></ul>
- <p py:if="not c.fieldset.model.packages">There are no packages currently in this group.</p>
+ <p py:if="not c.fieldset.model.packages">There are no datasets currently in this group.</p></fieldset>
${h.literal(c.fieldset2.render())}
--- a/ckan/templates/group/index.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/group/index.html Mon Sep 05 11:21:34 2011 +0100
@@ -3,8 +3,8 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">Groups of Data Packages</py:def>
- <py:def function="page_heading">Groups of Data Packages</py:def>
+ <py:def function="page_title">Groups of Datasets</py:def>
+ <py:def function="page_heading">Groups of Datasets</py:def><py:def function="optional_head"><style>#minornavigation { visibility: hidden; }</style>
--- a/ckan/templates/group/new.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/group/new.html Mon Sep 05 11:21:34 2011 +0100
@@ -8,7 +8,7 @@
<py:def function="optional_head"><link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
- <!-- Package autocomplete and rack-up -->
+ <!-- Dataset autocomplete and rack-up --><script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script><script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script><link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" />
--- a/ckan/templates/group/new_group_form.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/group/new_group_form.html Mon Sep 05 11:21:34 2011 +0100
@@ -63,25 +63,25 @@
</fieldset><fieldset>
- <legend>Packages</legend>
+ <legend>Datasets</legend><dl py:if="data.get('packages')"><py:for each="num, package in enumerate(data.get('packages'))">
- <dt><input checked="checked" id="packages__${num}__name" name="packages__${num}__name" type="checkbox" value="${package['name']}"/></dt>
+ <dt><input checked="checked" id="datasets__${num}__name" name="datasets__${num}__name" type="checkbox" value="${package['name']}"/></dt><dd>
- <label for="packages__${num}__name">${package['name']}</label>
+ <label for="datasets__${num}__name">${package['name']}</label></dd></py:for></dl>
- <p py:if="not data.get('packages')">There are no packages currently in this group.</p>
+ <p py:if="not data.get('packages')">There are no datasets currently in this group.</p></fieldset><fieldset><legend>
- Add packages
+ Add datasets
</legend><dl>
- <dt><label class="field_opt" for="packages__${len(data.get('packages', []))}__name">Package</label></dt>
- <dd><input class="autocomplete-package" id="packages__${len(data.get('packages', []))}__name" name="packages__${len(data.get('packages', []))}__name" type="text" /></dd>
+ <dt><label class="field_opt" for="datasets__${len(data.get('packages', []))}__name">Dataset</label></dt>
+ <dd><input class="autocomplete-dataset" id="datasets__${len(data.get('packages', []))}__name" name="datasets__${len(data.get('packages', []))}__name" type="text" /></dd></dl></fieldset>
--- a/ckan/templates/group/read.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/group/read.html Mon Sep 05 11:21:34 2011 +0100
@@ -32,8 +32,8 @@
</py:match><py:match path="content">
- <h3>Packages:</h3>
- <p i18n:msg="item_count">There are ${c.page.item_count} packages in this group.</p>
+ <h3>Datasets:</h3>
+ <p i18n:msg="item_count">There are ${c.page.item_count} datasets in this group.</p>
${c.page.pager()}
${package_list(c.page.items)}
${c.page.pager()}
--- a/ckan/templates/home/about.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/home/about.html Mon Sep 05 11:21:34 2011 +0100
@@ -9,7 +9,7 @@
<h2>About CKAN</h2><p i18n:msg="">CKAN is the Comprehensive Knowledge Archive Network, a <strong>registry</strong> of <a
- href="http://opendefinition.org/">open knowledge</a> packages and projects
+ href="http://opendefinition.org/">open knowledge</a> datasets and projects
(and a few closed ones).</p><p i18n:msg="">CKAN makes it easy to <strong>find, share and reuse open
@@ -22,7 +22,7 @@
<img src="${g.site_url}/images/ckan-features.png" alt="CKAN Features Overview" style="margin-left: 4em; margin-bottom: 2em;" /><p i18n:msg="">As the diagram shows, CKAN combines the features of a listing/registry,
- a package index and a wiki. As a registry it acts like <a
+ a dataset index and a wiki. As a registry it acts like <a
href="http://www.freshmeat.net/">freshmeat</a> but for open data and
content resources. However it adds to a simple registry in key ways.</p>
--- a/ckan/templates/home/index.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/home/index.html Mon Sep 05 11:21:34 2011 +0100
@@ -117,9 +117,9 @@
<h1>Find data</h1><form action="/package" method="GET">
- <input name="q" value="" class="search-field" placeholder="Find data packages" />
+ <input name="q" value="" class="search-field" placeholder="Find datasets" /></form>
- ${g.site_title} contains <a href="/package">${c.package_count} data packages</a> that you can
+ ${g.site_title} contains <a href="/package">${c.package_count} datasets</a> that you can
browse, learn about and download.
</div></div>
@@ -131,7 +131,7 @@
to find other people interested in your data.
<py:choose test="h.am_authorized(c, actions.PACKAGE_CREATE)">
- <a py:when="" href="/package/new" class="create-button">Create a data package »</a>
+ <a py:when="" href="/package/new" class="create-button">Create a dataset »</a><py:otherwise><a href="/user/login" class="create-button">Sign up »</a></py:otherwise>
@@ -160,7 +160,7 @@
<p>
${h.markdown_extract(group.description)}
</p>
- <strong>${group.title} has ${len(group.packages)} data packages.</strong>
+ <strong>${group.title} has ${len(group.packages)} datasets.</strong></div></py:for></div>
--- a/ckan/templates/importer/importer.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/importer/importer.html Mon Sep 05 11:21:34 2011 +0100
@@ -5,8 +5,8 @@
<py:def function="page_title">Importer</py:def><div py:match="content">
- <h2>Import Data Packages</h2>
- <p>Here you can supply an Excel file with details of multiple packages and import these into ${g.site_title}.</p>
+ <h2>Import Datasets</h2>
+ <p>Here you can supply an Excel file with details of multiple datasets and import these into ${g.site_title}.</p><div><h3 py:if="c.error" class="form-errors">
Error: ${c.error}
--- a/ckan/templates/importer/preview.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/importer/preview.html Mon Sep 05 11:21:34 2011 +0100
@@ -13,7 +13,7 @@
</h3>
${h.form(h.url_for(controller='importer', action='do_import'), multipart=True, id='import-preview')}
- <p>${c.num_pkgs} package${'s' if c.num_pkgs != 1 else ''} read from ${c.import_filename}:</p>
+ <p>${c.num_pkgs} dataset${'s' if c.num_pkgs != 1 else ''} read from ${c.import_filename}:</p><py:for each="pkg in c.import_previews"><div>
@@ -22,7 +22,7 @@
</py:for><py:if test="c.pkgs_suppressed">
- <p>Further package previews not shown.</p>
+ <p>Further dataset previews not shown.</p></py:if><label for="log_message">Edit summary (briefly describe the changes you have made)</label>
--- a/ckan/templates/layout_base.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/layout_base.html Mon Sep 05 11:21:34 2011 +0100
@@ -90,11 +90,11 @@
<div class="menu"><span id="menusearch"><form action="${url(controller='package', action='search')}" method="GET">
- <input name="q" value="${c.q if hasattr(c, 'q') else ''}" class="search" placeholder="Find data packages" />
+ <input name="q" value="${c.q if hasattr(c, 'q') else ''}" class="search" placeholder="Find datasets" /></form></span><div id="mainmenu">
- <span py:if="h.check_access('package_create')">${h.nav_link(c, _('Add a package'), controller='package', action='new', id=None)}</span>
+ <span py:if="h.check_access('package_create')">${h.nav_link(c, _('Add a dataset'), controller='package', action='new', id=None)}</span>
${h.nav_link(c, _('Search'), controller='package', action='index', id=None, highlight_actions = 'new index')}
${h.nav_link(c, _('Groups'), controller='group', action='index', id=None)}
</div>
--- a/ckan/templates/package/authz.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/authz.html Mon Sep 05 11:21:34 2011 +0100
@@ -2,7 +2,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.pkgtitle or c.pkgname} - Authorization - Data Packages</py:def>
+ <py:def function="page_title">${c.pkgtitle or c.pkgname} - Authorization - Datasets</py:def><py:def function="page_heading">Authorization: ${c.pkgtitle or c.pkgname}</py:def><div py:match="content">
--- a/ckan/templates/package/comments.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/comments.html Mon Sep 05 11:21:34 2011 +0100
@@ -2,9 +2,9 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Data Packages - History</py:def>
+ <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Datasets - History</py:def>
- <div py:match="content" class="package">
+ <div py:match="content" class="dataset"><h2 class="head">
${c.pkg_dict.get('title', '')}
<span class="name">(${c.pkg_dict['name']})</span>
--- a/ckan/templates/package/edit.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/edit.html Mon Sep 05 11:21:34 2011 +0100
@@ -3,7 +3,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.pkg.title or c.pkg.name} - Edit - Data Packages</py:def>
+ <py:def function="page_title">${c.pkg.title or c.pkg.name} - Edit - Datasets</py:def><py:def function="page_heading">Edit: ${c.pkg.title or c.pkg.name}</py:def><py:def function="body_class">hide-sidebar</py:def>
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="${g.site_url}/css/flexitable.css" /></py:def>
- <div py:match="content" class="package">
+ <div py:match="content" class="dataset"><div id="preview" style="margin-left: 20px;" py:if="c.preview"><hr /><h2>Preview</h2>
--- a/ckan/templates/package/edit_form.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/edit_form.html Mon Sep 05 11:21:34 2011 +0100
@@ -1,4 +1,4 @@
- <form id="package-edit" action="" method="post" class="ckan package_create_form"
+ <form id="dataset-edit" action="" method="post" class="ckan dataset_create_form"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
--- a/ckan/templates/package/form_extra_fields.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/form_extra_fields.html Mon Sep 05 11:21:34 2011 +0100
@@ -38,8 +38,8 @@
</thead><tbody><tr>
- <td><input name="Package- -extras-newfield0-key" type="text" value="" /></td>
- <td><input name="Package- -extras-newfield0-value" type="text" class="short" value="" /></td>
+ <td><input name="Dataset- -extras-newfield0-key" type="text" value="" /></td>
+ <td><input name="Dataset- -extras-newfield0-value" type="text" class="short" value="" /></td></tr></tbody></table>
--- a/ckan/templates/package/form_fields.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/form_fields.html Mon Sep 05 11:21:34 2011 +0100
@@ -4,7 +4,7 @@
<script type="text/javascript">
jQuery(document).ready(function($) {
- CKAN.Utils.PackageSlugCreator.create($('#Package--title'), $('#Package--name'));
+ CKAN.Utils.PackageSlugCreator.create($('#Dataset--title'), $('#Dataset--name'));
});
</script>
--- a/ckan/templates/package/history.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/history.html Mon Sep 05 11:21:34 2011 +0100
@@ -3,25 +3,25 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Data Packages - History</py:def>
+ <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Datasets - History</py:def><py:def function="page_heading">History: ${c.pkg.title or c.pkg.name}</py:def><!-- Sidebar --><py:match path="primarysidebar"><li class="widget-container widget_text"><h4>Updates</h4>
- <p class="atom-feed-link package-history-link">
+ <p class="atom-feed-link dataset-history-link"><a
href="${url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}"
- title="${g.site_title} - Package History - ${c.pkg_dict['name']}">
+ title="${g.site_title} - Dataset History - ${c.pkg_dict['name']}">
Subscribe »</a></p></li></py:match>
- <div py:match="content" class="package">
+ <div py:match="content" class="dataset"><h3>Revisions</h3>
- <form id="package-revisions" action="diff" method="post"
+ <form id="dataset-revisions" action="diff" method="post"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
>
@@ -46,7 +46,7 @@
<a href="${h.url_for(controller='revision',action='read',id=rev['id'])}">${rev['id'][:4]}…</a></td><td>
- <a href="${h.url_for(controller='package',action='read',id='%s@%s' % (c.pkg_dict['name'], rev['timestamp']))}" title="${'Read package as of %s' % rev['timestamp']}">${h.render_datetime(rev['timestamp'])}</a></td>
+ <a href="${h.url_for(controller='package',action='read',id='%s@%s' % (c.pkg_dict['name'], rev['timestamp']))}" title="${'Read dataset as of %s' % rev['timestamp']}">${h.render_datetime(rev['timestamp'])}</a></td><td>${h.linked_user(rev['author'])}</td><td>${rev['message']}</td></tr>
@@ -57,7 +57,7 @@
</div><!-- content --><py:def function="optional_feed">
- <link rel="alternate" type="application/atom+xml" title="Package History"
+ <link rel="alternate" type="application/atom+xml" title="Dataset History"
href="${url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}" /></py:def>
--- a/ckan/templates/package/new.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/new.html Mon Sep 05 11:21:34 2011 +0100
@@ -3,8 +3,8 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">New - Data Packages</py:def>
- <py:def function="page_heading">Register a New Data Package</py:def>
+ <py:def function="page_title">New - Datasets</py:def>
+ <py:def function="page_heading">Register a New Dataset</py:def><py:def function="body_class">hide-sidebar</py:def>
--- a/ckan/templates/package/new_package_form.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/new_package_form.html Mon Sep 05 11:21:34 2011 +0100
@@ -1,4 +1,4 @@
-<form id="package-edit" class="package_create_form ckan" method="post"
+<form id="dataset-edit" class="dataset_create_form ckan" method="post"
py:attrs="{'class':'has-errors'} if errors else {}"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:py="http://genshi.edgewall.org/"
@@ -18,13 +18,13 @@
<dl><dt><label class="field_opt" for="title">Title</label></dt><dd><input id="title" name="title" type="text" value="${data.get('title', '')}"/></dd>
- <dd class="instructions basic">A short descriptive title for the data set.</dd>
+ <dd class="instructions basic">A short descriptive title for the dataset.</dd><dd class="instructions further">It should not be a description though - save that for the Notes field. Do not give a trailing full stop.</dd><dd class="field_error" py:if="errors.get('title', '')">${errors.get('title', '')}</dd><dt><label class="field_req" for="name">Name *</label></dt><dd><input id="name" maxlength="100" name="name" type="text" value="${data.get('name', '')}" /></dd>
- <dd class="instructions basic">A unique identifier for the package.</dd>
+ <dd class="instructions basic">A unique identifier for the dataset.</dd><dd class="instructions further">It should be broadly humanly readable, in the spirit of Semantic Web URIs. Only use an acronym if it is widely recognised. Renaming is possible but discouraged.</dd><dd class="hints">2+ characters, lowercase, using only 'a-z0-9' and '-_'</dd><dd class="field_error" py:if="errors.get('name', '')">${errors.get('name', '')}</dd>
@@ -38,7 +38,7 @@
<dt><label class="field_opt" for="notes">Notes</label></dt><dd><textarea cols="60" id="notes" name="notes" rows="15">${data.get('notes', '')}</textarea></dd><dd class="instructions basic">The main description of the dataset</dd>
- <dd class="instructions further">It is often displayed with the package title. In particular, it should start with a short sentence that describes the data set succinctly, because the first few words alone may be used in some views of the data sets.</dd>
+ <dd class="instructions further">It is often displayed with the dataset title. In particular, it should start with a short sentence that describes the dataset succinctly, because the first few words alone may be used in some views of the datasets.</dd><dd class="hints">You can use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown formatting</a> here.</dd><dt><label class="field_opt" for="license_id">Licence</label></dt>
@@ -97,9 +97,9 @@
</table><div class="instructions basic">The files containing the data or address of the APIs for accessing it.</div>
- <div class="instructions further"><br />These can be repeated as required. For example if the data is being supplied in multiple formats, or split into different areas or time periods, each file is a different 'resource' which should be described differently. They will all appear on the dataset page on CKAN together.<br /><br /><b>URL:</b> This is the Internet link directly to the data - by selecting this link in a web browser, the user will immediately download the full data set. Note that datasets are not hosted on this site, but by the publisher of the data. Alternatively the URL can point to an API server such as a SPARQL endpoint or JSON-P service.<br /><b>Format:</b> This should give the file format in which the data is supplied. <br /><b>Description</b> Any information you want to add to describe the resource.<br /></div>
+ <div class="instructions further"><br />These can be repeated as required. For example if the data is being supplied in multiple formats, or split into different areas or time periods, each file is a different 'resource' which should be described differently. They will all appear on the dataset page on CKAN together.<br /><br /><b>URL:</b> This is the Internet link directly to the data - by selecting this link in a web browser, the user will immediately download the full dataset. Note that datasets are not hosted on this site, but by the publisher of the data. Alternatively the URL can point to an API server such as a SPARQL endpoint or JSON-P service.<br /><b>Format:</b> This should give the file format in which the data is supplied. <br /><b>Description</b> Any information you want to add to describe the resource.<br /></div><div class="hints">Format choices: CSV | RDF | XML | XBRL | SDMX | HTML+RDFa | Other as appropriate</div>
- <div class="field_error" py:if="errors.get('resources', '')">Package resource(s) incomplete.</div>
+ <div class="field_error" py:if="errors.get('resources', '')">Dataset resource(s) incomplete.</div></fieldset><fieldset id="groups">
--- a/ckan/templates/package/read.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/read.html Mon Sep 05 11:21:34 2011 +0100
@@ -12,7 +12,7 @@
py:strip=""><py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])}
- - Data Packages</py:def>
+ - Datasets</py:def><py:def function="page_heading" property="dc:title">${c.pkg_dict['title']}</py:def>
@@ -65,7 +65,7 @@
</py:if><p class="hint"><py:if test="not c.pkg.groups">
- Groups are collections of packages maintained by users of ${g.site_title}. This package has not been added to any groups yet.
+ Groups are collections of dataset maintained by users of ${g.site_title}. This dataset has not been added to any groups yet.
</py:if>
@@ -83,7 +83,7 @@
href="${c.harvest_catalogue_url}">${c.harvest_catalogue_name}</a></li><li py:if="c.package_relationships">
- <h3>Related packages</h3>
+ <h3>Related dataset</h3><ul><py:for each="pkg, relationship_str, comment in c.package_relationships"><li>
@@ -102,7 +102,7 @@
<li class="widget-container boxed widget_text"><py:if test="c.pkg.isopen() and c.pkg.resources"><h3>
- This Package is Open
+ This Dataset is Open
</h3><p py:if="c.pkg.license_id">
License:
@@ -116,13 +116,13 @@
<p class="okd"><a
href="http://www.opendefinition.org/okd/"
- title="This package satisfies the Open Knowledge Definition.">
+ title="This dataset satisfies the Open Knowledge Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a></p></py:if><py:if test="not(c.pkg.isopen() and c.pkg.resources)">
- <h3 i18n:msg="">This package is Not Open</h3>
+ <h3 i18n:msg="">This dataset is Not Open</h3><p>Either because it is not openly licensed or is missing
downloadable resources.</p>
@@ -136,8 +136,8 @@
<div py:match="content"><py:if test="c.pkg_revision_id"><div id="revision" class="widget-container">
- <p py:if="c.pkg_revision_not_latest">This is an old revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}. It may differ significantly from the <a href="${url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
- <p py:if="not c.pkg_revision_not_latest">This is the current revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}.</p>
+ <p py:if="c.pkg_revision_not_latest">This is an old revision of this dataset, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}. It may differ significantly from the <a href="${url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
+ <p py:if="not c.pkg_revision_not_latest">This is the current revision of this dataset, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}.</p></div></py:if>
@@ -152,7 +152,7 @@
</py:def><py:def function="optional_feed">
- <link rel="alternate" type="application/atom+xml" title="Package History"
+ <link rel="alternate" type="application/atom+xml" title="Dataset History"
href="${url(controller='package', action='history', id=c.pkg.name, format='atom', days=7)}" /></py:def>
--- a/ckan/templates/package/read_core.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/read_core.html Mon Sep 05 11:21:34 2011 +0100
@@ -3,8 +3,8 @@
py:strip=""
><xi:include href="../_util.html" />
- <div id="package" class="package">
- <!-- About package -->
+ <div id="dataset" class="dataset">
+ <!-- About dataset --><div class="notes" py:if="str(c.pkg_notes_formatted).strip()">
${c.pkg_notes_formatted}
</div>
@@ -39,7 +39,7 @@
This is a list of all known formats and datasets for <em>${c.pkg_dict.get('title', '')}</em>. If you know of another (CSV, SPARQL end-point etc.) ${h.subnav_link(c, 'please edit this page and add it to the list', controller='package', action='edit', id=c.pkg.name)}.
</caption></table>
- <table py:otherwise=""><tr><th>Resources</th><td>None given for this package.</td></tr></table>
+ <table py:otherwise=""><tr><th>Resources</th><td>None given for this dataset.</td></tr></table></py:choose></div>
@@ -47,10 +47,10 @@
<py:def function="details_item(label, value)"><tr>
- <td class="package-label">
+ <td class="dataset-label">
${label}
</td>
- <td class="package-details">
+ <td class="dataset-details">
${value}
</td></tr>
@@ -68,8 +68,8 @@
<tbody><tr py:for="i, (key, value) in enumerate(c.pkg_extras)"
rel="dc:relation" resource="_:extra${i}">
- <td class="package-label" property="rdfs:label">${_(key)}</td>
- <td class="package-details" property="rdf:value">${value}</td>
+ <td class="dataset-label" property="rdfs:label">${_(key)}</td>
+ <td class="dataset-details" property="rdf:value">${value}</td></tr></tbody><caption py:if="not c.is_preview and h.check_access('package_update',{'id':c.pkg.id})">
@@ -78,6 +78,6 @@
</table></div>
- </div><!-- /package -->
+ </div><!-- /dataset --></html>
--- a/ckan/templates/package/search.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/search.html Mon Sep 05 11:21:34 2011 +0100
@@ -21,7 +21,7 @@
<py:match path="primarysidebar"><li class="widget-container boxed widget_text" py:if="h.check_access('package_create')">
- <h3>Add a package</h3>
+ <h3>Add a dataset</h3><p>
Do you know of a dataset that should be added to ${g.site_title}?
<br/>
@@ -61,10 +61,10 @@
Please try another search term.</p></py:if><py:if test="request.params">
- <h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> packages found</h4>
+ <h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> datasets found</h4></py:if><py:if test="c.page.item_count == 0 and request.params">
- <p i18n:msg="">Would you like to <a href="${h.url_for(action='new', id=None)}">create a new package?</a></p>
+ <p i18n:msg="">Would you like to <a href="${h.url_for(action='new', id=None)}">create a new dataset?</a></p></py:if>
${package_list_from_dict(c.page.items)}
${c.page.pager(q=c.q)}
--- a/ckan/templates/package/search_form.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/package/search_form.html Mon Sep 05 11:21:34 2011 +0100
@@ -5,15 +5,15 @@
py:strip=""
>
-<form id="package-search" class="package-search" action="${h.url_for(controller='package', action='search', id=None)}" method="GET">
+<form id="dataset-search" class="dataset-search" action="${h.url_for(controller='package', action='search', id=None)}" method="GET"><input type="search" class="search" name="q" value="${c.q}" autocomplete="off" results="5" placeholder="Search..." /><span py:if="c.fields"><py:for each="(k, v) in c.fields"><input type="hidden" name="${k}" value="${v}" /></py:for></span>
- <div class="package-search-filters">Filter by <label for="open_only" class="inline">${h.checkbox(name='open_only', checked=c.open_only)} packages with open licenses</label>
- <label for="downloadable_only" class="inline">${h.checkbox(name='downloadable_only', checked=c.downloadable_only)} packages with downloads</label>
+ <div class="dataset-search-filters">Filter by <label for="open_only" class="inline">${h.checkbox(name='open_only', checked=c.open_only)} datasets with open licenses</label>
+ <label for="downloadable_only" class="inline">${h.checkbox(name='downloadable_only', checked=c.downloadable_only)} datasets with downloads</label><input type="submit" value="${_('Search')}" class="button" /></div></form>
--- a/ckan/templates/revision/read.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/revision/read.html Mon Sep 05 11:21:34 2011 +0100
@@ -42,7 +42,7 @@
${c.revision.message}
<h3>Changes</h3>
- <h4>Packages</h4>
+ <h4>Datasets</h4><ul><py:for each="pkg in c.packages"><li>
@@ -51,11 +51,11 @@
</py:for></ul>
- <h4>Packages' Tags</h4>
+ <h4>Datasets' Tags</h4><ul><py:for each="pkgtag in c.pkgtags"><li>
- Package - ${h.link_to(pkgtag.package.name, h.url_for(controller='package', action='read', id=pkgtag.package.name))},
+ Dataset - ${h.link_to(pkgtag.package.name, h.url_for(controller='package', action='read', id=pkgtag.package.name))},
Tag - ${h.link_to(pkgtag.tag.name, h.url_for(controller='tag', action='read', id=pkgtag.tag.name))}
</li></py:for>
--- a/ckan/templates/tag/read.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/tag/read.html Mon Sep 05 11:21:34 2011 +0100
@@ -7,7 +7,7 @@
<py:def function="page_heading">Tag: ${c.tag['name']}</py:def><div py:match="content">
- <p i18n:msg="package_count, tagname">There are ${len(c.tag['packages'])} packages tagged with <strong>${c.tag['name']}</strong>:</p>
+ <p i18n:msg="package_count, tagname">There are ${len(c.tag['packages'])} datasets tagged with <strong>${c.tag['name']}</strong>:</p>
${package_list_from_dict(c.tag['packages'])}
</div>
--- a/ckan/templates/user/login.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/user/login.html Mon Sep 05 11:21:34 2011 +0100
@@ -18,7 +18,7 @@
<li class="widget-container boxed widget_text"><h2>Not a member?</h2><p>
- Join CKAN to contribute packages under your own name.
+ Join CKAN to contribute datasets under your own name.
</p><ul><li>${h.link_to(_('Register'), h.url_for(action='register'))}</li>
--- a/ckan/templates/user/read.html Mon Sep 05 10:20:24 2011 +0100
+++ b/ckan/templates/user/read.html Mon Sep 05 11:21:34 2011 +0100
@@ -18,7 +18,7 @@
<h3>Activity</h3><ul><li><strong>Number of edits:</strong> ${c.user_dict['number_of_edits']}</li>
- <li><strong>Number of packages administered:</strong> ${c.user_dict['number_administered_packages']}</li>
+ <li><strong>Number of datasets administered:</strong> ${c.user_dict['number_administered_packages']}</li></ul></li></py:match>
http://bitbucket.org/okfn/ckan/changeset/b5af9eefb6ab/
changeset: b5af9eefb6ab
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 13:25:02
summary: [rename][xs]: Missed one 'package' use.
affected #: 2 files (8 bytes)
--- a/ckan/templates/group/layout.html Mon Sep 05 11:21:34 2011 +0100
+++ b/ckan/templates/group/layout.html Mon Sep 05 12:25:02 2011 +0100
@@ -9,7 +9,7 @@
<py:match path="primarysidebar"><li class="widget-container boxed widget_text"><h3>Groups section</h3>
- <p i18n:msg="">Whilst tags are great at collecting packages together, there are occasions when you want to restrict users from editing a collection. A <strong>group</strong> can be set-up to specify which users have permission to add or remove packages from it.</p>
+ <p i18n:msg="">Whilst tags are great at collecting datasets together, there are occasions when you want to restrict users from editing a collection. A <strong>group</strong> can be set-up to specify which users have permission to add or remove datasets from it.</p><p><span class="ckan_logged_in" style="display: none;">
To create a new group, please first <a href="${h.url_for(controller='user',action='login', id=None)}">login</a>.
--- a/ckan/templates/tag/read.html Mon Sep 05 11:21:34 2011 +0100
+++ b/ckan/templates/tag/read.html Mon Sep 05 12:25:02 2011 +0100
@@ -7,7 +7,7 @@
<py:def function="page_heading">Tag: ${c.tag['name']}</py:def><div py:match="content">
- <p i18n:msg="package_count, tagname">There are ${len(c.tag['packages'])} datasets tagged with <strong>${c.tag['name']}</strong>:</p>
+ <p i18n:msg="count, tagname">There are ${len(c.tag['packages'])} datasets tagged with <strong>${c.tag['name']}</strong>:</p>
${package_list_from_dict(c.tag['packages'])}
</div>
http://bitbucket.org/okfn/ckan/changeset/6a4b3969fe64/
changeset: 6a4b3969fe64
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 13:47:33
summary: [rename][xs]: Updated some hardlinks to use h.url_for(...) in index.html; also one external hardlink.
affected #: 2 files (98 bytes)
--- a/ckan/templates/home/index.html Mon Sep 05 12:25:02 2011 +0100
+++ b/ckan/templates/home/index.html Mon Sep 05 12:47:33 2011 +0100
@@ -119,7 +119,7 @@
<form action="/package" method="GET"><input name="q" value="" class="search-field" placeholder="Find datasets" /></form>
- ${g.site_title} contains <a href="/package">${c.package_count} datasets</a> that you can
+ ${g.site_title} contains <a href="${h.url_for(controller='package')}">${c.package_count} datasets</a> that you can
browse, learn about and download.
</div></div>
@@ -131,9 +131,9 @@
to find other people interested in your data.
<py:choose test="h.am_authorized(c, actions.PACKAGE_CREATE)">
- <a py:when="" href="/package/new" class="create-button">Create a dataset »</a>
+ <a py:when="" href="${h.url_for(controller='package', action='new')}" class="create-button">Create a dataset »</a><py:otherwise>
- <a href="/user/login" class="create-button">Sign up »</a>
+ <a href="${h.url_for(controller='user', action='login')}" class="create-button">Sign up »</a></py:otherwise></py:choose></div>
--- a/ckan/templates/package/read.html Mon Sep 05 12:25:02 2011 +0100
+++ b/ckan/templates/package/read.html Mon Sep 05 12:47:33 2011 +0100
@@ -127,7 +127,7 @@
<p>Either because it is not openly licensed or is missing
downloadable resources.</p><p class="widget_action">
- <a href="http://isitopendata.org/enquiry/start/?ckan_package=${c.pkg.name}">Start an enquiry on IsItOpenData »</a>
+ <a href="http://isitopendata.org/enquiry/start/?ckan_dataset=${c.pkg.name}">Start an enquiry on IsItOpenData »</a></p></py:if></li>
http://bitbucket.org/okfn/ckan/changeset/af6f7f697608/
changeset: af6f7f697608
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 14:03:45
summary: [rename][s]: Updated application.js to use dataset urls; fixed some css ids in /public/css/style.css.
affected #: 2 files (0 bytes)
--- a/ckan/public/css/style.css Mon Sep 05 12:47:33 2011 +0100
+++ b/ckan/public/css/style.css Mon Sep 05 13:03:45 2011 +0100
@@ -544,7 +544,7 @@
/* = Search boxes = */
/* ================ */
-form.package-search input.search {
+form.dataset-search input.search {
width: 99%;
font-size: 1.2em;
margin: 0px;
@@ -560,7 +560,7 @@
-moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}
-.package-search input.button {
+.dataset-search input.button {
display: inline-block;
float: right;
margin-top: 5px;
@@ -568,13 +568,13 @@
margin-bottom: 1px !important;
}
-.package-search-filters {
+.dataset-search-filters {
margin-top: 1em;
margin-bottom: 1em;
color: #888;
}
-.package-search-filters label {
+.dataset-search-filters label {
padding-left: 1em;
}
--- a/ckan/public/scripts/application.js Mon Sep 05 12:47:33 2011 +0100
+++ b/ckan/public/scripts/application.js Mon Sep 05 13:03:45 2011 +0100
@@ -2,7 +2,7 @@
$(document).ready(function () {
CKAN.Utils.setupUserAutocomplete($('input.autocomplete-user'));
CKAN.Utils.setupAuthzGroupAutocomplete($('input.autocomplete-authzgroup'));
- CKAN.Utils.setupPackageAutocomplete($('input.autocomplete-package'));
+ CKAN.Utils.setupPackageAutocomplete($('input.autocomplete-dataset'));
CKAN.Utils.setupTagAutocomplete($('input.autocomplete-tag'));
CKAN.Utils.setupFormatAutocomplete($('input.autocomplete-format'));
});
@@ -11,14 +11,14 @@
var CKAN = CKAN || {};
CKAN.Utils = function($, my) {
- // Attach package autocompletion to provided elements
+ // Attach dataset autocompletion to provided elements
//
// Requires: jquery-ui autocomplete
my.setupPackageAutocomplete = function(elements) {
elements.autocomplete({
minLength: 0,
source: function(request, callback) {
- var url = '/package/autocomplete?q=' + request.term;
+ var url = '/dataset/autocomplete?q=' + request.term;
$.ajax({
url: url,
success: function(data) {
@@ -183,9 +183,9 @@
// fetch updates.
this.name_changed = false;
// url for slug api (we need api rather than do it ourself because we check if available)
- this.url = '/api/2/util/package/create_slug';
- // Add a new element where the validity of the package name can be displayed
- this.name_field.parent().append('<div id="package_name_valid_msg"></div>');
+ this.url = '/api/2/util/dataset/create_slug';
+ // Add a new element where the validity of the dataset name can be displayed
+ this.name_field.parent().append('<div id="dataset_name_valid_msg"></div>');
this.title_field.blur(this.title_change_handler())
this.title_field.keyup(this.title_change_handler())
this.name_field.keyup(this.name_change_handler());
@@ -211,7 +211,7 @@
// Reset if the name is emptied
if (!self.name_field.val().replace(/^\s+|\s+$/g, '')){
self.name_changed = false;
- $('#package_name_valid_msg').html('');
+ $('#dataset_name_valid_msg').html('');
} else {
self.update(self.name_field.val(), function(data) {
self.name_field.val(data.name)
@@ -226,7 +226,7 @@
// Reset if the name is emptied
if (!self.name_field.val().replace(/^\s+|\s+$/g, '')){
self.name_changed = false;
- $('#package_name_valid_msg').html('');
+ $('#dataset_name_valid_msg').html('');
} else {
self.name_changed = true;
self.update(self.name_field.val(), function(data) {
@@ -251,11 +251,11 @@
if (on_success) {
on_success(data);
}
- var valid_msg = $('#package_name_valid_msg');
+ var valid_msg = $('#dataset_name_valid_msg');
if (data.valid) {
- valid_msg.html('<span style="font-weight: bold; color: #0c0">This package name is available!</span>');
+ valid_msg.html('<span style="font-weight: bold; color: #0c0">This dataset name is available!</span>');
} else {
- valid_msg.html('<span style="font-weight: bold; color: #c00">This package name is already used, please use a different name</span>');
+ valid_msg.html('<span style="font-weight: bold; color: #c00">This dataset name is already used, please use a different name</span>');
}
}
});
http://bitbucket.org/okfn/ckan/changeset/fa6a6a8edaa2/
changeset: fa6a6a8edaa2
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 16:41:29
summary: [rename][m]: Unit tests updated; all tests now passing.
affected #: 13 files (115 bytes)
--- a/ckan/forms/common.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/forms/common.py Mon Sep 05 15:41:29 2011 +0100
@@ -33,15 +33,15 @@
def package_name_validator(val, field=None):
name_validator(val, field)
- # we disable autoflush here since may get used in package preview
+ # we disable autoflush here since may get used in dataset preview
pkgs = model.Session.query(model.Package).autoflush(False).filter_by(name=val)
for pkg in pkgs:
if pkg != field.parent.model:
- raise formalchemy.ValidationError(_('Package name already exists in database'))
+ raise formalchemy.ValidationError(_('Dataset name already exists in database'))
def group_name_validator(val, field=None):
name_validator(val, field)
- # we disable autoflush here since may get used in package preview
+ # we disable autoflush here since may get used in dataset preview
groups = model.Session.query(model.Group).autoflush(False).filter_by(name=val)
for group in groups:
if group != field.parent.model:
@@ -269,7 +269,7 @@
def _serialized_value(self):
# interpret params like this:
- # 'Package--temporal_coverage-from', u'4/12/2009'
+ # 'Dataset--temporal_coverage-from', u'4/12/2009'
param_val_from = self.params.get(self.name + '-from', u'')
param_val_to = self.params.get(self.name + '-to', u'')
return param_val_from, param_val_to
@@ -330,7 +330,7 @@
return self._serialized_value()
class ResourcesField(ConfiguredField):
- '''A form field for multiple package resources.'''
+ '''A form field for multiple dataset resources.'''
def __init__(self, name, hidden_label=False, fields_required=None):
super(ResourcesField, self).__init__(name)
@@ -342,7 +342,7 @@
resources_data = val
assert isinstance(resources_data, list)
not_nothing_regex = re.compile('\S')
- errormsg = _('Package resource(s) incomplete.')
+ errormsg = _('Dataset resource(s) incomplete.')
not_nothing_validator = formalchemy.validators.regex(not_nothing_regex,
errormsg)
for resource_data in resources_data:
@@ -410,12 +410,12 @@
rest_key = self.name
# REST param format
- # e.g. 'Package-1-resources': [{u'url':u'http://ww...
+ # e.g. 'Dataset-1-resources': [{u'url':u'http://ww...
if params.has_key(rest_key) and any(params.getall(rest_key)):
new_resources = params.getall(rest_key)[:] # copy, so don't edit orig
# formalchemy form param format
- # e.g. 'Package-1-resources-0-url': u'http://ww...'
+ # e.g. 'Dataset-1-resources-0-url': u'http://ww...'
row = 0
while True:
if not params.has_key('%s-%i-url' % (self.name, row)):
@@ -510,7 +510,7 @@
raise formalchemy.ValidationError(_('Tag "%s" must not be uppercase' % (tag)))
class ExtrasField(ConfiguredField):
- '''A form field for arbitrary "extras" package data.'''
+ '''A form field for arbitrary "extras" dataset data.'''
def __init__(self, name, hidden_label=False):
super(ExtrasField, self).__init__(name)
self._hidden_label = hidden_label
@@ -602,11 +602,11 @@
def deserialize(self):
# Example params:
- # ('Package-1-extras', {...}) (via REST i/f)
- # ('Package-1-extras-genre', u'romantic novel'),
- # ('Package-1-extras-genre-checkbox', 'on')
- # ('Package-1-extras-newfield0-key', u'aaa'),
- # ('Package-1-extras-newfield0-value', u'bbb'),
+ # ('Dataset-1-extras', {...}) (via REST i/f)
+ # ('Dataset-1-extras-genre', u'romantic novel'),
+ # ('Dataset-1-extras-genre-checkbox', 'on')
+ # ('Dataset-1-extras-newfield0-key', u'aaa'),
+ # ('Dataset-1-extras-newfield0-value', u'bbb'),
# TODO: This method is run multiple times per edit - cache results?
if not hasattr(self, 'extras_re'):
self.extras_re = re.compile('([a-zA-Z0-9-]*)-([a-f0-9-]*)-extras(?:-(.+))?$')
@@ -621,7 +621,7 @@
entity_id = key_parts[1]
if key_parts[2] is None:
if isinstance(value, dict):
- # simple dict passed into 'Package-1-extras' e.g. via REST i/f
+ # simple dict passed into 'Dataset-1-extras' e.g. via REST i/f
extra_fields.extend(value.items())
elif key_parts[2].startswith('newfield'):
newfield_match = self.newfield_re.match(key_parts[2])
@@ -694,13 +694,13 @@
append_set = (new_set - old_set).intersection(editable_set)
remove_set = (old_set - new_set).intersection(editable_set)
- # Create package group associations.
+ # Create dataset group associations.
for id in append_set:
group = model.Session.query(model.Group).autoflush(False).get(id)
if group:
self.parent.model.groups.append(group)
- # Delete package group associations.
+ # Delete dataset group associations.
for group in self.parent.model.groups:
if group.id in remove_set:
self.parent.model.groups.remove(group)
--- a/ckan/logic/validators.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/logic/validators.py Mon Sep 05 15:41:29 2011 +0100
@@ -29,7 +29,7 @@
result = session.query(model.Package).get(value)
if not result:
- raise Invalid(_('Package was not found.'))
+ raise Invalid(_('Dataset was not found.'))
return value
def package_name_exists(value, context):
@@ -40,7 +40,7 @@
result = session.query(model.Package).filter_by(name=value).first()
if not result:
- raise Invalid(_('Package with name %r does not exist.') % str(value))
+ raise Invalid(_('Dataset with name %r does not exist.') % str(value))
return value
def package_id_or_name_exists(value, context):
@@ -55,7 +55,7 @@
result = session.query(model.Package).filter_by(name=value).first()
if not result:
- raise Invalid(_('Package was not found.'))
+ raise Invalid(_('Dataset was not found.'))
return result.id
@@ -88,7 +88,7 @@
query = query.filter(model.Package.id <> package_id)
result = query.first()
if result:
- errors[key].append(_('Package name already exists in database'))
+ errors[key].append(_('Dataset name already exists in database'))
def duplicate_extras_key(key, data, errors, context):
--- a/ckan/templates/group/edit_form.html Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/templates/group/edit_form.html Mon Sep 05 15:41:29 2011 +0100
@@ -10,8 +10,8 @@
<legend>Datasets</legend><ul py:for="pkg in c.fieldset.model.packages"><li>
- <input checked="checked" id="Group-datasets-current" name="Group-datasets-current" type="checkbox" value="${pkg.name}" />
- <label for="Group-datasets_${pkg.name}" style="display: inline;">${pkg.name}</label>
+ <input checked="checked" id="Group-datasets-current" name="Group-packages-current" type="checkbox" value="${pkg.name}" />
+ <label for="Group-packages_${pkg.name}" style="display: inline;">${pkg.name}</label></li></ul><p py:if="not c.fieldset.model.packages">There are no datasets currently in this group.</p>
--- a/ckan/templates/group/new_group_form.html Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/templates/group/new_group_form.html Mon Sep 05 15:41:29 2011 +0100
@@ -66,9 +66,9 @@
<legend>Datasets</legend><dl py:if="data.get('packages')"><py:for each="num, package in enumerate(data.get('packages'))">
- <dt><input checked="checked" id="datasets__${num}__name" name="datasets__${num}__name" type="checkbox" value="${package['name']}"/></dt>
+ <dt><input checked="checked" id="datasets__${num}__name" name="packages__${num}__name" type="checkbox" value="${package['name']}"/></dt><dd>
- <label for="datasets__${num}__name">${package['name']}</label>
+ <label for="packages__${num}__name">${package['name']}</label></dd></py:for></dl>
@@ -80,8 +80,8 @@
Add datasets
</legend><dl>
- <dt><label class="field_opt" for="datasets__${len(data.get('packages', []))}__name">Dataset</label></dt>
- <dd><input class="autocomplete-dataset" id="datasets__${len(data.get('packages', []))}__name" name="datasets__${len(data.get('packages', []))}__name" type="text" /></dd>
+ <dt><label class="field_opt" for="packages__${len(data.get('packages', []))}__name">Dataset</label></dt>
+ <dd><input class="autocomplete-dataset" id="datasets__${len(data.get('packages', []))}__name" name="packages__${len(data.get('packages', []))}__name" type="text" /></dd></dl></fieldset>
--- a/ckan/templates/package/form_extra_fields.html Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/templates/package/form_extra_fields.html Mon Sep 05 15:41:29 2011 +0100
@@ -38,8 +38,8 @@
</thead><tbody><tr>
- <td><input name="Dataset- -extras-newfield0-key" type="text" value="" /></td>
- <td><input name="Dataset- -extras-newfield0-value" type="text" class="short" value="" /></td>
+ <td><input name="Package- -extras-newfield0-key" type="text" value="" /></td>
+ <td><input name="Package- -extras-newfield0-value" type="text" class="short" value="" /></td></tr></tbody></table>
--- a/ckan/tests/functional/test_edit_authz.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/tests/functional/test_edit_authz.py Mon Sep 05 15:41:29 2011 +0100
@@ -57,7 +57,7 @@
model.repo.new_revision()
- self.pkg = u'package'
+ self.pkg = u'dataset'
pkg = model.Package(name=self.pkg)
model.Session.add(pkg)
--- a/ckan/tests/functional/test_group.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/tests/functional/test_group.py Mon Sep 05 15:41:29 2011 +0100
@@ -79,10 +79,10 @@
assert 'Administrators' in res, res
assert 'russianfan' in main_res, main_res
assert name in res, res
- assert 'There are 2 packages in this group' in self.strip_tags(main_res), main_res
+ assert 'There are 2 datasets in this group' in self.strip_tags(main_res), main_res
pkg = model.Package.by_name(pkgname)
res = res.click(pkg.title)
- assert '%s - Data Packages' % pkg.title in res
+ assert '%s - Datasets' % pkg.title in res
def test_read_plugin_hook(self):
plugin = MockGroupControllerPlugin()
@@ -165,11 +165,11 @@
assert group.title == newtitle, group
assert group.description == newdesc, group
- # now look at packages
+ # now look at datasets
assert len(group.packages) == 3
def test_3_edit_form_has_new_package(self):
- # check for package in autocomplete
+ # check for dataset in autocomplete
offset = url_for(controller='package', action='autocomplete', q='an')
res = self.app.get(offset, status=200, extra_environ={'REMOTE_USER': 'russianfan'})
assert 'annakarenina' in res, res
--- a/ckan/tests/functional/test_home.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/tests/functional/test_home.py Mon Sep 05 15:41:29 2011 +0100
@@ -24,7 +24,7 @@
offset = url_for('home')
res = self.app.get(offset)
print res
- assert 'Add a package' in res
+ assert 'Add a dataset' in res
def test_calculate_etag_hash(self):
c.user = 'test user'
--- a/ckan/tests/functional/test_package.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/tests/functional/test_package.py Mon Sep 05 15:41:29 2011 +0100
@@ -72,7 +72,7 @@
'''Inherit this in tests for these form testing methods'''
def _check_package_read(self, res, **params):
assert not 'Error' in res, res
- assert u'%s - Data Packages' % params['title'] in res, res
+ assert u'%s - Datasets' % params['title'] in res, res
main_res = self.main_div(res)
main_div = main_res
main_div_str = main_div.encode('utf8')
@@ -80,7 +80,7 @@
assert params['title'] in main_div, main_div_str
assert params['version'] in main_div, main_div_str
self.check_named_element(main_div, 'a', 'href="%s"' % params['url'])
- prefix = 'Package-%s-' % params.get('id', '')
+ prefix = 'Dataset-%s-' % params.get('id', '')
for res_index, values in self._get_resource_values(params['resources'], by_resource=True):
self.check_named_element(main_div, 'tr', *values)
assert params['notes'] in main_div, main_div_str
@@ -215,7 +215,7 @@
then assume redirect is specified in pylons config
@param expected_redirect - url we expect to redirect to (but <NAME>
not yet substituted)
- @param pkg_name_to_edit - '' means create a new package
+ @param pkg_name_to_edit - '' means create a new dataset
'''
try:
new_name = u'new-name'
@@ -234,13 +234,13 @@
offset_params['return_to'] = return_url_param
offset = url_for(**offset_params)
res = self.app.get(offset)
- assert 'Packages -' in res
- fv = res.forms['package-edit']
+ assert 'Datasets -' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
res = fv.submit('preview')
assert not 'Error' in res, res
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
res = fv.submit('save', status=302)
assert not 'Error' in res, res
redirected_to = dict(res.headers).get('Location') or dict(res.headers)['location']
@@ -276,7 +276,7 @@
offset = url_for(controller='package', action='search')
res = self.app.get(offset)
res = res.click('Register it now')
- assert 'New - Data Packages' in res
+ assert 'New - Datasets' in res
def test_read(self):
name = u'annakarenina'
@@ -351,12 +351,12 @@
assert 'decoy"' not in res, res
#res = self.app.get(offset)
- #assert 'Packages' in res
+ #assert 'Datasets' in res
#name = u'annakarenina'
#title = u'A Novel By Tolstoy'
#assert title in res
#res = res.click(title)
- #assert '%s - Data Packages' % title in res, res
+ #assert '%s - Datasets' % title in res, res
#main_div = self.main_div(res)
#assert title in main_div, main_div.encode('utf8')
@@ -433,7 +433,7 @@
cls.today = datetime.datetime.now()
cls.pkg_name = u'testpkg'
- # create package
+ # create dataset
rev = model.repo.new_revision()
rev.timestamp = cls.date1
pkg = model.Package(name=cls.pkg_name, title=u'title1')
@@ -441,7 +441,7 @@
model.setup_default_user_roles(pkg)
model.repo.commit_and_remove()
- # edit package
+ # edit dataset
rev = model.repo.new_revision()
rev.timestamp = cls.date2
pkg = model.Package.by_name(cls.pkg_name)
@@ -450,7 +450,7 @@
pkg.extras = {'key2': u'value2'}
model.repo.commit_and_remove()
- # edit package again
+ # edit dataset again
rev = model.repo.new_revision()
rev.timestamp = cls.date3
pkg = model.Package.by_name(cls.pkg_name)
@@ -472,7 +472,7 @@
def test_read_normally(self):
res = self.app.get(self.offset, status=200)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'PKG', pkg_html
assert 'title3' in res
@@ -485,7 +485,7 @@
def test_read_date1(self):
offset = self.offset + self.date1.strftime('@%Y-%m-%d')
res = self.app.get(offset, status=200)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
assert 'title1' in res, res
assert 'key2' not in pkg_html, pkg_html
@@ -497,7 +497,7 @@
date2_plus_3h = self.date2 + datetime.timedelta(hours=3)
offset = self.offset + date2_plus_3h.strftime('@%Y-%m-%d')
res = self.app.get(offset, status=200)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'PKG', pkg_html
assert 'title2' in res
@@ -510,7 +510,7 @@
def test_read_date3(self):
offset = self.offset + self.date3.strftime('@%Y-%m-%d-%H-%M')
res = self.app.get(offset, status=200)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'PKG', pkg_html
assert 'title3' in res
@@ -536,10 +536,10 @@
offset = self.offset + '@%s' % self.revision_ids[0]
res = self.app.get(offset, status=200)
main_html = self.main_div(res)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'MAIN', main_html
- assert 'This is an old revision of this package' in main_html
+ assert 'This is an old revision of this dataset' in main_html
assert 'at 2011-01-01 00:00' in main_html
self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
print 'PKG', pkg_html
@@ -554,10 +554,10 @@
offset = self.offset + '@%s' % self.revision_ids[1]
res = self.app.get(offset, status=200)
main_html = self.main_div(res)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'MAIN', main_html
- assert 'This is an old revision of this package' in main_html
+ assert 'This is an old revision of this dataset' in main_html
assert 'at 2011-01-02 00:00' in main_html
self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
print 'PKG', pkg_html
@@ -572,11 +572,11 @@
offset = self.offset + '@%s' % self.revision_ids[2]
res = self.app.get(offset, status=200)
main_html = self.main_div(res)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'MAIN', main_html
- assert 'This is an old revision of this package' not in main_html
- assert 'This is the current revision of this package' in main_html
+ assert 'This is an old revision of this dataset' not in main_html
+ assert 'This is the current revision of this dataset' in main_html
assert 'at 2011-01-03 00:00' in main_html
self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
print 'PKG', pkg_html
@@ -637,10 +637,10 @@
# just the absolute basics
try:
self.res = self.app.get(self.offset)
- assert 'Edit - Data Packages' in self.res, self.res
+ assert 'Edit - Datasets' in self.res, self.res
new_name = u'new-name'
new_title = u'New Title'
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
fv[prefix + 'title'] = new_title
@@ -649,7 +649,7 @@
res = res.follow()
offset = url_for(controller='package', action='read', id=new_name)
res = self.app.get(offset)
- assert '%s - Data Packages' % new_title in res, res
+ assert '%s - Datasets' % new_title in res, res
pkg = model.Package.by_name(new_name)
assert pkg
assert pkg.title == new_title
@@ -660,16 +660,16 @@
# just the key fields
try:
self.res = self.app.get(self.offset)
- assert 'Edit - Data Packages' in self.res, self.res
+ assert 'Edit - Datasets' in self.res, self.res
assert self.editpkg.notes in self.res
new_name = u'new-name'
- new_title = u'A Short Description of this Package'
+ new_title = u'A Short Description of this Dataset'
newurl = u'http://www.editpkgnewurl.com'
new_download_url = newurl + u'/download/'
newlicense_id = u'cc-by'
newversion = u'0.9b'
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
fv[prefix + 'title'] = new_title
@@ -683,7 +683,7 @@
model.Session.remove()
offset = url_for(controller='package', action='read', id=new_name)
res = self.app.get(offset)
- assert '%s - Data Packages' % new_title in res, res
+ assert '%s - Datasets' % new_title in res, res
pkg = model.Package.by_name(new_name)
assert pkg.title == new_title
assert pkg.url == newurl
@@ -699,11 +699,11 @@
offset = url_for(controller='package', action='edit', id=pkg.id)
res = self.app.get(offset)
#assert res.body == self.res.body, self.diff_responses(res, self.res)
- assert 'Edit - Data Packages' in res, res
+ assert 'Edit - Datasets' in res, res
assert pkg.name in res
new_name = u'new-name'
- new_title = u'A Short Description of this Package'
- fv = self.res.forms['package-edit']
+ new_title = u'A Short Description of this Dataset'
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
fv[prefix + 'title'] = new_title
@@ -712,7 +712,7 @@
res = res.follow()
offset = url_for(controller='package', action='read', id=new_name)
res = self.app.get(offset)
- assert '%s - Data Packages' % new_title in res, res
+ assert '%s - Datasets' % new_title in res, res
pkg = model.Package.by_name(new_name)
assert pkg
finally:
@@ -720,8 +720,8 @@
def test_edit_2_not_groups(self):
# not allowed to edit groups for now
- prefix = 'Package-%s-' % self.pkgid
- fv = self.res.forms['package-edit']
+ prefix = 'Dataset-%s-' % self.pkgid
+ fv = self.res.forms['dataset-edit']
assert not fv.fields.has_key(prefix + 'groups')
def test_edit_2_tags_and_groups(self):
@@ -729,7 +729,7 @@
newtagnames = [u'russian', u'tolstoy', u'superb']
newtags = newtagnames
tagvalues = ' '.join(newtags)
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'tag_string'] = tagvalues
exp_log_message = 'test_edit_2: making some changes'
@@ -737,7 +737,7 @@
res = fv.submit('save')
# get redirected ...
res = res.follow()
- assert '%s - Data Packages' % self.editpkg_name in res
+ assert '%s - Datasets' % self.editpkg_name in res
pkg = model.Package.by_name(self.editpkg.name)
assert len(pkg.tags) == len(newtagnames)
outtags = [ tag.name for tag in pkg.tags ]
@@ -759,12 +759,12 @@
u with umlaut \xc3\xbc
'''
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'url'] = newurl
fv[prefix + 'notes'] = newnotes
res = fv.submit('preview')
- assert 'Edit - Data Packages' in res
+ assert 'Edit - Datasets' in res
assert 'Preview' in res
assert 'Hello world' in res
self.check_tag_and_data(res, 'umlaut', u'\xfc')
@@ -773,11 +773,11 @@
def test_missing_fields(self):
# User edits and a field is left out in the commit parameters.
# (Spammers can cause this)
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
del fv.fields['log_message']
res = fv.submit('save', status=400)
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
del fv.fields[prefix + 'license_id']
res = fv.submit('save', status=400)
@@ -832,7 +832,7 @@
# Edit it
offset = url_for(controller='package', action='edit', id=pkg.name)
res = self.app.get(offset, status=200, extra_environ={'REMOTE_USER':'testadmin'})
- assert 'Edit - Data Packages' in res, res
+ assert 'Edit - Datasets' in res, res
# Check form is correctly filled
pkg = model.Package.by_name(pkg_name)
@@ -856,7 +856,7 @@
extra_new = 'newkey', 'newvalue', False
log_message = 'This is a comment'
assert not model.Package.by_name(name)
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix+'name'] = name
fv[prefix+'title'] = title
@@ -903,13 +903,13 @@
state=state)
# Submit
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
res = fv.submit('save', extra_environ={'REMOTE_USER':'testadmin'})
- # Check package page
+ # Check dataset page
assert not 'Error' in res, res
- # Check package object
+ # Check dataset object
pkg = model.Package.by_name(name)
assert pkg.name == name
assert pkg.title == title
@@ -936,14 +936,14 @@
assert rev.author == 'testadmin', rev.author
assert rev.message == log_message
# TODO: reinstate once fixed in code
- exp_log_message = u'Creating package %s' % name
+ exp_log_message = u'Creating dataset %s' % name
#assert rev.message == exp_log_message
finally:
self._reset_data()
def test_edit_bad_log_message(self):
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv['log_message'] = u'Free enlargements: http://drugs.com/' # spam
res = fv.submit('preview')
@@ -957,7 +957,7 @@
assert 'No links are allowed' in res, res
def test_edit_bad_name(self):
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = u'a' # invalid name
res = fv.submit('preview')
@@ -981,7 +981,7 @@
res = self.app.get(self.offset)
new_name = u'new-name'
new_title = u'New Title'
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
fv[prefix + 'title'] = new_title
@@ -1000,7 +1000,7 @@
offset = url_for(controller='package', action='edit', id=pkg.name)
res = self.app.get(offset)
prefix = ''
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
name = prefix + 'groups__0__id'
# XXX the following assertion fails since upgrade to
# sqlalchemy 0.6.5; apparently outer joins are handled
@@ -1027,7 +1027,7 @@
prefix = ''
field_name = prefix + "groups__0__id"
assert field_name in res
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
fv[prefix + 'groups__0__id'] = grp.id
res = fv.submit('preview', extra_environ={'REMOTE_USER':'russianfan'})
assert not 'error' in res
@@ -1053,7 +1053,7 @@
res = self.app.get(offset, extra_environ={'REMOTE_USER':'russianfan'})
prefix = ''
field_name = prefix + "groups__0__id"
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
print field_name
fv[field_name] = False
res = fv.submit('save', extra_environ={'REMOTE_USER':'russianfan'})
@@ -1084,17 +1084,17 @@
offset = url_for(controller='package', action='new',
url='http://xxx.org', name='xxx.org')
res = self.app.get(offset)
- form = res.forms['package-edit']
+ form = res.forms['dataset-edit']
assert_equal(form['url'].value, 'http://xxx.org')
assert_equal(form['name'].value, 'xxx.org')
def test_new_without_resource(self):
- # new package
+ # new dataset
prefix = ''
name = u'test_no_res'
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
fv[prefix+'name'] = name
res = fv.submit('preview')
assert not 'Error' in res, res
@@ -1104,11 +1104,11 @@
assert '<td><a href="">' not in res1, res1
# submit
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
self.pkg_names.append(name)
res = fv.submit('save')
- # check package page
+ # check dataset page
assert not 'Error' in res, res
res = res.follow()
res1 = self.main_div(res).replace('</strong>', '')
@@ -1124,8 +1124,8 @@
assert not model.Package.by_name(u'annakarenina')
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = 'annakarenina'
self.pkg_names.append('annakarenina')
@@ -1135,8 +1135,8 @@
def test_new_bad_name(self):
offset = url_for(controller='package', action='new', id=None)
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = u'a' # invalid name
res = fv.submit('preview')
@@ -1179,8 +1179,8 @@
assert not model.Package.by_name(name)
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix+'name'] = name
fv[prefix+'title'] = title
@@ -1222,14 +1222,14 @@
log_message=log_message,
)
# Submit
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
self.pkg_names.append(name)
res = fv.submit('save')
- # Check package page
+ # Check dataset page
assert not 'Error' in res, res
- # Check package object
+ # Check dataset object
pkg = model.Package.by_name(name)
assert pkg.name == name
assert pkg.title == title
@@ -1253,37 +1253,37 @@
assert rev.author == 'Unknown IP Address'
assert rev.message == log_message
# TODO: reinstate once fixed in code
- exp_log_message = u'Creating package %s' % name
+ exp_log_message = u'Creating dataset %s' % name
# assert rev.message == exp_log_message
def test_new_existing_name(self):
- # test creating a package with an existing name results in error'
- # create initial package
+ # test creating a dataset with an existing name results in error'
+ # create initial dataset
pkgname = u'testpkg'
pkgtitle = u'mytesttitle'
assert not model.Package.by_name(pkgname)
offset = url_for(controller='package', action='new', id=None)
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = pkgname
self.pkg_names.append(pkgname)
res = fv.submit('save')
assert not 'Error' in res, res
assert model.Package.by_name(pkgname)
- # create duplicate package
+ # create duplicate dataset
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
fv[prefix+'name'] = pkgname
fv[prefix+'title'] = pkgtitle
res = fv.submit('preview')
assert 'Preview' in res
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
res = fv.submit('save')
assert 'Error' in res, res
- assert 'Package name already exists in database' in res, res
+ assert 'Dataset name already exists in database' in res, res
self._assert_form_errors(res)
def test_missing_fields(self):
@@ -1291,9 +1291,9 @@
# (Spammers can cause this)
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res, res
+ assert 'New - Datasets' in res, res
prefix = ''
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
fv[prefix + 'name'] = 'anything'
del fv.fields['log_message']
self.pkg_names.append('anything')
@@ -1301,8 +1301,8 @@
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
fv[prefix + 'name'] = 'anything'
prefix = ''
del fv.fields[prefix + 'notes']
@@ -1315,8 +1315,8 @@
# ticket:276
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = 'name276'
resformat = u'xls'
@@ -1333,7 +1333,7 @@
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
new_name = u'plugged'
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
res = fv.submit('save')
@@ -1361,8 +1361,8 @@
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = self.pkgname
fv[prefix + 'title'] = self.pkgtitle
@@ -1418,11 +1418,11 @@
offset = url_for(controller='package', action='search')
res = self.app.get(offset)
assert 'Search - ' in res
- form = res.forms['package-search']
+ form = res.forms['dataset-search']
form['q'] = str(self.non_active_name)
results_page = form.submit()
assert 'Search - ' in results_page, results_page
- assert '<strong>0</strong> packages found' in results_page, (self.non_active_name, results_page)
+ assert '<strong>0</strong> datasets found' in results_page, (self.non_active_name, results_page)
class TestRevisions(TestPackageBase):
@@ -1472,7 +1472,7 @@
def test_1_do_diff(self):
res = self.app.get(self.offset)
- form = res.forms['package-revisions']
+ form = res.forms['dataset-revisions']
res = form.submit()
res = res.follow()
main_res = self.main_div(res)
@@ -1499,7 +1499,7 @@
url = str(self.revision_timestamps[1])[-6:]
res = res.click(href=url)
main_html = self.main_div(res)
- assert 'This is an old revision of this package' in main_html
+ assert 'This is an old revision of this dataset' in main_html
assert 'at %s' % str(self.revision_timestamps[1])[:6] in main_html
--- a/ckan/tests/functional/test_package_relationships.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/tests/functional/test_package_relationships.py Mon Sep 05 15:41:29 2011 +0100
@@ -18,7 +18,7 @@
offset = url_for(controller='package', action='read', id=pkg_name)
res = self.app.get(offset)
pkg = model.Package.by_name(pkg_name)
- assert '%s - Data Packages' % pkg.title in res
+ assert '%s - Datasets' % pkg.title in res
return res
res = read_package(u'homer')
self.check_named_element(res, 'li', 'is a child of', 'abraham')
--- a/ckan/tests/functional/test_revision.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/tests/functional/test_revision.py Mon Sep 05 15:41:29 2011 +0100
@@ -146,10 +146,10 @@
#assert 'Author:</strong> tester' in res
#assert 'Log Message:' in res
#assert 'Creating test data.' in res
- #assert 'Package: annakarenina' in res
- #assert "Packages' Tags" in res
+ #assert 'Dataset: annakarenina' in res
+ #assert "Datasets' Tags" in res
#res = res.click('annakarenina', index=0)
- #assert 'Packages - annakarenina' in res
+ #assert 'Datasets - annakarenina' in res
def test_list_format_atom(self):
self.create_40_revisions()
--- a/ckan/tests/functional/test_user.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/tests/functional/test_user.py Mon Sep 05 15:41:29 2011 +0100
@@ -55,7 +55,7 @@
'rel="nofollow"')
assert 'Edit' not in main_res, main_res
assert 'Number of edits:</strong> 3' in res, res
- assert 'Number of packages administered:</strong> 1' in res, res
+ assert 'Number of datasets administered:</strong> 1' in res, res
assert 'Revision History' in res, res
def test_user_read_without_id(self):
--- a/ckan/tests/lib/test_dictization_schema.py Mon Sep 05 13:03:45 2011 +0100
+++ b/ckan/tests/lib/test_dictization_schema.py Mon Sep 05 15:41:29 2011 +0100
@@ -102,7 +102,7 @@
converted_data, errors = validate(data, default_package_schema(), context)
assert errors == {
- 'name': [u'Package name already exists in database'],
+ 'name': [u'Dataset name already exists in database'],
'resources': [{},
{'url': [u'Missing value']}]
}, pformat(errors)
@@ -156,5 +156,5 @@
data["packages"][1].pop("name")
converted_data, errors = validate(data, default_group_schema(), context)
- assert errors == {'packages': [{'id': [u'Package was not found.']}, {'id': [u'Missing value']}]} , pformat(errors)
+ assert errors == {'packages': [{'id': [u'Dataset was not found.']}, {'id': [u'Missing value']}]} , pformat(errors)
http://bitbucket.org/okfn/ckan/changeset/4b7faa201c79/
changeset: 4b7faa201c79
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 16:47:55
summary: [rename][xs]: Stripping some old forms.css & autocomplete.js imports that had snuck back in.
affected #: 4 files (1.2 KB)
--- a/ckan/templates/group/edit.html Mon Sep 05 15:41:29 2011 +0100
+++ b/ckan/templates/group/edit.html Mon Sep 05 15:47:55 2011 +0100
@@ -5,14 +5,6 @@
<py:def function="page_title">${c.grouptitle or c.groupname} - Edit - Groups</py:def><py:def function="page_heading">Edit: ${c.grouptitle or c.groupname}</py:def>
- <py:def function="optional_head">
- <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
-
- <!-- Dataset autocomplete -->
- <script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script>
- <script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script>
- <link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" />
- </py:def><div py:match="content">
${Markup(c.form)}
--- a/ckan/templates/group/new.html Mon Sep 05 15:41:29 2011 +0100
+++ b/ckan/templates/group/new.html Mon Sep 05 15:47:55 2011 +0100
@@ -5,15 +5,6 @@
<py:def function="page_title">New - Groups</py:def><py:def function="page_heading">New Group</py:def>
- <py:def function="optional_head">
- <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
-
- <!-- Dataset autocomplete and rack-up -->
- <script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script>
- <script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script>
- <link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" />
- </py:def>
-
<div py:match="content">
${Markup(c.form)}
</div>
--- a/ckan/templates/user/edit.html Mon Sep 05 15:41:29 2011 +0100
+++ b/ckan/templates/user/edit.html Mon Sep 05 15:47:55 2011 +0100
@@ -8,10 +8,6 @@
Edit User: ${c.userobj.display_name}
</py:def>
- <py:def function="optional_head">
- <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
- </py:def>
-
<div py:match="content"><a href="#preview" py:if="c.preview">(skip to preview)</a>
--- a/ckan/templates/user/new.html Mon Sep 05 15:41:29 2011 +0100
+++ b/ckan/templates/user/new.html Mon Sep 05 15:47:55 2011 +0100
@@ -2,10 +2,6 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="optional_head">
- <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
- </py:def>
-
<py:match path="primarysidebar"><li class="widget-container widget_text"><h3>Have an OpenID?</h3>
http://bitbucket.org/okfn/ckan/changeset/4544dc5fe6be/
changeset: 4544dc5fe6be
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 16:51:15
summary: [rename][xs]: Redirecting robots.txt to follow the rest.
affected #: 1 file (0 bytes)
--- a/ckan/public/robots.txt Mon Sep 05 15:47:55 2011 +0100
+++ b/ckan/public/robots.txt Mon Sep 05 15:51:15 2011 +0100
@@ -1,7 +1,7 @@
User-agent: *
-Disallow: /package/rate/
+Disallow: /dataset/rate/
Disallow: /revision/
-Disallow: /package/*/history
+Disallow: /dataset/*/history
Disallow: /api/
User-Agent: *
http://bitbucket.org/okfn/ckan/changeset/7a23abe6a3cb/
changeset: 7a23abe6a3cb
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 16:56:26
summary: [rename][xs]: Glitchfix to link broken during license page removal.
affected #: 1 file (16 bytes)
--- a/ckan/templates/package/new_package_form.html Mon Sep 05 15:51:15 2011 +0100
+++ b/ckan/templates/package/new_package_form.html Mon Sep 05 15:56:26 2011 +0100
@@ -210,7 +210,7 @@
<p class="hints"><strong>Important:</strong> By submitting content, you agree to release your contributions
- under the open license specified on the <a href="/license">license page</a>. Please <strong>refrain</strong> from editing this page if you are <strong>not</strong> happy to do this.
+ under the <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open Database License</a>. Please <strong>refrain</strong> from editing this page if you are <strong>not</strong> happy to do this.
</p>
http://bitbucket.org/okfn/ckan/changeset/744ae2e290f1/
changeset: 744ae2e290f1
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 17:21:44
summary: [rename][s]: Updated deployment.ini_tmpl and lib/cli.py to respect new naming convention.
affected #: 2 files (0 bytes)
--- a/ckan/config/deployment.ini_tmpl Mon Sep 05 15:56:26 2011 +0100
+++ b/ckan/config/deployment.ini_tmpl Mon Sep 05 16:21:44 2011 +0100
@@ -74,16 +74,16 @@
# CKAN QoS monitoring
ckan.enable_call_timing = false
-# Location of RDF versions of packages
+# Location of RDF versions of datasets
#rdf_packages = http://semantic.ckan.net/record/
-# Location of licenses group (defaults to local Python licenses package)
+# Location of licenses group (defaults to local Python licenses dataset)
#licenses_group_url = http://licenses.opendefinition.org/2.0/ckan_original
-# Package form to use
+# Dataset form to use
package_form = standard
-# Hide certain extras fields from package read form:
+# Hide certain extras fields from dataset read form:
# package_hide_extras = for_search_index_only
# API configuration
@@ -103,9 +103,9 @@
# extra_template_paths = %(here)s/my-templates
# extra_public_paths = %(here)s/my-public
-# Package form integration
-#package_edit_return_url = http://another.frontend/package/<NAME>
-#package_new_return_url = http://another.frontend/package/<NAME>
+# Dataset form integration
+#package_edit_return_url = http://another.frontend/dataset/<NAME>
+#package_new_return_url = http://another.frontend/dataset/<NAME>
# Turn on messaging with carrot, default to false
--- a/ckan/lib/cli.py Mon Sep 05 15:56:26 2011 +0100
+++ b/ckan/lib/cli.py Mon Sep 05 16:21:44 2011 +0100
@@ -61,7 +61,7 @@
db clean
db upgrade [{version no.}] # Data migrate
db dump {file-path} # dump to a pg_dump file
- db dump-rdf {package-name} {file-path}
+ db dump-rdf {dataset-name} {file-path}
db simple-dump-csv {file-path}
db simple-dump-json {file-path}
db send-rdf {talis-store} {username} {password}
@@ -199,7 +199,7 @@
def dump_rdf(self, cmd):
if len(self.args) < 3:
- print 'Need package name and rdf file path'
+ print 'Need dataset name and rdf file path'
return
package_name = self.args[1]
rdf_path = self.args[2]
@@ -207,7 +207,7 @@
import ckan.lib.rdf as rdf
pkg = model.Package.by_name(unicode(package_name))
if not pkg:
- print 'Package name "%s" does not exist' % package_name
+ print 'Dataset name "%s" does not exist' % package_name
return
rdf = rdf.RdfExporter().export_package(pkg)
f = open(rdf_path, 'w')
@@ -227,12 +227,12 @@
class SearchIndexCommand(CkanCommand):
- '''Creates a search index for all packages
+ '''Creates a search index for all datasets
Usage:
- search-index rebuild - indexes all packages (default)
- search-index check - checks for packages not indexed
- search-index show {package-name} - shows index of a package
+ search-index rebuild - indexes all datasets (default)
+ search-index check - checks for datasets not indexed
+ search-index show {dataset-name} - shows index of a dataset
'''
summary = __doc__.split('\n')[0]
@@ -265,7 +265,7 @@
class Notification(CkanCommand):
'''Send out modification notifications.
- In "replay" mode, an update signal is sent for each package in the database.
+ In "replay" mode, an update signal is sent for each dataset in the database.
Usage:
notify replay - send out modification signals
@@ -716,39 +716,39 @@
except UncommittedChangesException, inst:
print "There are uncommitted revisions (run 'changes commit')."
sys.exit(1)
- print ", ".join(["%s %s packages" % (key, len(val)) for (key, val) in report.items()])
+ print ", ".join(["%s %s datasets" % (key, len(val)) for (key, val) in report.items()])
if report['created']:
print ""
- print "The following packages have been created:"
+ print "The following datasets have been created:"
names = []
for entity in report['created']:
if not entity:
continue
if entity.name in names:
continue
- print "package: %s" % entity.name
+ print "dataset: %s" % entity.name
names.append(entity.name)
if report['updated']:
print ""
- print "The following packages have been updated:"
+ print "The following datasets have been updated:"
names = []
for entity in report['updated']:
if not entity:
continue
if entity.name in names:
continue
- print "package: %s" % entity.name
+ print "dataset: %s" % entity.name
names.append(entity.name)
if report['deleted']:
print ""
- print "The following packages have been deleted:"
+ print "The following datasets have been deleted:"
names = []
for entity in report['deleted']:
if not entity:
continue
if entity.name in names:
continue
- print "package: %s" % entity.name
+ print "dataset: %s" % entity.name
names.append(entity.name)
def moderate_changeset_apply(self, changeset):
http://bitbucket.org/okfn/ckan/changeset/808f2279474f/
changeset: 808f2279474f
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 18:06:18
summary: [rename][m]: Updated the documentation to reflect the rename.
affected #: 10 files (3 bytes)
--- a/doc/api.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/api.rst Mon Sep 05 17:06:18 2011 +0100
@@ -53,7 +53,7 @@
These are very similar, but when the API returns a reference to an object, Version 1 API will return the Name of the object (e.g. "river-pollution") and Version 2 API will return the ID of the object (e.g. "a3dd8f64-9078-4f04-845c-e3f047125028").
-The reason for this is that Names can change, so to reliably refer to the same package every time, you will want to use the ID and therefore use API v2. Alternatively, many people prefer to deal with Names, so API v1 suits them.
+The reason for this is that Names can change, so to reliably refer to the same dataset every time, you will want to use the ID and therefore use API v2. Alternatively, many people prefer to deal with Names, so API v1 suits them.
When making requests, you can call objects by either their Name or ID, interchangeably.
@@ -121,9 +121,9 @@
+--------------------------------+-------------------------------------------------------------------+
| Model Resource | Location |
+================================+===================================================================+
-| Package Register | ``/rest/package`` |
+| Dataset Register | ``/rest/dataset`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Entity | ``/rest/package/PACKAGE-REF`` |
+| Dataset Entity | ``/rest/dataset/DATASET-REF`` |
+--------------------------------+-------------------------------------------------------------------+
| Group Register | ``/rest/group`` |
+--------------------------------+-------------------------------------------------------------------+
@@ -135,15 +135,15 @@
+--------------------------------+-------------------------------------------------------------------+
| Rating Register | ``/rest/rating`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Relationships Register | ``/rest/package/PACKAGE-REF/relationships`` |
+| Dataset Relationships Register | ``/rest/dataset/DATASET-REF/relationships`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Relationships Register | ``/rest/package/PACKAGE-REF/RELATIONSHIP-TYPE`` |
+| Dataset Relationships Register | ``/rest/dataset/DATASET-REF/RELATIONSHIP-TYPE`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Relationships Register | ``/rest/package/PACKAGE-REF/relationships/PACKAGE-REF`` |
+| Dataset Relationships Register | ``/rest/dataset/DATASET-REF/relationships/DATASET-REF`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Relationship Entity | ``/rest/package/PACKAGE-REF/RELATIONSHIP-TYPE/PACKAGE-REF`` |
+| Dataset Relationship Entity | ``/rest/dataset/DATASET-REF/RELATIONSHIP-TYPE/DATASET-REF`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package\'s Revisions Entity | ``/rest/package/PACKAGE-REF/revisions`` |
+| Dataset\'s Revisions Entity | ``/rest/dataset/DATASET-REF/revisions`` |
+--------------------------------+-------------------------------------------------------------------+
| Revision Register | ``/rest/revision`` |
+--------------------------------+-------------------------------------------------------------------+
@@ -152,7 +152,7 @@
| License List | ``/rest/licenses`` |
+--------------------------------+-------------------------------------------------------------------+
-Possible values for PACKAGE-REF are the package id, or the current package name.
+Possible values for DATASET-REF are the dataset id, or the current dataset name.
Possible values for RELATIONSHIP-TYPE are described in the Relationship-Type data format.
@@ -165,13 +165,13 @@
+-------------------------------+--------+------------------+-------------------+
| Resource | Method | Request | Response |
+===============================+========+==================+===================+
-| Package Register | GET | | Package-List |
+| Dataset Register | GET | | Dataset-List |
+-------------------------------+--------+------------------+-------------------+
-| Package Register | POST | Package | |
+| Dataset Register | POST | Dataset | |
+-------------------------------+--------+------------------+-------------------+
-| Package Entity | GET | | Package |
+| Dataset Entity | GET | | Dataset |
+-------------------------------+--------+------------------+-------------------+
-| Package Entity | PUT | Package | |
+| Dataset Entity | PUT | Dataset | |
+-------------------------------+--------+------------------+-------------------+
| Group Register | GET | | Group-List |
+-------------------------------+--------+------------------+-------------------+
@@ -183,19 +183,19 @@
+-------------------------------+--------+------------------+-------------------+
| Tag Register | GET | | Tag-List |
+-------------------------------+--------+------------------+-------------------+
-| Tag Entity | GET | | Package-List |
+| Tag Entity | GET | | Dataset-List |
+-------------------------------+--------+------------------+-------------------+
| Rating Register | POST | Rating | |
+-------------------------------+--------+------------------+-------------------+
| Rating Entity | GET | | Rating |
+-------------------------------+--------+------------------+-------------------+
-| Package Relationships Register| GET | | Pkg-Relationships |
+| Dataset Relationships Register| GET | | Pkg-Relationships |
+-------------------------------+--------+------------------+-------------------+
-| Package Relationship Entity | GET | | Pkg-Relationship |
+| Dataset Relationship Entity | GET | | Pkg-Relationship |
+-------------------------------+--------+------------------+-------------------+
-| Package Relationship Entity | PUT | Pkg-Relationship | |
+| Dataset Relationship Entity | PUT | Pkg-Relationship | |
+-------------------------------+--------+------------------+-------------------+
-| Package\'s Revisions Entity | GET | | Pkg-Revisions |
+| Dataset\'s Revisions Entity | GET | | Pkg-Revisions |
+-------------------------------+--------+------------------+-------------------+
| Revision List | GET | | Revision-List |
+-------------------------------+--------+------------------+-------------------+
@@ -215,17 +215,17 @@
Here are the data formats for the Model API.
-.. |format-package-ref| replace:: Package-Ref
+.. |format-dataset-ref| replace:: Dataset-Ref
-.. |format-package-register| replace:: [ |format-package-ref|, |format-package-ref|, |format-package-ref|, ... ]
+.. |format-dataset-register| replace:: [ |format-dataset-ref|, |format-dataset-ref|, |format-dataset-ref|, ... ]
-.. |format-package-entity| replace:: { id: Uuid, name: Name-String, title: String, version: String, url: String, resources: [ Resource, Resource, ...], author: String, author_email: String, maintainer: String, maintainer_email: String, license_id: String, tags: Tag-List, notes: String, extras: { Name-String: String, ... } }
+.. |format-dataset-entity| replace:: { id: Uuid, name: Name-String, title: String, version: String, url: String, resources: [ Resource, Resource, ...], author: String, author_email: String, maintainer: String, maintainer_email: String, license_id: String, tags: Tag-List, notes: String, extras: { Name-String: String, ... } }
.. |format-group-ref| replace:: Group-Ref
.. |format-group-register| replace:: [ |format-group-ref|, |format-group-ref|, |format-group-ref|, ... ]
-.. |format-group-entity| replace:: { name: Name-String, title: String, description: String, packages: Package-List }
+.. |format-group-entity| replace:: { name: Name-String, title: String, description: String, datasets: Dataset-List }
To send request data, create the JSON-format string (encode in UTF8) put it in the request body and send it using PUT or POST.
@@ -238,7 +238,7 @@
* To delete an 'extra' key-value pair, supply the key with JSON value: ``null``
- * When you read a package then some additional information is supplied that cannot current be adjusted throught the CKAN API. This includes info on Package Relationship ('relationships'), Group membership ('groups'), ratings ('ratings_average' and 'ratings_count'), full URL of the package in CKAN ('ckan_url') and Package ID ('id'). This is purely a convenience for clients, and only forms part of the Package on GET.
+ * When you read a dataset then some additional information is supplied that cannot current be adjusted throught the CKAN API. This includes info on Dataset Relationship ('relationships'), Group membership ('groups'), ratings ('ratings_average' and 'ratings_count'), full URL of the dataset in CKAN ('ckan_url') and Dataset ID ('id'). This is purely a convenience for clients, and only forms part of the Dataset on GET.
Search API
~~~~~~~~~~
@@ -256,7 +256,7 @@
+---------------------------+--------------------------+
| Search Resource | Location |
+===========================+==========================+
-| Package Search | ``/search/package`` |
+| Dataset Search | ``/search/dataset`` |
+---------------------------+--------------------------+
| Resource Search | ``/search/resource`` |
+---------------------------+--------------------------+
@@ -265,7 +265,7 @@
| Tag Counts | ``/tag_counts`` |
+---------------------------+--------------------------+
-See below for more information about package and revision search parameters.
+See below for more information about dataset and revision search parameters.
Search Methods
``````````````
@@ -275,7 +275,7 @@
+-------------------------------+--------+------------------------+--------------------------+
| Resource | Method | Request | Response |
+===============================+========+========================+==========================+
-| Package Search | POST | Package-Search-Params | Package-Search-Response |
+| Dataset Search | POST | Dataset-Search-Params | Dataset-Search-Response |
+-------------------------------+--------+------------------------+--------------------------+
| Resource Search | POST | Resource-Search-Params | Resource-Search-Response |
+-------------------------------+--------+------------------------+--------------------------+
@@ -285,7 +285,7 @@
+-------------------------------+--------+------------------------+--------------------------+
It is also possible to supply the search parameters in the URL of a GET request,
-for example ``/api/search/package?q=geodata&allfields=1``.
+for example ``/api/search/dataset?q=geodata&allfields=1``.
Search Formats
``````````````
@@ -295,11 +295,11 @@
+-------------------------+------------------------------------------------------------+
| Name | Format |
+=========================+============================================================+
-| Package-Search-Params | { Param-Key: Param-Value, Param-Key: Param-Value, ... } |
+| Dataset-Search-Params | { Param-Key: Param-Value, Param-Key: Param-Value, ... } |
| Resource-Search-Params | See below for full details of search parameters across the |
| Revision-Search-Params | various domain objects. |
+-------------------------+------------------------------------------------------------+
-| Package-Search-Response | { count: Count-int, results: [Package, Package, ... ] } |
+| Dataset-Search-Response | { count: Count-int, results: [Dataset, Dataset, ... ] } |
+-------------------------+------------------------------------------------------------+
| Resource-Search-Response| { count: Count-int, results: [Resource, Resource, ... ] } |
+-------------------------+------------------------------------------------------------+
@@ -309,14 +309,14 @@
| Tag-Count-List | [ [Name-String, Integer], [Name-String, Integer], ... ] |
+-------------------------+------------------------------------------------------------+
-The ``Package`` and ``Revision`` data formats are as defined in `Model Formats`_.
+The ``Dataset`` and ``Revision`` data formats are as defined in `Model Formats`_.
-**Package Parameters**
+**Dataset Parameters**
+-----------------------+---------------+----------------------------------+----------------------------------+
| Param-Key | Param-Value | Examples | Notes |
+=======================+===============+==================================+==================================+
-| q | Search-String || q=geodata | Criteria to search the package |
+| q | Search-String || q=geodata | Criteria to search the dataset |
| | || q=government+sweden | fields for. URL-encoded search |
| | || q=%22drug%20abuse%22 | text. (You can also concatenate |
| | | | words with a '+' symbol in a |
@@ -344,8 +344,8 @@
| | limit=20) | | return. |
+-----------------------+---------------+----------------------------------+----------------------------------+
| all_fields | 0 (default) | all_fields=1 | Each matching search result is |
-| | or 1 | | given as either a package name |
-| | | | (0) or the full package record |
+| | or 1 | | given as either a dataset name |
+| | | | (0) or the full dataset record |
| | | | (1). |
+-----------------------+---------------+----------------------------------+----------------------------------+
| filter_by_openness | 0 (default) | filter_by_openness=1 | Filters results by ones which are|
@@ -360,7 +360,7 @@
+-----------------------+---------------+-----------------------------------------+----------------------------------+
| Param-Key | Param-Value | Example | Notes |
+=======================+===============+=========================================+==================================+
-| url, format, | Search-String || url=statistics.org | Criteria to search the package |
+| url, format, | Search-String || url=statistics.org | Criteria to search the dataset |
| description | || format=xls | fields for. URL-encoded search |
| | || description=Research+Institute | text. This search string must be |
| | | | found somewhere within the field |
@@ -458,12 +458,12 @@
Example normal request::
- GET /api/rest/package/pollution_stats
+ GET /api/rest/dataset/pollution_stats
returns: {"name": "pollution_stats", ... }
but now with the callback parameter::
- GET /api/rest/package/pollution_stats?callback=jsoncallback
+ GET /api/rest/dataset/pollution_stats?callback=jsoncallback
returns: jsoncallback({"name": "pollution_stats", ... });
This parameter can apply to all GET requests in the API.
@@ -473,30 +473,30 @@
~~~~~~~~
Some of CKAN's client-side Javascript code makes calls to the CKAN API. For
-example, to generate a suggestion for a package name when adding a new package
+example, to generate a suggestion for a dataset name when adding a new dataset
the following API call is made:
::
- /api/2/util/package/create_slug?title=Package+1+Title+Typed+So+Far
+ /api/2/util/dataset/create_slug?title=Dataset+1+Title+Typed+So+Far
The return value is a JSON data structure:
::
- {"valid": true, "name": "package_1_title_typed_so_far"}
+ {"valid": true, "name": "dataset_1_title_typed_so_far"}
These are the keys returned:
``valid``
Can be ``True`` or ``False``. It is ``true`` when the title entered can be
- successfully turned into a package name and when that package name is not
+ successfully turned into a dataset name and when that dataset name is not
already being used. It is ``false`` otherwise.
``name``
- The suggested name for the package, based on the title
+ The suggested name for the dataset, based on the title
You can also add ``callback=callback`` to have the response returned as JSONP. eg:
@@ -504,17 +504,17 @@
::
- /api/2/util/package/create_slug?title=Package+1+Title+Typed+So+Far&callback=callback
+ /api/2/util/dataset/create_slug?title=Dataset+1+Title+Typed+So+Far&callback=callback
Returns:
::
- callback({"valid": true, "name": "package_1_title_typed_so_far"});
+ callback({"valid": true, "name": "dataset_1_title_typed_so_far"});
In some CKAN deployments you may have the API deployed at a different domain
from the main CKAN code. In these circumstances you'll need to add a new option
-to the config file to tell the new package form where it should make its API
+to the config file to tell the new dataset form where it should make its API
requests to:
::
--- a/doc/authorization.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/authorization.rst Mon Sep 05 17:06:18 2011 +0100
@@ -16,11 +16,11 @@
Overview
--------
-In a nutshell: for a particular **object** (e.g. a package) a CKAN **user** can be assigned a **role** (e.g. editor) which allows permitted **actions** (e.g. read, edit).
+In a nutshell: for a particular **object** (e.g. a dataset) a CKAN **user** can be assigned a **role** (e.g. editor) which allows permitted **actions** (e.g. read, edit).
In more detail, these concepts are as follows:
-* There are **objects** to which access can be controlled, such as packages and groups.
+* There are **objects** to which access can be controlled, such as datasets and groups.
* For each object there are a set of relevant **actions**, such as create and edit, which users can perform on the object.
* To simplify mapping users to actions and objects, actions are aggregated into a set of **roles**. For example, an editor role would automatically have edit and read actions.
* Finally, CKAN has registered **users**.
@@ -29,25 +29,25 @@
+++++++
Permissions are controlled per object: access can be controlled for an individual
-package, group or authorization group instance. Current objects include
-**packages**, package **groups**, **authorization groups** and the **system**.
+dataset, group or authorization group instance. Current objects include
+**datasets**, dataset **groups**, **authorization groups** and the **system**.
-* A package is the basic CKAN concept of metadata about a dataset.
-* A group of packages can be set up to specify which users have permission to add or remove packages from the group.
-* Users can be assigned to authorization groups, to increase flexibility. Instead of specifying the privileges of specific users on a package or group, you can also specify a set of users that share the same rights. To do that, an authorization group can be set up and users can be added to it. Authorization groups are both the object of authorization (i.e. one can have several roles with regards to an authorization group, such as being allowed to read or edit it) and the subject of authorization (i.e. they can be assigned roles on other objects which will apply to their members, such as the group having edit rights on a particular group).
-* Finally, the system object is special, serving as an object for assignments that do not relate to a specific object. For example, creating a package cannot be linked to a specific package instance, and is therefore a operation.
+* A dataset is the basic CKAN concept of metadata about a dataset.
+* A group of datasets can be set up to specify which users have permission to add or remove datasets from the group.
+* Users can be assigned to authorization groups, to increase flexibility. Instead of specifying the privileges of specific users on a dataset or group, you can also specify a set of users that share the same rights. To do that, an authorization group can be set up and users can be added to it. Authorization groups are both the object of authorization (i.e. one can have several roles with regards to an authorization group, such as being allowed to read or edit it) and the subject of authorization (i.e. they can be assigned roles on other objects which will apply to their members, such as the group having edit rights on a particular group).
+* Finally, the system object is special, serving as an object for assignments that do not relate to a specific object. For example, creating a dataset cannot be linked to a specific dataset instance, and is therefore a operation.
Actions
+++++++
-**Actions** are defined in the Action enumeration in ``ckan/model/authz.py`` and currently include: **edit**, **change-state**, **read**, **purge**, **edit-permissions**, **create-package**, **create-group**, **create-authorization-group**, **read-site**, **read-user**, **create-user**.
+**Actions** are defined in the Action enumeration in ``ckan/model/authz.py`` and currently include: **edit**, **change-state**, **read**, **purge**, **edit-permissions**, **create-dataset**, **create-group**, **create-authorization-group**, **read-site**, **read-user**, **create-user**.
-As noted above, some of these (e.g. **read**) have meaning for any type of object, while some (e.g. **create-package**) can not be associated with any particular object, and are therefore only associated with the system object.
+As noted above, some of these (e.g. **read**) have meaning for any type of object, while some (e.g. **create-dataset**) can not be associated with any particular object, and are therefore only associated with the system object.
The **read-site** action (associated with the system object) allows or denies access to pages not associated with specific objects. These currently include:
- * Package search
+ * Dataset search
* Group index
* Tags index
* Authorization Group index
@@ -95,8 +95,8 @@
CKAN ships with the following default permissions:
-* When a new package is created, its creator automatically becomes **admin** for it. This user can then change permissions for other users.
-* By default, any other user (including both visitors and logged-ins) can read and write to this package.
+* When a new dataset is created, its creator automatically becomes **admin** for it. This user can then change permissions for other users.
+* By default, any other user (including both visitors and logged-ins) can read and write to this dataset.
These defaults can be changed in the CKAN config - see ``default_roles`` in :doc:`configuration`.
@@ -107,7 +107,7 @@
--------------------
The assignment of users and authorization groups to roles on a given
-protected object (such as a package) can be done by 'admins' via the
+protected object (such as a dataset) can be done by 'admins' via the
'authorization' tab of the web interface (or by sysadmins via that
interface or the system admin interface).
@@ -127,12 +127,12 @@
paster --plugin=ckan rights -c my.ini list
-The ``rights make`` command lets you assign specific permissions. For example, to give the user named **bar** the **admin** role on the package foo::
+The ``rights make`` command lets you assign specific permissions. For example, to give the user named **bar** the **admin** role on the dataset foo::
- paster --plugin=ckan rights -c my.ini make bar admin package:foo
+ paster --plugin=ckan rights -c my.ini make bar admin dataset:foo
-As well as users and packages, you can assign rights to other objects. These
-include authorization groups, package groups and the system as a whole.
+As well as users and datasets, you can assign rights to other objects. These
+include authorization groups, dataset groups and the system as a whole.
For example, to make the user 'chef' a system-wide admin::
@@ -144,9 +144,9 @@
group:bar
To revoke one of the roles assigned using ``rights make``, the ``rights remove`` command
-is available. For example, to remove **bar**'s **admin** role on the foo package::
+is available. For example, to remove **bar**'s **admin** role on the foo dataset::
- paster --plugin=ckan rights -c my.ini remove bar admin package:foo
+ paster --plugin=ckan rights -c my.ini remove bar admin dataset:foo
The ``roles`` command lists and modifies the assignment of actions to
roles.
@@ -180,24 +180,26 @@
1. Anonymous Edit Mode
++++++++++++++++++++++
-Anyone can edit and create packages without logging in. This is the default for CKAN out of the box.
+Anyone can edit and create datasets without logging in. This is the default for CKAN out of the box.
+
+
2. Logged-in Edit Mode
++++++++++++++++++++++
-You need to log-in and create/edit packages. Anyone can create an account.
+You need to log-in and create/edit datasets. Anyone can create an account.
To operate in this mode:
-1. First, change the visitor (any non-logged in user) rights from being able to create and edit packages to just reading them::
+1. First, change the visitor (any non-logged in user) rights from being able to create and edit datasets to just reading them::
paster rights make visitor reader system
paster rights make visitor reader package:all
paster rights remove visitor anon_editor package:all
paster rights remove visitor anon_editor system
-2. Change the default rights for newly created packages. Do this by using these values in your config file (see :doc:`configuration`)::
+2. Change the default rights for newly created datasets. Do this by using these values in your config file (see :doc:`configuration`)::
ckan.default_roles.Package = {"visitor": ["reader"], "logged_in": ["editor"]}
ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["editor"]}
@@ -212,27 +214,27 @@
The key features are:
-* Packages are assigned to a specific publishing group.
-* Only users associated to that group are able to create or update packages associated to that group.
+* Datasets are assigned to a specific publishing group.
+* Only users associated to that group are able to create or update datasets associated to that group.
To operate in this mode:
-1. First, remove the general public's rights to create and edit packages::
+1. First, remove the general public's rights to create and edit datasets::
paster rights remove visitor anon_editor package:all
paster rights remove logged_in editor package:all
paster rights remove visitor anon_editor system
paster rights remove logged_in editor system
-2. If logged-in users have already created packages in your system, you may also wish to remove their admin rights. For example::
+2. If logged-in users have already created datasets in your system, you may also wish to remove their admin rights. For example::
paster rights remove bob admin package:all
-3. Change the default rights for newly created packages. Do this by using these values in your config file (see :doc:`configuration`)::
+3. Change the default rights for newly created datasets. Do this by using these values in your config file (see :doc:`configuration`)::
ckan.default_roles.Package = {"visitor": ["reader"], "logged_in": ["reader"]}
ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["reader"]}
ckan.default_roles.System = {"visitor": ["reader"], "logged_in": ["reader"]}
ckan.default_roles.AuthorizationGroup = {"visitor": ["reader"], "logged_in": ["reader"]}
-Note you can also restrict package edits by a user's authorization group.
+Note you can also restrict dataset edits by a user's authorization group.
--- a/doc/configuration.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/configuration.rst Mon Sep 05 17:06:18 2011 +0100
@@ -79,7 +79,7 @@
Default value: (empty)
-This sets a space-separated list of extra field key values which will not be shown on the package read page.
+This sets a space-separated list of extra field key values which will not be shown on the dataset read page.
.. warning:: While this is useful to e.g. create internal notes, it is not a security measure. The keys will still be available via the API and in revision diffs.
@@ -93,9 +93,9 @@
rdf_packages = http://semantic.ckan.net/record/
-Configure this if you have an RDF store of the same packages as are in your CKAN instance. It will provide three sorts of links from each package page to the equivalent RDF URL given in `rdf_packages`:
+Configure this if you have an RDF store of the same datasets as are in your CKAN instance. It will provide three sorts of links from each dataset page to the equivalent RDF URL given in `rdf_packages`:
-1. 303 redirects for clients that content-negotiate rdf-xml or turtle. e.g. client GETs `http://ckan.net/package/pollution-2008` with accept header `application/rdf+xml` ``curl -H "Accept: application/rdf+xml" http://ckan.net/package/pollution-2008``. CKAN's response is a 303 redirect to `http://semantic.ckan.net/package/pollution-2008` which can be obtained with: ``curl -L -H "Accept: application/rdf+xml" http://ckan.net/package/pollution-2008``
+1. 303 redirects for clients that content-negotiate rdf-xml or turtle. e.g. client GETs `http://ckan.net/dataset/pollution-2008` with accept header `application/rdf+xml` ``curl -H "Accept: application/rdf+xml" http://ckan.net/dataset/pollution-2008``. CKAN's response is a 303 redirect to `http://semantic.ckan.net/dataset/pollution-2008` which can be obtained with: ``curl -L -H "Accept: application/rdf+xml" http://ckan.net/dataset/pollution-2008``
2. Embedded links for browsers that are aware. e.g. `<link rel="alternate" type="application/rdf+xml" href="http://semantic.ckan.net/record/b410e678-8a96-40cf-8e46-e8bd4bf02684.rdf">`
@@ -254,7 +254,7 @@
Default value: ``standard``
-This sets the name of the form to use when editing a package. This can be a form defined in the core CKAN code or in another setuputils-managed python module. The only requirement is that the ``setup.py`` file has an entry point for the form defined in the ``ckan.forms`` section.
+This sets the name of the form to use when editing a dataset. This can be a form defined in the core CKAN code or in another setuputils-managed python module. The only requirement is that the ``setup.py`` file has an entry point for the form defined in the ``ckan.forms`` section.
For more information on forms, see :doc:`forms`.
@@ -271,9 +271,9 @@
package_new_return_url = http://datadotgc.ca/new_dataset_complete?name=<NAME>
package_edit_return_url = http://datadotgc.ca/dataset/<NAME>
-If integrating the Edit Package and New Package forms into a third-party interface, setting these options allows you to set the return address. When the user has completed the form and presses 'commit', the user is redirected to the URL specified.
+If integrating the Edit Dataset and New Dataset forms into a third-party interface, setting these options allows you to set the return address. When the user has completed the form and presses 'commit', the user is redirected to the URL specified.
-The ``<NAME>`` string is replaced with the name of the package edited. Full details of this process are given in :doc:`form-integration`.
+The ``<NAME>`` string is replaced with the name of the dataset edited. Full details of this process are given in :doc:`form-integration`.
.. index::
@@ -284,7 +284,7 @@
A url pointing to a JSON file containing a list of licence objects. This list
determines the licences offered by the system to users, for example when
-creating or editing a package.
+creating or editing a dataset.
This is entirely optional - by default, the system will use the CKAN list of
licences available in the `Python licenses package <http://pypi.python.org/pypi/licenses>`_.
@@ -417,7 +417,7 @@
Default value: (none)
-The primary URL used by this site. Used in the API to provide packages with links to themselves in the web UI.
+The primary URL used by this site. Used in the API to provide datasets with links to themselves in the web UI.
.. index::
single: api_url
@@ -445,7 +445,7 @@
default_roles
^^^^^^^^^^^^^
-This allows you to set the default authorization roles (i.e. permissions) for new objects. Currently this extends to new packages, groups, authorization groups and the ``system`` object. For full details of these, see :doc:`authorization`.
+This allows you to set the default authorization roles (i.e. permissions) for new objects. Currently this extends to new datasets, groups, authorization groups and the ``system`` object. For full details of these, see :doc:`authorization`.
The value is a strict JSON dictionary of user names ``visitor`` (any user who is not logged in) and ``logged_in`` (any user who is logged in) with lists of their roles.
@@ -454,7 +454,7 @@
ckan.default_roles.Package = {"visitor": ["editor"], "logged_in": ["editor"]}
ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["reader"]}
-With this example setting, visitors and logged-in users can only read packages that get created.
+With this example setting, visitors and logged-in users can only read datasets that get created.
Defaults: see in ``ckan/model/authz.py`` for: ``default_default_user_roles``
--- a/doc/database_dumps.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/database_dumps.rst Mon Sep 05 17:06:18 2011 +0100
@@ -10,7 +10,7 @@
We provide two ``paster`` methods to create dumpfiles.
-* ``db simple-dump-json`` - A simple dumpfile, useful to create a public listing of the packages with no user information. All packages are dumped, including deleted packages and ones with strict authorization.
+* ``db simple-dump-json`` - A simple dumpfile, useful to create a public listing of the datasets with no user information. All datasets are dumped, including deleted datasets and ones with strict authorization.
* ``db dump`` - A more complicated dumpfile, useful for backups. Replicates the database completely, including users, their personal info and API keys, and hence should be kept private.
For more information on paster, see :doc:`paster`.
--- a/doc/extensions.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/extensions.rst Mon Sep 05 17:06:18 2011 +0100
@@ -18,9 +18,9 @@
* `ckanext-admin <https://bitbucket.org/okfn/ckanext-admin>`_: Admin web interface for CKAN.
* `ckanext-apps <https://bitbucket.org/okfn/ckanext-apps>`_: Apps and ideas catalogue extension for CKAN.
* `ckanext-deliverance <https://bitbucket.org/okfn/ckanext-deliverance>`_: Extends CKAN to use the Deliverance HTTP proxy, which can request and render web pages from * an external site (e.g. a CMS like Drupal or Wordpress).
-* `ckanext-disqus <https://bitbucket.org/okfn/ckanext-disqus>`_: Allows users to comment on package pages with Disqus.
-* `ckanext-follower <https://bitbucket.org/okfn/ckanext-follower>`_: Allow users to follow packages.
-* `ckanext-googleanalytics <https://bitbucket.org/okfn/ckanext-googleanalytics>`_: Integrates Google Analytics data into CKAN. Gives download stats on package pages, list * of most popular packages, etc.
+* `ckanext-disqus <https://bitbucket.org/okfn/ckanext-disqus>`_: Allows users to comment on dataset pages with Disqus.
+* `ckanext-follower <https://bitbucket.org/okfn/ckanext-follower>`_: Allow users to follow datasets.
+* `ckanext-googleanalytics <https://bitbucket.org/okfn/ckanext-googleanalytics>`_: Integrates Google Analytics data into CKAN. Gives download stats on dataset pages, list * of most popular datasets, etc.
* `ckanext-qa <https://bitbucket.org/okfn/ckanext-qa>`_: Provides link checker, 5 stars of openness and other Quality Assurance features.
* `ckanext-rdf <https://bitbucket.org/okfn/ckanext-rdf>`_: Consolidated handling of RDF export and import for CKAN.
* `ckanext-stats <https://bitbucket.org/okfn/ckanext-stats>`_: Statistics (and visuals) about the datasets in a CKAN instance.
--- a/doc/form-integration.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/form-integration.rst Mon Sep 05 17:06:18 2011 +0100
@@ -2,12 +2,12 @@
Form Integration
================
-CKAN allows you to integrate its Edit Package and New Package forms forms into an external front-end. To that end, CKAN also provides a simple way to redirect these forms back to the external front-end upon submission.
+CKAN allows you to integrate its Edit Dataset and New Dataset forms forms into an external front-end. To that end, CKAN also provides a simple way to redirect these forms back to the external front-end upon submission.
Redirecting CKAN Forms
======================
-It is obviously simple enough for an external front-end to link to CKAN's Edit Package and New Package forms, but once the forms are submitted, it would be desirable to redirect the user back to the external front-end, rather than CKAN's package read page.
+It is obviously simple enough for an external front-end to link to CKAN's Edit Dataset and New Dataset forms, but once the forms are submitted, it would be desirable to redirect the user back to the external front-end, rather than CKAN's dataset read page.
This is achieved with a parameter to the CKAN URL. The 'return URL' can be specified in two places:
@@ -17,22 +17,22 @@
(If the 'return URL' is supplied in both places, then the first takes precedence.)
-Since the 'return URL' may need to include the package name, which could be changed by the user, CKAN replaces a known placeholder ``<NAME>`` with this value on redirect.
+Since the 'return URL' may need to include the dataset name, which could be changed by the user, CKAN replaces a known placeholder ``<NAME>`` with this value on redirect.
.. note:: Note that the downside of specifying the 'return URL' in the CKAN config is that the CKAN web interface becomes less usable on its own, since the user is hampered by the redirects to the external interface.
Example
-------
-An external front-end displays a package 'ontariolandcoverv100' here::
+An external front-end displays a dataset 'ontariolandcoverv100' here::
http://datadotgc.ca/dataset/ontariolandcoverv100
-It displays a link to edit this package using CKAN's form, which without the redirect would be::
+It displays a link to edit this dataset using CKAN's form, which without the redirect would be::
- http://ca.ckan.net/package/edit/ontariolandoverv100
+ http://ca.ckan.net/dataset/edit/ontariolandoverv100
-At first, it may seem that the return link should be ``http://datadotgc.ca/dataset/ontariolandcoverv100``. But when the user edits this package, the name may change. So the return link needs to be::
+At first, it may seem that the return link should be ``http://datadotgc.ca/dataset/ontariolandcoverv100``. But when the user edits this dataset, the name may change. So the return link needs to be::
http://datadotgc.ca/dataset/<NAME>
@@ -42,9 +42,9 @@
So, in summary, the edit link becomes::
- http://ca.ckan.net/package/edit/ontariolandoverv100?return_to=http%3A%2F%2Fdatadotgc.ca%2Fdataset%2F%3CNAME%3E
+ http://ca.ckan.net/dataset/edit/ontariolandoverv100?return_to=http%3A%2F%2Fdatadotgc.ca%2Fdataset%2F%3CNAME%3E
-During editing the package, the user changes the package name to `canadalandcover`, presses 'preview' and finally 'commit'. The user is now redirected back to the external front-end at::
+During editing the dataset, the user changes the dataset name to `canadalandcover`, presses 'preview' and finally 'commit'. The user is now redirected back to the external front-end at::
http://datadotgc.ca/dataset/canadalandcover
@@ -55,4 +55,4 @@
[app:main]
package_edit_return_url = http://datadotgc.ca/dataset/<NAME>
- ...
\ No newline at end of file
+ ...
--- a/doc/forms.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/forms.rst Mon Sep 05 17:06:18 2011 +0100
@@ -2,21 +2,21 @@
Customizing Forms
=================
-The forms used to edit packages and groups in CKAN can be customized. This lets you tailor them to your needs, helping your users choose from sensible options or use different data formats.
+The forms used to edit datasets and groups in CKAN can be customized. This lets you tailor them to your needs, helping your users choose from sensible options or use different data formats.
-This document explains how to customize the package and group forms you offer to your users, without getting embroiled in the core CKAN code.
+This document explains how to customize the dataset and group forms you offer to your users, without getting embroiled in the core CKAN code.
-.. note:: This section deals with the form used to *edit* packages and groups, not the way they are displayed. For information on customizing the display of forms, see :doc:`theming`.
+.. note:: This section deals with the form used to *edit* datasets and groups, not the way they are displayed. For information on customizing the display of forms, see :doc:`theming`.
.. warning:: This is an advanced topic. Ensure you are familiar with :doc:`extensions` before attempting to customize forms.
-Building a Package Form
+Building a Dataset Form
-----------------------
The Best Way: Extensions
^^^^^^^^^^^^^^^^^^^^^^^^
-The best way to build a package form is by using a CKAN extension.
+The best way to build a dataset form is by using a CKAN extension.
You will firstly need to make a new controller in your extension. This should subclass PackageController as follows::
@@ -26,7 +26,7 @@
The ``package_form`` variable in the subclass will be used as the new form template.
-It is recommended that you copy the package form (``new_package_form.html``) and make modifications to it. However, it is possible to start from scratch.
+It is recommended that you copy the dataset form (``new_package_form.html``) and make modifications to it. However, it is possible to start from scratch.
To point at this new controller correctly, your extension should look like the following::
@@ -34,8 +34,8 @@
implements(IRoutes)
implements(IConfigurer)
def before_map(self, map):
- map.connect('/package/new', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='new')
- map.connect('/package/edit/{id}', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='edit')
+ map.connect('/dataset/new', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='new')
+ map.connect('/dataset/edit/{id}', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='edit')
return map
def after_map(self, map):
return map
--- a/doc/loading_data.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/loading_data.rst Mon Sep 05 17:06:18 2011 +0100
@@ -22,34 +22,34 @@
The Simplest Approach - ckanclient
++++++++++++++++++++++++++++++++++
-The most basic way to automate package loading is with a Python script using the `ckanclient library <http://pypi.python.org/pypi/ckanclient>`_. You will need to register for an API key first.
+The most basic way to automate dataset loading is with a Python script using the `ckanclient library <http://pypi.python.org/pypi/ckanclient>`_. You will need to register for an API key first.
You can install ckanclient with::
pip install ckanclient
-Here is an example script to register a new package::
+Here is an example script to register a new dataset::
import ckanclient
# Instantiate the CKAN client.
ckan = ckanclient.CkanClient(api_key=my_api_key, base_location="http://myckaninstance.com/api")
- # Describe the package.
- package_entity = {
- 'name': my_package_name,
- 'url': my_package_url,
- 'download_url': my_package_download_url,
- 'tags': my_package_keywords,
- 'notes': my_package_long_description,
+ # Describe the dataset.
+ dataset_entity = {
+ 'name': my_dataset_name,
+ 'url': my_dataset_url,
+ 'download_url': my_dataset_download_url,
+ 'tags': my_dataset_keywords,
+ 'notes': my_dataset_long_description,
}
- # Register the package.
- ckan.package_register_post(package_entity)
+ # Register the dataset.
+ ckan.package_register_post(dataset_entity)
Loader Scripts
++++++++++++++
'Loader scripts' provide a simple way to take any format metadata and bulk upload it to a remote CKAN instance.
-Essentially each set of loader scripts converts the dataset metadata to the standard 'package' format, and then loads it into CKAN.
+Essentially each set of loader scripts converts the dataset metadata to the standard 'dataset' format, and then loads it into CKAN.
Loader scripts are generally stored into the `ckanext` repository. To get a flavour of what loader scripts look like, take a look at `the ONS scripts <https://bitbucket.org/okfn/ckanext-dgu/src/default/ckanext/dgu/ons/>`_.
@@ -58,7 +58,7 @@
For CSV and Excel formats, the `SpreadsheetPackageImporter` (found in ``ckan/lib/spreadsheet_importer.py``) loader script wraps the file in `SpreadsheetData` before extracting the records into `SpreadsheetDataRecords`.
-SpreadsheetPackageImporter copes with multiple title rows, data on multiple sheets, dates. The loader can reload packages based on a unique key column in the spreadsheet, choose unique names for packages if there is a clash, add/merge new resources for existing packages and manage package groups.
+SpreadsheetPackageImporter copes with multiple title rows, data on multiple sheets, dates. The loader can reload datasets based on a unique key column in the spreadsheet, choose unique names for datasets if there is a clash, add/merge new resources for existing datasets and manage dataset groups.
Loader Scripts for Google Spreadsheets
**************************************
@@ -74,12 +74,12 @@
First, you need an importer that derives from `PackageImporter` (found in ``ckan/lib/importer.py``). This takes whatever format the metadata is in and sorts it into records of type `DataRecord`.
-Next, each DataRecord is converted into the correct fields for a package using the `record_2_package` method. This results in package dictionaries.
+Next, each DataRecord is converted into the correct fields for a dataset using the `record_2_package` method. This results in dataset dictionaries.
-The `PackageLoader` takes the package dictionaries and loads them onto a CKAN instance using the ckanclient. There are various settings to determine:
+The `PackageLoader` takes the dataset dictionaries and loads them onto a CKAN instance using the ckanclient. There are various settings to determine:
- * ##how to identify the same package, previously been loaded into CKAN.## This can be simply by name or by an identifier stored in another field.
- * how to merge in changes to an existing packages. It can simply replace it or maybe merge in resources etc.
+ * ##how to identify the same dataset, previously been loaded into CKAN.## This can be simply by name or by an identifier stored in another field.
+ * how to merge in changes to an existing datasets. It can simply replace it or maybe merge in resources etc.
The loader should be given a command-line interface using the `Command` base class (``ckanext/command.py``).
--- a/doc/paster.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/paster.rst Mon Sep 05 17:06:18 2011 +0100
@@ -79,7 +79,7 @@
ratings Manage the ratings stored in the db
rights Commands relating to per-object and system-wide access rights.
roles Commands relating to roles and actions.
- search-index Creates a search index for all packages
+ search-index Creates a search index for all datasets
sysadmin Gives sysadmin rights to a named user
user Manage users
================= ==========================================================
@@ -134,7 +134,7 @@
For information on using ``db`` to create dumpfiles, see :doc:`database_dumps`.
-ratings: Manage package ratings
+ratings: Manage dataset ratings
-------------------------------
Manages the ratings stored in the database, and can be used to count ratings, remove all ratings, or remove only anonymous ratings.
@@ -149,7 +149,7 @@
Sets the authorization roles of a specific user on a given object within the system.
-For example, to give the user named 'bar' the 'admin' role on the package 'foo'::
+For example, to give the user named 'bar' the 'admin' role on the dataset 'foo'::
paster --plugin=ckan rights make bar admin package:foo --config=/etc/ckan/std/std.ini
--- a/doc/plugins.rst Mon Sep 05 16:21:44 2011 +0100
+++ b/doc/plugins.rst Mon Sep 05 17:06:18 2011 +0100
@@ -40,7 +40,7 @@
(pyenv)$ paster create -t ckanext ckanext-myname
-You'll get prompted to complete a number of variables which will be used in your package. You change these later by editing the generated ``setup.py`` file. Here's some example output:
+You'll get prompted to complete a number of variables which will be used in your dataset. You change these later by editing the generated ``setup.py`` file. Here's some example output:
::
@@ -202,7 +202,7 @@
.. tip ::
This example is based on real code used to implement the ``ckanext-disqus`` plugin
- to add commenting to packages. You can see the latest version of this code at
+ to add commenting to datasets. You can see the latest version of this code at
http://bitbucket.org/okfn/ckanext-disqus/src/tip/ckanext/plugins/disqus/__init__.py.
First we set up logging and some helpers we'll need from Genshi to transfer the stream:
@@ -238,8 +238,8 @@
class Disqus(SingletonPlugin):
"""
- Insert javascript fragments into package pages and the home page to
- allow users to view and create comments on any package.
+ Insert javascript fragments into dataset pages and the home page to
+ allow users to view and create comments on any dataset.
"""
implements(IConfigurable)
@@ -928,7 +928,7 @@
You don't need to specify configuration options to connect to RabbitMQ because
the defaults are fine.
-At this point if you edit a package it should be using the queue. If you have
+At this point if you edit a dataset it should be using the queue. If you have
the echo worker running you'll see the message added to the queue.
Logging
http://bitbucket.org/okfn/ckan/changeset/a6e2c8d2c902/
changeset: a6e2c8d2c902
branch: feature-1293-rename-package-to-dataset
user: rgrp
date: 2011-09-05 19:06:40
summary: [tests][xs]: micro changes to tests to get them passing after rename (these are errors only showing up with postgres run).
affected #: 2 files (5 bytes)
--- a/ckan/tests/functional/test_authz.py Mon Sep 05 17:06:18 2011 +0100
+++ b/ckan/tests/functional/test_authz.py Mon Sep 05 18:06:40 2011 +0100
@@ -376,8 +376,8 @@
assert not model.Package.by_name(u'annakarenina')
offset = url_for(controller='package', action='new')
res = self.app.get(offset, extra_environ={'REMOTE_USER': user.name.encode('utf8')})
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = u'annakarenina'
res = fv.submit('save', extra_environ={'REMOTE_USER': user.name.encode('utf8')})
--- a/ckan/tests/functional/test_package.py Mon Sep 05 17:06:18 2011 +0100
+++ b/ckan/tests/functional/test_package.py Mon Sep 05 18:06:40 2011 +0100
@@ -288,8 +288,8 @@
offset = url_for(controller='package', action='read', id=self.anna.id)
res_by_id = self.app.get(offset)
# just check the stuff in the package div
- pkg_by_name_main = self.named_div('package', res)
- pkg_by_id_main = self.named_div('package', res_by_id)
+ pkg_by_name_main = self.named_div('dataset', res)
+ pkg_by_id_main = self.named_div('dataset', res_by_id)
# rename some things which may be in the wrong order sometimes
txt_order_non_deterministic = ('russian', 'tolstoy', 'david', 'roger')
for txt in txt_order_non_deterministic:
@@ -391,7 +391,7 @@
assert '<strong>0</strong>' in results_page, results_page
def _check_search_results(self, page, terms, requireds, only_open=False, only_downloadable=False):
- form = page.forms['package-search']
+ form = page.forms['dataset-search']
form['q'] = terms.encode('utf8') # paste doesn't handle this!
form['open_only'] = only_open
form['downloadable_only'] = only_downloadable
http://bitbucket.org/okfn/ckan/changeset/485293489f3e/
changeset: 485293489f3e
branch: feature-1293-rename-package-to-dataset
user: zephod
date: 2011-09-05 19:16:38
summary: [close-branch]: All done.
affected #: 0 files (0 bytes)
http://bitbucket.org/okfn/ckan/changeset/4a98589af6c1/
changeset: 4a98589af6c1
user: zephod
date: 2011-09-05 19:18:20
summary: [merge,from-branch][l]: Merge completed work renaming package to dataset.
affected #: 68 files (2.8 KB)
--- a/ckan/config/deployment.ini_tmpl Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/config/deployment.ini_tmpl Mon Sep 05 18:18:20 2011 +0100
@@ -74,16 +74,16 @@
# CKAN QoS monitoring
ckan.enable_call_timing = false
-# Location of RDF versions of packages
+# Location of RDF versions of datasets
#rdf_packages = http://semantic.ckan.net/record/
-# Location of licenses group (defaults to local Python licenses package)
+# Location of licenses group (defaults to local Python licenses dataset)
#licenses_group_url = http://licenses.opendefinition.org/2.0/ckan_original
-# Package form to use
+# Dataset form to use
package_form = standard
-# Hide certain extras fields from package read form:
+# Hide certain extras fields from dataset read form:
# package_hide_extras = for_search_index_only
# API configuration
@@ -103,9 +103,9 @@
# extra_template_paths = %(here)s/my-templates
# extra_public_paths = %(here)s/my-public
-# Package form integration
-#package_edit_return_url = http://another.frontend/package/<NAME>
-#package_new_return_url = http://another.frontend/package/<NAME>
+# Dataset form integration
+#package_edit_return_url = http://another.frontend/dataset/<NAME>
+#package_new_return_url = http://another.frontend/dataset/<NAME>
# Turn on messaging with carrot, default to false
--- a/ckan/config/routing.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/config/routing.py Mon Sep 05 18:18:20 2011 +0100
@@ -38,6 +38,7 @@
# CKAN API versioned.
register_list = [
'package',
+ 'dataset',
'resource',
'tag',
'group',
@@ -154,7 +155,7 @@
map.connect('/api/2/util/user/autocomplete', controller='api',
action='user_autocomplete')
- map.connect('/api/2/util/package/create_slug', controller='api', action='create_slug',
+ map.connect('/api/2/util/dataset/create_slug', controller='api', action='create_slug',
conditions=dict(method=['GET']))
map.connect('/api/2/util/tag/autocomplete', controller='api', action='tag_autocomplete',
conditions=dict(method=['GET']))
@@ -168,15 +169,17 @@
## /END API
###########
- map.redirect("/packages", "/package")
- map.redirect("/packages/{url:.*}", "/package/{url}")
- map.connect('/package', controller='package', action='search')
+ map.redirect("/packages", "/dataset")
+ map.redirect("/packages/{url:.*}", "/dataset/{url}")
+ map.redirect("/package", "/dataset")
+ map.redirect("/package/{url:.*}", "/dataset/{url}")
+ map.connect('/dataset', controller='package', action='search')
##to get back formalchemy uncomment these lines
##map.connect('/package/new', controller='package_formalchemy', action='new')
##map.connect('/package/edit/{id}', controller='package_formalchemy', action='edit')
- map.connect('/package/{action}', controller='package',
+ map.connect('/dataset/{action}', controller='package',
requirements=dict(action='|'.join([
'list',
'new',
@@ -184,9 +187,9 @@
'search'
]))
)
- map.connect('/package', controller='package', action='index')
- map.connect('/package/{action}/{id}/{revision}', controller='package', action='read_ajax')
- map.connect('/package/{action}/{id}', controller='package',
+ map.connect('/dataset', controller='package', action='index')
+ map.connect('/dataset/{action}/{id}/{revision}', controller='package', action='read_ajax')
+ map.connect('/dataset/{action}/{id}', controller='package',
requirements=dict(action='|'.join([
'edit',
'authz',
@@ -195,7 +198,7 @@
'history_ajax',
]))
)
- map.connect('/package/{id}', controller='package', action='read')
+ map.connect('/dataset/{id}', controller='package', action='read')
# group
map.redirect("/groups", "/group")
map.redirect("/groups/{url:.*}", "/group/{url}")
--- a/ckan/controllers/api.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/controllers/api.py Mon Sep 05 18:18:20 2011 +0100
@@ -139,7 +139,6 @@
context = {'model': model, 'session': model.Session, 'user': c.user}
model.Session()._context = context
return_dict = {'help': function.__doc__}
-
try:
request_data = self._get_request_data()
except ValueError, inst:
@@ -180,10 +179,13 @@
action_map = {
'revision': get_action('revision_list'),
'group': get_action('group_list'),
+ 'dataset': get_action('package_list'),
'package': get_action('package_list'),
'tag': get_action('tag_list'),
'licenses': get_action('licence_list'),
+ ('dataset', 'relationships'): get_action('package_relationships_list'),
('package', 'relationships'): get_action('package_relationships_list'),
+ ('dataset', 'revisions'): get_action('package_revision_list'),
('package', 'revisions'): get_action('package_revision_list'),
}
@@ -206,7 +208,9 @@
'revision': get_action('revision_show'),
'group': get_action('group_show_rest'),
'tag': get_action('tag_show_rest'),
+ 'dataset': get_action('package_show_rest'),
'package': get_action('package_show_rest'),
+ ('dataset', 'relationships'): get_action('package_relationships_list'),
('package', 'relationships'): get_action('package_relationships_list'),
}
@@ -215,6 +219,7 @@
data_dict = {'id': id, 'id2': id2, 'rel': subregister}
for type in model.PackageRelationship.get_all_types():
+ action_map[('dataset', type)] = get_action('package_relationships_list')
action_map[('package', type)] = get_action('package_relationships_list')
log.debug('show: %s' % context)
@@ -239,13 +244,16 @@
def create(self, ver=None, register=None, subregister=None, id=None, id2=None):
action_map = {
+ ('dataset', 'relationships'): get_action('package_relationship_create'),
('package', 'relationships'): get_action('package_relationship_create'),
'group': get_action('group_create_rest'),
+ 'dataset': get_action('package_create_rest'),
'package': get_action('package_create_rest'),
'rating': get_action('rating_create'),
}
for type in model.PackageRelationship.get_all_types():
+ action_map[('dataset', type)] = get_action('package_relationship_create')
action_map[('package', type)] = get_action('package_relationship_create')
context = {'model': model, 'session': model.Session, 'user': c.user,
@@ -289,11 +297,14 @@
def update(self, ver=None, register=None, subregister=None, id=None, id2=None):
action_map = {
+ ('dataset', 'relationships'): get_action('package_relationship_update'),
('package', 'relationships'): get_action('package_relationship_update'),
+ 'dataset': get_action('package_update_rest'),
'package': get_action('package_update_rest'),
'group': get_action('group_update_rest'),
}
for type in model.PackageRelationship.get_all_types():
+ action_map[('dataset', type)] = get_action('package_relationship_update')
action_map[('package', type)] = get_action('package_relationship_update')
context = {'model': model, 'session': model.Session, 'user': c.user,
@@ -331,11 +342,14 @@
def delete(self, ver=None, register=None, subregister=None, id=None, id2=None):
action_map = {
+ ('dataset', 'relationships'): get_action('package_relationship_delete'),
('package', 'relationships'): get_action('package_relationship_delete'),
'group': get_action('group_delete'),
+ 'dataset': get_action('package_delete'),
'package': get_action('package_delete'),
}
for type in model.PackageRelationship.get_all_types():
+ action_map[('dataset', type)] = get_action('package_relationship_delete')
action_map[('package', type)] = get_action('package_relationship_delete')
context = {'model': model, 'session': model.Session, 'user': c.user,
@@ -390,7 +404,7 @@
gettext("Missing search term ('since_id=UUID' or 'since_time=TIMESTAMP')"))
revs = model.Session.query(model.Revision).filter(model.Revision.timestamp>since_time)
return self._finish_ok([rev.id for rev in revs])
- elif register == 'package' or register == 'resource':
+ elif register in ['dataset', 'package', 'resource']:
try:
params = self._get_search_params(request.params)
except ValueError, e:
@@ -417,7 +431,7 @@
for v in values:
query_fields.add(field, v)
- if register == 'package':
+ if register in ['dataset', 'package']:
options.ref_entity_with_attr = 'id' if ver == '2' else 'name'
try:
backend = None
--- a/ckan/forms/common.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/forms/common.py Mon Sep 05 18:18:20 2011 +0100
@@ -33,15 +33,15 @@
def package_name_validator(val, field=None):
name_validator(val, field)
- # we disable autoflush here since may get used in package preview
+ # we disable autoflush here since may get used in dataset preview
pkgs = model.Session.query(model.Package).autoflush(False).filter_by(name=val)
for pkg in pkgs:
if pkg != field.parent.model:
- raise formalchemy.ValidationError(_('Package name already exists in database'))
+ raise formalchemy.ValidationError(_('Dataset name already exists in database'))
def group_name_validator(val, field=None):
name_validator(val, field)
- # we disable autoflush here since may get used in package preview
+ # we disable autoflush here since may get used in dataset preview
groups = model.Session.query(model.Group).autoflush(False).filter_by(name=val)
for group in groups:
if group != field.parent.model:
@@ -269,7 +269,7 @@
def _serialized_value(self):
# interpret params like this:
- # 'Package--temporal_coverage-from', u'4/12/2009'
+ # 'Dataset--temporal_coverage-from', u'4/12/2009'
param_val_from = self.params.get(self.name + '-from', u'')
param_val_to = self.params.get(self.name + '-to', u'')
return param_val_from, param_val_to
@@ -330,7 +330,7 @@
return self._serialized_value()
class ResourcesField(ConfiguredField):
- '''A form field for multiple package resources.'''
+ '''A form field for multiple dataset resources.'''
def __init__(self, name, hidden_label=False, fields_required=None):
super(ResourcesField, self).__init__(name)
@@ -342,7 +342,7 @@
resources_data = val
assert isinstance(resources_data, list)
not_nothing_regex = re.compile('\S')
- errormsg = _('Package resource(s) incomplete.')
+ errormsg = _('Dataset resource(s) incomplete.')
not_nothing_validator = formalchemy.validators.regex(not_nothing_regex,
errormsg)
for resource_data in resources_data:
@@ -410,12 +410,12 @@
rest_key = self.name
# REST param format
- # e.g. 'Package-1-resources': [{u'url':u'http://ww...
+ # e.g. 'Dataset-1-resources': [{u'url':u'http://ww...
if params.has_key(rest_key) and any(params.getall(rest_key)):
new_resources = params.getall(rest_key)[:] # copy, so don't edit orig
# formalchemy form param format
- # e.g. 'Package-1-resources-0-url': u'http://ww...'
+ # e.g. 'Dataset-1-resources-0-url': u'http://ww...'
row = 0
while True:
if not params.has_key('%s-%i-url' % (self.name, row)):
@@ -510,7 +510,7 @@
raise formalchemy.ValidationError(_('Tag "%s" must not be uppercase' % (tag)))
class ExtrasField(ConfiguredField):
- '''A form field for arbitrary "extras" package data.'''
+ '''A form field for arbitrary "extras" dataset data.'''
def __init__(self, name, hidden_label=False):
super(ExtrasField, self).__init__(name)
self._hidden_label = hidden_label
@@ -602,11 +602,11 @@
def deserialize(self):
# Example params:
- # ('Package-1-extras', {...}) (via REST i/f)
- # ('Package-1-extras-genre', u'romantic novel'),
- # ('Package-1-extras-genre-checkbox', 'on')
- # ('Package-1-extras-newfield0-key', u'aaa'),
- # ('Package-1-extras-newfield0-value', u'bbb'),
+ # ('Dataset-1-extras', {...}) (via REST i/f)
+ # ('Dataset-1-extras-genre', u'romantic novel'),
+ # ('Dataset-1-extras-genre-checkbox', 'on')
+ # ('Dataset-1-extras-newfield0-key', u'aaa'),
+ # ('Dataset-1-extras-newfield0-value', u'bbb'),
# TODO: This method is run multiple times per edit - cache results?
if not hasattr(self, 'extras_re'):
self.extras_re = re.compile('([a-zA-Z0-9-]*)-([a-f0-9-]*)-extras(?:-(.+))?$')
@@ -621,7 +621,7 @@
entity_id = key_parts[1]
if key_parts[2] is None:
if isinstance(value, dict):
- # simple dict passed into 'Package-1-extras' e.g. via REST i/f
+ # simple dict passed into 'Dataset-1-extras' e.g. via REST i/f
extra_fields.extend(value.items())
elif key_parts[2].startswith('newfield'):
newfield_match = self.newfield_re.match(key_parts[2])
@@ -694,13 +694,13 @@
append_set = (new_set - old_set).intersection(editable_set)
remove_set = (old_set - new_set).intersection(editable_set)
- # Create package group associations.
+ # Create dataset group associations.
for id in append_set:
group = model.Session.query(model.Group).autoflush(False).get(id)
if group:
self.parent.model.groups.append(group)
- # Delete package group associations.
+ # Delete dataset group associations.
for group in self.parent.model.groups:
if group.id in remove_set:
self.parent.model.groups.remove(group)
--- a/ckan/lib/cli.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/lib/cli.py Mon Sep 05 18:18:20 2011 +0100
@@ -61,7 +61,7 @@
db clean
db upgrade [{version no.}] # Data migrate
db dump {file-path} # dump to a pg_dump file
- db dump-rdf {package-name} {file-path}
+ db dump-rdf {dataset-name} {file-path}
db simple-dump-csv {file-path}
db simple-dump-json {file-path}
db send-rdf {talis-store} {username} {password}
@@ -199,7 +199,7 @@
def dump_rdf(self, cmd):
if len(self.args) < 3:
- print 'Need package name and rdf file path'
+ print 'Need dataset name and rdf file path'
return
package_name = self.args[1]
rdf_path = self.args[2]
@@ -207,7 +207,7 @@
import ckan.lib.rdf as rdf
pkg = model.Package.by_name(unicode(package_name))
if not pkg:
- print 'Package name "%s" does not exist' % package_name
+ print 'Dataset name "%s" does not exist' % package_name
return
rdf = rdf.RdfExporter().export_package(pkg)
f = open(rdf_path, 'w')
@@ -227,12 +227,12 @@
class SearchIndexCommand(CkanCommand):
- '''Creates a search index for all packages
+ '''Creates a search index for all datasets
Usage:
- search-index rebuild - indexes all packages (default)
- search-index check - checks for packages not indexed
- search-index show {package-name} - shows index of a package
+ search-index rebuild - indexes all datasets (default)
+ search-index check - checks for datasets not indexed
+ search-index show {dataset-name} - shows index of a dataset
'''
summary = __doc__.split('\n')[0]
@@ -265,7 +265,7 @@
class Notification(CkanCommand):
'''Send out modification notifications.
- In "replay" mode, an update signal is sent for each package in the database.
+ In "replay" mode, an update signal is sent for each dataset in the database.
Usage:
notify replay - send out modification signals
@@ -716,39 +716,39 @@
except UncommittedChangesException, inst:
print "There are uncommitted revisions (run 'changes commit')."
sys.exit(1)
- print ", ".join(["%s %s packages" % (key, len(val)) for (key, val) in report.items()])
+ print ", ".join(["%s %s datasets" % (key, len(val)) for (key, val) in report.items()])
if report['created']:
print ""
- print "The following packages have been created:"
+ print "The following datasets have been created:"
names = []
for entity in report['created']:
if not entity:
continue
if entity.name in names:
continue
- print "package: %s" % entity.name
+ print "dataset: %s" % entity.name
names.append(entity.name)
if report['updated']:
print ""
- print "The following packages have been updated:"
+ print "The following datasets have been updated:"
names = []
for entity in report['updated']:
if not entity:
continue
if entity.name in names:
continue
- print "package: %s" % entity.name
+ print "dataset: %s" % entity.name
names.append(entity.name)
if report['deleted']:
print ""
- print "The following packages have been deleted:"
+ print "The following datasets have been deleted:"
names = []
for entity in report['deleted']:
if not entity:
continue
if entity.name in names:
continue
- print "package: %s" % entity.name
+ print "dataset: %s" % entity.name
names.append(entity.name)
def moderate_changeset_apply(self, changeset):
--- a/ckan/lib/dictization/model_dictize.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/lib/dictization/model_dictize.py Mon Sep 05 18:18:20 2011 +0100
@@ -252,7 +252,7 @@
dictized['ratings_count'] = len(pkg.ratings)
site_url = config.get('ckan.site_url', None)
if site_url:
- dictized['ckan_url'] = '%s/package/%s' % (site_url, pkg.name)
+ dictized['ckan_url'] = '%s/dataset/%s' % (site_url, pkg.name)
dictized['metadata_modified'] = pkg.metadata_modified.isoformat() \
if pkg.metadata_modified else None
dictized['metadata_created'] = pkg.metadata_created.isoformat() \
@@ -303,7 +303,7 @@
dictized['ratings_count'] = len(pkg.ratings)
site_url = config.get('ckan.site_url', None)
if site_url:
- dictized['ckan_url'] = '%s/package/%s' % (site_url, pkg.name)
+ dictized['ckan_url'] = '%s/dataset/%s' % (site_url, pkg.name)
dictized['metadata_modified'] = pkg.metadata_modified.isoformat() \
if pkg.metadata_modified else None
dictized['metadata_created'] = pkg.metadata_created.isoformat() \
--- a/ckan/logic/validators.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/logic/validators.py Mon Sep 05 18:18:20 2011 +0100
@@ -29,7 +29,7 @@
result = session.query(model.Package).get(value)
if not result:
- raise Invalid(_('Package was not found.'))
+ raise Invalid(_('Dataset was not found.'))
return value
def package_name_exists(value, context):
@@ -40,7 +40,7 @@
result = session.query(model.Package).filter_by(name=value).first()
if not result:
- raise Invalid(_('Package with name %r does not exist.') % str(value))
+ raise Invalid(_('Dataset with name %r does not exist.') % str(value))
return value
def package_id_or_name_exists(value, context):
@@ -55,7 +55,7 @@
result = session.query(model.Package).filter_by(name=value).first()
if not result:
- raise Invalid(_('Package was not found.'))
+ raise Invalid(_('Dataset was not found.'))
return result.id
@@ -88,7 +88,7 @@
query = query.filter(model.Package.id <> package_id)
result = query.first()
if result:
- errors[key].append(_('Package name already exists in database'))
+ errors[key].append(_('Dataset name already exists in database'))
def duplicate_extras_key(key, data, errors, context):
--- a/ckan/model/package.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/model/package.py Mon Sep 05 18:18:20 2011 +0100
@@ -202,7 +202,7 @@
for res in self.resources]
site_url = config.get('ckan.site_url', None)
if site_url:
- _dict['ckan_url'] = '%s/package/%s' % (site_url, self.name)
+ _dict['ckan_url'] = '%s/dataset/%s' % (site_url, self.name)
_dict['relationships'] = [rel.as_dict(self, ref_package_by=ref_package_by) for rel in self.get_relationships()]
_dict['metadata_modified'] = self.metadata_modified.isoformat() \
if self.metadata_modified else None
--- a/ckan/public/css/style.css Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/public/css/style.css Mon Sep 05 18:18:20 2011 +0100
@@ -340,7 +340,7 @@
padding-top: 10px;
}
-.package-search-filters {
+.dataset-search-filters {
margin-top: 15px;
}
@@ -422,7 +422,7 @@
/* ===================== */
-/* = Package read view = */
+/* = Dataset read view = */
/* ===================== */
.property-list {
@@ -441,25 +441,25 @@
margin-bottom: 0.2em;
}
-.package .api div {
+.dataset .api div {
background:#f0f0f0;
padding:10px;
}
-.package .api h5 {
+.dataset .api h5 {
font-weight:bold;
margin-bottom:1em!important;
font-size:1em;
}
-.package .api code {
+.dataset .api code {
background:#444;
color:#fff;
padding:3px 10px ;
margin-bottom:1em;
display:block;
}
-.package .api code a {
+.dataset .api code a {
color:#fff;
}
@@ -544,7 +544,7 @@
/* = Search boxes = */
/* ================ */
-form.package-search input.search {
+form.dataset-search input.search {
width: 99%;
font-size: 1.2em;
margin: 0px;
@@ -560,7 +560,7 @@
-moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}
-.package-search input.button {
+.dataset-search input.button {
display: inline-block;
float: right;
margin-top: 5px;
@@ -568,36 +568,36 @@
margin-bottom: 1px !important;
}
-.package-search-filters {
+.dataset-search-filters {
margin-top: 1em;
margin-bottom: 1em;
color: #888;
}
-.package-search-filters label {
+.dataset-search-filters label {
padding-left: 1em;
}
/* =================== */
-/* = Package listing = */
+/* = Dataset listing = */
/* =================== */
-ul.packages {
+ul.datasets {
padding-left: 0;
margin: 0 0 1em 0;
}
-.packages .header {
+.datasets .header {
padding-top: 0.5em;
font-weight: bold;
font-size: 1.1em;
}
-.packages .extract {
+.datasets .extract {
padding-top: 0.3em;
}
-.packages li {
+.datasets li {
list-style: none;
padding: 1em 0 0.2em 0.0em;
border-bottom: 1px solid #ececec;
@@ -605,11 +605,11 @@
/*white-space: nowrap;*/
}
-.packages li a {
+.datasets li a {
text-decoration: none;
}
-.packages li img {
+.datasets li img {
margin-bottom: -2px;
}
@@ -617,14 +617,14 @@
float:right;
}
-ul.package_formats {
+ul.dataset_formats {
float: right;
padding: 0 0 3px 0;
margin: 0;
font-family: monospace;
}
-ul.package_formats li {
+ul.dataset_formats li {
display: inline;
margin: 0;
padding: 0 5px 0 5px;
--- a/ckan/public/robots.txt Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/public/robots.txt Mon Sep 05 18:18:20 2011 +0100
@@ -1,7 +1,7 @@
User-agent: *
-Disallow: /package/rate/
+Disallow: /dataset/rate/
Disallow: /revision/
-Disallow: /package/*/history
+Disallow: /dataset/*/history
Disallow: /api/
User-Agent: *
--- a/ckan/public/scripts/application.js Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/public/scripts/application.js Mon Sep 05 18:18:20 2011 +0100
@@ -2,7 +2,7 @@
$(document).ready(function () {
CKAN.Utils.setupUserAutocomplete($('input.autocomplete-user'));
CKAN.Utils.setupAuthzGroupAutocomplete($('input.autocomplete-authzgroup'));
- CKAN.Utils.setupPackageAutocomplete($('input.autocomplete-package'));
+ CKAN.Utils.setupPackageAutocomplete($('input.autocomplete-dataset'));
CKAN.Utils.setupTagAutocomplete($('input.autocomplete-tag'));
CKAN.Utils.setupFormatAutocomplete($('input.autocomplete-format'));
});
@@ -11,14 +11,14 @@
var CKAN = CKAN || {};
CKAN.Utils = function($, my) {
- // Attach package autocompletion to provided elements
+ // Attach dataset autocompletion to provided elements
//
// Requires: jquery-ui autocomplete
my.setupPackageAutocomplete = function(elements) {
elements.autocomplete({
minLength: 0,
source: function(request, callback) {
- var url = '/package/autocomplete?q=' + request.term;
+ var url = '/dataset/autocomplete?q=' + request.term;
$.ajax({
url: url,
success: function(data) {
@@ -183,9 +183,9 @@
// fetch updates.
this.name_changed = false;
// url for slug api (we need api rather than do it ourself because we check if available)
- this.url = '/api/2/util/package/create_slug';
- // Add a new element where the validity of the package name can be displayed
- this.name_field.parent().append('<div id="package_name_valid_msg"></div>');
+ this.url = '/api/2/util/dataset/create_slug';
+ // Add a new element where the validity of the dataset name can be displayed
+ this.name_field.parent().append('<div id="dataset_name_valid_msg"></div>');
this.title_field.blur(this.title_change_handler())
this.title_field.keyup(this.title_change_handler())
this.name_field.keyup(this.name_change_handler());
@@ -211,7 +211,7 @@
// Reset if the name is emptied
if (!self.name_field.val().replace(/^\s+|\s+$/g, '')){
self.name_changed = false;
- $('#package_name_valid_msg').html('');
+ $('#dataset_name_valid_msg').html('');
} else {
self.update(self.name_field.val(), function(data) {
self.name_field.val(data.name)
@@ -226,7 +226,7 @@
// Reset if the name is emptied
if (!self.name_field.val().replace(/^\s+|\s+$/g, '')){
self.name_changed = false;
- $('#package_name_valid_msg').html('');
+ $('#dataset_name_valid_msg').html('');
} else {
self.name_changed = true;
self.update(self.name_field.val(), function(data) {
@@ -251,11 +251,11 @@
if (on_success) {
on_success(data);
}
- var valid_msg = $('#package_name_valid_msg');
+ var valid_msg = $('#dataset_name_valid_msg');
if (data.valid) {
- valid_msg.html('<span style="font-weight: bold; color: #0c0">This package name is available!</span>');
+ valid_msg.html('<span style="font-weight: bold; color: #0c0">This dataset name is available!</span>');
} else {
- valid_msg.html('<span style="font-weight: bold; color: #c00">This package name is already used, please use a different name</span>');
+ valid_msg.html('<span style="font-weight: bold; color: #c00">This dataset name is already used, please use a different name</span>');
}
}
});
--- a/ckan/templates/_util.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/_util.html Mon Sep 05 18:18:20 2011 +0100
@@ -47,9 +47,9 @@
</li></ul>
- <!--! List of packages: pass in a collection of tags and this renders the
- standard package listing -->
- <ul py:def="package_list(packages)" class="packages">
+ <!--! List of datasets: pass in a collection of tags and this renders the
+ standard dataset listing -->
+ <ul py:def="package_list(packages)" class="datasets"><li py:for="package in packages"
class="${'fullyopen' if (package.isopen() and package.resources) else None}"><div class="header">
@@ -59,7 +59,7 @@
<div class="search_meta"><py:if test="package.resources">
- <ul class="package_formats">
+ <ul class="dataset_formats"><py:for each="resource in package.resources"><py:if test="resource.format and not resource.format == ''"><li><a href="${resource.url}"
@@ -71,7 +71,7 @@
<ul class="openness"><py:if test="package.isopen()"><li>
- <a href="http://opendefinition.org/okd/" title="This package satisfies the Open Definition.">
+ <a href="http://opendefinition.org/okd/" title="This dataset satisfies the Open Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a></li>
@@ -95,7 +95,7 @@
</li></ul>
- <ul py:def="package_list_from_dict(packages)" class="packages">
+ <ul py:def="package_list_from_dict(packages)" class="datasets"><li py:for="package in packages"
class="${'fullyopen' if (package.isopen and package.get('resources')) else None}"><div class="header">
@@ -105,7 +105,7 @@
<div class="search_meta"><py:if test="package.resources">
- <ul class="package_formats">
+ <ul class="dataset_formats"><py:for each="resource in package.resources"><py:if test="resource.get('format')"><li><a href="${resource.get('url')}"
@@ -117,7 +117,7 @@
<ul class="openness"><py:if test="package.isopen"><li>
- <a href="http://opendefinition.org/okd/" title="This package satisfies the Open Definition.">
+ <a href="http://opendefinition.org/okd/" title="This dataset satisfies the Open Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a></li>
@@ -141,10 +141,10 @@
</li></ul>
- <!--! List of data package groups: pass in a collection of data package groups
+ <!--! List of dataset groups: pass in a collection of dataset groups
and this renders the standard group listing --><table py:def="group_list(groups)" class="groups">
- <tr><th>Title</th><th>Number of packages</th><th>Description</th></tr>
+ <tr><th>Title</th><th>Number of datasets</th><th>Description</th></tr><py:for each="group in groups"><tr><td><a href="${h.url_for(controller='group', action='read', id=group.name)}">${group.display_name}</a></td>
@@ -154,10 +154,10 @@
</py:for></table>
- <!--! List of data package groups: pass in a collection of data package groups
+ <!--! List of dataset groups: pass in a collection of dataset groups
and this renders the standard group listing. Same as the above, but using dictionaries --><table py:def="group_list_from_dict(groups)" class="groups">
- <tr><th>Title</th><th>Number of packages</th><th>Description</th></tr>
+ <tr><th>Title</th><th>Number of datasets</th><th>Description</th></tr><py:for each="group in groups"><tr><td><a href="${h.url_for(controller='group', action='read', id=group['name'])}">${group['display_name']}</a></td>
@@ -181,7 +181,7 @@
</py:for></table>
- <!--! Package openness icons -->
+ <!--! Dataset openness icons --><img py:def="package_license_icon(package)"
src="${g.site_url}/images/icons/door_${'open' if package.isopen() else 'grey'}.png"
title="License: ${package.license.title if hasattr(package.license, 'title') else '?'}"
@@ -190,7 +190,7 @@
<py:def function="package_resources_icon(package)" py:choose=""><a py:when="package.resources"
href="${h.url_for(controller='package', action='read', id=package.name, anchor='resources')}">
- <img src="${h.icon_url('arrow_down')}" title="View package resources" alt="DOWNLOAD" />
+ <img src="${h.icon_url('arrow_down')}" title="View dataset resources" alt="DOWNLOAD" /></a><img py:otherwise="" src="${h.icon_url('arrow_down_grey')}" title="No downloadable resources." alt="" />
--- a/ckan/templates/authorization_group/layout.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/authorization_group/layout.html Mon Sep 05 18:18:20 2011 +0100
@@ -21,7 +21,7 @@
<py:match path="primarysidebar"><li class="widget-container widget_text"><h2>Authorization Groups</h2>
- <p i18n:msg="">Instead of specifying the privileges of specific users on a package or group,
+ <p i18n:msg="">Instead of specifying the privileges of specific users on a dataset or group,
you can also specify a set of users that will share the same rights. To do that, an
<strong>authorization group</strong> can be set-up and users can be added to it.</p><p>
--- a/ckan/templates/group/edit.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/group/edit.html Mon Sep 05 18:18:20 2011 +0100
@@ -5,14 +5,6 @@
<py:def function="page_title">${c.grouptitle or c.groupname} - Edit - Groups</py:def><py:def function="page_heading">Edit: ${c.grouptitle or c.groupname}</py:def>
- <py:def function="optional_head">
- <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
-
- <!-- Package autocomplete -->
- <script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script>
- <script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script>
- <link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" />
- </py:def><div py:match="content">
${Markup(c.form)}
--- a/ckan/templates/group/edit_form.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/group/edit_form.html Mon Sep 05 18:18:20 2011 +0100
@@ -7,14 +7,14 @@
${h.literal(c.fieldset.render())}
<fieldset>
- <legend>Packages</legend>
+ <legend>Datasets</legend><ul py:for="pkg in c.fieldset.model.packages"><li>
- <input checked="checked" id="Group-packages-current" name="Group-packages-current" type="checkbox" value="${pkg.name}" />
+ <input checked="checked" id="Group-datasets-current" name="Group-packages-current" type="checkbox" value="${pkg.name}" /><label for="Group-packages_${pkg.name}" style="display: inline;">${pkg.name}</label></li></ul>
- <p py:if="not c.fieldset.model.packages">There are no packages currently in this group.</p>
+ <p py:if="not c.fieldset.model.packages">There are no datasets currently in this group.</p></fieldset>
${h.literal(c.fieldset2.render())}
--- a/ckan/templates/group/index.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/group/index.html Mon Sep 05 18:18:20 2011 +0100
@@ -3,8 +3,8 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">Groups of Data Packages</py:def>
- <py:def function="page_heading">Groups of Data Packages</py:def>
+ <py:def function="page_title">Groups of Datasets</py:def>
+ <py:def function="page_heading">Groups of Datasets</py:def><py:def function="optional_head"><style>#minornavigation { visibility: hidden; }</style>
--- a/ckan/templates/group/layout.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/group/layout.html Mon Sep 05 18:18:20 2011 +0100
@@ -9,7 +9,7 @@
<py:match path="primarysidebar"><li class="widget-container boxed widget_text"><h3>Groups section</h3>
- <p i18n:msg="">Whilst tags are great at collecting packages together, there are occasions when you want to restrict users from editing a collection. A <strong>group</strong> can be set-up to specify which users have permission to add or remove packages from it.</p>
+ <p i18n:msg="">Whilst tags are great at collecting datasets together, there are occasions when you want to restrict users from editing a collection. A <strong>group</strong> can be set-up to specify which users have permission to add or remove datasets from it.</p><p><span class="ckan_logged_in" style="display: none;">
To create a new group, please first <a href="${h.url_for(controller='user',action='login', id=None)}">login</a>.
--- a/ckan/templates/group/new.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/group/new.html Mon Sep 05 18:18:20 2011 +0100
@@ -5,15 +5,6 @@
<py:def function="page_title">New - Groups</py:def><py:def function="page_heading">New Group</py:def>
- <py:def function="optional_head">
- <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
-
- <!-- Package autocomplete and rack-up -->
- <script type="text/javascript" src="${g.site_url}/scripts/jquery.autocomplete.pack.js"></script>
- <script type="text/javascript" src="${g.site_url}/scripts/autocompleter.js"></script>
- <link rel="stylesheet" href="${g.site_url}/css/jquery.autocomplete.css" />
- </py:def>
-
<div py:match="content">
${Markup(c.form)}
</div>
--- a/ckan/templates/group/new_group_form.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/group/new_group_form.html Mon Sep 05 18:18:20 2011 +0100
@@ -63,25 +63,25 @@
</fieldset><fieldset>
- <legend>Packages</legend>
+ <legend>Datasets</legend><dl py:if="data.get('packages')"><py:for each="num, package in enumerate(data.get('packages'))">
- <dt><input checked="checked" id="packages__${num}__name" name="packages__${num}__name" type="checkbox" value="${package['name']}"/></dt>
+ <dt><input checked="checked" id="datasets__${num}__name" name="packages__${num}__name" type="checkbox" value="${package['name']}"/></dt><dd><label for="packages__${num}__name">${package['name']}</label></dd></py:for></dl>
- <p py:if="not data.get('packages')">There are no packages currently in this group.</p>
+ <p py:if="not data.get('packages')">There are no datasets currently in this group.</p></fieldset><fieldset><legend>
- Add packages
+ Add datasets
</legend><dl>
- <dt><label class="field_opt" for="packages__${len(data.get('packages', []))}__name">Package</label></dt>
- <dd><input class="autocomplete-package" id="packages__${len(data.get('packages', []))}__name" name="packages__${len(data.get('packages', []))}__name" type="text" /></dd>
+ <dt><label class="field_opt" for="packages__${len(data.get('packages', []))}__name">Dataset</label></dt>
+ <dd><input class="autocomplete-dataset" id="datasets__${len(data.get('packages', []))}__name" name="packages__${len(data.get('packages', []))}__name" type="text" /></dd></dl></fieldset>
--- a/ckan/templates/group/read.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/group/read.html Mon Sep 05 18:18:20 2011 +0100
@@ -32,8 +32,8 @@
</py:match><py:match path="content">
- <h3>Packages:</h3>
- <p i18n:msg="item_count">There are ${c.page.item_count} packages in this group.</p>
+ <h3>Datasets:</h3>
+ <p i18n:msg="item_count">There are ${c.page.item_count} datasets in this group.</p>
${c.page.pager()}
${package_list(c.page.items)}
${c.page.pager()}
--- a/ckan/templates/home/about.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/home/about.html Mon Sep 05 18:18:20 2011 +0100
@@ -9,7 +9,7 @@
<h2>About CKAN</h2><p i18n:msg="">CKAN is the Comprehensive Knowledge Archive Network, a <strong>registry</strong> of <a
- href="http://opendefinition.org/">open knowledge</a> packages and projects
+ href="http://opendefinition.org/">open knowledge</a> datasets and projects
(and a few closed ones).</p><p i18n:msg="">CKAN makes it easy to <strong>find, share and reuse open
@@ -22,7 +22,7 @@
<img src="${g.site_url}/images/ckan-features.png" alt="CKAN Features Overview" style="margin-left: 4em; margin-bottom: 2em;" /><p i18n:msg="">As the diagram shows, CKAN combines the features of a listing/registry,
- a package index and a wiki. As a registry it acts like <a
+ a dataset index and a wiki. As a registry it acts like <a
href="http://www.freshmeat.net/">freshmeat</a> but for open data and
content resources. However it adds to a simple registry in key ways.</p>
--- a/ckan/templates/home/index.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/home/index.html Mon Sep 05 18:18:20 2011 +0100
@@ -117,9 +117,9 @@
<h1>Find data</h1><form action="/package" method="GET">
- <input name="q" value="" class="search-field" placeholder="Find data packages" />
+ <input name="q" value="" class="search-field" placeholder="Find datasets" /></form>
- ${g.site_title} contains <a href="/package">${c.package_count} data packages</a> that you can
+ ${g.site_title} contains <a href="${h.url_for(controller='package')}">${c.package_count} datasets</a> that you can
browse, learn about and download.
</div></div>
@@ -131,9 +131,9 @@
to find other people interested in your data.
<py:choose test="h.am_authorized(c, actions.PACKAGE_CREATE)">
- <a py:when="" href="/package/new" class="create-button">Create a data package »</a>
+ <a py:when="" href="${h.url_for(controller='package', action='new')}" class="create-button">Create a dataset »</a><py:otherwise>
- <a href="/user/login" class="create-button">Sign up »</a>
+ <a href="${h.url_for(controller='user', action='login')}" class="create-button">Sign up »</a></py:otherwise></py:choose></div>
@@ -160,7 +160,7 @@
<p>
${h.markdown_extract(group.description)}
</p>
- <strong>${group.title} has ${len(group.packages)} data packages.</strong>
+ <strong>${group.title} has ${len(group.packages)} datasets.</strong></div></py:for></div>
--- a/ckan/templates/importer/importer.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/importer/importer.html Mon Sep 05 18:18:20 2011 +0100
@@ -5,8 +5,8 @@
<py:def function="page_title">Importer</py:def><div py:match="content">
- <h2>Import Data Packages</h2>
- <p>Here you can supply an Excel file with details of multiple packages and import these into ${g.site_title}.</p>
+ <h2>Import Datasets</h2>
+ <p>Here you can supply an Excel file with details of multiple datasets and import these into ${g.site_title}.</p><div><h3 py:if="c.error" class="form-errors">
Error: ${c.error}
--- a/ckan/templates/importer/preview.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/importer/preview.html Mon Sep 05 18:18:20 2011 +0100
@@ -13,7 +13,7 @@
</h3>
${h.form(h.url_for(controller='importer', action='do_import'), multipart=True, id='import-preview')}
- <p>${c.num_pkgs} package${'s' if c.num_pkgs != 1 else ''} read from ${c.import_filename}:</p>
+ <p>${c.num_pkgs} dataset${'s' if c.num_pkgs != 1 else ''} read from ${c.import_filename}:</p><py:for each="pkg in c.import_previews"><div>
@@ -22,7 +22,7 @@
</py:for><py:if test="c.pkgs_suppressed">
- <p>Further package previews not shown.</p>
+ <p>Further dataset previews not shown.</p></py:if><label for="log_message">Edit summary (briefly describe the changes you have made)</label>
--- a/ckan/templates/layout_base.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/layout_base.html Mon Sep 05 18:18:20 2011 +0100
@@ -90,11 +90,11 @@
<div class="menu"><span id="menusearch"><form action="${url(controller='package', action='search')}" method="GET">
- <input name="q" value="${c.q if hasattr(c, 'q') else ''}" class="search" placeholder="Find data packages" />
+ <input name="q" value="${c.q if hasattr(c, 'q') else ''}" class="search" placeholder="Find datasets" /></form></span><div id="mainmenu">
- <span py:if="h.check_access('package_create')">${h.nav_link(c, _('Add a package'), controller='package', action='new', id=None)}</span>
+ <span py:if="h.check_access('package_create')">${h.nav_link(c, _('Add a dataset'), controller='package', action='new', id=None)}</span>
${h.nav_link(c, _('Search'), controller='package', action='index', id=None, highlight_actions = 'new index')}
${h.nav_link(c, _('Groups'), controller='group', action='index', id=None)}
</div>
--- a/ckan/templates/package/authz.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/authz.html Mon Sep 05 18:18:20 2011 +0100
@@ -2,7 +2,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.pkgtitle or c.pkgname} - Authorization - Data Packages</py:def>
+ <py:def function="page_title">${c.pkgtitle or c.pkgname} - Authorization - Datasets</py:def><py:def function="page_heading">Authorization: ${c.pkgtitle or c.pkgname}</py:def><div py:match="content">
--- a/ckan/templates/package/comments.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/comments.html Mon Sep 05 18:18:20 2011 +0100
@@ -2,9 +2,9 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Data Packages - History</py:def>
+ <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Datasets - History</py:def>
- <div py:match="content" class="package">
+ <div py:match="content" class="dataset"><h2 class="head">
${c.pkg_dict.get('title', '')}
<span class="name">(${c.pkg_dict['name']})</span>
--- a/ckan/templates/package/edit.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/edit.html Mon Sep 05 18:18:20 2011 +0100
@@ -3,7 +3,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.pkg.title or c.pkg.name} - Edit - Data Packages</py:def>
+ <py:def function="page_title">${c.pkg.title or c.pkg.name} - Edit - Datasets</py:def><py:def function="page_heading">Edit: ${c.pkg.title or c.pkg.name}</py:def><py:def function="body_class">hide-sidebar</py:def>
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="${g.site_url}/css/flexitable.css" /></py:def>
- <div py:match="content" class="package">
+ <div py:match="content" class="dataset"><div id="preview" style="margin-left: 20px;" py:if="c.preview"><hr /><h2>Preview</h2>
--- a/ckan/templates/package/edit_form.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/edit_form.html Mon Sep 05 18:18:20 2011 +0100
@@ -1,4 +1,4 @@
- <form id="package-edit" action="" method="post" class="ckan package_create_form"
+ <form id="dataset-edit" action="" method="post" class="ckan dataset_create_form"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
--- a/ckan/templates/package/form_fields.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/form_fields.html Mon Sep 05 18:18:20 2011 +0100
@@ -4,7 +4,7 @@
<script type="text/javascript">
jQuery(document).ready(function($) {
- CKAN.Utils.PackageSlugCreator.create($('#Package--title'), $('#Package--name'));
+ CKAN.Utils.PackageSlugCreator.create($('#Dataset--title'), $('#Dataset--name'));
});
</script>
--- a/ckan/templates/package/history.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/history.html Mon Sep 05 18:18:20 2011 +0100
@@ -3,25 +3,25 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Data Packages - History</py:def>
+ <py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Datasets - History</py:def><py:def function="page_heading">History: ${c.pkg.title or c.pkg.name}</py:def><!-- Sidebar --><py:match path="primarysidebar"><li class="widget-container widget_text"><h4>Updates</h4>
- <p class="atom-feed-link package-history-link">
+ <p class="atom-feed-link dataset-history-link"><a
href="${url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}"
- title="${g.site_title} - Package History - ${c.pkg_dict['name']}">
+ title="${g.site_title} - Dataset History - ${c.pkg_dict['name']}">
Subscribe »</a></p></li></py:match>
- <div py:match="content" class="package">
+ <div py:match="content" class="dataset"><h3>Revisions</h3>
- <form id="package-revisions" action="diff" method="post"
+ <form id="dataset-revisions" action="diff" method="post"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
>
@@ -46,7 +46,7 @@
<a href="${h.url_for(controller='revision',action='read',id=rev['id'])}">${rev['id'][:4]}…</a></td><td>
- <a href="${h.url_for(controller='package',action='read',id='%s@%s' % (c.pkg_dict['name'], rev['timestamp']))}" title="${'Read package as of %s' % rev['timestamp']}">${h.render_datetime(rev['timestamp'])}</a></td>
+ <a href="${h.url_for(controller='package',action='read',id='%s@%s' % (c.pkg_dict['name'], rev['timestamp']))}" title="${'Read dataset as of %s' % rev['timestamp']}">${h.render_datetime(rev['timestamp'])}</a></td><td>${h.linked_user(rev['author'])}</td><td>${rev['message']}</td></tr>
@@ -57,7 +57,7 @@
</div><!-- content --><py:def function="optional_feed">
- <link rel="alternate" type="application/atom+xml" title="Package History"
+ <link rel="alternate" type="application/atom+xml" title="Dataset History"
href="${url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}" /></py:def>
--- a/ckan/templates/package/new.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/new.html Mon Sep 05 18:18:20 2011 +0100
@@ -3,8 +3,8 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="page_title">New - Data Packages</py:def>
- <py:def function="page_heading">Register a New Data Package</py:def>
+ <py:def function="page_title">New - Datasets</py:def>
+ <py:def function="page_heading">Register a New Dataset</py:def><py:def function="body_class">hide-sidebar</py:def>
--- a/ckan/templates/package/new_package_form.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/new_package_form.html Mon Sep 05 18:18:20 2011 +0100
@@ -1,4 +1,4 @@
-<form id="package-edit" class="package_create_form ckan" method="post"
+<form id="dataset-edit" class="dataset_create_form ckan" method="post"
py:attrs="{'class':'has-errors'} if errors else {}"
xmlns:i18n="http://genshi.edgewall.org/i18n"
xmlns:py="http://genshi.edgewall.org/"
@@ -18,13 +18,13 @@
<dl><dt><label class="field_opt" for="title">Title</label></dt><dd><input id="title" name="title" type="text" value="${data.get('title', '')}"/></dd>
- <dd class="instructions basic">A short descriptive title for the data set.</dd>
+ <dd class="instructions basic">A short descriptive title for the dataset.</dd><dd class="instructions further">It should not be a description though - save that for the Notes field. Do not give a trailing full stop.</dd><dd class="field_error" py:if="errors.get('title', '')">${errors.get('title', '')}</dd><dt><label class="field_req" for="name">Name *</label></dt><dd><input id="name" maxlength="100" name="name" type="text" value="${data.get('name', '')}" /></dd>
- <dd class="instructions basic">A unique identifier for the package.</dd>
+ <dd class="instructions basic">A unique identifier for the dataset.</dd><dd class="instructions further">It should be broadly humanly readable, in the spirit of Semantic Web URIs. Only use an acronym if it is widely recognised. Renaming is possible but discouraged.</dd><dd class="hints">2+ characters, lowercase, using only 'a-z0-9' and '-_'</dd><dd class="field_error" py:if="errors.get('name', '')">${errors.get('name', '')}</dd>
@@ -38,7 +38,7 @@
<dt><label class="field_opt" for="notes">Notes</label></dt><dd><textarea cols="60" id="notes" name="notes" rows="15">${data.get('notes', '')}</textarea></dd><dd class="instructions basic">The main description of the dataset</dd>
- <dd class="instructions further">It is often displayed with the package title. In particular, it should start with a short sentence that describes the data set succinctly, because the first few words alone may be used in some views of the data sets.</dd>
+ <dd class="instructions further">It is often displayed with the dataset title. In particular, it should start with a short sentence that describes the dataset succinctly, because the first few words alone may be used in some views of the datasets.</dd><dd class="hints">You can use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown formatting</a> here.</dd><dt><label class="field_opt" for="license_id">Licence</label></dt>
@@ -97,9 +97,9 @@
</table><div class="instructions basic">The files containing the data or address of the APIs for accessing it.</div>
- <div class="instructions further"><br />These can be repeated as required. For example if the data is being supplied in multiple formats, or split into different areas or time periods, each file is a different 'resource' which should be described differently. They will all appear on the dataset page on CKAN together.<br /><br /><b>URL:</b> This is the Internet link directly to the data - by selecting this link in a web browser, the user will immediately download the full data set. Note that datasets are not hosted on this site, but by the publisher of the data. Alternatively the URL can point to an API server such as a SPARQL endpoint or JSON-P service.<br /><b>Format:</b> This should give the file format in which the data is supplied. <br /><b>Description</b> Any information you want to add to describe the resource.<br /></div>
+ <div class="instructions further"><br />These can be repeated as required. For example if the data is being supplied in multiple formats, or split into different areas or time periods, each file is a different 'resource' which should be described differently. They will all appear on the dataset page on CKAN together.<br /><br /><b>URL:</b> This is the Internet link directly to the data - by selecting this link in a web browser, the user will immediately download the full dataset. Note that datasets are not hosted on this site, but by the publisher of the data. Alternatively the URL can point to an API server such as a SPARQL endpoint or JSON-P service.<br /><b>Format:</b> This should give the file format in which the data is supplied. <br /><b>Description</b> Any information you want to add to describe the resource.<br /></div><div class="hints">Format choices: CSV | RDF | XML | XBRL | SDMX | HTML+RDFa | Other as appropriate</div>
- <div class="field_error" py:if="errors.get('resources', '')">Package resource(s) incomplete.</div>
+ <div class="field_error" py:if="errors.get('resources', '')">Dataset resource(s) incomplete.</div></fieldset><fieldset id="groups">
@@ -210,7 +210,7 @@
<p class="hints"><strong>Important:</strong> By submitting content, you agree to release your contributions
- under the open license specified on the <a href="/license">license page</a>. Please <strong>refrain</strong> from editing this page if you are <strong>not</strong> happy to do this.
+ under the <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open Database License</a>. Please <strong>refrain</strong> from editing this page if you are <strong>not</strong> happy to do this.
</p>
--- a/ckan/templates/package/read.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/read.html Mon Sep 05 18:18:20 2011 +0100
@@ -12,7 +12,7 @@
py:strip=""><py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])}
- - Data Packages</py:def>
+ - Datasets</py:def><py:def function="page_heading" property="dc:title">${c.pkg_dict['title']}</py:def>
@@ -65,7 +65,7 @@
</py:if><p class="hint"><py:if test="not c.pkg.groups">
- Groups are collections of packages maintained by users of ${g.site_title}. This package has not been added to any groups yet.
+ Groups are collections of dataset maintained by users of ${g.site_title}. This dataset has not been added to any groups yet.
</py:if>
@@ -83,7 +83,7 @@
href="${c.harvest_catalogue_url}">${c.harvest_catalogue_name}</a></li><li py:if="c.package_relationships">
- <h3>Related packages</h3>
+ <h3>Related dataset</h3><ul><py:for each="pkg, relationship_str, comment in c.package_relationships"><li>
@@ -102,7 +102,7 @@
<li class="widget-container boxed widget_text"><py:if test="c.pkg.isopen() and c.pkg.resources"><h3>
- This Package is Open
+ This Dataset is Open
</h3><p py:if="c.pkg.license_id">
License:
@@ -116,18 +116,18 @@
<p class="okd"><a
href="http://www.opendefinition.org/okd/"
- title="This package satisfies the Open Knowledge Definition.">
+ title="This dataset satisfies the Open Knowledge Definition."><img src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" alt="[Open Data]" /></a></p></py:if><py:if test="not(c.pkg.isopen() and c.pkg.resources)">
- <h3 i18n:msg="">This package is Not Open</h3>
+ <h3 i18n:msg="">This dataset is Not Open</h3><p>Either because it is not openly licensed or is missing
downloadable resources.</p><p class="widget_action">
- <a href="http://isitopendata.org/enquiry/start/?ckan_package=${c.pkg.name}">Start an enquiry on IsItOpenData »</a>
+ <a href="http://isitopendata.org/enquiry/start/?ckan_dataset=${c.pkg.name}">Start an enquiry on IsItOpenData »</a></p></py:if></li>
@@ -136,8 +136,8 @@
<div py:match="content"><py:if test="c.pkg_revision_id"><div id="revision" class="widget-container">
- <p py:if="c.pkg_revision_not_latest">This is an old revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}. It may differ significantly from the <a href="${url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
- <p py:if="not c.pkg_revision_not_latest">This is the current revision of this package, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}.</p>
+ <p py:if="c.pkg_revision_not_latest">This is an old revision of this dataset, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}. It may differ significantly from the <a href="${url(controller='package', action='read', id=c.pkg.name)}">current revision</a>.</p>
+ <p py:if="not c.pkg_revision_not_latest">This is the current revision of this dataset, as edited <!--!by ${h.linked_user(rev.author)}-->at ${h.render_datetime(c.pkg_revision_timestamp)}.</p></div></py:if>
@@ -152,7 +152,7 @@
</py:def><py:def function="optional_feed">
- <link rel="alternate" type="application/atom+xml" title="Package History"
+ <link rel="alternate" type="application/atom+xml" title="Dataset History"
href="${url(controller='package', action='history', id=c.pkg.name, format='atom', days=7)}" /></py:def>
--- a/ckan/templates/package/read_core.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/read_core.html Mon Sep 05 18:18:20 2011 +0100
@@ -3,8 +3,8 @@
py:strip=""
><xi:include href="../_util.html" />
- <div id="package" class="package">
- <!-- About package -->
+ <div id="dataset" class="dataset">
+ <!-- About dataset --><div class="notes" py:if="str(c.pkg_notes_formatted).strip()">
${c.pkg_notes_formatted}
</div>
@@ -39,7 +39,7 @@
This is a list of all known formats and datasets for <em>${c.pkg_dict.get('title', '')}</em>. If you know of another (CSV, SPARQL end-point etc.) ${h.subnav_link(c, 'please edit this page and add it to the list', controller='package', action='edit', id=c.pkg.name)}.
</caption></table>
- <table py:otherwise=""><tr><th>Resources</th><td>None given for this package.</td></tr></table>
+ <table py:otherwise=""><tr><th>Resources</th><td>None given for this dataset.</td></tr></table></py:choose></div>
@@ -47,10 +47,10 @@
<py:def function="details_item(label, value)"><tr>
- <td class="package-label">
+ <td class="dataset-label">
${label}
</td>
- <td class="package-details">
+ <td class="dataset-details">
${value}
</td></tr>
@@ -68,8 +68,8 @@
<tbody><tr py:for="i, (key, value) in enumerate(c.pkg_extras)"
rel="dc:relation" resource="_:extra${i}">
- <td class="package-label" property="rdfs:label">${_(key)}</td>
- <td class="package-details" property="rdf:value">${value}</td>
+ <td class="dataset-label" property="rdfs:label">${_(key)}</td>
+ <td class="dataset-details" property="rdf:value">${value}</td></tr></tbody><caption py:if="not c.is_preview and h.check_access('package_update',{'id':c.pkg.id})">
@@ -78,6 +78,6 @@
</table></div>
- </div><!-- /package -->
+ </div><!-- /dataset --></html>
--- a/ckan/templates/package/search.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/search.html Mon Sep 05 18:18:20 2011 +0100
@@ -21,7 +21,7 @@
<py:match path="primarysidebar"><li class="widget-container boxed widget_text" py:if="h.check_access('package_create')">
- <h3>Add a package</h3>
+ <h3>Add a dataset</h3><p>
Do you know of a dataset that should be added to ${g.site_title}?
<br/>
@@ -61,10 +61,10 @@
Please try another search term.</p></py:if><py:if test="request.params">
- <h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> packages found</h4>
+ <h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> datasets found</h4></py:if><py:if test="c.page.item_count == 0 and request.params">
- <p i18n:msg="">Would you like to <a href="${h.url_for(action='new', id=None)}">create a new package?</a></p>
+ <p i18n:msg="">Would you like to <a href="${h.url_for(action='new', id=None)}">create a new dataset?</a></p></py:if>
${package_list_from_dict(c.page.items)}
${c.page.pager(q=c.q)}
--- a/ckan/templates/package/search_form.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/package/search_form.html Mon Sep 05 18:18:20 2011 +0100
@@ -5,15 +5,15 @@
py:strip=""
>
-<form id="package-search" class="package-search" action="${h.url_for(controller='package', action='search', id=None)}" method="GET">
+<form id="dataset-search" class="dataset-search" action="${h.url_for(controller='package', action='search', id=None)}" method="GET"><input type="search" class="search" name="q" value="${c.q}" autocomplete="off" results="5" placeholder="Search..." /><span py:if="c.fields"><py:for each="(k, v) in c.fields"><input type="hidden" name="${k}" value="${v}" /></py:for></span>
- <div class="package-search-filters">Filter by <label for="open_only" class="inline">${h.checkbox(name='open_only', checked=c.open_only)} packages with open licenses</label>
- <label for="downloadable_only" class="inline">${h.checkbox(name='downloadable_only', checked=c.downloadable_only)} packages with downloads</label>
+ <div class="dataset-search-filters">Filter by <label for="open_only" class="inline">${h.checkbox(name='open_only', checked=c.open_only)} datasets with open licenses</label>
+ <label for="downloadable_only" class="inline">${h.checkbox(name='downloadable_only', checked=c.downloadable_only)} datasets with downloads</label><input type="submit" value="${_('Search')}" class="button" /></div></form>
--- a/ckan/templates/revision/read.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/revision/read.html Mon Sep 05 18:18:20 2011 +0100
@@ -42,7 +42,7 @@
${c.revision.message}
<h3>Changes</h3>
- <h4>Packages</h4>
+ <h4>Datasets</h4><ul><py:for each="pkg in c.packages"><li>
@@ -51,11 +51,11 @@
</py:for></ul>
- <h4>Packages' Tags</h4>
+ <h4>Datasets' Tags</h4><ul><py:for each="pkgtag in c.pkgtags"><li>
- Package - ${h.link_to(pkgtag.package.name, h.url_for(controller='package', action='read', id=pkgtag.package.name))},
+ Dataset - ${h.link_to(pkgtag.package.name, h.url_for(controller='package', action='read', id=pkgtag.package.name))},
Tag - ${h.link_to(pkgtag.tag.name, h.url_for(controller='tag', action='read', id=pkgtag.tag.name))}
</li></py:for>
--- a/ckan/templates/tag/read.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/tag/read.html Mon Sep 05 18:18:20 2011 +0100
@@ -7,7 +7,7 @@
<py:def function="page_heading">Tag: ${c.tag['name']}</py:def><div py:match="content">
- <p i18n:msg="package_count, tagname">There are ${len(c.tag['packages'])} packages tagged with <strong>${c.tag['name']}</strong>:</p>
+ <p i18n:msg="count, tagname">There are ${len(c.tag['packages'])} datasets tagged with <strong>${c.tag['name']}</strong>:</p>
${package_list_from_dict(c.tag['packages'])}
</div>
--- a/ckan/templates/user/edit.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/user/edit.html Mon Sep 05 18:18:20 2011 +0100
@@ -8,10 +8,6 @@
Edit User: ${c.userobj.display_name}
</py:def>
- <py:def function="optional_head">
- <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
- </py:def>
-
<div py:match="content"><a href="#preview" py:if="c.preview">(skip to preview)</a>
--- a/ckan/templates/user/login.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/user/login.html Mon Sep 05 18:18:20 2011 +0100
@@ -18,7 +18,7 @@
<li class="widget-container boxed widget_text"><h2>Not a member?</h2><p>
- Join CKAN to contribute packages under your own name.
+ Join CKAN to contribute datasets under your own name.
</p><ul><li>${h.link_to(_('Register'), h.url_for(action='register'))}</li>
--- a/ckan/templates/user/new.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/user/new.html Mon Sep 05 18:18:20 2011 +0100
@@ -2,10 +2,6 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="optional_head">
- <link rel="stylesheet" href="${g.site_url}/css/forms.css" type="text/css" media="screen, print" />
- </py:def>
-
<py:match path="primarysidebar"><li class="widget-container widget_text"><h3>Have an OpenID?</h3>
--- a/ckan/templates/user/read.html Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/templates/user/read.html Mon Sep 05 18:18:20 2011 +0100
@@ -18,7 +18,7 @@
<h3>Activity</h3><ul><li><strong>Number of edits:</strong> ${c.user_dict['number_of_edits']}</li>
- <li><strong>Number of packages administered:</strong> ${c.user_dict['number_administered_packages']}</li>
+ <li><strong>Number of datasets administered:</strong> ${c.user_dict['number_administered_packages']}</li></ul></li></py:match>
--- a/ckan/tests/forms/test_authz.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/forms/test_authz.py Mon Sep 05 18:18:20 2011 +0100
@@ -32,7 +32,7 @@
linker = ckan.forms.authz.get_package_linker('delete')
pr = anna.roles[0]
out = linker(pr)
- assert '<a href="/package/authz/%s' % pr.package.name in out, out
+ assert '<a href="/dataset/authz/%s' % pr.package.name in out, out
class TestSync:
--- a/ckan/tests/functional/api/base.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/api/base.py Mon Sep 05 18:18:20 2011 +0100
@@ -71,11 +71,11 @@
def package_offset(self, package_name=None):
if package_name is None:
# Package Register
- return self.offset('/rest/package')
+ return self.offset('/rest/dataset')
else:
# Package Entity
package_ref = self.package_ref_from_name(package_name)
- return self.offset('/rest/package/%s' % package_ref)
+ return self.offset('/rest/dataset/%s' % package_ref)
def package_ref_from_name(self, package_name):
package = self.get_package_by_name(unicode(package_name))
@@ -140,18 +140,18 @@
package_1_ref = self.package_ref_from_name(package_1_name)
if package_2_name is None:
if not relationship_type:
- return self.offset('/rest/package/%s/relationships' % \
+ return self.offset('/rest/dataset/%s/relationships' % \
package_1_ref)
else:
- return self.offset('/rest/package/%s/%s' %
+ return self.offset('/rest/dataset/%s/%s' %
(package_1_ref, relationship_type))
else:
package_2_ref = self.package_ref_from_name(package_2_name)
if not relationship_type:
- return self.offset('/rest/package/%s/relationships/%s' % \
+ return self.offset('/rest/dataset/%s/relationships/%s' % \
(package_1_ref, package_2_ref))
else:
- return self.offset('/rest/package/%s/%s/%s' % \
+ return self.offset('/rest/dataset/%s/%s/%s' % \
(package_1_ref,
relationship_type,
package_2_ref))
@@ -221,7 +221,7 @@
# Todo: What is the deal with ckan_url? And should this use IDs rather than names?
assert 'ckan_url' in msg
- assert '"ckan_url": "http://test.ckan.net/package/annakarenina"' in msg, msg
+ assert '"ckan_url": "http://test.ckan.net/dataset/annakarenina"' in msg, msg
def assert_msg_represents_roger(self, msg):
assert 'roger' in msg, msg
--- a/ckan/tests/functional/api/model/test_package.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/api/model/test_package.py Mon Sep 05 18:18:20 2011 +0100
@@ -151,19 +151,19 @@
'name':u'testpackage06_400',
'resources':[u'should_be_a_dict'],
}
- offset = self.offset('/rest/package')
+ offset = self.offset('/rest/dataset')
postparams = '%s=1' % self.dumps(test_params)
res = self.app.post(offset, params=postparams, status=self.STATUS_400_BAD_REQUEST,
extra_environ=self.extra_environ)
def test_register_post_denied(self):
- offset = self.offset('/rest/package')
+ offset = self.offset('/rest/dataset')
postparams = '%s=1' % self.dumps(self.package_fixture_data)
res = self.app.post(offset, params=postparams, status=self.STATUS_403_ACCESS_DENIED)
def test_register_post_readonly_fields(self):
# (ticket 662) Post a package with readonly field such as 'id'
- offset = self.offset('/rest/package')
+ offset = self.offset('/rest/dataset')
data = {'name': u'test_readonly',
'id': u'not allowed to be set',
}
@@ -176,7 +176,7 @@
def test_entity_get_ok(self):
package_refs = [self.anna.name, self.anna.id]
for ref in package_refs:
- offset = self.offset('/rest/package/%s' % ref)
+ offset = self.offset('/rest/dataset/%s' % ref)
res = self.app.get(offset, status=self.STATUS_200_OK)
self.assert_msg_represents_anna(msg=res.body)
@@ -190,7 +190,7 @@
self.assert_msg_represents_anna(msg=msg)
def test_entity_get_not_found(self):
- offset = self.offset('/rest/package/22222')
+ offset = self.offset('/rest/dataset/22222')
res = self.app.get(offset, status=self.STATUS_404_NOT_FOUND)
self.remove()
@@ -232,7 +232,7 @@
res = self.app.delete(offset, status=self.STATUS_403_ACCESS_DENIED)
def test_09_update_package_entity_not_found(self):
- offset = self.offset('/rest/package/22222')
+ offset = self.offset('/rest/dataset/22222')
postparams = '%s=1' % self.dumps(self.package_fixture_data)
res = self.app.post(offset, params=postparams,
status=self.STATUS_404_NOT_FOUND,
@@ -286,7 +286,7 @@
# because you should be able to specify the package both ways round
# for both versions of the API.
package_ref = getattr(pkg, package_ref_attribute)
- offset = self.offset('/rest/package/%s' % package_ref)
+ offset = self.offset('/rest/dataset/%s' % package_ref)
params = '%s=1' % self.dumps(new_fixture_data)
method_func = getattr(self.app, method_str)
res = method_func(offset, params=params, status=self.STATUS_200_OK,
@@ -498,13 +498,13 @@
def test_entity_delete_not_found(self):
package_name = u'random_one'
assert not model.Session.query(model.Package).filter_by(name=package_name).count()
- offset = self.offset('/rest/package/%s' % package_name)
+ offset = self.offset('/rest/dataset/%s' % package_name)
res = self.app.delete(offset, status=self.STATUS_404_NOT_FOUND,
extra_environ=self.extra_environ)
def test_package_revisions(self):
# check original revision
- res = self.app.get(self.offset('/rest/package/%s/revisions' % 'annakarenina'))
+ res = self.app.get(self.offset('/rest/dataset/%s/revisions' % 'annakarenina'))
revisions = res.json
assert len(revisions) == 1, len(revisions)
expected_keys = set(('id', 'message', 'author', 'timestamp', 'approved_timestamp'))
@@ -518,7 +518,7 @@
model.repo.commit_and_remove()
# check new revision is there
- res = self.app.get(self.offset('/rest/package/%s/revisions' % 'annakarenina'))
+ res = self.app.get(self.offset('/rest/dataset/%s/revisions' % 'annakarenina'))
revisions = res.json
assert len(revisions) == 2, len(revisions)
@@ -532,7 +532,7 @@
model.repo.commit_and_remove()
# check new revision is there
- res = self.app.get(self.offset('/rest/package/%s/revisions' % 'annakarenina'))
+ res = self.app.get(self.offset('/rest/dataset/%s/revisions' % 'annakarenina'))
revisions = res.json
assert len(revisions) == 3, len(revisions)
--- a/ckan/tests/functional/api/test_package_search.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/api/test_package_search.py Mon Sep 05 18:18:20 2011 +0100
@@ -27,7 +27,7 @@
'geographic_coverage':'England, Wales'},
}
CreateTestData.create_arbitrary(self.package_fixture_data)
- self.base_url = self.offset('/search/package')
+ self.base_url = self.offset('/search/dataset')
@classmethod
def teardown_class(cls):
--- a/ckan/tests/functional/test_authz.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/test_authz.py Mon Sep 05 18:18:20 2011 +0100
@@ -13,8 +13,8 @@
class AuthzTestBase(object):
INTERFACES = ['wui', 'rest']
- DEFAULT_ENTITY_TYPES = ['package', 'group']
- ENTITY_CLASS_MAP = {'package': model.Package,
+ DEFAULT_ENTITY_TYPES = ['dataset', 'group']
+ ENTITY_CLASS_MAP = {'dataset': model.Package,
'group': model.Group,
'package_relationship': model.PackageRelationship}
@@ -81,11 +81,13 @@
'Should NOT be able to %s %s %r as user %r on %r interface. Diagnostics: %r'
raise Exception(msg % (action, entity_type, entity_name, user.name, interface, truncate(repr(diagnostics), 1000)))
- def _test_via_wui(self, action, user, entity_name, entity='package'):
+ def _test_via_wui(self, action, user, entity_name, entity='dataset'):
# Test action on WUI
str_required_in_response = entity_name
+ controller_name = 'package' if entity == 'dataset' else entity
+
if action in (model.Action.EDIT, model.Action.READ):
- offset = url_for(controller=entity, action=action, id=unicode(entity_name))
+ offset = url_for(controller=controller_name, action=action, id=unicode(entity_name))
elif action == 'search':
offset = '/%s/search?q=%s' % (entity, entity_name)
str_required_in_response = '/%s"' % entity_name
@@ -98,7 +100,7 @@
offset = '/%s/new' % entity
str_required_in_response = 'New'
elif action == 'delete':
- offset = url_for(controller=entity, action=model.Action.EDIT, id=unicode(entity_name))
+ offset = url_for(controller=controller_name, action=model.Action.EDIT, id=unicode(entity_name))
str_required_in_response = 'state'
else:
raise NotImplementedError
@@ -114,7 +116,7 @@
self.app.reset()
return is_ok, [offset, user.name, tests, res.status, res.body]
- def _test_via_api(self, action, user, entity_name, entity_type='package'):
+ def _test_via_api(self, action, user, entity_name, entity_type='dataset'):
# Test action on REST
str_required_in_response = entity_name
if action == model.Action.EDIT:
@@ -159,11 +161,11 @@
if action == 'edit':
func = self.app.put
if isinstance(entity_name, basestring):
- offset = '/api/rest/package/%s/relationships' % entity_name
+ offset = '/api/rest/dataset/%s/relationships' % entity_name
else:
assert isinstance(entity_name, tuple)
if len(entity_name) == 1:
- offset = '/api/rest/package/%s/relationships' % entity_name[0]
+ offset = '/api/rest/dataset/%s/relationships' % entity_name[0]
else:
if len(entity_name) == 2:
entity_properties = {'entity1': entity_name[0],
@@ -176,9 +178,9 @@
else:
raise NotImplementedError
if action in 'list':
- offset = '/api/rest/package/%(entity1)s/relationships/%(entity2)s' % entity_properties
+ offset = '/api/rest/dataset/%(entity1)s/relationships/%(entity2)s' % entity_properties
else:
- offset = '/api/rest/package/%(entity1)s/%(type)s/%(entity2)s' % entity_properties
+ offset = '/api/rest/dataset/%(entity1)s/%(type)s/%(entity2)s' % entity_properties
str_required_in_response = '"object": "%(entity2)s", "type": "%(type)s", "subject": "%(entity1)s"' % entity_properties
if user.name == 'visitor':
@@ -188,7 +190,6 @@
res = func(offset, params=postparams,
extra_environ=environ,
expect_errors=True)
-
tests = {}
tests['str_required (%s)' % str_required_in_response] = bool(str_required_in_response in res)
tests['error string'] = bool('error' not in res)
@@ -331,7 +332,7 @@
self._test_can('edit', self.visitor, [], interfaces=['rest'])
def test_visitor_creates(self):
- self._test_can('create', self.visitor, [], interfaces=['wui'], entity_types=['package'])
+ self._test_can('create', self.visitor, [], interfaces=['wui'], entity_types=['dataset'])
self._test_cant('create', self.visitor, [], interfaces=['wui'], entity_types=['group']) # need to be sysadmin
self._test_cant('create', self.visitor, [], interfaces=['rest'])
@@ -364,9 +365,9 @@
def test_search_deleted(self):
# can't search groups
- self._test_can('search', self.pkggroupadmin, ['xx', 'rx', 'wx', 'rr', 'wr', 'ww', 'deleted'], entity_types=['package'])
- self._test_can('search', self.mrloggedin, ['rx', 'wx', 'rr', 'wr', 'ww'], entity_types=['package'])
- self._test_cant('search', self.mrloggedin, ['deleted', 'xx'], entity_types=['package'])
+ self._test_can('search', self.pkggroupadmin, ['xx', 'rx', 'wx', 'rr', 'wr', 'ww', 'deleted'], entity_types=['dataset'])
+ self._test_can('search', self.mrloggedin, ['rx', 'wx', 'rr', 'wr', 'ww'], entity_types=['dataset'])
+ self._test_cant('search', self.mrloggedin, ['deleted', 'xx'], entity_types=['dataset'])
def test_05_author_is_new_package_admin(self):
user = self.mrloggedin
@@ -375,8 +376,8 @@
assert not model.Package.by_name(u'annakarenina')
offset = url_for(controller='package', action='new')
res = self.app.get(offset, extra_environ={'REMOTE_USER': user.name.encode('utf8')})
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = u'annakarenina'
res = fv.submit('save', extra_environ={'REMOTE_USER': user.name.encode('utf8')})
@@ -399,7 +400,7 @@
self._test_can('create', self.testsysadmin, [])
def test_sysadmin_can_search_anything(self):
- self._test_can('search', self.testsysadmin, ['xx', 'rx', 'wx', 'rr', 'wr', 'ww', 'deleted'], entity_types=['package'])
+ self._test_can('search', self.testsysadmin, ['xx', 'rx', 'wx', 'rr', 'wr', 'ww', 'deleted'], entity_types=['dataset'])
def test_visitor_deletes(self):
self._test_cant('delete', self.visitor, ['gets_filled'], interfaces=['wui'])
@@ -423,7 +424,7 @@
self._test_can('purge', self.pkggroupadmin, ['gets_filled'], interfaces=['rest'])
def test_sysadmin_purges(self):
- self._test_can('purge', self.testsysadmin, ['gets_filled'], interfaces=['rest'], entity_types=['package'])
+ self._test_can('purge', self.testsysadmin, ['gets_filled'], interfaces=['rest'], entity_types=['dataset'])
def test_sysadmin_relationships(self):
opts = {'interfaces': ['rest'],
@@ -536,7 +537,7 @@
self._test_can('edit', self.testsysadmin, 'deleted')
def test_sysadmin_can_search_anything(self):
- self._test_can('search', self.testsysadmin, self.ENTITY_NAME, entity_types=['package']) # cannot search groups
+ self._test_can('search', self.testsysadmin, self.ENTITY_NAME, entity_types=['dataset']) # cannot search groups
def test_pkggroupadmin_read(self):
# These don't make sense - there should be no difference between
@@ -554,14 +555,14 @@
def test_pkggroupadmin_search(self):
# can't search as not a site reader
- self._test_cant('search', self.pkggroupadmin, self.ENTITY_NAME, entity_types=['package'])
+ self._test_cant('search', self.pkggroupadmin, self.ENTITY_NAME, entity_types=['dataset'])
def test_site_reader(self):
- self._test_can('search', self.site_reader, self.ENTITY_NAME, entity_types=['package']) # cannot search groups
+ self._test_can('search', self.site_reader, self.ENTITY_NAME, entity_types=['dataset']) # cannot search groups
self._test_can('read', self.site_reader, self.ENTITY_NAME, entity_types=['tag'])
def test_outcast_search(self):
- self._test_cant('search', self.outcast, self.ENTITY_NAME, entity_types=['package']) # cannot search groups
+ self._test_cant('search', self.outcast, self.ENTITY_NAME, entity_types=['dataset']) # cannot search groups
self._test_cant('read', self.outcast, self.ENTITY_NAME, entity_types=['tag'])
--- a/ckan/tests/functional/test_edit_authz.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/test_edit_authz.py Mon Sep 05 18:18:20 2011 +0100
@@ -57,7 +57,7 @@
model.repo.new_revision()
- self.pkg = u'package'
+ self.pkg = u'dataset'
pkg = model.Package(name=self.pkg)
model.Session.add(pkg)
--- a/ckan/tests/functional/test_group.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/test_group.py Mon Sep 05 18:18:20 2011 +0100
@@ -79,10 +79,10 @@
assert 'Administrators' in res, res
assert 'russianfan' in main_res, main_res
assert name in res, res
- assert 'There are 2 packages in this group' in self.strip_tags(main_res), main_res
+ assert 'There are 2 datasets in this group' in self.strip_tags(main_res), main_res
pkg = model.Package.by_name(pkgname)
res = res.click(pkg.title)
- assert '%s - Data Packages' % pkg.title in res
+ assert '%s - Datasets' % pkg.title in res
def test_read_plugin_hook(self):
plugin = MockGroupControllerPlugin()
@@ -165,11 +165,11 @@
assert group.title == newtitle, group
assert group.description == newdesc, group
- # now look at packages
+ # now look at datasets
assert len(group.packages) == 3
def test_3_edit_form_has_new_package(self):
- # check for package in autocomplete
+ # check for dataset in autocomplete
offset = url_for(controller='package', action='autocomplete', q='an')
res = self.app.get(offset, status=200, extra_environ={'REMOTE_USER': 'russianfan'})
assert 'annakarenina' in res, res
--- a/ckan/tests/functional/test_home.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/test_home.py Mon Sep 05 18:18:20 2011 +0100
@@ -24,7 +24,7 @@
offset = url_for('home')
res = self.app.get(offset)
print res
- assert 'Add a package' in res
+ assert 'Add a dataset' in res
def test_calculate_etag_hash(self):
c.user = 'test user'
--- a/ckan/tests/functional/test_package.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/test_package.py Mon Sep 05 18:18:20 2011 +0100
@@ -72,7 +72,7 @@
'''Inherit this in tests for these form testing methods'''
def _check_package_read(self, res, **params):
assert not 'Error' in res, res
- assert u'%s - Data Packages' % params['title'] in res, res
+ assert u'%s - Datasets' % params['title'] in res, res
main_res = self.main_div(res)
main_div = main_res
main_div_str = main_div.encode('utf8')
@@ -80,7 +80,7 @@
assert params['title'] in main_div, main_div_str
assert params['version'] in main_div, main_div_str
self.check_named_element(main_div, 'a', 'href="%s"' % params['url'])
- prefix = 'Package-%s-' % params.get('id', '')
+ prefix = 'Dataset-%s-' % params.get('id', '')
for res_index, values in self._get_resource_values(params['resources'], by_resource=True):
self.check_named_element(main_div, 'tr', *values)
assert params['notes'] in main_div, main_div_str
@@ -215,7 +215,7 @@
then assume redirect is specified in pylons config
@param expected_redirect - url we expect to redirect to (but <NAME>
not yet substituted)
- @param pkg_name_to_edit - '' means create a new package
+ @param pkg_name_to_edit - '' means create a new dataset
'''
try:
new_name = u'new-name'
@@ -234,13 +234,13 @@
offset_params['return_to'] = return_url_param
offset = url_for(**offset_params)
res = self.app.get(offset)
- assert 'Packages -' in res
- fv = res.forms['package-edit']
+ assert 'Datasets -' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
res = fv.submit('preview')
assert not 'Error' in res, res
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
res = fv.submit('save', status=302)
assert not 'Error' in res, res
redirected_to = dict(res.headers).get('Location') or dict(res.headers)['location']
@@ -276,7 +276,7 @@
offset = url_for(controller='package', action='search')
res = self.app.get(offset)
res = res.click('Register it now')
- assert 'New - Data Packages' in res
+ assert 'New - Datasets' in res
def test_read(self):
name = u'annakarenina'
@@ -288,8 +288,8 @@
offset = url_for(controller='package', action='read', id=self.anna.id)
res_by_id = self.app.get(offset)
# just check the stuff in the package div
- pkg_by_name_main = self.named_div('package', res)
- pkg_by_id_main = self.named_div('package', res_by_id)
+ pkg_by_name_main = self.named_div('dataset', res)
+ pkg_by_id_main = self.named_div('dataset', res_by_id)
# rename some things which may be in the wrong order sometimes
txt_order_non_deterministic = ('russian', 'tolstoy', 'david', 'roger')
for txt in txt_order_non_deterministic:
@@ -351,12 +351,12 @@
assert 'decoy"' not in res, res
#res = self.app.get(offset)
- #assert 'Packages' in res
+ #assert 'Datasets' in res
#name = u'annakarenina'
#title = u'A Novel By Tolstoy'
#assert title in res
#res = res.click(title)
- #assert '%s - Data Packages' % title in res, res
+ #assert '%s - Datasets' % title in res, res
#main_div = self.main_div(res)
#assert title in main_div, main_div.encode('utf8')
@@ -391,7 +391,7 @@
assert '<strong>0</strong>' in results_page, results_page
def _check_search_results(self, page, terms, requireds, only_open=False, only_downloadable=False):
- form = page.forms['package-search']
+ form = page.forms['dataset-search']
form['q'] = terms.encode('utf8') # paste doesn't handle this!
form['open_only'] = only_open
form['downloadable_only'] = only_downloadable
@@ -433,7 +433,7 @@
cls.today = datetime.datetime.now()
cls.pkg_name = u'testpkg'
- # create package
+ # create dataset
rev = model.repo.new_revision()
rev.timestamp = cls.date1
pkg = model.Package(name=cls.pkg_name, title=u'title1')
@@ -441,7 +441,7 @@
model.setup_default_user_roles(pkg)
model.repo.commit_and_remove()
- # edit package
+ # edit dataset
rev = model.repo.new_revision()
rev.timestamp = cls.date2
pkg = model.Package.by_name(cls.pkg_name)
@@ -450,7 +450,7 @@
pkg.extras = {'key2': u'value2'}
model.repo.commit_and_remove()
- # edit package again
+ # edit dataset again
rev = model.repo.new_revision()
rev.timestamp = cls.date3
pkg = model.Package.by_name(cls.pkg_name)
@@ -472,7 +472,7 @@
def test_read_normally(self):
res = self.app.get(self.offset, status=200)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'PKG', pkg_html
assert 'title3' in res
@@ -485,7 +485,7 @@
def test_read_date1(self):
offset = self.offset + self.date1.strftime('@%Y-%m-%d')
res = self.app.get(offset, status=200)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
assert 'title1' in res, res
assert 'key2' not in pkg_html, pkg_html
@@ -497,7 +497,7 @@
date2_plus_3h = self.date2 + datetime.timedelta(hours=3)
offset = self.offset + date2_plus_3h.strftime('@%Y-%m-%d')
res = self.app.get(offset, status=200)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'PKG', pkg_html
assert 'title2' in res
@@ -510,7 +510,7 @@
def test_read_date3(self):
offset = self.offset + self.date3.strftime('@%Y-%m-%d-%H-%M')
res = self.app.get(offset, status=200)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'PKG', pkg_html
assert 'title3' in res
@@ -536,12 +536,12 @@
offset = self.offset + '@%s' % self.revision_ids[0]
res = self.app.get(offset, status=200)
main_html = self.main_div(res)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'MAIN', main_html
- assert 'This is an old revision of this package' in main_html
+ assert 'This is an old revision of this dataset' in main_html
assert 'at 2011-01-01 00:00' in main_html
- self.check_named_element(main_html, 'a', 'href="/package/%s"' % self.pkg_name)
+ self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
print 'PKG', pkg_html
assert 'title1' in res
assert 'key2' not in pkg_html
@@ -554,12 +554,12 @@
offset = self.offset + '@%s' % self.revision_ids[1]
res = self.app.get(offset, status=200)
main_html = self.main_div(res)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'MAIN', main_html
- assert 'This is an old revision of this package' in main_html
+ assert 'This is an old revision of this dataset' in main_html
assert 'at 2011-01-02 00:00' in main_html
- self.check_named_element(main_html, 'a', 'href="/package/%s"' % self.pkg_name)
+ self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
print 'PKG', pkg_html
assert 'title2' in res
assert 'key2' in pkg_html
@@ -572,13 +572,13 @@
offset = self.offset + '@%s' % self.revision_ids[2]
res = self.app.get(offset, status=200)
main_html = self.main_div(res)
- pkg_html = self.named_div('package', res)
+ pkg_html = self.named_div('dataset', res)
side_html = self.named_div('sidebar', res)
print 'MAIN', main_html
- assert 'This is an old revision of this package' not in main_html
- assert 'This is the current revision of this package' in main_html
+ assert 'This is an old revision of this dataset' not in main_html
+ assert 'This is the current revision of this dataset' in main_html
assert 'at 2011-01-03 00:00' in main_html
- self.check_named_element(main_html, 'a', 'href="/package/%s"' % self.pkg_name)
+ self.check_named_element(main_html, 'a', 'href="/dataset/%s"' % self.pkg_name)
print 'PKG', pkg_html
assert 'title3' in res
assert 'key2' in pkg_html
@@ -637,10 +637,10 @@
# just the absolute basics
try:
self.res = self.app.get(self.offset)
- assert 'Edit - Data Packages' in self.res, self.res
+ assert 'Edit - Datasets' in self.res, self.res
new_name = u'new-name'
new_title = u'New Title'
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
fv[prefix + 'title'] = new_title
@@ -649,7 +649,7 @@
res = res.follow()
offset = url_for(controller='package', action='read', id=new_name)
res = self.app.get(offset)
- assert '%s - Data Packages' % new_title in res, res
+ assert '%s - Datasets' % new_title in res, res
pkg = model.Package.by_name(new_name)
assert pkg
assert pkg.title == new_title
@@ -660,16 +660,16 @@
# just the key fields
try:
self.res = self.app.get(self.offset)
- assert 'Edit - Data Packages' in self.res, self.res
+ assert 'Edit - Datasets' in self.res, self.res
assert self.editpkg.notes in self.res
new_name = u'new-name'
- new_title = u'A Short Description of this Package'
+ new_title = u'A Short Description of this Dataset'
newurl = u'http://www.editpkgnewurl.com'
new_download_url = newurl + u'/download/'
newlicense_id = u'cc-by'
newversion = u'0.9b'
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
fv[prefix + 'title'] = new_title
@@ -683,7 +683,7 @@
model.Session.remove()
offset = url_for(controller='package', action='read', id=new_name)
res = self.app.get(offset)
- assert '%s - Data Packages' % new_title in res, res
+ assert '%s - Datasets' % new_title in res, res
pkg = model.Package.by_name(new_name)
assert pkg.title == new_title
assert pkg.url == newurl
@@ -699,11 +699,11 @@
offset = url_for(controller='package', action='edit', id=pkg.id)
res = self.app.get(offset)
#assert res.body == self.res.body, self.diff_responses(res, self.res)
- assert 'Edit - Data Packages' in res, res
+ assert 'Edit - Datasets' in res, res
assert pkg.name in res
new_name = u'new-name'
- new_title = u'A Short Description of this Package'
- fv = self.res.forms['package-edit']
+ new_title = u'A Short Description of this Dataset'
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
fv[prefix + 'title'] = new_title
@@ -712,7 +712,7 @@
res = res.follow()
offset = url_for(controller='package', action='read', id=new_name)
res = self.app.get(offset)
- assert '%s - Data Packages' % new_title in res, res
+ assert '%s - Datasets' % new_title in res, res
pkg = model.Package.by_name(new_name)
assert pkg
finally:
@@ -720,8 +720,8 @@
def test_edit_2_not_groups(self):
# not allowed to edit groups for now
- prefix = 'Package-%s-' % self.pkgid
- fv = self.res.forms['package-edit']
+ prefix = 'Dataset-%s-' % self.pkgid
+ fv = self.res.forms['dataset-edit']
assert not fv.fields.has_key(prefix + 'groups')
def test_edit_2_tags_and_groups(self):
@@ -729,7 +729,7 @@
newtagnames = [u'russian', u'tolstoy', u'superb']
newtags = newtagnames
tagvalues = ' '.join(newtags)
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'tag_string'] = tagvalues
exp_log_message = 'test_edit_2: making some changes'
@@ -737,7 +737,7 @@
res = fv.submit('save')
# get redirected ...
res = res.follow()
- assert '%s - Data Packages' % self.editpkg_name in res
+ assert '%s - Datasets' % self.editpkg_name in res
pkg = model.Package.by_name(self.editpkg.name)
assert len(pkg.tags) == len(newtagnames)
outtags = [ tag.name for tag in pkg.tags ]
@@ -759,12 +759,12 @@
u with umlaut \xc3\xbc
'''
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'url'] = newurl
fv[prefix + 'notes'] = newnotes
res = fv.submit('preview')
- assert 'Edit - Data Packages' in res
+ assert 'Edit - Datasets' in res
assert 'Preview' in res
assert 'Hello world' in res
self.check_tag_and_data(res, 'umlaut', u'\xfc')
@@ -773,19 +773,19 @@
def test_missing_fields(self):
# User edits and a field is left out in the commit parameters.
# (Spammers can cause this)
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
del fv.fields['log_message']
res = fv.submit('save', status=400)
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
del fv.fields[prefix + 'license_id']
res = fv.submit('save', status=400)
def test_redirect_after_edit_using_param(self):
- return_url = 'http://random.site.com/package/<NAME>?test=param'
+ return_url = 'http://random.site.com/dataset/<NAME>?test=param'
# It's useful to know that this url encodes to:
- # 'http%3A%2F%2Frandom.site.com%2Fpackage%2F%3CNAME%3E%3Ftest%3Dparam'
+ # 'http%3A%2F%2Frandom.site.com%2Fdataset%2F%3CNAME%3E%3Ftest%3Dparam'
expected_redirect = return_url
self._check_redirect(return_url, expected_redirect,
pkg_name_to_edit=self.editpkg_name)
@@ -832,7 +832,7 @@
# Edit it
offset = url_for(controller='package', action='edit', id=pkg.name)
res = self.app.get(offset, status=200, extra_environ={'REMOTE_USER':'testadmin'})
- assert 'Edit - Data Packages' in res, res
+ assert 'Edit - Datasets' in res, res
# Check form is correctly filled
pkg = model.Package.by_name(pkg_name)
@@ -856,7 +856,7 @@
extra_new = 'newkey', 'newvalue', False
log_message = 'This is a comment'
assert not model.Package.by_name(name)
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix+'name'] = name
fv[prefix+'title'] = title
@@ -903,13 +903,13 @@
state=state)
# Submit
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
res = fv.submit('save', extra_environ={'REMOTE_USER':'testadmin'})
- # Check package page
+ # Check dataset page
assert not 'Error' in res, res
- # Check package object
+ # Check dataset object
pkg = model.Package.by_name(name)
assert pkg.name == name
assert pkg.title == title
@@ -936,14 +936,14 @@
assert rev.author == 'testadmin', rev.author
assert rev.message == log_message
# TODO: reinstate once fixed in code
- exp_log_message = u'Creating package %s' % name
+ exp_log_message = u'Creating dataset %s' % name
#assert rev.message == exp_log_message
finally:
self._reset_data()
def test_edit_bad_log_message(self):
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv['log_message'] = u'Free enlargements: http://drugs.com/' # spam
res = fv.submit('preview')
@@ -957,7 +957,7 @@
assert 'No links are allowed' in res, res
def test_edit_bad_name(self):
- fv = self.res.forms['package-edit']
+ fv = self.res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = u'a' # invalid name
res = fv.submit('preview')
@@ -981,7 +981,7 @@
res = self.app.get(self.offset)
new_name = u'new-name'
new_title = u'New Title'
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
fv[prefix + 'title'] = new_title
@@ -1000,7 +1000,7 @@
offset = url_for(controller='package', action='edit', id=pkg.name)
res = self.app.get(offset)
prefix = ''
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
name = prefix + 'groups__0__id'
# XXX the following assertion fails since upgrade to
# sqlalchemy 0.6.5; apparently outer joins are handled
@@ -1027,7 +1027,7 @@
prefix = ''
field_name = prefix + "groups__0__id"
assert field_name in res
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
fv[prefix + 'groups__0__id'] = grp.id
res = fv.submit('preview', extra_environ={'REMOTE_USER':'russianfan'})
assert not 'error' in res
@@ -1053,7 +1053,7 @@
res = self.app.get(offset, extra_environ={'REMOTE_USER':'russianfan'})
prefix = ''
field_name = prefix + "groups__0__id"
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
print field_name
fv[field_name] = False
res = fv.submit('save', extra_environ={'REMOTE_USER':'russianfan'})
@@ -1084,17 +1084,17 @@
offset = url_for(controller='package', action='new',
url='http://xxx.org', name='xxx.org')
res = self.app.get(offset)
- form = res.forms['package-edit']
+ form = res.forms['dataset-edit']
assert_equal(form['url'].value, 'http://xxx.org')
assert_equal(form['name'].value, 'xxx.org')
def test_new_without_resource(self):
- # new package
+ # new dataset
prefix = ''
name = u'test_no_res'
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
fv[prefix+'name'] = name
res = fv.submit('preview')
assert not 'Error' in res, res
@@ -1104,11 +1104,11 @@
assert '<td><a href="">' not in res1, res1
# submit
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
self.pkg_names.append(name)
res = fv.submit('save')
- # check package page
+ # check dataset page
assert not 'Error' in res, res
res = res.follow()
res1 = self.main_div(res).replace('</strong>', '')
@@ -1124,8 +1124,8 @@
assert not model.Package.by_name(u'annakarenina')
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = 'annakarenina'
self.pkg_names.append('annakarenina')
@@ -1135,8 +1135,8 @@
def test_new_bad_name(self):
offset = url_for(controller='package', action='new', id=None)
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = u'a' # invalid name
res = fv.submit('preview')
@@ -1151,9 +1151,9 @@
self._assert_form_errors(res)
def test_redirect_after_new_using_param(self):
- return_url = 'http://random.site.com/package/<NAME>?test=param'
+ return_url = 'http://random.site.com/dataset/<NAME>?test=param'
# It's useful to know that this url encodes to:
- # 'http%3A%2F%2Frandom.site.com%2Fpackage%2F%3CNAME%3E%3Ftest%3Dparam'
+ # 'http%3A%2F%2Frandom.site.com%2Fdataset%2F%3CNAME%3E%3Ftest%3Dparam'
expected_redirect = return_url
self._check_redirect(return_url, expected_redirect,
pkg_name_to_edit='')
@@ -1179,8 +1179,8 @@
assert not model.Package.by_name(name)
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix+'name'] = name
fv[prefix+'title'] = title
@@ -1222,14 +1222,14 @@
log_message=log_message,
)
# Submit
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
self.pkg_names.append(name)
res = fv.submit('save')
- # Check package page
+ # Check dataset page
assert not 'Error' in res, res
- # Check package object
+ # Check dataset object
pkg = model.Package.by_name(name)
assert pkg.name == name
assert pkg.title == title
@@ -1253,37 +1253,37 @@
assert rev.author == 'Unknown IP Address'
assert rev.message == log_message
# TODO: reinstate once fixed in code
- exp_log_message = u'Creating package %s' % name
+ exp_log_message = u'Creating dataset %s' % name
# assert rev.message == exp_log_message
def test_new_existing_name(self):
- # test creating a package with an existing name results in error'
- # create initial package
+ # test creating a dataset with an existing name results in error'
+ # create initial dataset
pkgname = u'testpkg'
pkgtitle = u'mytesttitle'
assert not model.Package.by_name(pkgname)
offset = url_for(controller='package', action='new', id=None)
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = pkgname
self.pkg_names.append(pkgname)
res = fv.submit('save')
assert not 'Error' in res, res
assert model.Package.by_name(pkgname)
- # create duplicate package
+ # create duplicate dataset
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
fv[prefix+'name'] = pkgname
fv[prefix+'title'] = pkgtitle
res = fv.submit('preview')
assert 'Preview' in res
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
res = fv.submit('save')
assert 'Error' in res, res
- assert 'Package name already exists in database' in res, res
+ assert 'Dataset name already exists in database' in res, res
self._assert_form_errors(res)
def test_missing_fields(self):
@@ -1291,9 +1291,9 @@
# (Spammers can cause this)
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res, res
+ assert 'New - Datasets' in res, res
prefix = ''
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
fv[prefix + 'name'] = 'anything'
del fv.fields['log_message']
self.pkg_names.append('anything')
@@ -1301,8 +1301,8 @@
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
fv[prefix + 'name'] = 'anything'
prefix = ''
del fv.fields[prefix + 'notes']
@@ -1315,8 +1315,8 @@
# ticket:276
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = 'name276'
resformat = u'xls'
@@ -1333,7 +1333,7 @@
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
new_name = u'plugged'
- fv = res.forms['package-edit']
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = new_name
res = fv.submit('save')
@@ -1361,8 +1361,8 @@
offset = url_for(controller='package', action='new')
res = self.app.get(offset)
- assert 'New - Data Packages' in res
- fv = res.forms['package-edit']
+ assert 'New - Datasets' in res
+ fv = res.forms['dataset-edit']
prefix = ''
fv[prefix + 'name'] = self.pkgname
fv[prefix + 'title'] = self.pkgtitle
@@ -1418,11 +1418,11 @@
offset = url_for(controller='package', action='search')
res = self.app.get(offset)
assert 'Search - ' in res
- form = res.forms['package-search']
+ form = res.forms['dataset-search']
form['q'] = str(self.non_active_name)
results_page = form.submit()
assert 'Search - ' in results_page, results_page
- assert '<strong>0</strong> packages found' in results_page, (self.non_active_name, results_page)
+ assert '<strong>0</strong> datasets found' in results_page, (self.non_active_name, results_page)
class TestRevisions(TestPackageBase):
@@ -1472,7 +1472,7 @@
def test_1_do_diff(self):
res = self.app.get(self.offset)
- form = res.forms['package-revisions']
+ form = res.forms['dataset-revisions']
res = form.submit()
res = res.follow()
main_res = self.main_div(res)
@@ -1499,7 +1499,7 @@
url = str(self.revision_timestamps[1])[-6:]
res = res.click(href=url)
main_html = self.main_div(res)
- assert 'This is an old revision of this package' in main_html
+ assert 'This is an old revision of this dataset' in main_html
assert 'at %s' % str(self.revision_timestamps[1])[:6] in main_html
@@ -1625,7 +1625,7 @@
def test_etags_in_response(self):
c.user = 'annafan'
c.userobj = model.User.by_name(u'annafan')
- res = self.app.get('/package/annakarenina',
+ res = self.app.get('/dataset/annakarenina',
extra_environ={'REMOTE_USER':c.user})
anna_hash = str(PackageController._pkg_cache_key(self.anna))
self.assert_equal(res.header_dict['ETag'], anna_hash)
@@ -1642,7 +1642,7 @@
def test_package_autocomplete(self):
query = 'a'
- res = self.app.get('/package/autocomplete?q=%s' % query)
+ res = self.app.get('/dataset/autocomplete?q=%s' % query)
expected = ['A Wonderful Story (warandpeace)|warandpeace','annakarenina|annakarenina']
received = sorted(res.body.split('\n'))
--- a/ckan/tests/functional/test_package_relationships.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/test_package_relationships.py Mon Sep 05 18:18:20 2011 +0100
@@ -18,11 +18,11 @@
offset = url_for(controller='package', action='read', id=pkg_name)
res = self.app.get(offset)
pkg = model.Package.by_name(pkg_name)
- assert '%s - Data Packages' % pkg.title in res
+ assert '%s - Datasets' % pkg.title in res
return res
res = read_package(u'homer')
self.check_named_element(res, 'li', 'is a child of', 'abraham')
- self.check_named_element(res, 'li', 'is a child of', '<a href="/package/abraham">abraham</a>')
+ self.check_named_element(res, 'li', 'is a child of', '<a href="/dataset/abraham">abraham</a>')
self.check_named_element(res, 'li', 'is a parent of', 'bart')
self.check_named_element(res, 'li', 'is a parent of', 'lisa')
self.check_named_element(res, 'li', 'has derivation', 'homer_derived')
--- a/ckan/tests/functional/test_revision.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/test_revision.py Mon Sep 05 18:18:20 2011 +0100
@@ -146,10 +146,10 @@
#assert 'Author:</strong> tester' in res
#assert 'Log Message:' in res
#assert 'Creating test data.' in res
- #assert 'Package: annakarenina' in res
- #assert "Packages' Tags" in res
+ #assert 'Dataset: annakarenina' in res
+ #assert "Datasets' Tags" in res
#res = res.click('annakarenina', index=0)
- #assert 'Packages - annakarenina' in res
+ #assert 'Datasets - annakarenina' in res
def test_list_format_atom(self):
self.create_40_revisions()
--- a/ckan/tests/functional/test_user.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/functional/test_user.py Mon Sep 05 18:18:20 2011 +0100
@@ -55,7 +55,7 @@
'rel="nofollow"')
assert 'Edit' not in main_res, main_res
assert 'Number of edits:</strong> 3' in res, res
- assert 'Number of packages administered:</strong> 1' in res, res
+ assert 'Number of datasets administered:</strong> 1' in res, res
assert 'Revision History' in res, res
def test_user_read_without_id(self):
--- a/ckan/tests/lib/test_dictization_schema.py Mon Sep 05 09:43:11 2011 +0100
+++ b/ckan/tests/lib/test_dictization_schema.py Mon Sep 05 18:18:20 2011 +0100
@@ -102,7 +102,7 @@
converted_data, errors = validate(data, default_package_schema(), context)
assert errors == {
- 'name': [u'Package name already exists in database'],
+ 'name': [u'Dataset name already exists in database'],
'resources': [{},
{'url': [u'Missing value']}]
}, pformat(errors)
@@ -156,5 +156,5 @@
data["packages"][1].pop("name")
converted_data, errors = validate(data, default_group_schema(), context)
- assert errors == {'packages': [{'id': [u'Package was not found.']}, {'id': [u'Missing value']}]} , pformat(errors)
+ assert errors == {'packages': [{'id': [u'Dataset was not found.']}, {'id': [u'Missing value']}]} , pformat(errors)
--- a/doc/api.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/api.rst Mon Sep 05 18:18:20 2011 +0100
@@ -53,7 +53,7 @@
These are very similar, but when the API returns a reference to an object, Version 1 API will return the Name of the object (e.g. "river-pollution") and Version 2 API will return the ID of the object (e.g. "a3dd8f64-9078-4f04-845c-e3f047125028").
-The reason for this is that Names can change, so to reliably refer to the same package every time, you will want to use the ID and therefore use API v2. Alternatively, many people prefer to deal with Names, so API v1 suits them.
+The reason for this is that Names can change, so to reliably refer to the same dataset every time, you will want to use the ID and therefore use API v2. Alternatively, many people prefer to deal with Names, so API v1 suits them.
When making requests, you can call objects by either their Name or ID, interchangeably.
@@ -121,9 +121,9 @@
+--------------------------------+-------------------------------------------------------------------+
| Model Resource | Location |
+================================+===================================================================+
-| Package Register | ``/rest/package`` |
+| Dataset Register | ``/rest/dataset`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Entity | ``/rest/package/PACKAGE-REF`` |
+| Dataset Entity | ``/rest/dataset/DATASET-REF`` |
+--------------------------------+-------------------------------------------------------------------+
| Group Register | ``/rest/group`` |
+--------------------------------+-------------------------------------------------------------------+
@@ -135,15 +135,15 @@
+--------------------------------+-------------------------------------------------------------------+
| Rating Register | ``/rest/rating`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Relationships Register | ``/rest/package/PACKAGE-REF/relationships`` |
+| Dataset Relationships Register | ``/rest/dataset/DATASET-REF/relationships`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Relationships Register | ``/rest/package/PACKAGE-REF/RELATIONSHIP-TYPE`` |
+| Dataset Relationships Register | ``/rest/dataset/DATASET-REF/RELATIONSHIP-TYPE`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Relationships Register | ``/rest/package/PACKAGE-REF/relationships/PACKAGE-REF`` |
+| Dataset Relationships Register | ``/rest/dataset/DATASET-REF/relationships/DATASET-REF`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package Relationship Entity | ``/rest/package/PACKAGE-REF/RELATIONSHIP-TYPE/PACKAGE-REF`` |
+| Dataset Relationship Entity | ``/rest/dataset/DATASET-REF/RELATIONSHIP-TYPE/DATASET-REF`` |
+--------------------------------+-------------------------------------------------------------------+
-| Package\'s Revisions Entity | ``/rest/package/PACKAGE-REF/revisions`` |
+| Dataset\'s Revisions Entity | ``/rest/dataset/DATASET-REF/revisions`` |
+--------------------------------+-------------------------------------------------------------------+
| Revision Register | ``/rest/revision`` |
+--------------------------------+-------------------------------------------------------------------+
@@ -152,7 +152,7 @@
| License List | ``/rest/licenses`` |
+--------------------------------+-------------------------------------------------------------------+
-Possible values for PACKAGE-REF are the package id, or the current package name.
+Possible values for DATASET-REF are the dataset id, or the current dataset name.
Possible values for RELATIONSHIP-TYPE are described in the Relationship-Type data format.
@@ -165,13 +165,13 @@
+-------------------------------+--------+------------------+-------------------+
| Resource | Method | Request | Response |
+===============================+========+==================+===================+
-| Package Register | GET | | Package-List |
+| Dataset Register | GET | | Dataset-List |
+-------------------------------+--------+------------------+-------------------+
-| Package Register | POST | Package | |
+| Dataset Register | POST | Dataset | |
+-------------------------------+--------+------------------+-------------------+
-| Package Entity | GET | | Package |
+| Dataset Entity | GET | | Dataset |
+-------------------------------+--------+------------------+-------------------+
-| Package Entity | PUT | Package | |
+| Dataset Entity | PUT | Dataset | |
+-------------------------------+--------+------------------+-------------------+
| Group Register | GET | | Group-List |
+-------------------------------+--------+------------------+-------------------+
@@ -183,19 +183,19 @@
+-------------------------------+--------+------------------+-------------------+
| Tag Register | GET | | Tag-List |
+-------------------------------+--------+------------------+-------------------+
-| Tag Entity | GET | | Package-List |
+| Tag Entity | GET | | Dataset-List |
+-------------------------------+--------+------------------+-------------------+
| Rating Register | POST | Rating | |
+-------------------------------+--------+------------------+-------------------+
| Rating Entity | GET | | Rating |
+-------------------------------+--------+------------------+-------------------+
-| Package Relationships Register| GET | | Pkg-Relationships |
+| Dataset Relationships Register| GET | | Pkg-Relationships |
+-------------------------------+--------+------------------+-------------------+
-| Package Relationship Entity | GET | | Pkg-Relationship |
+| Dataset Relationship Entity | GET | | Pkg-Relationship |
+-------------------------------+--------+------------------+-------------------+
-| Package Relationship Entity | PUT | Pkg-Relationship | |
+| Dataset Relationship Entity | PUT | Pkg-Relationship | |
+-------------------------------+--------+------------------+-------------------+
-| Package\'s Revisions Entity | GET | | Pkg-Revisions |
+| Dataset\'s Revisions Entity | GET | | Pkg-Revisions |
+-------------------------------+--------+------------------+-------------------+
| Revision List | GET | | Revision-List |
+-------------------------------+--------+------------------+-------------------+
@@ -215,17 +215,17 @@
Here are the data formats for the Model API.
-.. |format-package-ref| replace:: Package-Ref
+.. |format-dataset-ref| replace:: Dataset-Ref
-.. |format-package-register| replace:: [ |format-package-ref|, |format-package-ref|, |format-package-ref|, ... ]
+.. |format-dataset-register| replace:: [ |format-dataset-ref|, |format-dataset-ref|, |format-dataset-ref|, ... ]
-.. |format-package-entity| replace:: { id: Uuid, name: Name-String, title: String, version: String, url: String, resources: [ Resource, Resource, ...], author: String, author_email: String, maintainer: String, maintainer_email: String, license_id: String, tags: Tag-List, notes: String, extras: { Name-String: String, ... } }
+.. |format-dataset-entity| replace:: { id: Uuid, name: Name-String, title: String, version: String, url: String, resources: [ Resource, Resource, ...], author: String, author_email: String, maintainer: String, maintainer_email: String, license_id: String, tags: Tag-List, notes: String, extras: { Name-String: String, ... } }
.. |format-group-ref| replace:: Group-Ref
.. |format-group-register| replace:: [ |format-group-ref|, |format-group-ref|, |format-group-ref|, ... ]
-.. |format-group-entity| replace:: { name: Name-String, title: String, description: String, packages: Package-List }
+.. |format-group-entity| replace:: { name: Name-String, title: String, description: String, datasets: Dataset-List }
To send request data, create the JSON-format string (encode in UTF8) put it in the request body and send it using PUT or POST.
@@ -238,7 +238,7 @@
* To delete an 'extra' key-value pair, supply the key with JSON value: ``null``
- * When you read a package then some additional information is supplied that cannot current be adjusted throught the CKAN API. This includes info on Package Relationship ('relationships'), Group membership ('groups'), ratings ('ratings_average' and 'ratings_count'), full URL of the package in CKAN ('ckan_url') and Package ID ('id'). This is purely a convenience for clients, and only forms part of the Package on GET.
+ * When you read a dataset then some additional information is supplied that cannot current be adjusted throught the CKAN API. This includes info on Dataset Relationship ('relationships'), Group membership ('groups'), ratings ('ratings_average' and 'ratings_count'), full URL of the dataset in CKAN ('ckan_url') and Dataset ID ('id'). This is purely a convenience for clients, and only forms part of the Dataset on GET.
Search API
~~~~~~~~~~
@@ -256,7 +256,7 @@
+---------------------------+--------------------------+
| Search Resource | Location |
+===========================+==========================+
-| Package Search | ``/search/package`` |
+| Dataset Search | ``/search/dataset`` |
+---------------------------+--------------------------+
| Resource Search | ``/search/resource`` |
+---------------------------+--------------------------+
@@ -265,7 +265,7 @@
| Tag Counts | ``/tag_counts`` |
+---------------------------+--------------------------+
-See below for more information about package and revision search parameters.
+See below for more information about dataset and revision search parameters.
Search Methods
``````````````
@@ -275,7 +275,7 @@
+-------------------------------+--------+------------------------+--------------------------+
| Resource | Method | Request | Response |
+===============================+========+========================+==========================+
-| Package Search | POST | Package-Search-Params | Package-Search-Response |
+| Dataset Search | POST | Dataset-Search-Params | Dataset-Search-Response |
+-------------------------------+--------+------------------------+--------------------------+
| Resource Search | POST | Resource-Search-Params | Resource-Search-Response |
+-------------------------------+--------+------------------------+--------------------------+
@@ -285,7 +285,7 @@
+-------------------------------+--------+------------------------+--------------------------+
It is also possible to supply the search parameters in the URL of a GET request,
-for example ``/api/search/package?q=geodata&allfields=1``.
+for example ``/api/search/dataset?q=geodata&allfields=1``.
Search Formats
``````````````
@@ -295,11 +295,11 @@
+-------------------------+------------------------------------------------------------+
| Name | Format |
+=========================+============================================================+
-| Package-Search-Params | { Param-Key: Param-Value, Param-Key: Param-Value, ... } |
+| Dataset-Search-Params | { Param-Key: Param-Value, Param-Key: Param-Value, ... } |
| Resource-Search-Params | See below for full details of search parameters across the |
| Revision-Search-Params | various domain objects. |
+-------------------------+------------------------------------------------------------+
-| Package-Search-Response | { count: Count-int, results: [Package, Package, ... ] } |
+| Dataset-Search-Response | { count: Count-int, results: [Dataset, Dataset, ... ] } |
+-------------------------+------------------------------------------------------------+
| Resource-Search-Response| { count: Count-int, results: [Resource, Resource, ... ] } |
+-------------------------+------------------------------------------------------------+
@@ -309,14 +309,14 @@
| Tag-Count-List | [ [Name-String, Integer], [Name-String, Integer], ... ] |
+-------------------------+------------------------------------------------------------+
-The ``Package`` and ``Revision`` data formats are as defined in `Model Formats`_.
+The ``Dataset`` and ``Revision`` data formats are as defined in `Model Formats`_.
-**Package Parameters**
+**Dataset Parameters**
+-----------------------+---------------+----------------------------------+----------------------------------+
| Param-Key | Param-Value | Examples | Notes |
+=======================+===============+==================================+==================================+
-| q | Search-String || q=geodata | Criteria to search the package |
+| q | Search-String || q=geodata | Criteria to search the dataset |
| | || q=government+sweden | fields for. URL-encoded search |
| | || q=%22drug%20abuse%22 | text. (You can also concatenate |
| | | | words with a '+' symbol in a |
@@ -344,8 +344,8 @@
| | limit=20) | | return. |
+-----------------------+---------------+----------------------------------+----------------------------------+
| all_fields | 0 (default) | all_fields=1 | Each matching search result is |
-| | or 1 | | given as either a package name |
-| | | | (0) or the full package record |
+| | or 1 | | given as either a dataset name |
+| | | | (0) or the full dataset record |
| | | | (1). |
+-----------------------+---------------+----------------------------------+----------------------------------+
| filter_by_openness | 0 (default) | filter_by_openness=1 | Filters results by ones which are|
@@ -360,7 +360,7 @@
+-----------------------+---------------+-----------------------------------------+----------------------------------+
| Param-Key | Param-Value | Example | Notes |
+=======================+===============+=========================================+==================================+
-| url, format, | Search-String || url=statistics.org | Criteria to search the package |
+| url, format, | Search-String || url=statistics.org | Criteria to search the dataset |
| description | || format=xls | fields for. URL-encoded search |
| | || description=Research+Institute | text. This search string must be |
| | | | found somewhere within the field |
@@ -458,12 +458,12 @@
Example normal request::
- GET /api/rest/package/pollution_stats
+ GET /api/rest/dataset/pollution_stats
returns: {"name": "pollution_stats", ... }
but now with the callback parameter::
- GET /api/rest/package/pollution_stats?callback=jsoncallback
+ GET /api/rest/dataset/pollution_stats?callback=jsoncallback
returns: jsoncallback({"name": "pollution_stats", ... });
This parameter can apply to all GET requests in the API.
@@ -473,30 +473,30 @@
~~~~~~~~
Some of CKAN's client-side Javascript code makes calls to the CKAN API. For
-example, to generate a suggestion for a package name when adding a new package
+example, to generate a suggestion for a dataset name when adding a new dataset
the following API call is made:
::
- /api/2/util/package/create_slug?title=Package+1+Title+Typed+So+Far
+ /api/2/util/dataset/create_slug?title=Dataset+1+Title+Typed+So+Far
The return value is a JSON data structure:
::
- {"valid": true, "name": "package_1_title_typed_so_far"}
+ {"valid": true, "name": "dataset_1_title_typed_so_far"}
These are the keys returned:
``valid``
Can be ``True`` or ``False``. It is ``true`` when the title entered can be
- successfully turned into a package name and when that package name is not
+ successfully turned into a dataset name and when that dataset name is not
already being used. It is ``false`` otherwise.
``name``
- The suggested name for the package, based on the title
+ The suggested name for the dataset, based on the title
You can also add ``callback=callback`` to have the response returned as JSONP. eg:
@@ -504,17 +504,17 @@
::
- /api/2/util/package/create_slug?title=Package+1+Title+Typed+So+Far&callback=callback
+ /api/2/util/dataset/create_slug?title=Dataset+1+Title+Typed+So+Far&callback=callback
Returns:
::
- callback({"valid": true, "name": "package_1_title_typed_so_far"});
+ callback({"valid": true, "name": "dataset_1_title_typed_so_far"});
In some CKAN deployments you may have the API deployed at a different domain
from the main CKAN code. In these circumstances you'll need to add a new option
-to the config file to tell the new package form where it should make its API
+to the config file to tell the new dataset form where it should make its API
requests to:
::
--- a/doc/authorization.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/authorization.rst Mon Sep 05 18:18:20 2011 +0100
@@ -16,11 +16,11 @@
Overview
--------
-In a nutshell: for a particular **object** (e.g. a package) a CKAN **user** can be assigned a **role** (e.g. editor) which allows permitted **actions** (e.g. read, edit).
+In a nutshell: for a particular **object** (e.g. a dataset) a CKAN **user** can be assigned a **role** (e.g. editor) which allows permitted **actions** (e.g. read, edit).
In more detail, these concepts are as follows:
-* There are **objects** to which access can be controlled, such as packages and groups.
+* There are **objects** to which access can be controlled, such as datasets and groups.
* For each object there are a set of relevant **actions**, such as create and edit, which users can perform on the object.
* To simplify mapping users to actions and objects, actions are aggregated into a set of **roles**. For example, an editor role would automatically have edit and read actions.
* Finally, CKAN has registered **users**.
@@ -29,25 +29,25 @@
+++++++
Permissions are controlled per object: access can be controlled for an individual
-package, group or authorization group instance. Current objects include
-**packages**, package **groups**, **authorization groups** and the **system**.
+dataset, group or authorization group instance. Current objects include
+**datasets**, dataset **groups**, **authorization groups** and the **system**.
-* A package is the basic CKAN concept of metadata about a dataset.
-* A group of packages can be set up to specify which users have permission to add or remove packages from the group.
-* Users can be assigned to authorization groups, to increase flexibility. Instead of specifying the privileges of specific users on a package or group, you can also specify a set of users that share the same rights. To do that, an authorization group can be set up and users can be added to it. Authorization groups are both the object of authorization (i.e. one can have several roles with regards to an authorization group, such as being allowed to read or edit it) and the subject of authorization (i.e. they can be assigned roles on other objects which will apply to their members, such as the group having edit rights on a particular group).
-* Finally, the system object is special, serving as an object for assignments that do not relate to a specific object. For example, creating a package cannot be linked to a specific package instance, and is therefore a operation.
+* A dataset is the basic CKAN concept of metadata about a dataset.
+* A group of datasets can be set up to specify which users have permission to add or remove datasets from the group.
+* Users can be assigned to authorization groups, to increase flexibility. Instead of specifying the privileges of specific users on a dataset or group, you can also specify a set of users that share the same rights. To do that, an authorization group can be set up and users can be added to it. Authorization groups are both the object of authorization (i.e. one can have several roles with regards to an authorization group, such as being allowed to read or edit it) and the subject of authorization (i.e. they can be assigned roles on other objects which will apply to their members, such as the group having edit rights on a particular group).
+* Finally, the system object is special, serving as an object for assignments that do not relate to a specific object. For example, creating a dataset cannot be linked to a specific dataset instance, and is therefore a operation.
Actions
+++++++
-**Actions** are defined in the Action enumeration in ``ckan/model/authz.py`` and currently include: **edit**, **change-state**, **read**, **purge**, **edit-permissions**, **create-package**, **create-group**, **create-authorization-group**, **read-site**, **read-user**, **create-user**.
+**Actions** are defined in the Action enumeration in ``ckan/model/authz.py`` and currently include: **edit**, **change-state**, **read**, **purge**, **edit-permissions**, **create-dataset**, **create-group**, **create-authorization-group**, **read-site**, **read-user**, **create-user**.
-As noted above, some of these (e.g. **read**) have meaning for any type of object, while some (e.g. **create-package**) can not be associated with any particular object, and are therefore only associated with the system object.
+As noted above, some of these (e.g. **read**) have meaning for any type of object, while some (e.g. **create-dataset**) can not be associated with any particular object, and are therefore only associated with the system object.
The **read-site** action (associated with the system object) allows or denies access to pages not associated with specific objects. These currently include:
- * Package search
+ * Dataset search
* Group index
* Tags index
* Authorization Group index
@@ -95,8 +95,8 @@
CKAN ships with the following default permissions:
-* When a new package is created, its creator automatically becomes **admin** for it. This user can then change permissions for other users.
-* By default, any other user (including both visitors and logged-ins) can read and write to this package.
+* When a new dataset is created, its creator automatically becomes **admin** for it. This user can then change permissions for other users.
+* By default, any other user (including both visitors and logged-ins) can read and write to this dataset.
These defaults can be changed in the CKAN config - see ``default_roles`` in :doc:`configuration`.
@@ -107,7 +107,7 @@
--------------------
The assignment of users and authorization groups to roles on a given
-protected object (such as a package) can be done by 'admins' via the
+protected object (such as a dataset) can be done by 'admins' via the
'authorization' tab of the web interface (or by sysadmins via that
interface or the system admin interface).
@@ -127,12 +127,12 @@
paster --plugin=ckan rights -c my.ini list
-The ``rights make`` command lets you assign specific permissions. For example, to give the user named **bar** the **admin** role on the package foo::
+The ``rights make`` command lets you assign specific permissions. For example, to give the user named **bar** the **admin** role on the dataset foo::
- paster --plugin=ckan rights -c my.ini make bar admin package:foo
+ paster --plugin=ckan rights -c my.ini make bar admin dataset:foo
-As well as users and packages, you can assign rights to other objects. These
-include authorization groups, package groups and the system as a whole.
+As well as users and datasets, you can assign rights to other objects. These
+include authorization groups, dataset groups and the system as a whole.
For example, to make the user 'chef' a system-wide admin::
@@ -144,9 +144,9 @@
group:bar
To revoke one of the roles assigned using ``rights make``, the ``rights remove`` command
-is available. For example, to remove **bar**'s **admin** role on the foo package::
+is available. For example, to remove **bar**'s **admin** role on the foo dataset::
- paster --plugin=ckan rights -c my.ini remove bar admin package:foo
+ paster --plugin=ckan rights -c my.ini remove bar admin dataset:foo
The ``roles`` command lists and modifies the assignment of actions to
roles.
@@ -180,24 +180,26 @@
1. Anonymous Edit Mode
++++++++++++++++++++++
-Anyone can edit and create packages without logging in. This is the default for CKAN out of the box.
+Anyone can edit and create datasets without logging in. This is the default for CKAN out of the box.
+
+
2. Logged-in Edit Mode
++++++++++++++++++++++
-You need to log-in and create/edit packages. Anyone can create an account.
+You need to log-in and create/edit datasets. Anyone can create an account.
To operate in this mode:
-1. First, change the visitor (any non-logged in user) rights from being able to create and edit packages to just reading them::
+1. First, change the visitor (any non-logged in user) rights from being able to create and edit datasets to just reading them::
paster rights make visitor reader system
paster rights make visitor reader package:all
paster rights remove visitor anon_editor package:all
paster rights remove visitor anon_editor system
-2. Change the default rights for newly created packages. Do this by using these values in your config file (see :doc:`configuration`)::
+2. Change the default rights for newly created datasets. Do this by using these values in your config file (see :doc:`configuration`)::
ckan.default_roles.Package = {"visitor": ["reader"], "logged_in": ["editor"]}
ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["editor"]}
@@ -212,27 +214,27 @@
The key features are:
-* Packages are assigned to a specific publishing group.
-* Only users associated to that group are able to create or update packages associated to that group.
+* Datasets are assigned to a specific publishing group.
+* Only users associated to that group are able to create or update datasets associated to that group.
To operate in this mode:
-1. First, remove the general public's rights to create and edit packages::
+1. First, remove the general public's rights to create and edit datasets::
paster rights remove visitor anon_editor package:all
paster rights remove logged_in editor package:all
paster rights remove visitor anon_editor system
paster rights remove logged_in editor system
-2. If logged-in users have already created packages in your system, you may also wish to remove their admin rights. For example::
+2. If logged-in users have already created datasets in your system, you may also wish to remove their admin rights. For example::
paster rights remove bob admin package:all
-3. Change the default rights for newly created packages. Do this by using these values in your config file (see :doc:`configuration`)::
+3. Change the default rights for newly created datasets. Do this by using these values in your config file (see :doc:`configuration`)::
ckan.default_roles.Package = {"visitor": ["reader"], "logged_in": ["reader"]}
ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["reader"]}
ckan.default_roles.System = {"visitor": ["reader"], "logged_in": ["reader"]}
ckan.default_roles.AuthorizationGroup = {"visitor": ["reader"], "logged_in": ["reader"]}
-Note you can also restrict package edits by a user's authorization group.
+Note you can also restrict dataset edits by a user's authorization group.
--- a/doc/configuration.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/configuration.rst Mon Sep 05 18:18:20 2011 +0100
@@ -79,7 +79,7 @@
Default value: (empty)
-This sets a space-separated list of extra field key values which will not be shown on the package read page.
+This sets a space-separated list of extra field key values which will not be shown on the dataset read page.
.. warning:: While this is useful to e.g. create internal notes, it is not a security measure. The keys will still be available via the API and in revision diffs.
@@ -93,9 +93,9 @@
rdf_packages = http://semantic.ckan.net/record/
-Configure this if you have an RDF store of the same packages as are in your CKAN instance. It will provide three sorts of links from each package page to the equivalent RDF URL given in `rdf_packages`:
+Configure this if you have an RDF store of the same datasets as are in your CKAN instance. It will provide three sorts of links from each dataset page to the equivalent RDF URL given in `rdf_packages`:
-1. 303 redirects for clients that content-negotiate rdf-xml or turtle. e.g. client GETs `http://ckan.net/package/pollution-2008` with accept header `application/rdf+xml` ``curl -H "Accept: application/rdf+xml" http://ckan.net/package/pollution-2008``. CKAN's response is a 303 redirect to `http://semantic.ckan.net/package/pollution-2008` which can be obtained with: ``curl -L -H "Accept: application/rdf+xml" http://ckan.net/package/pollution-2008``
+1. 303 redirects for clients that content-negotiate rdf-xml or turtle. e.g. client GETs `http://ckan.net/dataset/pollution-2008` with accept header `application/rdf+xml` ``curl -H "Accept: application/rdf+xml" http://ckan.net/dataset/pollution-2008``. CKAN's response is a 303 redirect to `http://semantic.ckan.net/dataset/pollution-2008` which can be obtained with: ``curl -L -H "Accept: application/rdf+xml" http://ckan.net/dataset/pollution-2008``
2. Embedded links for browsers that are aware. e.g. `<link rel="alternate" type="application/rdf+xml" href="http://semantic.ckan.net/record/b410e678-8a96-40cf-8e46-e8bd4bf02684.rdf">`
@@ -254,7 +254,7 @@
Default value: ``standard``
-This sets the name of the form to use when editing a package. This can be a form defined in the core CKAN code or in another setuputils-managed python module. The only requirement is that the ``setup.py`` file has an entry point for the form defined in the ``ckan.forms`` section.
+This sets the name of the form to use when editing a dataset. This can be a form defined in the core CKAN code or in another setuputils-managed python module. The only requirement is that the ``setup.py`` file has an entry point for the form defined in the ``ckan.forms`` section.
For more information on forms, see :doc:`forms`.
@@ -271,9 +271,9 @@
package_new_return_url = http://datadotgc.ca/new_dataset_complete?name=<NAME>
package_edit_return_url = http://datadotgc.ca/dataset/<NAME>
-If integrating the Edit Package and New Package forms into a third-party interface, setting these options allows you to set the return address. When the user has completed the form and presses 'commit', the user is redirected to the URL specified.
+If integrating the Edit Dataset and New Dataset forms into a third-party interface, setting these options allows you to set the return address. When the user has completed the form and presses 'commit', the user is redirected to the URL specified.
-The ``<NAME>`` string is replaced with the name of the package edited. Full details of this process are given in :doc:`form-integration`.
+The ``<NAME>`` string is replaced with the name of the dataset edited. Full details of this process are given in :doc:`form-integration`.
.. index::
@@ -284,7 +284,7 @@
A url pointing to a JSON file containing a list of licence objects. This list
determines the licences offered by the system to users, for example when
-creating or editing a package.
+creating or editing a dataset.
This is entirely optional - by default, the system will use the CKAN list of
licences available in the `Python licenses package <http://pypi.python.org/pypi/licenses>`_.
@@ -417,7 +417,7 @@
Default value: (none)
-The primary URL used by this site. Used in the API to provide packages with links to themselves in the web UI.
+The primary URL used by this site. Used in the API to provide datasets with links to themselves in the web UI.
.. index::
single: api_url
@@ -445,7 +445,7 @@
default_roles
^^^^^^^^^^^^^
-This allows you to set the default authorization roles (i.e. permissions) for new objects. Currently this extends to new packages, groups, authorization groups and the ``system`` object. For full details of these, see :doc:`authorization`.
+This allows you to set the default authorization roles (i.e. permissions) for new objects. Currently this extends to new datasets, groups, authorization groups and the ``system`` object. For full details of these, see :doc:`authorization`.
The value is a strict JSON dictionary of user names ``visitor`` (any user who is not logged in) and ``logged_in`` (any user who is logged in) with lists of their roles.
@@ -454,7 +454,7 @@
ckan.default_roles.Package = {"visitor": ["editor"], "logged_in": ["editor"]}
ckan.default_roles.Group = {"visitor": ["reader"], "logged_in": ["reader"]}
-With this example setting, visitors and logged-in users can only read packages that get created.
+With this example setting, visitors and logged-in users can only read datasets that get created.
Defaults: see in ``ckan/model/authz.py`` for: ``default_default_user_roles``
--- a/doc/database_dumps.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/database_dumps.rst Mon Sep 05 18:18:20 2011 +0100
@@ -10,7 +10,7 @@
We provide two ``paster`` methods to create dumpfiles.
-* ``db simple-dump-json`` - A simple dumpfile, useful to create a public listing of the packages with no user information. All packages are dumped, including deleted packages and ones with strict authorization.
+* ``db simple-dump-json`` - A simple dumpfile, useful to create a public listing of the datasets with no user information. All datasets are dumped, including deleted datasets and ones with strict authorization.
* ``db dump`` - A more complicated dumpfile, useful for backups. Replicates the database completely, including users, their personal info and API keys, and hence should be kept private.
For more information on paster, see :doc:`paster`.
--- a/doc/extensions.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/extensions.rst Mon Sep 05 18:18:20 2011 +0100
@@ -18,9 +18,9 @@
* `ckanext-admin <https://bitbucket.org/okfn/ckanext-admin>`_: Admin web interface for CKAN.
* `ckanext-apps <https://bitbucket.org/okfn/ckanext-apps>`_: Apps and ideas catalogue extension for CKAN.
* `ckanext-deliverance <https://bitbucket.org/okfn/ckanext-deliverance>`_: Extends CKAN to use the Deliverance HTTP proxy, which can request and render web pages from * an external site (e.g. a CMS like Drupal or Wordpress).
-* `ckanext-disqus <https://bitbucket.org/okfn/ckanext-disqus>`_: Allows users to comment on package pages with Disqus.
-* `ckanext-follower <https://bitbucket.org/okfn/ckanext-follower>`_: Allow users to follow packages.
-* `ckanext-googleanalytics <https://bitbucket.org/okfn/ckanext-googleanalytics>`_: Integrates Google Analytics data into CKAN. Gives download stats on package pages, list * of most popular packages, etc.
+* `ckanext-disqus <https://bitbucket.org/okfn/ckanext-disqus>`_: Allows users to comment on dataset pages with Disqus.
+* `ckanext-follower <https://bitbucket.org/okfn/ckanext-follower>`_: Allow users to follow datasets.
+* `ckanext-googleanalytics <https://bitbucket.org/okfn/ckanext-googleanalytics>`_: Integrates Google Analytics data into CKAN. Gives download stats on dataset pages, list * of most popular datasets, etc.
* `ckanext-qa <https://bitbucket.org/okfn/ckanext-qa>`_: Provides link checker, 5 stars of openness and other Quality Assurance features.
* `ckanext-rdf <https://bitbucket.org/okfn/ckanext-rdf>`_: Consolidated handling of RDF export and import for CKAN.
* `ckanext-stats <https://bitbucket.org/okfn/ckanext-stats>`_: Statistics (and visuals) about the datasets in a CKAN instance.
--- a/doc/form-integration.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/form-integration.rst Mon Sep 05 18:18:20 2011 +0100
@@ -2,12 +2,12 @@
Form Integration
================
-CKAN allows you to integrate its Edit Package and New Package forms forms into an external front-end. To that end, CKAN also provides a simple way to redirect these forms back to the external front-end upon submission.
+CKAN allows you to integrate its Edit Dataset and New Dataset forms forms into an external front-end. To that end, CKAN also provides a simple way to redirect these forms back to the external front-end upon submission.
Redirecting CKAN Forms
======================
-It is obviously simple enough for an external front-end to link to CKAN's Edit Package and New Package forms, but once the forms are submitted, it would be desirable to redirect the user back to the external front-end, rather than CKAN's package read page.
+It is obviously simple enough for an external front-end to link to CKAN's Edit Dataset and New Dataset forms, but once the forms are submitted, it would be desirable to redirect the user back to the external front-end, rather than CKAN's dataset read page.
This is achieved with a parameter to the CKAN URL. The 'return URL' can be specified in two places:
@@ -17,22 +17,22 @@
(If the 'return URL' is supplied in both places, then the first takes precedence.)
-Since the 'return URL' may need to include the package name, which could be changed by the user, CKAN replaces a known placeholder ``<NAME>`` with this value on redirect.
+Since the 'return URL' may need to include the dataset name, which could be changed by the user, CKAN replaces a known placeholder ``<NAME>`` with this value on redirect.
.. note:: Note that the downside of specifying the 'return URL' in the CKAN config is that the CKAN web interface becomes less usable on its own, since the user is hampered by the redirects to the external interface.
Example
-------
-An external front-end displays a package 'ontariolandcoverv100' here::
+An external front-end displays a dataset 'ontariolandcoverv100' here::
http://datadotgc.ca/dataset/ontariolandcoverv100
-It displays a link to edit this package using CKAN's form, which without the redirect would be::
+It displays a link to edit this dataset using CKAN's form, which without the redirect would be::
- http://ca.ckan.net/package/edit/ontariolandoverv100
+ http://ca.ckan.net/dataset/edit/ontariolandoverv100
-At first, it may seem that the return link should be ``http://datadotgc.ca/dataset/ontariolandcoverv100``. But when the user edits this package, the name may change. So the return link needs to be::
+At first, it may seem that the return link should be ``http://datadotgc.ca/dataset/ontariolandcoverv100``. But when the user edits this dataset, the name may change. So the return link needs to be::
http://datadotgc.ca/dataset/<NAME>
@@ -42,9 +42,9 @@
So, in summary, the edit link becomes::
- http://ca.ckan.net/package/edit/ontariolandoverv100?return_to=http%3A%2F%2Fdatadotgc.ca%2Fdataset%2F%3CNAME%3E
+ http://ca.ckan.net/dataset/edit/ontariolandoverv100?return_to=http%3A%2F%2Fdatadotgc.ca%2Fdataset%2F%3CNAME%3E
-During editing the package, the user changes the package name to `canadalandcover`, presses 'preview' and finally 'commit'. The user is now redirected back to the external front-end at::
+During editing the dataset, the user changes the dataset name to `canadalandcover`, presses 'preview' and finally 'commit'. The user is now redirected back to the external front-end at::
http://datadotgc.ca/dataset/canadalandcover
@@ -55,4 +55,4 @@
[app:main]
package_edit_return_url = http://datadotgc.ca/dataset/<NAME>
- ...
\ No newline at end of file
+ ...
--- a/doc/forms.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/forms.rst Mon Sep 05 18:18:20 2011 +0100
@@ -2,21 +2,21 @@
Customizing Forms
=================
-The forms used to edit packages and groups in CKAN can be customized. This lets you tailor them to your needs, helping your users choose from sensible options or use different data formats.
+The forms used to edit datasets and groups in CKAN can be customized. This lets you tailor them to your needs, helping your users choose from sensible options or use different data formats.
-This document explains how to customize the package and group forms you offer to your users, without getting embroiled in the core CKAN code.
+This document explains how to customize the dataset and group forms you offer to your users, without getting embroiled in the core CKAN code.
-.. note:: This section deals with the form used to *edit* packages and groups, not the way they are displayed. For information on customizing the display of forms, see :doc:`theming`.
+.. note:: This section deals with the form used to *edit* datasets and groups, not the way they are displayed. For information on customizing the display of forms, see :doc:`theming`.
.. warning:: This is an advanced topic. Ensure you are familiar with :doc:`extensions` before attempting to customize forms.
-Building a Package Form
+Building a Dataset Form
-----------------------
The Best Way: Extensions
^^^^^^^^^^^^^^^^^^^^^^^^
-The best way to build a package form is by using a CKAN extension.
+The best way to build a dataset form is by using a CKAN extension.
You will firstly need to make a new controller in your extension. This should subclass PackageController as follows::
@@ -26,7 +26,7 @@
The ``package_form`` variable in the subclass will be used as the new form template.
-It is recommended that you copy the package form (``new_package_form.html``) and make modifications to it. However, it is possible to start from scratch.
+It is recommended that you copy the dataset form (``new_package_form.html``) and make modifications to it. However, it is possible to start from scratch.
To point at this new controller correctly, your extension should look like the following::
@@ -34,8 +34,8 @@
implements(IRoutes)
implements(IConfigurer)
def before_map(self, map):
- map.connect('/package/new', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='new')
- map.connect('/package/edit/{id}', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='edit')
+ map.connect('/dataset/new', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='new')
+ map.connect('/dataset/edit/{id}', controller='ckanext.extension_name.controllers.PackageNewController:PackageNew', action='edit')
return map
def after_map(self, map):
return map
--- a/doc/loading_data.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/loading_data.rst Mon Sep 05 18:18:20 2011 +0100
@@ -22,34 +22,34 @@
The Simplest Approach - ckanclient
++++++++++++++++++++++++++++++++++
-The most basic way to automate package loading is with a Python script using the `ckanclient library <http://pypi.python.org/pypi/ckanclient>`_. You will need to register for an API key first.
+The most basic way to automate dataset loading is with a Python script using the `ckanclient library <http://pypi.python.org/pypi/ckanclient>`_. You will need to register for an API key first.
You can install ckanclient with::
pip install ckanclient
-Here is an example script to register a new package::
+Here is an example script to register a new dataset::
import ckanclient
# Instantiate the CKAN client.
ckan = ckanclient.CkanClient(api_key=my_api_key, base_location="http://myckaninstance.com/api")
- # Describe the package.
- package_entity = {
- 'name': my_package_name,
- 'url': my_package_url,
- 'download_url': my_package_download_url,
- 'tags': my_package_keywords,
- 'notes': my_package_long_description,
+ # Describe the dataset.
+ dataset_entity = {
+ 'name': my_dataset_name,
+ 'url': my_dataset_url,
+ 'download_url': my_dataset_download_url,
+ 'tags': my_dataset_keywords,
+ 'notes': my_dataset_long_description,
}
- # Register the package.
- ckan.package_register_post(package_entity)
+ # Register the dataset.
+ ckan.package_register_post(dataset_entity)
Loader Scripts
++++++++++++++
'Loader scripts' provide a simple way to take any format metadata and bulk upload it to a remote CKAN instance.
-Essentially each set of loader scripts converts the dataset metadata to the standard 'package' format, and then loads it into CKAN.
+Essentially each set of loader scripts converts the dataset metadata to the standard 'dataset' format, and then loads it into CKAN.
Loader scripts are generally stored into the `ckanext` repository. To get a flavour of what loader scripts look like, take a look at `the ONS scripts <https://bitbucket.org/okfn/ckanext-dgu/src/default/ckanext/dgu/ons/>`_.
@@ -58,7 +58,7 @@
For CSV and Excel formats, the `SpreadsheetPackageImporter` (found in ``ckan/lib/spreadsheet_importer.py``) loader script wraps the file in `SpreadsheetData` before extracting the records into `SpreadsheetDataRecords`.
-SpreadsheetPackageImporter copes with multiple title rows, data on multiple sheets, dates. The loader can reload packages based on a unique key column in the spreadsheet, choose unique names for packages if there is a clash, add/merge new resources for existing packages and manage package groups.
+SpreadsheetPackageImporter copes with multiple title rows, data on multiple sheets, dates. The loader can reload datasets based on a unique key column in the spreadsheet, choose unique names for datasets if there is a clash, add/merge new resources for existing datasets and manage dataset groups.
Loader Scripts for Google Spreadsheets
**************************************
@@ -74,12 +74,12 @@
First, you need an importer that derives from `PackageImporter` (found in ``ckan/lib/importer.py``). This takes whatever format the metadata is in and sorts it into records of type `DataRecord`.
-Next, each DataRecord is converted into the correct fields for a package using the `record_2_package` method. This results in package dictionaries.
+Next, each DataRecord is converted into the correct fields for a dataset using the `record_2_package` method. This results in dataset dictionaries.
-The `PackageLoader` takes the package dictionaries and loads them onto a CKAN instance using the ckanclient. There are various settings to determine:
+The `PackageLoader` takes the dataset dictionaries and loads them onto a CKAN instance using the ckanclient. There are various settings to determine:
- * ##how to identify the same package, previously been loaded into CKAN.## This can be simply by name or by an identifier stored in another field.
- * how to merge in changes to an existing packages. It can simply replace it or maybe merge in resources etc.
+ * ##how to identify the same dataset, previously been loaded into CKAN.## This can be simply by name or by an identifier stored in another field.
+ * how to merge in changes to an existing datasets. It can simply replace it or maybe merge in resources etc.
The loader should be given a command-line interface using the `Command` base class (``ckanext/command.py``).
--- a/doc/paster.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/paster.rst Mon Sep 05 18:18:20 2011 +0100
@@ -79,7 +79,7 @@
ratings Manage the ratings stored in the db
rights Commands relating to per-object and system-wide access rights.
roles Commands relating to roles and actions.
- search-index Creates a search index for all packages
+ search-index Creates a search index for all datasets
sysadmin Gives sysadmin rights to a named user
user Manage users
================= ==========================================================
@@ -134,7 +134,7 @@
For information on using ``db`` to create dumpfiles, see :doc:`database_dumps`.
-ratings: Manage package ratings
+ratings: Manage dataset ratings
-------------------------------
Manages the ratings stored in the database, and can be used to count ratings, remove all ratings, or remove only anonymous ratings.
@@ -149,7 +149,7 @@
Sets the authorization roles of a specific user on a given object within the system.
-For example, to give the user named 'bar' the 'admin' role on the package 'foo'::
+For example, to give the user named 'bar' the 'admin' role on the dataset 'foo'::
paster --plugin=ckan rights make bar admin package:foo --config=/etc/ckan/std/std.ini
--- a/doc/plugins.rst Mon Sep 05 09:43:11 2011 +0100
+++ b/doc/plugins.rst Mon Sep 05 18:18:20 2011 +0100
@@ -40,7 +40,7 @@
(pyenv)$ paster create -t ckanext ckanext-myname
-You'll get prompted to complete a number of variables which will be used in your package. You change these later by editing the generated ``setup.py`` file. Here's some example output:
+You'll get prompted to complete a number of variables which will be used in your dataset. You change these later by editing the generated ``setup.py`` file. Here's some example output:
::
@@ -202,7 +202,7 @@
.. tip ::
This example is based on real code used to implement the ``ckanext-disqus`` plugin
- to add commenting to packages. You can see the latest version of this code at
+ to add commenting to datasets. You can see the latest version of this code at
http://bitbucket.org/okfn/ckanext-disqus/src/tip/ckanext/plugins/disqus/__init__.py.
First we set up logging and some helpers we'll need from Genshi to transfer the stream:
@@ -238,8 +238,8 @@
class Disqus(SingletonPlugin):
"""
- Insert javascript fragments into package pages and the home page to
- allow users to view and create comments on any package.
+ Insert javascript fragments into dataset pages and the home page to
+ allow users to view and create comments on any dataset.
"""
implements(IConfigurable)
@@ -928,7 +928,7 @@
You don't need to specify configuration options to connect to RabbitMQ because
the defaults are fine.
-At this point if you edit a package it should be using the queue. If you have
+At this point if you edit a dataset it should be using the queue. If you have
the echo worker running you'll see the message added to the queue.
Logging
--- a/test-core.ini Mon Sep 05 09:43:11 2011 +0100
+++ b/test-core.ini Mon Sep 05 18:18:20 2011 +0100
@@ -27,8 +27,8 @@
# pyamqplib or queue
carrot_messaging_library = queue
ckan.site_url = http://test.ckan.net
-package_new_return_url = http://localhost/package/<NAME>?test=new
-package_edit_return_url = http://localhost/package/<NAME>?test=edit
+package_new_return_url = http://localhost/dataset/<NAME>?test=new
+package_edit_return_url = http://localhost/dataset/<NAME>?test=edit
rdf_packages = http://test.com/package/
ckan.extra_resource_fields = alt_url
http://bitbucket.org/okfn/ckan/changeset/2091f8e3b625/
changeset: 2091f8e3b625
user: rgrp
date: 2011-09-05 19:22:26
summary: [merge,in-branch][xs]: merge in dread's minor changes from earlier today.
affected #: 2 files (1 byte)
--- a/doc/api.rst Mon Sep 05 18:18:20 2011 +0100
+++ b/doc/api.rst Mon Sep 05 18:22:26 2011 +0100
@@ -351,7 +351,7 @@
| filter_by_openness | 0 (default) | filter_by_openness=1 | Filters results by ones which are|
| | or 1 | | open. |
+-----------------------+---------------+----------------------------------+----------------------------------+
-|filter_by_downloadbable| 0 (default) | filter_by_downloadable=1 | Filters results by ones which |
+|filter_by_downloadable| 0 (default) | filter_by_downloadable=1 | Filters results by ones which |
| | or 1 | | have at least one resource URL. |
+-----------------------+---------------+----------------------------------+----------------------------------+
--- a/doc/conf.py Mon Sep 05 18:18:20 2011 +0100
+++ b/doc/conf.py Mon Sep 05 18:22:26 2011 +0100
@@ -122,7 +122,7 @@
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-html_favicon = 'images/favicon.ico'
+#html_favicon = 'images/favicon.ico'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Repository URL: https://bitbucket.org/okfn/ckan/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list