Changeset 2730


Ignore:
Timestamp:
May 18, 2012, 6:36:03 PM (8 years ago)
Author:
goya
Message:

urls absolues nécessaires pour inclusions exterieures du widget

Location:
cpc/trunk/project/apps/frontend/modules
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/modules/parlementaire/templates/_photoParlementaire.php

    r2692 r2730  
    66  $groupe = "ancien".($parlementaire->sexe == "F" ? "ne" : "")." député".($parlementaire->sexe == "F" ? "e" : "");
    77else $groupe = "Groupe parlementaire : ".$parlementaire->groupe_acronyme;
     8$abs = '';
     9if (isset($absolute) && $absolute)
     10  $abs = 'absolute=true';
    811if ($parlementaire->slug)
    9   echo '<img title="'.$parlementaire->nom.' -- ('.$groupe.')" src="'.url_for('@resized_photo_parlementaire?height='.$height.'&slug='.$parlementaire->slug.$add).'" class="jstitle photo_fiche" style="width:'.round($height*156/200).'px; height:'.$height.'px;" alt="Photo de '.$parlementaire->nom.'"/>';
     12  echo '<img title="'.$parlementaire->nom.' -- ('.$groupe.')" src="'.url_for('@resized_photo_parlementaire?height='.$height.'&slug='.$parlementaire->slug.$add, $abs).'" class="jstitle photo_fiche" style="width:'.round($height*156/200).'px; height:'.$height.'px;" alt="Photo de '.$parlementaire->nom.'"/>';
  • cpc/trunk/project/apps/frontend/modules/parlementaire/templates/_top.php

    r2710 r2730  
    11<?php
     2$abs = '';
     3$serv = '';
     4if (isset($absolute) && $absolute) {
     5  $abs = 'absolute=true';
     6  $serv = 'http://'.$_SERVER['SERVER_NAME'];
     7}
    28$titres = array('semaines_presence' => 'Semaines d\'activité',
    39               'commission_presences' => 'Présences en commission',
     
    94100    echo 'a';
    95101  else echo 'span';
    96   echo ' class="jstitle" title="'.$titre.'" href="'.url_for('@top_global_sorted?sort='.$sort[$k].'#'.$parlementaire->slug).'"><img style="height: 16px; width: 16px;" src="'.$sf_request->getRelativeUrlRoot().'/images/xneth/';
     102  echo ' class="jstitle" title="'.$titre.'" href="'.url_for('@top_global_sorted?sort='.$sort[$k].'#'.$parlementaire->slug, $abs).'"><img style="height: 16px; width: 16px;" src="'.$serv.$sf_request->getRelativeUrlRoot().'/images/xneth/';
    97103  printf($images[$k], $couleur);
    98104  echo '" alt="'.$titre.'" />';
  • cpc/trunk/project/apps/frontend/modules/parlementaire/templates/_widget.php

    r2729 r2730  
    22 return;
    33}
    4 $url = url_for('@parlementaire?slug='.$parl->slug); ?>
     4$url = url_for('@parlementaire?slug='.$parl->slug, 'absolute=true'); ?>
    55<style type="text/css">
    66 .nosdeputes_widget { width: 935px; text-align: center; font-size: 11px; }
     
    2929 <?php if ($options['titre']) : ?>
    3030  <div style="text-align:center;">
    31    <h2><a href="<?php echo $url; ?>"><?php echo $parl->nom; ?>, <?php echo $parl->getLongStatut(1); ?></h2>
     31   <h2><a href="<?php echo $url; ?>"><?php echo $parl->nom; ?>, <?php echo $parl->getLongStatut(); ?></h2>
    3232  </div>
    3333 <?php endif;
    3434 if ($options['photo']) : ?>
    3535  <div style="float: left; border: 2px solid #DCD6CA; height: 160px; width: 125px; margin-right: 3px;">
    36    <a href="<?php echo $url; ?>"><?php include_partial('parlementaire/photoParlementaire', array('parlementaire' => $parl, 'height' => 160)); ?></a>
     36   <a href="<?php echo $url; ?>"><?php include_partial('photoParlementaire', array('parlementaire' => $parl, 'height' => 160, 'absolute' => true)); ?></a>
    3737  </div>
    3838 <?php endif;
    3939 if ($options['graphe']) : ?>
    4040  <div class="graph_depute">
    41    <?php echo include_component('plot', 'parlementaire', array('parlementaire' => $parl, 'options' => array('plot' => 'total', 'questions' => 'true', 'link' => 'true'))); ?>
     41   <?php echo include_component('plot', 'parlementaire', array('parlementaire' => $parl, 'options' => array('plot' => 'total', 'questions' => 'true', 'link' => 'true', 'absolute' => true))); ?>
    4242  </div>
    4343  <div style="clear: both;"></div>
     
    4545 if ($options['activite']) : ?>
    4646  <div class="barre_activite">
    47    <?php include_partial('top', array('parlementaire'=>$parl)); ?>
     47   <?php include_partial('top', array('parlementaire'=>$parl, 'absolute' => true)); ?>
    4848  </div>
    4949  <div style="clear: both;"></div>
     
    5151 if ($options['tags']) : ?>
    5252  <div style="text-align: justify; border: 2px solid #EBEBEB">
    53     <?php echo include_component('tag', 'parlementaire', array('parlementaire'=>$parl)); ?>
     53    <?php echo include_component('tag', 'parlementaire', array('parlementaire'=>$parl, 'absolute' => true)); ?>
    5454  </div>
    5555 <?php endif; ?>
  • cpc/trunk/project/apps/frontend/modules/plot/templates/_parlementaire.php

    r1439 r2730  
    11<div id="overDiv"></div>
    2 <?php $plotarray = array('parlementaire' => $parlementaire, 'time' => 'lastyear', 'questions' => 'false', 'link' => 'false');
     2<?php $plotarray = array('parlementaire' => $parlementaire, 'time' => 'lastyear', 'questions' => 'false', 'link' => 'false', 'absolute' => false);
    33if (isset($options['session'])) $plotarray['time'] = $options['session'];
    44if (isset($options['questions'])) $plotarray['questions'] = $options['questions'];
    55if (isset($options['link'])) $plotarray['link'] = $options['link'];
     6if (isset($options['absolute'])) $plotarray['absolute'] = $options['absolute'];
    67
    78if ($options['plot'] == 'all' || $options['plot'] == 'total') {
  • cpc/trunk/project/apps/frontend/modules/plot/templates/_plotParlementaire.php

    r2728 r2730  
    11<?php
     2$abs = '';
     3if (isset($absolute) && $absolute)
     4  $abs = 'absolute=true';
    25$size='';
    36if ($time === 'lastyear')
     
    1518  $time = 'lastyear';
    1619  if (myTools::isFinLegislature()) $time = 'legislature';
    17   echo '<a href="'.url_for('@parlementaire_plot?slug='.$parlementaire->slug.'&time=legislature').'">';
     20  echo '<a href="'.url_for('@parlementaire_plot?slug='.$parlementaire->slug.'&time=legislature', $abs).'">';
    1821  $size = 'height:150px; width:800px';
    1922 } else echo '<div class="par_session">'; ?>
    20  <img style="<?php echo $size; ?>" id="graph<?php echo $PictureID; ?>" alt="Participation <?php echo $titre; ?> de <?php echo $parlementaire->nom; ?>" src="<?php echo url_for('@parlementaire_plot_graph?slug='.$parlementaire->slug.'&time='.$time.'&type='.$type.'&questions='.$questions.'&link='.$link.'&mapId='.$PictureID); ?>" onmousemove="getMousePosition(event);" onmouseout="nd();"/>
     23 <img style="<?php echo $size; ?>" id="graph<?php echo $PictureID; ?>" alt="Participation <?php echo $titre; ?> de <?php echo $parlementaire->nom; ?>" src="<?php echo url_for('@parlementaire_plot_graph?slug='.$parlementaire->slug.'&time='.$time.'&type='.$type.'&questions='.$questions.'&link='.$link.'&mapId='.$PictureID, $abs); ?>" onmousemove="getMousePosition(event);" onmouseout="nd();"/>
    2124<?php if ($link === 'true') { ?>
    2225<script type="text/javascript">
    2326<!--
    24 LoadImageMap("graph<?php echo $PictureID; ?>", "<?php echo url_for('@parlementaire_plot_graph?slug='.$parlementaire->slug.'&time='.$time.'&type='.$type.'&questions='.$questions.'&link='.$link.'&drawAction=map&mapId='.$PictureID); ?>");
     27LoadImageMap("graph<?php echo $PictureID; ?>", "<?php echo url_for('@parlementaire_plot_graph?slug='.$parlementaire->slug.'&time='.$time.'&type='.$type.'&questions='.$questions.'&link='.$link.'&drawAction=map&mapId='.$PictureID, $abs); ?>");
    2528//-->
    2629</script>
     
    3841echo "<span style='font-weight: bolder; color: rgb(160,160,160);'>&mdash;</span>&nbsp;Présence médiane";
    3942if ($link === 'true')
    40   echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.url_for('@faq').'#post_4">Explications</a></p>';
     43  echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.url_for('@faq', $abs).'#post_4">Explications</a></p>';
    4144else echo '</p>';
    4245if ($link != 'true')
  • cpc/trunk/project/apps/frontend/modules/tag/templates/_parlementaire.php

    r488 r2730  
    11<div>
    2 <?php echo include_component('tag', 'tagcloud', array('tagquery' => $qtag, 'model' => 'Intervention', 'min_tag' => 2, 'route' => '@tag_parlementaire_interventions?parlementaire='.$parlementaire->slug.'&', 'limit' => 100)); ?>
     2<?php $abs = false;
     3if (isset($absolute) && $absolute)
     4  $abs = true;
     5echo include_component('tag', 'tagcloud', array('tagquery' => $qtag, 'model' => 'Intervention', 'min_tag' => 2, 'route' => '@tag_parlementaire_interventions?parlementaire='.$parlementaire->slug.'&', 'limit' => 100, 'absolute' => $abs)); ?>
    36</div>
  • cpc/trunk/project/apps/frontend/modules/tag/templates/_tagcloud.php

    r1525 r2730  
    1 <?php $keys = array_keys($tags);
     1<?php $abs = '';
     2if (isset($absolute) && $absolute)
     3  $abs = 'absolute=true';
     4$keys = array_keys($tags);
    25$tot = count($keys);
    36if (!isset($nozerodisplay))
     
    2023$rel = preg_replace('/^iZ/', 'î', $rel);
    2124$rel = preg_replace('/^IZ/', 'Î', $rel);
    22 echo url_for($route.'tags='.$rel); ?>" title="<?php echo $tags[$tag]['count']; ?>"><?php
     25echo url_for($route.'tags='.$rel, $abs); ?>" title="<?php echo $tags[$tag]['count']; ?>"><?php
    2326} else if ($ct % 2 == 0) echo '<br/>';
    2427$nom = preg_replace('/\s+/', '&nbsp;', $tags[$tag]['tag']);
Note: See TracChangeset for help on using the changeset viewer.