Changeset 1476
- Timestamp:
- Sep 28, 2010, 9:19:22 PM (10 years ago)
- Location:
- cpc/trunk/project
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/config/routing.yml
r1473 r1476 460 460 param: {module: plot, action: generatePlotParlementaire} 461 461 groupes_plot_graph: 462 url: /graphes/groupes/ lastyear462 url: /graphes/groupes/:type 463 463 param: {module: plot, action: generatePlotGroupes} 464 464 preuve_presence_seance: -
cpc/trunk/project/apps/frontend/modules/parlementaire/config/view.yml
r1472 r1476 7 7 plotSuccess: 8 8 javascripts: [overlib.js, pMap.js] 9 topSuccess: 10 javascripts: [overlib.js, pMap.js] 11 -
cpc/trunk/project/apps/frontend/modules/parlementaire/templates/indexSuccess.php
r1463 r1476 177 177 </div> 178 178 </div> 179 <div class="box_repartition"> 180 <h2><span style="margin-right: 5px;"><img alt="activite" src="<?php echo $sf_request->getRelativeUrlRoot(); ?>/images/xneth/ico_graph.png"></span><a href="<?php echo url_for('@top_global'); ?>">Activité parlementaire des 12 derniers mois</a></h2> 181 <?php echo include_component('plot', 'newGroupes', array('type' => 'home')); ?> 182 <?php // echo include_component('plot', 'groupes', array('plot' => 'total')); ?> 183 </div> 184 <div class="box_tags"> 185 <h2><span style="margin-right: 5px;"><img alt="tags" src="<?php echo $sf_request->getRelativeUrlRoot(); ?>/images/xneth/assemblee-nationale.png"></span><?php echo link_to('En ce moment à l\'Assemblée Nationale', '@parlementaires_tags'); ?></h2> 186 <?php echo include_component('tag', 'globalActivite'); ?> 187 </div> 179 188 <div class="box_widget"> 180 189 <h2><span style="margin-right: 5px;"><img alt="comments" src="<?php echo $sf_request->getRelativeUrlRoot(); ?>/images/xneth/ico_comment.png"></span><a href="<?php echo url_for('@commentaires'); ?>">Les derniers commentaires</a></h2> … … 186 195 <div style="display: hidden;" id="coms_widget_update"></div> 187 196 </div> 188 <div class="box_repartition">189 <h2><span style="margin-right: 5px;"><img alt="activite" src="<?php echo $sf_request->getRelativeUrlRoot(); ?>/images/xneth/ico_graph.png"></span><a href="<?php echo url_for('@top_global'); ?>">Activité parlementaire des 12 derniers mois</a></h2>190 <?php echo include_component('plot', 'newGroupes'); ?>191 <?php // echo include_component('plot', 'groupes', array('plot' => 'total')); ?>192 </div>193 <div class="box_tags">194 <h2><span style="margin-right: 5px;"><img alt="tags" src="<?php echo $sf_request->getRelativeUrlRoot(); ?>/images/xneth/assemblee-nationale.png"></span><?php echo link_to('En ce moment à l\'Assemblée Nationale', '@parlementaires_tags'); ?></h2>195 <?php echo include_component('tag', 'globalActivite'); ?>196 </div>197 197 </div> -
cpc/trunk/project/apps/frontend/modules/parlementaire/templates/topSuccess.php
r1393 r1476 75 75 </div> 76 76 <div> 77 <div class="aligncenter"><?php echo include_component('plot', 'newGroupes', array('type' => 'all')); ?></div> 77 78 <h3>Explications :</h3> 78 79 <ul> -
cpc/trunk/project/apps/frontend/modules/plot/actions/actions.class.php
r1463 r1476 39 39 $this->mapId = $request->getParameter('mapId'); 40 40 $this->forward404Unless($this->mapId); 41 $this->type = $request->getParameter('type'); 41 42 $this->getResponse()->setHttpHeader('content-type', 'image/png'); 42 43 $this->setLayout(false); -
cpc/trunk/project/apps/frontend/modules/plot/actions/components.class.php
r1472 r1476 156 156 public function executeGetGroupesData() { 157 157 $this->data = array(); 158 if (!isset($this->type) || $this->type != "all") 159 $this->type = "home"; 158 160 $this->data['groupes'] = array('UMP' => array(),'NC' => array(),'SRC' => array(),'GDR' => array(), 'NI' => array()); 159 $this->data['titres'] = array(" Députés", "Interventions", "Amendements", "Propositions", "Quest. Orales", "Quest. Écrites"); 161 if ($this->type === "home") 162 $this->data['titres'] = array("Députés", "Interventions", "Amendements", "Propositions", "Quest. Écrites"); 163 else $this->data['titres'] = array("", "Interventions", "Longues", "Courtes", "Déposés", "Adoptés", "de Lois", "Écrites", "Orales"); 160 164 $n = count($this->data['titres']); 161 165 $stats = unserialize(Doctrine::getTable('VariableGlobale')->findOneByChamp('stats_groupes')->value); 162 $ amdmts= Doctrine_Query::create()166 $query = Doctrine_Query::create() 163 167 ->select('p.groupe_acronyme, count(DISTINCT(a.id)) as ct') 164 168 ->from('Parlementaire p, p.ParlementaireAmendements pa, pa.Amendement a') 165 169 ->where('a.date > ?', date('Y-m-d', time()-60*60*24*365)) 166 ->groupBy('p.groupe_acronyme') 167 ->fetchArray(); 170 ->groupBy('p.groupe_acronyme'); 171 $qamdmts = clone($query); 172 $amdmts = $qamdmts->fetchArray(); 173 if ($this->type === "all") { 174 $qamdmts2 = clone($query); 175 $amdmts2 = $qamdmts2->andWhere('a.sort = ?', "Adopté") 176 ->fetchArray(); 177 } 168 178 $props = Doctrine_Query::create() 169 179 ->select('p.groupe_acronyme, count(DISTINCT(t.id)) as ct') … … 176 186 foreach ($this->data['groupes'] as $groupe => $arr) if ($stats[$groupe]) { 177 187 $this->data['groupes'][$groupe][] = $stats[$groupe]['groupe']['nb']; 178 $this->data['groupes'][$groupe][] = $stats[$groupe]['hemicycle_interventions']['somme']+$stats[$groupe]['commission_interventions']['somme']; 188 if ($this->type === "all") { 189 $this->data['groupes'][$groupe][] = $stats[$groupe]['commission_interventions']['somme']; 190 $this->data['groupes'][$groupe][] = $stats[$groupe]['hemicycle_interventions']['somme']; 191 $this->data['groupes'][$groupe][] = $stats[$groupe]['hemicycle_interventions_courtes']['somme']; 192 } else $this->data['groupes'][$groupe][] = $stats[$groupe]['hemicycle_interventions']['somme']+$stats[$groupe]['commission_interventions']['somme']; 179 193 } 180 194 foreach ($amdmts as $amdt) 181 195 $this->data['groupes'][$amdt['groupe_acronyme']][] = $amdt['ct']; 196 if ($this->type === "all") 197 foreach ($amdmts2 as $amdt) 198 $this->data['groupes'][$amdt['groupe_acronyme']][] = $amdt['ct']; 182 199 foreach ($props as $pro) 183 200 $this->data['groupes'][$pro['groupe_acronyme']][] = $pro['ct']; 184 201 foreach ($this->data['groupes'] as $groupe => $arr) if ($stats[$groupe]) { 185 202 $this->data['groupes'][$groupe][] = $stats[$groupe]['questions_ecrites']['somme']; 186 $this->data['groupes'][$groupe][] = $stats[$groupe]['questions_orales']['somme']; 203 if ($this->type === "all") 204 $this->data['groupes'][$groupe][] = $stats[$groupe]['questions_orales']['somme']; 187 205 } 188 206 $this->data['totaux'] = array(); -
cpc/trunk/project/apps/frontend/modules/plot/templates/_newGroupes.php
r1472 r1476 2 2 <?php $PictureID = "Map_".rand(1,10000).".map"; ?> 3 3 <a href="<?php echo url_for('@top_global'); ?>"> 4 <img id="graph_groupes" alt="Répartition de l'activité parlementaire sur les 12 derniers mois" src="<?php echo url_for('@groupes_plot_graph? mapId='.$PictureID); ?>" OnMouseMove="getMousePosition(event);" OnMouseOut="nd();"/>4 <img id="graph_groupes" alt="Répartition de l'activité parlementaire sur les 12 derniers mois" src="<?php echo url_for('@groupes_plot_graph?type='.$type.'&mapId='.$PictureID); ?>" OnMouseMove="getMousePosition(event);" OnMouseOut="nd();"/> 5 5 </a> 6 <script> LoadImageMap("graph_groupes", "<?php echo url_for('@groupes_plot_graph? drawAction=map&mapId='.$PictureID); ?>"); </script>6 <script> LoadImageMap("graph_groupes", "<?php echo url_for('@groupes_plot_graph?type='.$type.'&drawAction=map&mapId='.$PictureID); ?>"); </script> 7 7 <?php echo include_partial('plot/groupesLegende', array()); ?> -
cpc/trunk/project/apps/frontend/modules/plot/templates/generatePlotGroupesSuccess.php
r1472 r1476 1 1 <?php 2 2 3 $data = unserialize(get_component('plot', 'getGroupesData')); 4 $xsize = 433; $ysize = 300 ; $font = 8; 3 $data = unserialize(get_component('plot', 'getGroupesData', array('type' => $type))); 4 if ($type === "home") 5 $xsize = 433; 6 else $xsize = 720; 7 $yadd = 0; 8 if ($type === "all") 9 $yadd = 40; 10 $ydefsize = 300; 11 $ysize = $ydefsize + $yadd; 12 $font = 8; 5 13 6 14 if ($drawAction === "map") { … … 33 41 34 42 $Test = new xsPChart($xsize,$ysize); 35 $Test->setGraphArea(40+2*$font,15+ 4*$font,$xsize-20,$ysize-4*$font);43 $Test->setGraphArea(40+2*$font,15+3*$font+$yadd,$xsize-20,$ysize-4*$font); 36 44 $Test->drawFilledRectangle(7,7,$xsize-7,$ysize-7,240,240,240); 37 45 $Test->drawGraphArea(190,190,190,FALSE); … … 39 47 $Test->xsSetFontProperties("tahoma.ttf",$font); 40 48 $Test->drawScale($Data2,$DataDescr2,SCALE_NORMAL,50,50,50,TRUE,0,0,TRUE,1,FALSE); 41 $Test->drawScale($Data,$DataDescr,SCALE_NORMAL,50,50,50,TRUE, 16,0,TRUE,1,TRUE);49 $Test->drawScale($Data,$DataDescr,SCALE_NORMAL,50,50,50,TRUE,0,0,TRUE,1,TRUE); 42 50 $Test->xsSetFontProperties("tahoma.ttf",$font+1); 43 51 $Test->drawTitle(4+2*$font,$ysize-4*$font+18, "TOTAL :",50,50,50); 44 $Test->drawGrid(4,TRUE,0,0,0,40); 52 if ($type === "all") { 53 $Test->drawTitle(70,52,"Députés",50,50,50); 54 $Test->drawTitle(130,52,"Commission",50,50,50); 55 $Test->drawTitle(208,52,"Hémicycle interventions",50,50,50); 56 $Test->drawTitle(376,52,"Amendements",50,50,50); 57 $Test->drawTitle(490,52,"Propositions",50,50,50); 58 $Test->drawTitle(600,52,"Questions",50,50,50); 59 $Test->xsSetFontProperties("tahoma.ttf",$font+5); 60 $Test->drawTitle(60,30,"Répartition de l'activité des députés sur les 12 derniers mois par groupe politique",25,25,25); 61 } 62 $Test->drawGrid(4,TRUE,0,0,0,30); 45 63 $Test->setColorPalette(0,30,30,200); 46 64 $Test->setColorPalette(1,30,190,255); -
cpc/trunk/project/plugins/xsPChartPlugin/lib/pChart/pChart/pChart.class
r1472 r1476 499 499 if ( $Angle == 0 ) 500 500 { 501 $YPos = $YAxisPos+$YAxisOrt* 18;501 $YPos = $YAxisPos+$YAxisOrt*(2*$YLegShift-2); 502 502 imagettftext($this->Picture,$this->FontSize,$Angle,floor($XPos)-floor($TextWidth/2),$YPos,$C_TextColor,$this->FontName,$Value); 503 503 } -
cpc/trunk/project/web/css/xneth/style.css
r1468 r1476 251 251 text-align:justify; 252 252 } 253 .tableau_synthese { height: 500px; overflow: auto; } 253 .tableau_synthese { 254 height: 500px; 255 overflow: auto; 256 margin-bottom: 25px; 257 } 254 258 .synthese td, .synthese tr { padding: 0px; margin: 0px, border: 0px; height: 25px; } 255 259 .p { width: 112px; }
Note: See TracChangeset
for help on using the changeset viewer.