Show
Ignore:
Timestamp:
01/18/06 18:45:19 (6 years ago)
Author:
john
Message:

Made all the file php long tags (uglysvn up)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/templates/scaffolds/generator_templates/controller.php

    r113 r117  
    1 < ? 
     1< ?php 
    22 
    3 class <?= $controller_class_name ?>Controller extends ApplicationController { 
     3class <?php echo $controller_class_name ?>Controller extends ApplicationController { 
    44 
    5 <? foreach($non_scaffolded_actions as $action): ?> 
    6     function <?= $action ?>() { 
     5<?php foreach($non_scaffolded_actions as $action): ?> 
     6    function <?php echo $action ?>() { 
    77    } 
    88    
    9 <? endforeach; ?> 
     9<?php endforeach; ?> 
    1010    function index() { 
    11         $<?=$singluar_model_name?> = new <?=$model_class_name?>(); 
    12         $this-><?=$plural_model_name?> = $<?=$singluar_model_name?>->find_all(); 
    13         $this->content_columns = $<?=$singluar_model_name?>->content_columns; 
     11        $<?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>(); 
     12        $this-><?php echo $plural_model_name ?> = $<?php echo $singluar_model_name ?>->find_all(); 
     13        $this->content_columns = $<?php echo $singluar_model_name ?>->content_columns; 
    1414    } 
    1515     
    1616    function show() { 
    17         $<?=$singluar_model_name?> = new <?=$model_class_name?>(); 
    18         $this-><?=$singluar_model_name?> = $<?=$singluar_model_name?>->find($_REQUEST['id']); 
     17        $<?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>(); 
     18        $this-><?php echo $singluar_model_name ?> = $<?php echo $singluar_model_name ?>->find($_REQUEST['id']); 
    1919    } 
    2020     
    2121    function add() { 
    22         $this-><?=$singluar_model_name?> = new <?=$model_class_name?>($_REQUEST['<?=$singluar_model_name?>']); 
     22        $this-><?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>($_REQUEST['<?php echo $singluar_model_name ?>']); 
    2323        if($_POST) { 
    24             if($this-><?=$singluar_model_name?>->save($_POST['<?=$singluar_model_name?>'])) { 
    25                 Session::flash('notice', "<?=$human_model_name?> was successfully created."); 
     24            if($this-><?php echo $singluar_model_name ?>->save($_POST['<?php echo $singluar_model_name ?>'])) { 
     25                Session::flash('notice', "<?php echo $human_model_name ?> was successfully created."); 
    2626                $this->redirect_to = url_for(array(":action" => "index")); 
    2727            } else { 
    28                 Session::flash('error', "Error adding <?=$singluar_model_name?> to the database."); 
     28                Session::flash('error', "Error adding <?php echo $singluar_model_name ?> to the database."); 
    2929            } 
    3030        } 
     
    3232     
    3333    function edit() { 
    34         $<?=$singluar_model_name?> = new <?=$model_class_name?>(); 
    35         $this-><?=$singluar_model_name?> = $<?=$singluar_model_name?>->find($_REQUEST['id']);    
     34        $<?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>(); 
     35        $this-><?php echo $singluar_model_name ?> = $<?php echo $singluar_model_name ?>->find($_REQUEST['id']);  
    3636        if($_POST) { 
    37             if($this-><?=$singluar_model_name?>->save($_POST['<?=$singluar_model_name?>'])) { 
    38                 Session::flash('notice', "<?=$human_model_name?> was successfully updated."); 
    39                 $this->redirect_to = url_for(array(":action" => "show", ":id" => $this-><?=$singluar_model_name?>)); 
     37            if($this-><?php echo $singluar_model_name ?>->save($_POST['<?php echo $singluar_model_name ?>'])) { 
     38                Session::flash('notice', "<?php echo $human_model_name ?> was successfully updated."); 
     39                $this->redirect_to = url_for(array(":action" => "show", ":id" => $this-><?php echo $singluar_model_name ?>)); 
    4040            } else { 
    41                 Session::flash('error', "Error saving <?=$singluar_model_name?> to the database."); 
     41                Session::flash('error', "Error saving <?php echo $singluar_model_name ?> to the database."); 
    4242            } 
    4343        } 
     
    4646    function delete() { 
    4747        if($_REQUEST['id'] > 0) { 
    48             $<?=$singluar_model_name?> = new <?=$model_class_name?>(); 
    49             $<?=$singluar_model_name?> = $<?=$singluar_model_name?>->find($_REQUEST['id']); 
    50             if($<?=$singluar_model_name?>->delete()) { 
    51                 Session::flash('notice', "<?=$human_model_name?> was successfully deleted."); 
     48            $<?php echo $singluar_model_name ?> = new <?php echo $model_class_name ?>(); 
     49            $<?php echo $singluar_model_name ?> = $<?php echo $singluar_model_name ?>->find($_REQUEST['id']); 
     50            if($<?php echo $singluar_model_name ?>->delete()) { 
     51                Session::flash('notice', "<?php echo $human_model_name ?> was successfully deleted."); 
    5252            } else { 
    53                 Session::flash('error', "Error deleting <?=$singluar_model_name?> from the database."); 
     53                Session::flash('error', "Error deleting <?php echo $singluar_model_name ?> from the database."); 
    5454            } 
    5555        }