[ckan-changes] [okfn/ckan] 13805f: [2306][scripts, templates] Add resource 'created' ...

GitHub noreply at github.com
Tue Apr 24 14:29:03 UTC 2012


  Branch: refs/heads/feature-2306-resource-created
  Home:   https://github.com/okfn/ckan
  Commit: 13805f2a2cd0f217ea2e28ce035356bb9c626332
      https://github.com/okfn/ckan/commit/13805f2a2cd0f217ea2e28ce035356bb9c626332
  Author: John Glover <j at johnglover.net>
  Date:   2012-04-24 (Tue, 24 Apr 2012)

  Changed paths:
    M ckan/public/scripts/application.js
    M ckan/public/scripts/templates.js
    M ckan/templates/js_strings.html

  Log Message:
  -----------
  [2306][scripts, templates] Add resource 'created' field to edit form (read-only for now)


diff --git a/ckan/public/scripts/application.js b/ckan/public/scripts/application.js
index d94bbd4..3c9b62d 100644
--- a/ckan/public/scripts/application.js
+++ b/ckan/public/scripts/application.js
@@ -638,6 +638,7 @@ CKAN.View.Resource = Backbone.View.extend({
           word=='format'                ||
           word=='hash'                  ||
           word=='id'                    ||
+          word=='created'               ||
           word=='last_modified'         ||
           word=='mimetype'              ||
           word=='mimetype_inner'        ||
diff --git a/ckan/public/scripts/templates.js b/ckan/public/scripts/templates.js
index 66b06cb..6ecad11 100644
--- a/ckan/public/scripts/templates.js
+++ b/ckan/public/scripts/templates.js
@@ -143,6 +143,12 @@ CKAN.Templates.resourceDetails = ' \
       </div> \
     </div> \
     <div class="control-group"> \
+      <label for="" class="control-label" property="rdfs:label">'+CKAN.Strings.created+'</label> \
+      <div class="controls"> \
+        <input type="text" disabled="disabled" value="${resource.created}" class="disabled" /> \
+      </div> \
+    </div> \
+    <div class="control-group"> \
       <label class="control-label">'+CKAN.Strings.extraFields+' \
         <button class="btn btn-small add-resource-extra">'+CKAN.Strings.addExtraField+'</button>\
       </label>\
diff --git a/ckan/templates/js_strings.html b/ckan/templates/js_strings.html
index 5ba337c..76a0d7e 100644
--- a/ckan/templates/js_strings.html
+++ b/ckan/templates/js_strings.html
@@ -51,6 +51,7 @@
   CKAN.Strings.datastoreEnabled = "${_('DataStore enabled')}";
   CKAN.Strings.sizeBracketsBytes = "${_('Size (Bytes)')}";
   CKAN.Strings.mimetype = "${_('Mimetype')}";
+  CKAN.Strings.created = "${_('Created')}";
   CKAN.Strings.lastModified = "${_('Last Modified')}";
   CKAN.Strings.mimetypeInner = "${_('Mimetype (Inner)')}";
   CKAN.Strings.hash = "${_('Hash')}";


================================================================



More information about the ckan-changes mailing list