Changeset 45 for trunk/app/views/entries
- Timestamp:
- 07/17/07 17:24:45 (17 months ago)
- Location:
- trunk/app/views/entries
- Files:
-
- 3 modified
-
admin_add.thtml (modified) (2 diffs)
-
admin_edit.thtml (modified) (1 diff)
-
admin_listing.thtml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/entries/admin_add.thtml
r36 r45 5 5 <?php echo $html->addCrumb('Entries', '/admin/entries/listing'); ?> 6 6 <?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'); ?> 8 8 <?php echo $html->hiddenTag('Entry/user_id', $othAuth->user('id')) ?> 9 9 <fieldset> … … 42 42 <?php echo $form->labelTag( 'Entry/status', 'Published:' );?> 43 43 <?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> 48 53 49 54 <tr><td colspan="3"> -
trunk/app/views/entries/admin_edit.thtml
r14 r45 2 2 <?php echo $javascript->link('fckeditor/fckeditor'); ?> 3 3 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'); ?> 8 6 <?php echo $html->getCrumbs(' / '); ?> 9 7 8 <fieldset> 9 <legend>Edit Entry</legend> 10 10 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'); ?> 12 14 <?php echo $html->hiddenTag('Entry/user_id', $othAuth->user('id')) ?> 13 15 <?php echo $html->hiddenTag('Entry/id') ?> 14 16 15 <fieldset>16 17 <?php echo $form->labelTag( 'Entry/title', 'Title' );?><br /> 17 18 <?php echo $html->input('Entry/title', array("size" => 40, "maxlength" => 50, "class"=>"formas")); ?> 18 19 <?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 54 58 </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(); ?> 1 5 2 <?php echo $html->addCrumb('Control Tools', '/admin/ /entries/start'); ?>6 <?php echo $html->addCrumb('Control Tools', '/admin/entries/start'); ?> 3 7 4 8 <?php echo $html->getCrumbs(' / '); ?> … … 8 12 <p><?php echo $html->link($html->image('actions/new.png', array("alt"=>"Add entry", "title"=>"Add entry")), '/admin/entries/add', null, false, false) ?></p> 9 13 14 <table class="tbadmin"> 10 15 <?php 11 16 //die(print_r($data)); 12 17 13 foreach ($data as $key => $val) { 14 echo '<p><a href="/admin/entries/edit/'.$data[$key]['Entry']['id'].'">Edit</a> '; 15 echo $data[$key]['Entry']['title']; 16 echo ' <a href="/admin/entries/delete/'.$data[$key]['Entry']['id'].'">Delete</a></p><hr />'; 18 $th = array ('Edit', 'Title', 'Status', 'Delete'); 19 echo $html->tableHeaders($th); 20 foreach ($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'")); 17 30 } 18 ?> 31 ?> 32 </table> 33 34 <?php echo $pagination; ?>
