[ckan-changes] commit/ckan: rgrp: [js/templates.js][s]: make last_modified and resource_type field editable again.

Bitbucket commits-noreply at bitbucket.org
Tue Sep 13 23:01:34 UTC 2011


1 new changeset in ckan:

http://bitbucket.org/okfn/ckan/changeset/c5036350ffaf/
changeset:   c5036350ffaf
user:        rgrp
date:        2011-09-14 01:01:53
summary:     [js/templates.js][s]: make last_modified and resource_type field editable again.
affected #:  1 file (193 bytes)

--- a/ckan/public/scripts/templates.js	Tue Sep 13 22:25:13 2011 +0100
+++ b/ckan/public/scripts/templates.js	Tue Sep 13 23:01:53 2011 +0000
@@ -122,21 +122,25 @@
       <dd> \
         <input name="resources__${num}__mimetype_inner" type="text" value="${resource.mimetype_inner}" /> \
       </dd> \
+      <dt>Last Modified</dt> \
+      <dd> \
+        <input name="resources__${num}__last_modified" type="text" value="${resource.last_modified}" /> \
+      </dd> \
       <dt>Resource Type</dt> \
       <dd> \
+      {{if resource.resource_type=="file.upload"}} \
         ${resource.resource_type} \
         <input name="resources__${num}__resource_type" type="hidden" value="${resource.resource_type}" /> \
+      {{/if}} \
+      {{if resource.resource_type!="file.upload"}} \
+        <input name="resources__${num}__resource_type" type="text" value="${resource.resource_type}" /> \
+      {{/if}} \
       </dd> \
       <dt>Hash</dt> \
       <dd> \
         ${resource.hash || "Unknown"} \
         <input name="resources__${num}__hash" type="hidden" value="${resource.hash}" /> \
       </dd> \
-      <dt>Last Modified</dt> \
-      <dd> \
-        ${resource.last_modified || "Unknown"} \
-        <input name="resources__${num}__last_modified" type="hidden" value="${resource.last_modified}" /> \
-      </dd> \
       <dt>ID</dt> \
       <dd> \
         ${resource.id} \

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