Exemple #1
0
 /**
  * Check completion status
  *
  * @return  object
  */
 public function getStatus($pub = NULL, $manifest = NULL, $elementId = NULL)
 {
     // Set block manifest
     if ($this->_manifest === NULL) {
         $this->_manifest = $manifest ? $manifest : self::getManifest();
     }
     // Start status
     $status = new \Components\Publications\Models\Status();
     // Get authors
     if (!isset($pub->_authors)) {
         $pAuthors = new \Components\Publications\Tables\Author($this->_parent->_db);
         $pub->_authors = $pAuthors->getAuthors($pub->version_id);
         $pub->_submitter = $pAuthors->getSubmitter($pub->version_id, $pub->created_by);
     }
     // Are authors required?
     $required = $this->_manifest->params->required;
     $status->status = $required && (!$pub->_authors || count($pub->_authors) == 0) ? 0 : 1;
     if ($status->status == 0) {
         $status->setError('Missing authors');
     }
     return $status;
 }
Exemple #2
0
    ?>
"><?php 
    echo Lang::txt('COM_PUBLICATIONS_CURATION_STATUS');
    ?>
</a></th>
						<th></th>
						<th></th>
					</tr>
				</thead>
				<tbody>
					<?php 
    foreach ($this->rows as $row) {
        $submitted = $row->reviewed && $row->state == 5 ? strtolower(Lang::txt('COM_PUBLICATIONS_CURATION_RESUBMITTED')) : strtolower(Lang::txt('COM_PUBLICATIONS_CURATION_SUBMITTED'));
        $submitted .= ' <span class="prominent">' . Date::of($row->submitted)->toLocal('M d, Y') . '</span> ';
        // Get submitter
        $submitter = $pa->getSubmitter($row->version_id, $row->created_by);
        $submitted .= ' <span class="block">' . Lang::txt('COM_PUBLICATIONS_CURATION_BY') . ' ' . $submitter->name . '</span>';
        if ($row->state == 7) {
            $reviewed = strtolower(Lang::txt('COM_PUBLICATIONS_CURATION_REVIEWED')) . ' <span class="prominent">' . Date::of($row->reviewed)->toLocal('M d, Y') . '</span> ';
            $reviewer = \Hubzero\User\Profile::getInstance($row->reviewed_by);
            $reviewed .= $reviewer ? ' <span class="block">' . Lang::txt('COM_PUBLICATIONS_CURATION_BY') . ' ' . $reviewer->get('name') . '</span>' : NULL;
        }
        $class = $row->state == 5 ? 'status-pending' : 'status-wip';
        $abstract = $row->abstract ? stripslashes($row->abstract) : '';
        // Is user authorize to edit assignment?
        $assign = $this->authorized == 'curator' || $this->authorized == 'admin' || $this->authorized == 'limited' && in_array($row->master_type, $this->filters['master_type']) ? true : false;
        ?>
							<tr class="mline mini faded" id="tr_<?php 
        echo $row->id;
        ?>
">