Author: david
Date: Tue Aug 23 15:03:27 2011
New Revision: 9575
Log:
Rollback r8642, r8603 - Don't make repository a child of QubitActor root
object. Intelligently link to ISAAR or ISDIAH template from ISAAR relations.
Refs issue 2041, issue 1849.
Modified:
trunk/apps/qubit/modules/repository/actions/editAction.class.php
trunk/apps/qubit/modules/repository/actions/indexAction.class.php
trunk/lib/model/QubitRepository.php
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/indexSuccess.php
Modified: trunk/apps/qubit/modules/repository/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/repository/actions/editAction.class.php Tue Aug
23 14:22:05 2011 (r9574)
+++ trunk/apps/qubit/modules/repository/actions/editAction.class.php Tue Aug
23 15:03:27 2011 (r9575)
@@ -39,12 +39,6 @@
{
$this->resource = $this->getRoute()->resource;
- // Check that this isn't the root
- if (!isset($this->resource->parent))
- {
- $this->forward404();
- }
-
// Check user authorization
if (!QubitAcl::check($this->resource, 'update'))
{
Modified: trunk/apps/qubit/modules/repository/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/repository/actions/indexAction.class.php Tue Aug
23 14:22:05 2011 (r9574)
+++ trunk/apps/qubit/modules/repository/actions/indexAction.class.php Tue Aug
23 15:03:27 2011 (r9575)
@@ -22,11 +22,5 @@
public function execute($request)
{
$this->resource = $this->getRoute()->resource;
-
- // Check that this isn't the root
- if (!isset($this->resource->parent))
- {
- $this->forward404();
- }
}
}
Modified: trunk/lib/model/QubitRepository.php
==============================================================================
--- trunk/lib/model/QubitRepository.php Tue Aug 23 14:22:05 2011 (r9574)
+++ trunk/lib/model/QubitRepository.php Tue Aug 23 15:03:27 2011 (r9575)
@@ -25,16 +25,6 @@
*/
class QubitRepository extends BaseRepository
{
- public function save($connection = null)
- {
- if (self::ROOT_ID != $this->id && !isset($this->parentId) &&
'QubitRepository' == $this->className)
- {
- $this->parentId = self::ROOT_ID;
- }
-
- parent::save($connection);
- }
-
/**
* Create new related QubitNote
*
Modified:
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/indexSuccess.php
==============================================================================
---
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/indexSuccess.php
Tue Aug 23 14:22:05 2011 (r9574)
+++
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/indexSuccess.php
Tue Aug 23 15:03:27 2011 (r9575)
@@ -68,13 +68,13 @@
<?php echo render_show(__('General context'),
render_value($resource->getGeneralContext(array('cultureFallback' => true)))) ?>
<?php foreach ($resource->getActorRelations() as $item): ?>
- <?php $relatedActor = $item->getOpposedObject($resource->id) ?>
+ <?php $relatedEntity = $item->getOpposedObject($resource->id) ?>
<div class="field">
<h3><?php echo __('Related entity') ?></h3>
<div>
- <?php echo link_to(render_title($relatedActor), array($relatedActor,
'module' => 'actor')) ?><?php if (isset($relatedActor->datesOfExistence)): ?>
<span class="note2">(<?php echo
render_value($relatedActor->getDatesOfExistence(array('cultureFallback' =>
true))) ?>)</span><?php endif; ?>
+ <?php echo link_to(render_title($relatedEntity), array($relatedEntity,
'module' => ('QubitRepository' == $relatedEntity->className) ? 'repository' :
'actor')) ?><?php if (isset($relatedEntity->datesOfExistence)): ?> <span
class="note2">(<?php echo
render_value($relatedEntity->getDatesOfExistence(array('cultureFallback' =>
true))) ?>)</span><?php endif; ?>
- <?php echo render_show(__('Identifier of the related entity'),
render_value($relatedActor->descriptionIdentifier)) ?>
+ <?php echo render_show(__('Identifier of the related entity'),
render_value($relatedEntity->descriptionIdentifier)) ?>
<?php echo render_show(__('Category of the relationship'),
render_value($item->type)) ?>
--
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.