コード例 #1
0
 public function set_version()
 {
     global $current_documentation_version, $url_documentation_version;
     $url_documentation_version = null;
     $this->load_model('DocumentationVersion');
     if (!empty($this->params['documentation_version_name'])) {
         $version = $this->DocumentationVersion->find_one(array('conditions' => array('name' => $this->params['documentation_version_name'])));
         if (!empty($version)) {
             $url_documentation_version = $version;
             $current_documentation_version = $version;
             $this->version = $version;
             $this->set('current_version', $this->version);
             return true;
         }
     }
     $version = null;
     if (!empty($this->params['version_id'])) {
         $version = $this->DocumentationVersion->find_by_id($this->params['version_id']);
     }
     if (empty($version)) {
         $version_id = mvc_setting('DocumentationSettings', 'public_version_id');
         if (empty($version_id)) {
             $version_id = 1;
         }
         $version = $this->DocumentationVersion->find_by_id($version_id);
     }
     $this->version = $version;
     $this->set('current_version', $this->version);
     $current_documentation_version = $this->version;
 }
コード例 #2
0
ファイル: documentation_node.php プロジェクト: RA2WP/RA2WP
 function public_version_id()
 {
     return mvc_setting('DocumentationSettings', 'public_version_id');
 }
コード例 #3
0
ファイル: _version_list.php プロジェクト: RA2WP/RA2WP
<div class="documentation-version-list">
	<strong>Version: <?php 
echo $current_version->name;
?>
</strong>
	<ul>
		<?php 
$default_public_version_id = mvc_setting('DocumentationSettings', 'public_version_id');
foreach ($versions as $version) {
    $name = $default_public_version_id == $version->id ? '__default__' : $version->name;
    if ($current_version->id != $version->id) {
        if (empty($version->related_node)) {
            $version->related_node = $this->model->find_one(array('conditions' => array('documentation_version_id' => $version->id, 'local_id' => 1)));
        }
        echo '<li>' . $this->html->object_link($version->related_node, array('text' => $version->name, 'documentation_version_name' => $name)) . '</li>';
    }
}
?>
	</ul>
</div>
コード例 #4
0
ファイル: public.php プロジェクト: RA2WP/RA2WP
		<?php 
$this->render_view('documentation_nodes/_tree', array('locals' => array('objects' => $tree_objects)));
?>
		
		<div id="documentation_container">
		
			<?php 
$this->render_main_view();
?>
		
		</div>
		
		<div style="clear:both"></div>
	
	</div>

	<?php 
if (mvc_setting('DocumentationSettings', 'show_version_list')) {
    ?>
		<?php 
    $this->render_view('documentation_nodes/_version_list', array('locals' => array('current_version' => $current_version, 'versions' => $versions)));
    ?>
	<?php 
}
?>

</div>

<?php 
get_footer();