function render_show_repository($label, $resource) { if (isset($resource->repository)) { return render_show($label, link_to(render_title($resource->repository), array($resource->repository, 'module' => 'repository'))); } foreach ($resource->ancestors->orderBy('rgt') as $item) { if (isset($item->repository)) { return render_show($label, link_to(render_title($item->repository), array($item->repository, 'module' => 'repository'), array('title' => __('Inherited from %1%', array('%1%' => $item))))); } } }
echo link_to($name, array($result, 'module' => 'function')); ?> <?php } elseif ('QubitRepository' == $className) { ?> <?php $name = render_title($result->getAuthorizedFormOfName(array('cultureFallback' => true))); ?> <?php echo link_to($name, array($result, 'module' => 'repository')); ?> <?php } elseif ('QubitTerm' == $className) { ?> <?php $name = render_title($result->getName(array('cultureFallback' => true))); ?> <?php echo link_to($name, array($result, 'module' => 'term')); ?> <?php } ?> </td> <?php if ('QubitInformationObject' == $className && 0 < sfConfig::get('app_multi_repository')) { ?> <td> <?php if (null !== ($repository = $result->getRepository(array('inherit' => true)))) {
<?php echo get_component('informationobject', 'creatorDetail', array('resource' => $resource)); ?> <?php foreach ($functionRelations as $item) { ?> <div class="field"> <h3><?php echo __('Related function'); ?> </h3> <div> <?php echo link_to(render_title($item->subject->getLabel()), array($item->subject, 'module' => 'function')); ?> </div> </div> <?php } ?> <?php echo render_show_repository(__('Repository'), $resource); ?> <?php echo render_show(__('Archival history'), render_value($resource->getArchivalHistory(array('cultureFallback' => true)))); ?>
<?php echo __('Note'); ?> </th> </tr> </thead><tbody> <?php foreach ($taxonomies as $item) { ?> <tr class="<?php echo 0 == @++$row % 2 ? 'even' : 'odd'; ?> "> <td> <?php echo link_to(render_title($item), array($item, 'module' => 'taxonomy')); ?> </td><td> <?php echo $item->getNote(array('cultureFallback' => true)); ?> </td> </tr> <?php } ?> </tbody> </table> <?php echo get_partial('default/pager', array('pager' => $pager));
<?php if (0 < count($taxonomyPermissions)) { ?> <?php foreach ($taxonomyPermissions as $key => $item) { ?> <div class="form-item"> <table id="acl_<?php echo $key; ?> "> <caption><?php echo render_title(QubitTaxonomy::getById($key)); ?> </caption> <thead> <tr> <th scope="col"><?php echo __('Action'); ?> </th> <th scope="col"><?php echo __('Permission'); ?> </th> </tr> </thead><tbody> <?php
" id="<?php echo url_for(array($item, 'module' => 'relation')); ?> "> <td> <?php if ($resource->id == $item->objectId) { ?> <?php echo render_title($item->subject); ?> <?php } else { ?> <?php echo render_title($item->object); ?> <?php } ?> </td><td> <?php echo $item->type; ?> </td><td> <?php echo Qubit::renderDateStartEnd($item->date, $item->startDate, $item->endDate); ?> </td><td> <?php echo $item->description;
<h1><?php echo __('Are you sure you want to delete %1%?', array('%1%' => render_title($resource))); ?> </h1> <?php echo $form->renderFormTag(url_for(array($resource, 'module' => 'deaccession', 'action' => 'delete')), array('method' => 'delete')); ?> <div class="actions section"> <h2 class="element-invisible"><?php echo __('Actions'); ?> </h2> <div class="content"> <ul class="clearfix links"> <li><?php echo link_to(__('Cancel'), array($resource, 'module' => 'deaccession')); ?> </li> <li><input class="form-submit" type="submit" value="<?php echo __('Confirm'); ?> "/></li> </ul> </div> </div>
echo render_title($date->actor); ?> <?php } ?> </li> <?php } ?> </ul> </td><td> <?php if ($item->getCollectionRoot()->id != $item->id) { ?> <?php echo render_title($item->getCollectionRoot()); ?> <?php } ?> </td><td> <?php if (null != ($accessConditions = $item->getAccessConditions(array('cultureFallback' => true)))) { ?> <?php echo render_value($accessConditions); ?> <?php } else { ?> <?php
<h1><?php echo __('View rights holder'); ?> </h1> <?php echo link_to_if(QubitAcl::check($resource, 'update'), '<h1 class="label">' . render_title($resource) . '</h1>', array($resource, 'module' => 'rightsholder', 'action' => 'edit'), array('title' => __('Edit rights holder'))); ?> <?php if (isset($errorSchema)) { ?> <div class="messages error"> <ul> <?php foreach ($errorSchema as $error) { ?> <li><?php echo $error; ?> </li> <?php } ?> </ul> </div> <?php } ?> <?php
} ?> </resourceRelation> <?php } ?> <?php foreach ($eac->functionRelation as $item) { ?> <functionRelation xlink:href="<?php echo url_for(array($item, 'module' => 'function'), true); ?> " xlink:type="simple"> <relationEntry><?php echo render_title($item->subject); ?> </relationEntry> <?php echo sfEacPlugin::renderDates($item); if (0 < count($date = $item->getNotesByType(array('noteTypeId' => QubitTerm::RELATION_NOTE_DATE_ID)))) { ?> <descriptiveNote> <?php echo render_value('<p>' . $date[0]) . '</p>'; ?> </descriptiveNote> <?php } ?> </functionRelation>
<h1><?php echo __('View %1%', array('%1%' => sfConfig::get('app_ui_label_repository'))); ?> </h1> <h1 class="label"> <?php echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'repository'), render_title($resource), array($resource, 'module' => 'repository', 'action' => 'edit'), array('title' => __('Edit repository'))); ?> </h1> <?php if (isset($errorSchema)) { ?> <div class="messages error"> <ul> <?php foreach ($errorSchema as $error) { ?> <li><?php echo $error; ?> </li> <?php } ?> </ul> </div> <?php } ?>
public static function renderYuiNodes($tree, $options = array()) { ProjectConfiguration::getActive()->loadHelpers(array('Qubit', 'Text', 'Escaping')); $yuiTree = array(); foreach ($tree as $key => $item) { $node = array(); if ($item instanceof QubitTerm) { if (QubitTerm::ROOT_ID != $item->id) { $label = render_title($item); $node['label'] = truncate_text($label, 50); if (50 < strlen($label)) { $node['title'] = esc_specialchars($label); } $node['href'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'term')); $node['id'] = $item->id; $node['parentId'] = $item->parentId; $node['isLeaf'] = (string) (!$item->hasChildren()); $node['moveUrl'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'default', 'action' => 'move')); $node['expandUrl'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'term', 'action' => 'treeView')); } else { $label = render_title($options['currentNode']->taxonomy); $node['label'] = truncate_text($label, 50); if (50 < strlen($label)) { $node['title'] = esc_specialchars($label); } $node['href'] = sfContext::getInstance()->routing->generate(null, array($options['currentNode']->taxonomy, 'module' => 'taxonomy')); $node['id'] = $item->id; $node['parentId'] = null; $node['isLeaf'] = (string) (!$item->hasChildren()); $node['moveUrl'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'default', 'action' => 'move')); $node['expandUrl'] = sfContext::getInstance()->routing->generate(null, array($item, 'module' => 'term', 'action' => 'treeView')); } if (isset($options['currentNode']) && $options['currentNode'] === $item) { $node['style'] = 'ygtvlabel currentTextNode'; } } else { $count = intval($item['total']) - intval($item['limit']); $node['label'] = sfContext::getInstance()->i18n->__('+%1% ...', array('%1%' => $count)); $node['parentId'] = $item['parentId']; $node['href'] = '#'; $node['isLeaf'] = 'true'; $node['style'] = 'seeAllNode XmlHttpRequest'; } $yuiTree[] = $node; } return $yuiTree; }
<div class="page"> <h1><?php echo render_title($resource->getTitle(array('cultureFallback' => true))); ?> </h1> <div> <?php echo render_value($resource->getContent(array('cultureFallback' => true))); ?> </div> <?php if (SecurityCheck::hasPermission($sf_user, array('module' => 'staticpage', 'action' => 'update'))) { ?> <div class="actions section"> <h2 class="element-invisible"><?php echo __('Actions'); ?> </h2> <div class="content"> <ul class="links"> <li><?php echo link_to(__('Edit'), array($resource, 'module' => 'staticpage', 'action' => 'edit'), array('title' => __('Edit this page'))); ?> </li> </ul> </div>
?> </h3> <div> <ul> <?php foreach ($ancestor->getCreators() as $item) { ?> <li> <?php if (0 < count($resource->getCreators())) { ?> <?php echo link_to(render_title($item), array($item, 'module' => 'actor')); ?> <?php } else { ?> <?php echo link_to(render_title($item), array($item, 'module' => 'actor'), array('title' => __('Inherited from %1%', array('%1%' => $ancestor)))); ?> <?php } ?> </li> <?php } ?> </ul> </div> </div>
"> <td> <?php echo link_to($item->username, array($item, 'module' => 'user')); ?> </td><td> <?php echo $item->email; ?> </td><td> <ul> <?php foreach ($item->getAclGroups() as $group) { ?> <li><?php echo render_title($group); ?> </li> <?php } ?> </ul> </td> </tr> <?php } ?> </tbody> </table> <?php
} ?> <!-- Related archival material --> <?php foreach ($isdf->relatedResource as $item) { ?> <div class="field"> <h3><?php echo __('Related resource'); ?> </h3> <div> <?php echo render_show(__('Title'), link_to(render_title($item->object->getTitle(array('cultureFallback' => true))), array($item->object, 'module' => 'informationobject'))); ?> <?php $isad = new sfIsadPlugin($item->object); echo render_show(__('Identifier'), $isad->referenceCode); ?> <?php if (null !== $item->description) { ?> <?php echo render_show(__('Nature of relationship'), render_value($item->description)); ?> <?php }
<?php echo render_show(__('Description of relationship'), render_value($item->description)); ?> </div> </div> <?php } ?> <?php foreach ($functions as $item) { ?> <?php echo render_show(__('Related function'), link_to(render_title($item), array($item, 'module' => 'function'))); ?> <?php } ?> </div> <div class="section" id="controlArea"> <?php echo link_to_if(QubitAcl::check($resource, 'update'), '<h2>' . __('Control area') . '</h2>', array($resource, 'module' => 'actor', 'action' => 'edit'), array('anchor' => 'controlArea', 'title' => __('Edit control area'))); ?> <?php echo render_show(__('Description identifier'), render_value($resource->descriptionIdentifier));
?> <?php echo link_to(render_title($repository), array($repository, 'module' => 'repository')); ?> <?php } ?> <?php } else { ?> <ul> <?php foreach ($item->getCreators(array('inherit' => true)) as $creator) { ?> <li><?php echo link_to(render_title($creator), array($creator, 'module' => 'actor')); ?> </li> <?php } ?> </ul> <?php } ?> <?php } ?> <?php } ?>
<td colspan="<?php echo $tableCols; ?> "><strong> <?php if ('' == $taxonomyId) { ?> <em><?php echo __('All %1%', array('%1%' => sfConfig::get('app_ui_label_term'))); ?> </em> <?php } else { ?> <?php echo __('Taxonomy: %1%', array('%1%' => render_title(QubitTaxonomy::getById($taxonomyId)))); ?> <?php } ?> </strong></td> </tr> <?php $row = 0; ?> <?php foreach ($actions as $action => $groupPermission) { ?> <tr class="<?php echo 0 == @++$row % 2 ? 'even' : 'odd';
<h1><?php echo __('Edit archival description - ISAD'); ?> </h1> <h1 class="label"><?php echo render_title($isad); ?> </h1> <?php if (isset($sf_request->source)) { ?> <div class="messages status"> <?php echo __('This is a duplicate of record %1%', array('%1%' => $sourceInformationObjectLabel)); ?> </div> <?php } ?> <?php echo $form->renderGlobalErrors(); ?> <?php if (isset($sf_request->getAttribute('sf_route')->resource)) { ?> <?php echo $form->renderFormTag(url_for(array($resource, 'module' => 'informationobject', 'action' => 'edit')), array('id' => 'editForm'));
<?php foreach ($resource->getEvents() as $item) { ?> <tr class="<?php echo 0 == @++$row % 2 ? 'even' : 'odd'; ?> related_obj_<?php echo $item->id; ?> " id="<?php echo url_for(array($item, 'module' => 'event')); ?> "> <td> <?php echo render_title($item->informationObject); ?> </td><td> <?php echo $item->type; ?> </td><td> <?php echo Qubit::renderDateStartEnd($item->date, $item->startDate, $item->endDate); ?> </td><td style="text-align: right"> <input class="multiDelete" name="deleteEvents[]" type="checkbox" value="<?php echo url_for(array($item, 'module' => 'event')); ?> "/> </td>
<?php echo __('Date'); ?> </th> </tr> </thead><tbody> <?php foreach ($accessions as $item) { ?> <tr class="<?php echo 0 == @++$row % 2 ? 'even' : 'odd'; ?> "> <td> <?php echo link_to(render_title($item), array($item, 'module' => 'accession')); ?> </td><td> <?php echo $item->date; ?> </td> </tr> <?php } ?> </tbody> </table> <?php echo get_partial('default/pager', array('pager' => $pager));
<h1><?php echo __('Edit %1% - ISDIAH', array('%1%' => sfConfig::get('app_ui_label_repository'))); ?> </h1> <h1 class="label"><?php echo render_title($resource); ?> </h1> <?php echo $form->renderGlobalErrors(); ?> <?php if (isset($sf_request->getAttribute('sf_route')->resource)) { ?> <?php echo $form->renderFormTag(url_for(array($resource, 'module' => 'repository', 'action' => 'edit'))); } else { ?> <?php echo $form->renderFormTag(url_for(array('module' => 'repository', 'action' => 'add'))); } ?> <?php echo $form->renderHiddenFields(); ?> <fieldset class="collapsible collapsed" id="identityArea">
</tr> </thead><tbody> <?php $row = 0; ?> <?php foreach ($pager->getResults() as $item) { ?> <tr class="<?php echo 0 == @++$row % 2 ? 'even' : 'odd'; ?> "> <td> <?php echo link_to(render_title($item), array($item, 'module' => 'repository')); ?> </td> <?php if ('nameDown' == $sf_request->sort || 'nameUp' == $sf_request->sort || !$sf_user->isAuthenticated() && 'updatedDown' != $sf_request->sort && 'updatedUp' != $sf_request->sort) { ?> <td> <ul> <?php foreach ($item->getTermRelations(QubitTaxonomy::REPOSITORY_TYPE_ID) as $relation) { ?> <li><?php echo $relation->term; ?> </li> <?php
echo 0 == @++$row % 2 ? 'even' : 'odd'; ?> related_obj_<?php echo $item->id; ?> " id="<?php echo url_for(array($item, 'module' => 'event')); ?> "> <td> <div> <?php if (isset($item->actor)) { ?> <?php echo render_title($item->actor); ?> <?php } ?> </div> </td><td> <div> <?php echo $item->type; ?> </div> </td><td> <div> <?php echo Qubit::renderDateStartEnd($item->getDate(array('cultureFallback' => true)), $item->startDate, $item->endDate);
//for breadcrumbs $blockid = required_param('blockid', PARAM_INT); // Next look for optional variables. $id = optional_param('id', 0, PARAM_INT); //error handling if (!($course = $DB->get_record('course', array('id' => $courseid)))) { print_error('invalidcourse', 'block_comments_and_ratings', $courseid); } // for geting $cm later on $modinfo = get_fast_modinfo($course); //moodle require_login method which handles lots of things in background require_login($course); //$PAGE settings from PAGE_API $PAGE->set_url(new moodle_url('/blocks/comments_and_ratings/view.php', array('id' => $courseid))); $PAGE->set_context(context_course::instance($courseid)); $PAGE->set_title('Comments And Ratings'); $PAGE->set_heading($COURSE->fullname); $PAGE->set_pagelayout('course'); $PAGE->set_pagetype('course-view-' . $course->format); $PAGE->set_cacheable(false); //Creating breadcrumbs $settingsnode = $PAGE->settingsnav->add(get_string('commentsandratingssettings', 'block_comments_and_ratings')); $editurl = new moodle_url('/blocks/comments_and_ratings/view.php', array('id' => $id, 'courseid' => $courseid, 'blockid' => $blockid)); $editnode = $settingsnode->add(get_string('editpage', 'block_comments_and_ratings'), $editurl); $editnode->make_active(); print $OUTPUT->header(); render_title($course, $PAGE->title); render_content($course, $modinfo, $PAGE->context); //Moze se dodati jos sta god padne na pamet. //Npr rejtinzi print $OUTPUT->footer();
<h1><?php echo __('Edit digital object'); ?> </h1> <h1 class="label"><?php echo render_title(new sfIsadPlugin($informationObject)); ?> </h1> <?php echo $form->renderGlobalErrors(); ?> <?php if (isset($resource)) { ?> <div class="form-item"> <?php echo get_component('digitalobject', 'show', array('resource' => $resource, 'usageType' => QubitTerm::REFERENCE_ID)); ?> </div> <?php } ?> <?php echo $form->renderFormTag(url_for(array($resource, 'module' => 'digitalobject', 'action' => 'edit'))); ?> <?php
<?php foreach ($item->getDates() as $date) { ?> <li> <?php echo Qubit::renderDateStartEnd($date->getDate(array('cultureFallback' => true)), $date->startDate, $date->endDate); ?> (<?php echo $date->getType(array('cultureFallback' => true)); ?> ) <?php if (isset($date->actor)) { ?> <?php echo link_to(render_title($date->actor), array($date->actor, 'module' => 'actor')); ?> <?php } ?> </li> <?php } ?> </ul> </td><td> <?php echo render_value($item->getAccessConditions(array('cultureFallback' => true))); ?> </td> </tr>
?> </h1> <?php if (0 < count($resource->descendants)) { ?> <h2><?php echo __('It has %1% descendants that will also be deleted:', array('%1%' => count($resource->descendants))); ?> </h2> <ul> <?php foreach ($resource->descendants as $item) { ?> <li><?php echo link_to(render_title($item), array($item, 'module' => 'informationobject')); ?> </li> <?php } ?> </ul> <?php } ?> <?php echo $form->renderFormTag(url_for(array($resource, 'module' => 'informationobject', 'action' => 'delete')), array('method' => 'delete')); ?> <div class="actions section">
} ?> </tr> </thead><tbody> <?php foreach ($pager->getResults() as $item) { ?> <tr class="<?php echo 0 == @++$row % 2 ? 'even' : 'odd'; ?> "> <td> <?php echo link_to(render_title($item), array($item, 'module' => 'function')); ?> </td> <?php if ('nameDown' == $sf_request->sort || 'nameUp' == $sf_request->sort || !$sf_user->isAuthenticated() && 'updatedDown' != $sf_request->sort && 'updatedUp' != $sf_request->sort) { ?> <td> <?php echo $item->type; ?> </td> <?php } else { ?> <td>