コード例 #1
0
ファイル: index.php プロジェクト: jruizdes/encuestamanki
    $message = "La encuesta ha sido %s. <a href=\"%s\">Verla</a>";
    ?>
			<div class="alert alert-success"><?php 
    printf($message, Param::get('updated') == 'true' ? 'actualizada' : 'creada', Url::get('vote', $id));
    ?>
</div>
		<?php 
}
unset($id);
unset($message);
?>
		<section class="span5 pull-left">
			<h2>Selecciona una encuesta</h2>
			<ul>
				<?php 
foreach (Poll::all() as $poll) {
    ?>
					<li class="poll poll-<?php 
    echo $poll->id;
    ?>
">
						<a href="<?php 
    echo Url::get('admin@edit', $poll->id);
    ?>
" title="<?php 
    echo $poll->question;
    ?>
"><?php 
    echo $poll->question;
    ?>
</a></li>
コード例 #2
0
ファイル: home.php プロジェクト: jruizdes/encuestamanki
 public static function action_index()
 {
     return View::make('home.index')->add_var('polls', Poll::all());
 }
コード例 #3
0
			  			  
        <div class="row">
        
  				<div id="first" class="col-sm-4">
  
  						<h3>About iRate Politics</h3>			
  						<p>iRate Politics will change politics as we know it by restoring the democracy, and put the power back into the hands of the people.  It is the first website to give Americans a fun, yet influential, and addicting, yet satisfying, way to be active in their government and really make a difference.  
  <a href="/about/">More &raquo;</a></p>
  					
  					  
  				</div><!-- #first .footer-col -->
  
  				<div id="second" class="col-sm-4">
  					<h3>Latest Polls</h3>			
  					<ul><?php 
$polls = Poll::all()->take(3);
?>
                                           @foreach($polls as $poll)
						<?php 
$question = $poll->questions->first();
?>
                                            <li><a href="{{URL::route('question',$question->id)}}">{{$question->content}}</a></li>
                                           @endforeach
  					 </ul>
  
  				</div><!-- #second .footer-col -->
  
  				<div id="third" class="col-sm-4">
            <h3>Quick Links</h3>
            <div class="row">