default.ctp 7.34 KB
<?php
/**
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc.
 * (http://cakefoundation.org)
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link http://cakephp.org CakePHP(tm) Project
 * @since 0.10.0
 * @license http://www.opensource.org/licenses/mit-license.php MIT License
 */
// $cakeDescription = 'CakePHP: the rapid development php framework';
$cakeDescription = 'Labinvent 2';

/**
 * Prepend `css` block with Bootstrap stylesheets and append
 * the `$html5Shim`.
 */
$html5Shim =
<<<HTML

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
HTML;
$this->prepend('css', $this->Html->css(['bootstrap/bootstrap']));
$this->append('css', $html5Shim);

//echo $this->Html->css('smoothness');
$this->append('css', $this->Html->css(['smoothness', 'inventirap', 'font-awesome']));
//<= $this->Html->css('inventirap') >
//<= $this->Html->css('font-awesome') >


/*
 <!-- EP modif 17/2/20
 <=$this->Html->script('jquery-1.5.2')>
 <=$this->Html->script('jquery-1.8.12')>
 $this->prepend('script', $this->Html->script(['jquery/jquery', 'bootstrap/bootstrap']));
 -->
 */
//Prepend `script` block with jQuery and Bootstrap scripts
//echo $this->Html->script('jquery/jquery');
//echo $this->Html->script('bootstrap/bootstrap');
$this->prepend('script', $this->Html->script(['jquery/jquery', 'bootstrap/bootstrap']));
//echo $this->Html->script('script');
//echo $this->Html->script('DatepickerConfig');
//echo $this->Html->script('onTabHover');
$this->append('script', $this->Html->script(['script', 'DatepickerConfig', 'onTabHover']));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <?=$this->Html->charset()?>
    <meta name="viewport"
	content="width=device-width, initial-scale=1.0">
	<!-- Added for LabInvent : START -->

	
    <!-- Added for LabInvent : END -->
	<title>
        <?= $cakeDescription ?>:
        <?= $this->fetch('title') ?>
	</title>
    <?= $this->Html->meta('icon') ?>
    <!-- Deactivated, but should be re-activated (TODO:) : 
    START 
    <//?= $this->Html->css('base.css') ?//>
	<//?= $this->Html->css('cake.css') ?//>
    END -->
	<!-- Added for LabInvent : START -->
	<!-- EP modif 17/2/20 
    <= $this->Html->css('inventirap') >
    <= $this->Html->css('font-awesome') >
	<= $this->Html->script('jquery.min') >
	-->
    <!-- Added for LabInvent : END -->
    <?= $this->fetch('meta') ?>
    <?= $this->fetch('css') ?>
    <?= $this->fetch('script') ?>
    <style>
#footer a, #footer p, #footer font {
	font-size: x-small;
}
</style>

</head>

<body>

	<div id="container">
		<div id="header">


<?=$this->Html->image('logo_software.jpg', ['alt' => 'Logo de l\'application','border' => '0','height' => '80px','url' => '/'])?>

			<div class="user">


				<?php
    if (isset($username) && $username != " ") {
        echo 'Bienvenue ' . $username . '<br/>';
        echo $role . '<br/>';
        echo $this->Html->link('Se déconnecter', [
            'controller' => 'Users',
            'action' => 'logout'
        ]);
    } else {
        echo 'Bienvenue invité<br/>';
        echo $this->Html->link('Se connecter', [
            'controller' => 'Users',
            'action' => 'login'
        ]);
    }
    ?>

			</div>
		</div>


		<div id="content">
        <?=$this->Flash->render()?>
   		<?=$this->Flash->render('auth')?>
        <?=$this->fetch('content')?>
    </div>


		<div id="footer">
			<table>
				<tr>
				
					<td>
						<?=$this->Html->image('logo_entity.jpg', ['alt' => 'Logo du labo','border' => '0','height' => '50px'])?>
					</td>
					
					<td>
						<br/> <a href="http://cakephp.org">Baked with CAKEPHP</a>
					</td>

					<td id="bugreport">
    					<a href="https://tinyurl.com/labinvent#heading=h.2r55bflctpt5"><h3>WHAT's NEW ?</h3></a>
    					<i>
    					<!-- 
    					(<a href="https://projects.irap.omp.eu/projects/inventirap/roadmap?tracker_ids[]=1&tracker_ids[]=2&tracker_ids[]=4&tracker_ids[]=5&tracker_ids[]=6&tracker_ids[]=7&tracker_ids[]=8&tracker_ids[]=9#version_2.04_-_Impl%C3%A9mentation_des_ACL_%28droits%29">ROADMAP : Activité restant à réaliser</a>)
    					-->
    					(<a href="https://projects.irap.omp.eu/projects/inventirap/issues?query_id=263">ROADMAP => Activité restant à réaliser - TODO LIST</a>)
						<br/>
						<h6>Merci de communiquer remarques et bugs à <a href="mailto:inventirap@irap.omp.eu">LABINVENT-MAILING-LIST</a></h6>
						</i>
					</td>
					
					<td id="version">
    					<?php
    						// pour "what's new" : &nbsp;&nbsp;&nbsp
    						
                            // Set $version and $version_date 
                            // (cf https://book.cakephp.org/3.0/fr/core-libraries/file-folder.html#Cake\Filesystem)
                            //$version = '2.9.1.4';
                            //$version_date = '21/12/2018';
                            $wwwroot_dir = new Cake\Filesystem\Folder(WWW_ROOT);
                            $readme_file = new Cake\Filesystem\File($wwwroot_dir->pwd() . DS . '..' . DS . 'README.md');
                            //dump($file);
                            $contents = $readme_file->read();
                            $lines = explode("\n", $contents);
                            for ($i = 0; $i < sizeof($lines); $i++) {
                                $line = $lines[$i];
                                if (substr($line, 0, strlen("Date:")) === "Date:") {
                                    $version_date = ltrim( explode(":", $line)[1] );
                                    $version = explode(":", $lines[$i+1])[1];
                                    break;
                                }
                            }
                            // $readme_file->write('J'écris dans ce fichier');
                            // $readme_file->append('J'ajoute à la fin de ce fichier.');
                            // $readme_file->delete(); // Je supprime ce fichier
                            $readme_file->close(); // Assurez-vous de fermer le fichier quand c'est fini
                        ?>
						<!-- VERSION M.m.f.b (version (M)ajeure, version (m)ineure, numero de nouvelle (f)onctionnalite, numero de (b)ugfix) -->
						<font color="black">
							<!-- 
							 VERSION 2.9.1.4 (21/12/2018)
							-->
							<?="VERSION $version ($version_date)"?>
							<br/>
							<a href="<?=$this->request->getAttribute("webroot")?>webroot/doc/userguide/labinvent2_userguide.pdf" onclick="window.open(this.href); return false;">Documentation utilisateurs</a> 
							<br/>
							<a href="https://tinyurl.com/labinvent" onclick="window.open(this.href); return false;">Documentation technique générale</a>
							<!-- 
							<a href="https://projects.irap.omp.eu/projects/inventirap/wiki/Installation" onclick="window.open(this.href); return false;">Wiki installation</a>
							-->
						</font>
					</td>
				</tr>
			</table>
		</div>

	</div>

</body>
</html>