Ejemplo n.º 1
0
 /**
  * Check if the attach step is completed
  *
  * @param   integer  $id  Resource ID
  * @return  boolean  True if step completed
  */
 public function step_attach_check($id)
 {
     if ($id) {
         $database = App::get('db');
         $ra = new \Components\Resources\Tables\Assoc($database);
         $total = $ra->getCount($id);
     } else {
         $total = 0;
     }
     return $total ? true : false;
 }
Ejemplo n.º 2
0
                case 1:
                    $state = 'published';
                    break;
                    // published
                // published
                case 2:
                    $state = 'draft';
                    break;
                    // draft
                // draft
                case 3:
                    $state = 'pending';
                    break;
                    // pending
            }
            $attachments = $ra->getCount($submission->id);
            $authors = $rc->getCount($submission->id, 'resources');
            $rt = new \Components\Resources\Helpers\Tags($submission->id);
            $tags = $rt->tags('count');
            ?>
					<tr class="<?php 
            echo $cls;
            ?>
">
						<td><?php 
            if ($submission->published == 2) {
                ?>
<a href="<?php 
                echo Route::url('index.php?option=' . $this->option . '&task=draft&step=1&id=' . $submission->id);
                ?>
"><?php 
Ejemplo n.º 3
0
            $state = 'published';
            break;
            // published
        // published
        case 2:
            $state = 'draft';
            break;
            // draft
        // draft
        case 3:
            $state = 'pending';
            break;
            // pending
    }
    $type = $this->resource->getTypeTitle();
    $attachments = $ra->getCount($this->resource->id);
    $authors = $rc->getCount($this->resource->id, 'resources');
    $tags = $rt->tags('count');
}
$this->css('create.css');
?>
<header id="content-header">
	<h2><?php 
echo $this->title;
?>
</h2>

	<div id="content-header-extra">
		<p>
			<a class="icon-add add btn" href="<?php 
echo Route::url('index.php?option=' . $this->option . '&task=draft');