Changeset 307 for trunk/app/views/quotes

Show
Ignore:
Timestamp:
03/05/08 00:56:26 (9 months ago)
Author:
aarkerio
Message:

Rewrite hepers

Location:
trunk/app/views/quotes
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/quotes/admin_edit.ctp

    r272 r307  
    1 <?php echo $html->addCrumb('Control Tools', '/admin/entries/start'); ?>  
    2 <?php echo $html->addCrumb('Quote', '/admin/quotes/listing'); ?>  
    3 <?php echo $html->getCrumbs(' / '); ?> 
     1<?php  
     2 echo $html->addCrumb('Control Tools', '/admin/entries/start');  
     3 echo $html->addCrumb('Quote', '/admin/quotes/listing');  
     4 echo $html->getCrumbs(' / '); 
    45 
    5 <?php echo $html->formTag('/admin/quotes/edit/','post'); ?> 
     6 echo $form->create('Quote', array('url' => 'quotes/admin_edit'));  
     7 echo $form->hidden('Quote.id'); 
     8?> 
     9<fieldset> 
     10<legend>Edit quote</legend> 
     11 <?php  
     12   echo $form->input('Quote.quote', array("size" => 60, "maxlength" => 150)); 
     13   echo $form->error('Quote.quote', 'Title is required.');  
     14    
     15   echo $form->input('Quote.author', array("size" => 25, "maxlength" => 70)); 
     16   echo $form->error('Quote.author', 'Author is required.');  
    617 
    7 <?php echo $html->hiddenTag('Quote/id'); ?> 
     18   echo '</fieldset>'; 
     19   echo $form->end('Save');   
     20?> 
    821 
    9 <fieldset> 
    10 <legend>Edit new</legend> 
    11  <?php  
    12    echo $form->labelTag( 'Quote/quote', 'Quote:' );  
    13    echo $html->input('Quote/quote', array("size" => 60, "maxlength" => 150)); 
    14    echo $html->tagErrorMsg('Quote/quote', 'Title is required.');  
    15     
    16    echo $form->labelTag( 'Quote/quote', 'Author:' );  
    17    echo $html->input('Quote/author', array("size" => 25, "maxlength" => 70)); 
    18    echo $html->tagErrorMsg('Quote/author', 'Author is required.');  
    19  ?> 
    20  
    21   <?php echo $html->submit('Send');  ?> 
    22 </fieldset> 
    23 </form> 
    24  
  • trunk/app/views/quotes/admin_listing.ctp

    r272 r307  
    1 <?php echo $html->addCrumb('Control Tools', '/admin/entries/start'); ?>  
    2 <?php echo $html->getCrumbs(' / '); ?> 
     1<?php  
     2  echo $html->addCrumb('Control Tools', '/admin/entries/start');  
     3  echo $html->getCrumbs(' / ');  
     4?> 
    35 
    46<div class="title_section">Quick News</div> 
     
    2022</script> 
    2123 
    22 <p><?php echo $html->link($html->image('admin/new.gif', array("alt"=>"Add new", "title"=>"Add new")), '#', array("onclick"=>"hU()"), false, false); ?></p> 
     24<?php  
     25echo $html->para(null, $html->link($html->image('actions/new.png', array("alt"=>"Add new", "title"=>"Add new")), '#', array("onclick"=>"hU()"), false, false)); ?> 
    2326 
    2427<div id="trh" style="margin:0;padding:0;padding-left:40px;width:80%;display:none;"> 
    25 <?php echo $html->formTag('/admin/quotes/add/','post'); ?> 
     28<?php echo $form->create('Quote', array('action'=>'admin_add')); ?> 
    2629 <fieldset> 
    27  <legend>New quote</legend> 
    28    <?php echo $form->labelTag('Quote/quote', 'Quote:'); ?><br /> 
    29    <?php echo $html->input('Quote/quote', array("size" => 60, "maxlength"=>130)); ?> 
    30    <?php echo $html->tagErrorMsg('Quote/quote', 'A quote is required.'); ?> 
     30 <legend>New quote</legend 
     31   <?php  
     32   echo $form->input('Quote.quote', array("size" => 60, "maxlength"=>130)); 
     33   echo $form->error('Quote.quote', 'A quote is required.');  
    3134    
    32    <?php echo $form->labelTag('Quote/author', 'Author:') . "<br />"; ?> 
    33    <?php echo $html->input('Quote/author', array("size" => 60, "maxlength"=>130)); ?> 
    34    <?php echo $html->tagErrorMsg('Quote/author', 'An author is required.'); ?> 
     35   echo $form->input('Quote/author', array("size" => 60, "maxlength"=>130)); 
     36   echo $form->error('Quote.author', 'An author is required.');  
     37?> 
    3538    
    3639   <div style="clear:both"></div> 
    37   <?php echo $html->submit('Add') ?> 
    3840</fieldset> 
    39 </form> 
     41  <?php echo $form->end('Save'); ?> 
    4042 
    4143</div>