linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file tpl_dashboard.php

Documentation is available at tpl_dashboard.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage public
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. $GLOBALS['filters'][U_L]['scale']['active'] = 1; // filter activation
  12. SetHTMLTitle(_t('dashboard','section')); // HTML title
  13. //////////////////////////////////////////
  14. /////récupération des variables GET et POST
  15. //////////////////////////////////////////
  16. include_once(themePath('../dashboard/display.php'));
  17.  
  18. // if parentid is not fired ID is scale_id
  19. if(isset($_REQUEST['id'])) {
  20.     $scale_id=$_REQUEST['id'];
  21. }
  22. else {
  23.     $scale_id=1;
  24. }
  25. // if parentid is fired ID is sdi_id
  26. // and parentid is sclae_id
  27. if (isset($_REQUEST['parentid'])) {
  28.   $sdi_id=$_REQUEST['id'];
  29.   $scale_id=$_REQUEST['parentid'];
  30. } 
  31.  
  32.  
  33.  
  34.  
  35. //////////////////////////////////////////
  36. /////affichage tableau de bord
  37. //////////////////////////////////////////
  38.  
  39. if(!isset($_REQUEST['parentid'])) {
  40.  
  41.   if ( ActiveItemKey($GLOBALS['activeitem']) == 'dashboard') {
  42.  
  43.     setBreadcrumb(array(ucfirst(_t('dashboard','section')) => false));
  44.     //////////////////////////////////////////
  45.     /////affichage liste des indicateurs classique
  46.     //////////////////////////////////////////
  47.     echo '<div>'.END_LINE;
  48.     echo "<h1>"._t('dashboard','list_public')."</h1>".END_LINE;
  49.     ?>
  50. <div class="sub-title"><?php echo _t('dashboard','h1_public_comment'); ?>
  51. </div>
  52.     <?php
  53.      
  54.     DisplayListValues($scale_id, $GLOBALS['filters'][U_L]['scale']['linkvalue']);
  55.     echo "<br />";
  56.     echo '</div>'.END_LINE;
  57.     
  58.     footerAddJS('../lib/js/jquery.tools.min.js');
  59.     echo '<script type="text/javascript">
  60.             $(document).ready(function() {
  61.                 $("table a.ruler").removeAttr("title");
  62.                 $("table").removeClass("a.ruler:hover");
  63.                 $("table a.ruler").hover(
  64.                     function() {
  65.                         $(this).next().fadeIn("fast");
  66.                     },
  67.                     function() {
  68.                         $(this).next().hide();
  69.                     }
  70.                 );
  71.             });
  72.         </script>';
  73.   }
  74.  
  75.  
  76. } else {
  77.   //////////////////////////////////////////
  78.   /////affichage détail d'un indicateur
  79.   //////////////////////////////////////////
  80.  
  81.   // set HTML Title
  82.   $result=$GLOBALS['sql_object']->DBSelect(SQL_getOnesdiname($sdi_id));
  83.   SetHTMLTitle(formatText($result[0]['sdii_name'], '2HTML'));
  84.   setBreadcrumb(array(ucfirst(_t('dashboard','section')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['dashboard']['linkvalue']))));
  85.   setBreadcrumb(array(formatText($result[0]['sdii_name'], '2HTML') => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['dashboard']['linkvalue'], 'id' => $sdi_id, 'parentid' => $scale_id, 'name' => formatText($result[0]['sdii_name'], '2HTML')))));
  86.  
  87.   echo '<div>'.END_LINE;
  88.   if(commentEnabled('indicator')) {
  89.     postCommentAction(array('module'=> 'indicator', 'module_id'=> $sdi_id));
  90.     echo '<div id="anchor-comments">'.END_LINE;
  91.     echo getCommentsAnchor(array('module'=> 'indicator', 'module_id'=> $sdi_id));
  92.     echo getPostCommentAnchor(array('module'=> 'indicator', 'module_id'=> $sdi_id));
  93.     echo '</div>'.END_LINE;
  94.   }
  95.   if(isset($_REQUEST['parentid']) && ActiveItemKey($GLOBALS['activeitem'])=='dashboard') {
  96.     DisplayOneSdi($sdi_id, $scale_id);
  97.     setBreadcrumb(array(ucfirst(_t('dashboard','mode_aff_info')) => false));
  98.   }
  99.   if (isset($_REQUEST['parentid']) && ActiveItemKey($GLOBALS['activeitem'])=='dashboard-rules') {
  100.     DisplayOneSdirules($sdi_id, $scale_id);
  101.     setBreadcrumb(array(ucfirst(_t('dashboard','mode_aff_rules')) => false));
  102.   }
  103.   if (isset($_REQUEST['parentid']) && ActiveItemKey($GLOBALS['activeitem'])=='dashboard-assessment') {
  104.     DisplayOneSdievaluation($sdi_id, $scale_id);
  105.     setBreadcrumb(array(ucfirst(_t('dashboard','mode_aff_evaluation')) => false));
  106.   }
  107.   if (isset($_REQUEST['parentid']) && ActiveItemKey($GLOBALS['activeitem'])=='dashboard-provider') {
  108.     DisplayOneSdiprovider($sdi_id, $scale_id);
  109.     setBreadcrumb(array(ucfirst(_t('dashboard','mode_aff_provider')) => false));
  110.   }
  111.   if(commentEnabled('indicator')) {
  112.     echo '<h3>'._t('comment', 'section').'</h3>'.END_LINE;
  113.     echo '<div id="comments">'.END_LINE;
  114.     displayComments(array('module'=> 'indicator', 'module_id'=> $sdi_id, 'order_by' => 'ASC'), false, true);
  115.     displayCommentForm(array('module'=> 'indicator', 'module_id'=> $sdi_id));
  116.     echo '</div>'.END_LINE;
  117.   }
  118.   echo '</div>'.END_LINE;
  119.   
  120.   echo '<script type="text/javascript">
  121.         $(document).ready(function() {
  122.             $(".valuecomment").hover(
  123.                 function() {
  124.                     $(".cont", this).fadeIn();
  125.                 },
  126.                 function() {
  127.                     $(".cont", this).hide();
  128.                 }
  129.             );
  130.         })
  131.         </script>';
  132. }?>

Documentation generated on Thu, 03 May 2012 15:07:55 +0200 by phpDocumentor 1.4.1