public function execute($request)
 {
     $this->resource = $request->getAttribute('sf_route')->resource;
     // Get tree (limit 10 siblings and children)
     $this->treeViewObjects = $this->resource->getFullYuiTree(10);
     // Check if tree view worth it
     if (1 > count($this->treeViewObjects)) {
         return sfView::NONE;
     }
     $this->treeViewExpands = array();
     foreach ($this->resource->ancestors->andSelf()->orderBy('lft') as $item) {
         $this->treeViewExpands[$item->id] = $item->id;
     }
     // Is it draggable?
     $this->treeViewDraggable = json_encode(SecurityPriviliges::editCredentials($this->context->user, 'term'));
 }
Esempio n. 2
0
foreach ($resource->getNotesByType(array('noteTypeId' => QubitTerm::ARCHIVIST_NOTE_ID)) as $item) {
    ?>
    <?php 
    echo render_show(__('Archivist\'s note'), render_value($item->getContent(array('cultureFallback' => true))));
    ?>
  <?php 
}
?>

</div> <!-- /.section#descriptionControlArea -->


  <div class="section" id="ehriMetadata">

    <?php 
echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'informationObject'), '<h2>' . __('EHRI Metadata') . '</h2>', array($resource, 'module' => 'informationobject', 'action' => 'edit'), array('anchor' => 'ehriMetadata', 'title' => __('Edit EHRI Metadata')));
?>

    <?php 
echo render_show(__('Scope'), render_value($isad->ehriScope));
?>
    <?php 
echo render_show(__('Priority'), render_value($isad->priorities[$isad->ehriPriority]));
?>
    <?php 
echo render_show(__('Copyright Issue'), render_value($isad->ehriCopyrightIssue ? "Yes" : "No"));
?>
    

  </div>  <!-- /.section#ehriMetadata -->
Esempio n. 3
0
    ?>

  <?php 
}
?>

</div>

<div class="section" style="margin-left: 2em;">

  <?php 
if ($child = $resource->getChildByUsageId(QubitTerm::THUMBNAIL_ID)) {
    ?>

    <?php 
    echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'informationObject'), '<h2>' . __('Digital object (%1%) rights area', array('%1%' => $child->usage)) . '</h2>', array($resource, 'module' => 'digitalobject', 'action' => 'edit'), array('title' => __('Edit digital object')));
    ?>

    <?php 
    foreach ($child->getRights() as $item) {
        ?>

      <?php 
        echo get_partial('right/right', array('resource' => $item->object));
        ?>

    <?php 
    }
    ?>

  <?php 
Esempio n. 4
0
?>

  <?php 
echo render_show(__('Reproduction services'), render_value($resource->getReproductionServices(array('cultureFallback' => true))));
?>

  <?php 
echo render_show(__('Public areas'), render_value($resource->getPublicFacilities(array('cultureFallback' => true))));
?>

</div>

<div class="section" id="controlArea">

  <?php 
echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'repository'), '<h2>' . __('Control area') . '</h2>', array($resource, 'module' => 'repository', 'action' => 'edit'), array('anchor' => 'controlArea', 'title' => __('Edit control area')));
?>

  <?php 
echo render_show(__('Description identifier'), render_value($resource->descIdentifier));
?>

  <?php 
echo render_show(__('Institution identifier'), render_value($resource->getDescInstitutionIdentifier(array('cultureFallback' => true))));
?>

  <?php 
echo render_show(__('Rules and/or conventions used'), render_value($resource->getDescRules(array('cultureFallback' => true))));
?>

  <?php 
Esempio n. 5
0
?>

  <?php 
echo get_partial('informationobject/placeAccessPoints', array('resource' => $resource));
?>

  <?php 
echo get_partial('informationobject/nameAccessPoints', array('resource' => $resource));
?>

</div> <!-- /.section -->

<div class="section" id="descriptionControlArea">

  <?php 
echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'informationObject'), '<h2>' . __('Control area') . '</h2>', array($resource, 'module' => 'informationobject', 'action' => 'edit'), array('anchor' => 'descriptionControlArea', 'title' => __('Edit control area')));
?>

  <?php 
echo render_show(__('Description record identifier'), render_value($resource->descriptionIdentifier));
?>

  <?php 
echo render_show(__('Institution identifier'), render_value($resource->getInstitutionResponsibleIdentifier(array('cultureFallback' => true))));
?>

  <?php 
echo render_show(__('Rules or conventions'), render_value($resource->getRules(array('cultureFallback' => true))));
?>

  <?php 
?>
      </td><td>
        <?php 
if (null !== $rightObject && null !== ($representation = $rightObject->getCompoundRepresentation())) {
    ?>
          <?php 
    echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'informationObject') || QubitTerm::TEXT_ID == $resource->mediaType->id, image_tag($representation->getFullPath()), public_path($rightObject->getFullPath(), array('title' => __('View full size'))));
    ?>
        <?php 
}
?>
      </td>
    </tr>

    <?php 
if (SecurityPriviliges::editCredentials($sf_user, 'informationObject')) {
    ?>
      <tr>
        <td colspan="2" class="download_link">
          <?php 
    echo link_to(__('Download %1%', array('%1%' => $resource)), public_path($resource->getFullPath()));
    ?>
        </td>
      </tr>
    <?php 
}
?>

  </tbody>
</table>
Esempio n. 7
0
<?php

use_helper('Date');
?>

<div class="section">

  <?php 
echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'informationObject'), '<h2>' . __('Digital object metadata') . '</h2>', array($resource, 'module' => 'digitalobject', 'action' => 'edit'), array('title' => __('Edit digital object')));
?>

  <?php 
if (!QubitAcl::check($resource->informationObject, 'readReference')) {
    ?>
    <?php 
    echo render_show(__('Access'), __('Restricted'));
    ?>
  <?php 
}
?>

<?php 
if (QubitAcl::check($resource->informationObject, 'readMaster')) {
    ?>
  <?php 
    if (QubitTerm::EXTERNAL_URI_ID == $resource->usageId) {
        ?>
    <?php 
        echo render_show(__('URL'), render_value($resource->path));
        ?>
  <?php