Changeset 45 for trunk/app/views/entries

Show
Ignore:
Timestamp:
07/17/07 17:24:45 (17 months ago)
Author:
aarkerio
Message:

Subjects list on front end

Location:
trunk/app/views/entries
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/entries/admin_add.thtml

    r36 r45  
    55<?php echo $html->addCrumb('Entries', '/admin/entries/listing'); ?>  
    66<?php echo $html->getCrumbs(' / '); ?> 
    7 <?php echo $html->formTag('/admin/entries/add/','post', array("onsubmit"=>"return validateEntry()")); ?> 
     7<?php echo $html->formTag('/admin/entries/add/','post'); ?> 
    88<?php echo $html->hiddenTag('Entry/user_id', $othAuth->user('id')) ?> 
    99<fieldset> 
     
    4242       <?php echo $form->labelTag( 'Entry/status', 'Published:' );?> 
    4343       <?php echo $html->checkbox('Entry/status', null, array("value"=>1)); ?> 
    44   </td><td colspan="2"> 
    45      <?php echo $form->labelTag( 'Entry/disc', 'Comments allowed:' );?> 
    46      <?php echo $html->checkbox('Entry/disc', null, array("value"=>1)); ?> 
    47   </td></tr> 
     44  </td><td> 
     45     <?php echo $form->labelTag( 'Entry/discution', 'Comments allowed:' );?> 
     46     <?php echo $html->checkbox('Entry/discution', null, array("value"=>1)); ?> 
     47  </td> 
     48   <td> 
     49       <?php echo $form->labelTag( 'Entry/end', 'Finish edition:' );?><br /> 
     50       <?php echo $html->checkbox('Entry/end', null, array("value" => 1)); ?> 
     51   </td> 
     52  </tr> 
    4853   
    4954  <tr><td colspan="3"> 
  • trunk/app/views/entries/admin_edit.thtml

    r14 r45  
    22<?php echo $javascript->link('fckeditor/fckeditor'); ?>  
    33 
    4 <div class="spaced"> 
    5  
    6 <?php echo $html->addCrumb('Control Tools', '/entries/index'); ?>  
    7 <?php echo $html->addCrumb('Entries', '/entries/listing'); ?>  
     4<?php echo $html->addCrumb('Control Tools', '/admin/entries/start'); ?>  
     5<?php echo $html->addCrumb('Entries', '/admin/entries/listing'); ?>  
    86<?php echo $html->getCrumbs(' / '); ?> 
    97 
     8<fieldset> 
     9<legend>Edit Entry</legend> 
    1010 
    11 <?php echo $html->formTag('/entries/edit/','post'); ?> 
     11<table style="margin:0 auto 0 auto;"> 
     12<tr><td> 
     13<?php echo $html->formTag('/admin/entries/edit/','post'); ?> 
    1214<?php echo $html->hiddenTag('Entry/user_id', $othAuth->user('id')) ?> 
    1315<?php echo $html->hiddenTag('Entry/id') ?> 
    1416 
    15 <fieldset> 
    1617  <?php echo $form->labelTag( 'Entry/title', 'Title' );?><br />  
    1718  <?php echo $html->input('Entry/title', array("size" => 40, "maxlength" => 50, "class"=>"formas")); ?> 
    1819  <?php echo $html->tagErrorMsg('Entry/title', 'Title is required.'); ?> 
    19   <br /><br /> 
    20    
    21   <p><?php echo $form->labelTag( 'Entry/category_id', 'Category' );?> 
    22   <br /> 
    23       <?php  
    24       /*$html->selectTag( 
    25       $fieldName, 
    26       $optionElements, 
    27       $selected = null, 
    28       $selectAttr = array(), 
    29       $optionAttr = null, 
    30       $showEmpty = true, 
    31       $return = false     
    32       selectTag ($fieldName, $optionElements, $selected=null, $selectAttr=array(), $optionAttr=null, $showEmpty=true, $return=false) 
    33       */ 
    34       echo $html->selectTag('Entry/category_id', $categories); ?> 
    35   </p> 
    36    
    37   <p><?php echo $form->labelTag( 'Entry/Body', 'Body:' );?><br /> 
    38   <?php echo $html->textarea('Entry/body', array("class"=>"formas", "cols"=>80, "rows"=>45)) ?> 
    39   <?php echo $fck->load('Entry/body', 'Karamelo'); ?>  
    40   <?php echo $html->tagErrorMsg('Entry/body', 'Body is required.'); ?> 
    41   <br /> 
    42   </p> 
    43    
    44   <p><?php echo $form->labelTag( 'Entry/status', 'Published:' );?><br /> 
    45   <?php echo $html->checkbox('Entry/status'); ?> 
    46   <br /></p> 
    47    
    48   <p><?php echo $form->labelTag( 'Entry/disc', 'Comments allowed:' );?><br /> 
    49   <?php echo $html->checkbox('Entry/disc'); ?> 
    50   <br /></p> 
    51     
    52   <br /> 
    53   <?php echo $html->submit('Add', array("class"=>"b_formas")) ?> 
     20  </td> 
     21  <td> 
     22       <?php echo $form->labelTag('Entry/subject_id', 'Subject:' );?> 
     23       <?php echo $html->selectTag('Entry/subject_id', $subjects); ?> 
     24  </td> 
     25   <td> 
     26  <?php echo $html->link($html->image('admin/myimages.jpg', array("alt"=>"My Images", "title"=>"My Images")), '#', array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false) ?></p> 
     27  </td> 
     28  </tr> 
     29  <tr> 
     30  <td colspan="3"> 
     31      <?php echo $form->labelTag( 'Entry/Body', 'Body:' );?><br /> 
     32      <?php echo $html->textarea('Entry/body', array("class"=>"formas", "cols"=>80, "rows"=>45)) ?> 
     33      <?php echo $fck->load('Entry/body', 'Karamelo'); ?>  
     34      <?php echo $html->tagErrorMsg('Entry/body', 'Body is required.'); ?> 
     35  </td></tr> 
     36  <tr> 
     37  <td> 
     38      <?php echo $form->labelTag( 'Entry/status', 'Published:' );?><br /> 
     39      <?php echo $html->checkbox('Entry/status', null, array("value" => 1)); ?> 
     40  </td> 
     41  <td> 
     42      <?php echo $form->labelTag( 'Entry/discution', 'Comments allowed:' );?><br /> 
     43      <?php echo $html->checkbox('Entry/discution', null, array("value" => 1)); ?> 
     44  </td> 
     45  <td> 
     46       <?php echo $form->labelTag( 'Entry/end', 'Finish edition:' );?><br /> 
     47       <?php echo $html->checkbox('Entry/end', null, array("value" => 1)); ?> 
     48   </td> 
     49  </tr> 
     50  <tr> 
     51  <td colspan="3"> 
     52       <?php echo $html->submit('Save') ?> 
     53       </form> 
     54  </td> 
     55  </tr> 
     56</table> 
     57 
    5458</fieldset> 
    55 </form> 
    56 </div> 
  • trunk/app/views/entries/admin_listing.thtml

    r20 r45  
     1<script type="text/javascript"> 
     2   window.onload = timedMsg; 
     3</script> 
     4<?php $session->flash(); ?> 
    15 
    2 <?php echo $html->addCrumb('Control Tools', '/admin//entries/start'); ?>  
     6<?php echo $html->addCrumb('Control Tools', '/admin/entries/start'); ?>  
    37 
    48<?php echo $html->getCrumbs(' / '); ?> 
     
    812<p><?php echo $html->link($html->image('actions/new.png', array("alt"=>"Add entry", "title"=>"Add entry")), '/admin/entries/add', null, false, false) ?></p> 
    913 
     14<table class="tbadmin"> 
    1015<?php 
    1116//die(print_r($data)); 
    1217 
    13 foreach ($data as $key => $val) { 
    14       echo '<p><a href="/admin/entries/edit/'.$data[$key]['Entry']['id'].'">Edit</a>&nbsp;&nbsp;'; 
    15       echo $data[$key]['Entry']['title']; 
    16       echo '&nbsp;&nbsp;<a href="/admin/entries/delete/'.$data[$key]['Entry']['id'].'">Delete</a></p><hr />'; 
     18$th = array ('Edit', 'Title', 'Status', 'Delete'); 
     19echo $html->tableHeaders($th);   
     20foreach ($data as $val) { 
     21       $tr = array ( 
     22        $gags->sendEdit($val['Entry']['id'], 'entries'), 
     23        $val['Entry']['title'], 
     24        $gags->setStatus($val['Entry']['status']), 
     25        $gags->confirmDel($val['Entry']['id'], 'entries') 
     26        ); 
     27        
     28    echo $html->tableCells($tr, array("class"=>"altRow", "onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='altRow'"),  
     29                                array('class'=>'evenRow',"onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='evenRow'"));  
    1730} 
    18 ?>  
     31?> 
     32</table> 
     33 
     34<?php echo $pagination; ?>