Browse Source

suite

master
Bastien 8 years ago
committed by Squiz
parent
commit
781230d211
5 changed files with 46 additions and 209 deletions
  1. +1
    -0
      index.php
  2. +15
    -15
      modules/catalogue/mvc.php
  3. +1
    -1
      modules/formation/mvc.php
  4. +0
    -164
      scripts/carrousel.js?new=20120621
  5. +29
    -29
      templates/header.html

+ 1
- 0
index.php View File

@ -39,6 +39,7 @@ try {
/* la libtpl */
$tpl = new raintpl();
raintpl::configure( 'tpl_dir', '' );
raintpl::configure( 'base_url', config::read_config('general', 'base_url').config::read_config('general', 'base_dir'));
/* on charge le module demandé */
$params = array();


+ 15
- 15
modules/catalogue/mvc.php View File

@ -8,20 +8,20 @@ class catalogue_view extends view {
$formations = array();
foreach($liste_formations as $formation) {
$formations[] = array (
'id' => $formation->id,
'label' => $formation->label,
'program' => $formation->program,
'price_id' => (is_null($formation->price))?'':$formation->price->id,
'price_full_price' => (is_null($formation->price))?'':$formation->price->full_price,
'price_low_price' => (is_null($formation->price))?'':$formation->price->low_price,
'place_id' => (is_null($formation->place))?'':$formation->place->id,
'place_label' => (is_null($formation->place))?'':$formation->place->label,
'type_id' => (is_null($formation->type))?'':$formation->type->id,
'type_label' => (is_null($formation->type))?'':$formation->type->label,
'category_id' => (is_null($formation->category))?'':$formation->category->id,
'category_label' => (is_null($formation->category))?'':$formation->category->label,
'category_department_id' => (is_null($formation->category) || is_null($formation->category->department))?'':$formation->category->department->id,
'category_department_label' => (is_null($formation->category) || is_null($formation->category->department))?'':$formation->category->department->label,
'id' => htmlspecialchars($formation->id),
'label' => htmlspecialchars($formation->label),
'program' => $output=='tex'?(parser::to_tex($formation->program)):(parser::to_html($formation->program)),
'price_id' => (is_null($formation->price))?'':htmlspecialchars($formation->price->id),
'price_full_price' => (is_null($formation->price))?'':htmlspecialchars($formation->price->full_price),
'price_low_price' => (is_null($formation->price))?'':htmlspecialchars($formation->price->low_price),
'place_id' => (is_null($formation->place))?'':htmlspecialchars($formation->place->id),
'place_label' => (is_null($formation->place))?'':htmlspecialchars($formation->place->label),
'type_id' => (is_null($formation->type))?'':htmlspecialchars($formation->type->id),
'type_label' => (is_null($formation->type))?'':htmlspecialchars($formation->type->label),
'category_id' => (is_null($formation->category))?'':htmlspecialchars($formation->category->id),
'category_label' => (is_null($formation->category))?'':htmlspecialchars($formation->category->label),
'category_department_id' => (is_null($formation->category) || is_null($formation->category->department))?'':htmlspecialchars($formation->category->department->id),
'category_department_label' => (is_null($formation->category) || is_null($formation->category->department))?'':htmlspecialchars($formation->category->department->label),
/* rajouter prérequis et objectifs */
'sessions' => array()
);
@ -57,7 +57,7 @@ class catalogue_view extends view {
switch($output) {
case 'tex':
return $this->tpl->draw('modules/catalogue/templates/pdf', $return_string);
default:
default: /* par défaut, en html, d'après la valeur par défaut de $output */
return $this->tpl->draw('modules/catalogue/templates/html', $return_string);
}
}


+ 1
- 1
modules/formation/mvc.php View File

@ -737,7 +737,7 @@ class formation_view extends view {
'id' => $formation->__get('id'),
'label' => $formation->__get('label'),
'validated' => $formation->__get('validated') ? 'validé' : 'non validé',
'program' => $formation->__get('program'),
'program' => parser::to_html($formation->__get('program')),
'prerequisite' => array_print($formation->__get('prerequisite')),
'price' => $formation->__get('price'),
'place' => $formation->__get('place'),


+ 0
- 164
scripts/carrousel.js?new=20120621 View File

@ -1,164 +0,0 @@
/**
* div, id = menuId, class = scroll_container
* div/ul, id = subMenuId, class = scroll_content
*/
function Carrousel()
{
var oThis = this; // création d'une référence vers l'objet courant
this.sIdCarrousel = '';
this.iDuree = 2; // duree en seconde pour le fade
this.bBoucleAuto = true; // boolean
this.iPos = 0; // element en cours
this.iNbItems = 0; // nombre de li
this.bActionable = true;
this.Init = function(sIdCarrousel)
{
// Attributs du composant
this.sIdCarrousel = sIdCarrousel;
var ulListe = document.getElementById(sIdCarrousel); // ul contenaut les actus renvoie la classe caroussel
// recuper nb items
var filsUlListe = ulListe.getElementsByTagName("*");
for(var i=0; i<filsUlListe.length; i++){
if( filsUlListe[i].id.indexOf(sIdCarrousel)>-1) {
this.iNbItems = this.iNbItems +1;
}
}
}
this.AfficheUnique = function(iIndex)
{
if (this.bActionable && iIndex <= this.iNbItems-1 && iIndex!=this.iPos )
{
this.SetActive(false);
new Effect.Fade(this.sIdCarrousel +'_' + this.iPos,{ duration: this.iDuree });
new Effect.Appear(this.sIdCarrousel +'_' + iIndex,{ duration: this.iDuree });
setTimeout(function() { oThis.SetActive(true); }, this.iDuree*1000);
this.iPos = iIndex;
this.ActualiserPositionPlayer(iIndex);
this.bBoucleAuto = false;
}
}
this.Affiche = function(iIndex)
{
// on ne peut pas afficher plus d'éléments que ce qu'on a dans la liste et on n'agit pas sur l'élément déjà affiché
if (this.bActionable && iIndex <= this.iNbItems-1 && iIndex!=this.iPos )
{
this.SetActive(false);
new Effect.Fade(this.sIdCarrousel +'_' + this.iPos,{ duration: this.iDuree });
new Effect.Appear(this.sIdCarrousel +'_' + iIndex,{ duration: this.iDuree });
setTimeout(function() { oThis.SetActive(true); }, this.iDuree*1000);
this.iPos = iIndex;
this.ActualiserPositionPlayer(iIndex);
//document.getElementById('position_courante').innerHTML=this.iPos+1 + '/'+ this.iNbItems;
}
}
this.ActualiserPositionPlayer = function(iIndex)
{
var ulPlayer = document.getElementById('player_slideshow_' + this.sIdCarrousel);
if (ulPlayer != null) {
var filsulPlayer = ulPlayer.getElementsByTagName("*");
for(var i=0; i<filsulPlayer.length; i++){
filsulPlayer[i].className = 'lien_slideshow';
}
}
var liPlayer = document.getElementById(this.sIdCarrousel + '_player_' + this.iPos);
if (liPlayer != null) {
liPlayer.className = liPlayer.className + " actif";
}
}
this.SetActive = function(actif) {
this.bActionable = actif;
}
this.Defile = function()
{
// gerer defilement
if (this.bBoucleAuto)
{
if (this.iPos < this.iNbItems-1) {
this.Affiche(this.iPos+1);
}
else {
this.Affiche(0);
this.bBoucleAuto=true;
//this.MasquerPause();
}
// gerer recursif
setTimeout(function() { oThis.Defile(); }, 7000);
}
}
this.Play = function(auto)
{
if (this.bActionable){
this.bBoucleAuto = true;
this.MasquerPlay();
this.Defile();
}
}
this.Pause = function()
{
this.bBoucleAuto = false;
this.MasquerPause();
}
this.Suivant = function()
{
if (this.bActionable && this.iPos < this.iNbItems-1){
this.bBoucleAuto = false;
this.Affiche(this.iPos+1);
this.MasquerPause();
}
}
this.Precedent = function()
{
if (this.bActionable && this.iPos > 0){
this.bBoucleAuto = false;
this.Affiche(this.iPos-1);
this.MasquerPause();
}
}
this.MasquerPlay = function()
{
document.getElementById('bouton_pause').style.display='block';
document.getElementById('bouton_play').style.display='none';
}
this.MasquerPause = function()
{
document.getElementById('bouton_pause').style.display='none';
document.getElementById('bouton_play').style.display='block';
}
this.hauteurImage = function(sIdCarrousel)
{
var docPere = document.getElementById(sIdCarrousel);
var docFils = docPere.getElementsByTagName("*");
if (document.all) // ok I.E
{
H = docFils[0].currentStyle.height;
}
else // ok firefox.0.9.2 , pas mozilla.1.0 ni netscape.7.02
{
H = document.defaultView.getComputedStyle(docFils[0], null).height;
}
docPere.style.height= H ;
}
}

+ 29
- 29
templates/header.html View File

@ -8,21 +8,21 @@
<link rel="icon" type="image/png" href="http://web.polytech.univ-nantes.fr/images/favicon.png" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/reset.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/police.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/ecran.css?new=2012091901" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/scroll.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/formulaires.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/degrades.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/multisites.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/reset.css" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/police.css" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/ecran.css" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/scroll.css" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/formulaires.css" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/degrades.css" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/multisites.css" title="defaut" />
<!--[if lte IE 9]>
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/lte_ie9.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/lte_ie9.css" title="defaut" />
<![endif]-->
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/lte_ie8.css?new=2012060251" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/lte_ie8.css" title="defaut" />
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/jsp/scripts/DD_roundies_0.0.2a.js"></script>
<script type="text/javascript" src="../scripts/DD_roundies_0.0.2a.js"></script>
<script type="text/javascript">
// DD_roundies.addRule('#profils', '10px 0 0 0');
</script>
@ -30,11 +30,11 @@
<![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/lte_ie7.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/lte_ie7.css" title="defaut" />
<![endif]-->
<link rel="stylesheet" type="text/css" media="screen" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/multisites/couleur_y.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="print" href="http://web.polytech.univ-nantes.fr/jsp/styles/defaut/impression.css?new=2012050301" title="defaut" />
<link rel="stylesheet" type="text/css" media="screen" href="../styles/defaut/multisites/couleur_y.css" title="defaut" />
<link rel="stylesheet" type="text/css" media="print" href="../styles/defaut/impression.css" title="defaut" />
<!-- CSS FORMATION CONTINUE -->
<link rel="stylesheet" type="text/css" media="screen" href="../modules/user/templates/user_module.css.css" title="defaut" />
@ -48,22 +48,22 @@
//]]>
</script>
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/jsp/scripts/defaut.js"></script>
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/jsp/scripts/menu.js"></script>
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/jsp/scripts/swfobject.js"></script>
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/adminsite/toolbox/toolbox.js"></script>
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/jsp/scripts/carrousel.js?new=20120621"></script>
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/jsp/scripts/scroll.js"></script>
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/adminsite/utils/prototype.js"></script>
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/jsp/scripts/effects.js"></script>
<script type="text/javascript" src="http://web.polytech.univ-nantes.fr/jsp/scripts/lytebox/lytebox.js"></script>
<script type="text/javascript" src="../scripts/defaut.js"></script>
<script type="text/javascript" src="../scripts/menu.js"></script>
<script type="text/javascript" src="../scripts/swfobject.js"></script>
<script type="text/javascript" src="../scripts/toolbox.js"></script>
<script type="text/javascript" src="../scripts/carrousel.js"></script>
<script type="text/javascript" src="../scripts/scroll.js"></script>
<script type="text/javascript" src="../scripts/prototype.js"></script>
<script type="text/javascript" src="../scripts/effects.js"></script>
<script type="text/javascript" src="../scripts/lytebox.js"></script>
<link rel="stylesheet" href="http://web.polytech.univ-nantes.fr/jsp/scripts/lytebox/lytebox.css?new=2012050301" type="text/css" media="screen" />
</head>
<body class="pagelibre interieur multisites polytech" id="body">
<script type="text/javascript" src="http://cdn.univ-nantes.fr/scripts/jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="http://cdn.univ-nantes.fr/scripts/activebar-2.0.1/src/activebar2.js"></script>
<script type="text/javascript" src="http://cdn.univ-nantes.fr/scripts/cookies.js"></script>
<script type="text/javascript" src="http://cdn.univ-nantes.fr/scripts/mozbar.js"></script>
<script type="text/javascript" src="../scripts/jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="../scripts/activebar-2.0.1/src/activebar2.js"></script>
<script type="text/javascript" src="../scripts/cookies.js"></script>
<script type="text/javascript" src="../scripts/mozbar.js"></script>
<p id="acces_direct"><a href="#contenu_avec_nav_sans_encadres" accesskey="s">Acc&egrave;s direct au contenu</a></p>
<div id="bandeau" role="banner">
@ -97,7 +97,7 @@
</form>
<h1>
<a href="" title="Retour &agrave; la page d'accueil" accesskey="1"><img src="http://web.polytech.univ-nantes.fr/images/logo.png?new=2012050301" alt="Polytech Nantes, École d'ingénieurs" /></a>
<a href="" title="Retour &agrave; la page d'accueil" accesskey="1"><img src="../styles/defaut/img/logos/logo.png" alt="Polytech Nantes, École d'ingénieurs" /></a>
</h1>
<div id="outils_acces">
@ -227,7 +227,7 @@
<div id="page" role="main">
<div id="navigation">
<a href="http://www.polytech.univ-nantes.fr/">
<img src="http://web.polytech.univ-nantes.fr/images/logos/logo-polytech-couleur.jpg" alt="logo rubrique">
<img src="../styles/defaut/img/logos/logo-polytech-couleur.jpg" alt="logo rubrique">
</a>
<br/><br/>
<div id="menu_secondaire_deco2">
@ -262,4 +262,4 @@
<div id="contenu_deco" class="contenu_avec_nav_sans_encadres">
<h2>{$page_title}</h2>
<h2>{$page_title}</h2>

Loading…
Cancel
Save