Author: sevein
Date: Wed Aug 10 11:46:52 2011
New Revision: 9476

Log:
Add new right fields

Modified:
   trunk/apps/qubit/modules/right/actions/indexAction.class.php

Modified: trunk/apps/qubit/modules/right/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/right/actions/indexAction.class.php        Tue Aug 
 9 14:04:35 2011        (r9475)
+++ trunk/apps/qubit/modules/right/actions/indexAction.class.php        Wed Aug 
10 11:46:52 2011        (r9476)
@@ -39,16 +39,86 @@
 
     $value['startDate'] = Qubit::renderDate($this->resource->startDate);
 
+    // TODO rightsholder multivalue
+
+    if (isset($this->resource->rightsNote))
+    {
+      $value['rightsNote'] = $this->resource->rightsNote;
+    }
+
     if (isset($this->resource->basis))
     {
       $value['basis'] = $this->context->routing->generate(null, 
array($this->resource->basis, 'module' => 'term'));
     }
 
+    /**
+     * Basis: copyright
+     */
+
+    if (isset($this->resource->copyrightStatus))
+    {
+      $value['copyrightStatus'] = $this->context->routing->generate(null, 
array($this->resource->copyrightStatus, 'module' => 'term'));
+    }
+
+    if (isset($this->resource->copyrightStatusDate))
+    {
+      $value['copyrightStatusDate'] = $this->resource->copyrightStatusDate;
+    }
+
+    if (isset($this->resource->copyrightJurisdiction))
+    {
+      // TODO serialize/unserialize?
+      $value['copyrightJurisdiction'] = $this->resource->copyrightJurisdiction;
+    }
+
     if (isset($this->resource->copyrightNote))
     {
       $value['copyrightNote'] = $this->resource->copyrightNote;
     }
 
+    /**
+     * Basis: license
+     */
+
+    if (isset($this->resource->licenseIdentifier))
+    {
+      $value['licenseIdentifier'] = $this->resource->licenseIdentifier;
+    }
+
+    if (isset($this->resource->licenseTerms))
+    {
+      $value['licenseTerms'] = $this->resource->licenseTerms;
+    }
+
+    if (isset($this->resource->licenseNote))
+    {
+      $value['licenseNote'] = $this->resource->licenseNote;
+    }
+
+    /**
+     * Basis: statute
+     */
+
+    if (isset($this->resource->statuteJurisdiction))
+    {
+      $value['statuteJurisdiction'] = $this->resource->statuteJurisdiction;
+    }
+
+    if (isset($this->resource->statuteCitation))
+    {
+      $value['statuteCitation'] = $this->resource->statuteCitation;
+    }
+
+    if (isset($this->resource->statuteDeterminationDate))
+    {
+      $value['statuteDeterminationDate'] = 
$this->resource->statuteDeterminationDate;
+    }
+
+    if (isset($this->resource->statuteNote))
+    {
+      $value['statuteNote'] = $this->resource->statuteNote;
+    }
+
     return $this->renderText(json_encode($value));
   }
 }

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to