Changeset 809 for trunk/app/views
- Timestamp:
- 10/11/08 22:19:40 (7 weeks ago)
- Location:
- trunk/app/views/newsletters
- Files:
-
- 3 modified
-
admin_add.ctp (modified) (1 diff)
-
admin_listing.ctp (modified) (3 diffs)
-
display.ctp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/newsletters/admin_add.ctp
r794 r809 1 1 <?php 2 echo $javascript->link('myfunctions');3 2 echo $javascript->link('fckeditor/fckeditor'); 4 3 5 echo $html->addCrumb('Control Tools', '/admin/entries/start');6 echo $html->addCrumb( 'Entries', '/admin/newsletters/listing');7 echo $html->getCrumbs(' /');4 echo $html->addCrumb('Control Panel', '/admin/entries/start'); 5 echo $html->addCrumb(__('Newsletters', true), '/admin/newsletters/listing'); 6 echo $html->getCrumbs('/'); 8 7 9 8 echo $form->create('Newsletter'); 10 9 ?> 11 12 10 <fieldset> 13 <legend> New newsletter</legend>11 <legend><?php __('New newsletter'); ?></legend> 14 12 15 13 <table style="margin:0 auto 0 auto;"> 16 <tr> 17 <td> 18 <?php 19 echo $form->input('Newsletter.title', array("size" => 50, "maxlength" => 50)); 20 ?> 14 <tr><td> 15 <?php echo $form->input('Newsletter.title', array('size'=>50, 'maxlength' => 50, 'label'=>__('Title', true))); ?> 21 16 </td> 22 <td>17 <td> 23 18 <?php 24 echo $html->link($html->image('admin/myimages.jpg', array('alt'=> 'My Images', 'title'=>'My Images')),19 echo $html->link($html->image('admin/myimages.jpg', array('alt'=>__('My Images', true), 'title'=>__('My Images', true))), 25 20 '#', 26 array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false); ?> </p>21 array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false); ?> 27 22 </td> 28 </tr> 29 <tr><td colspan="2"> 30 <?php 31 echo $form->label('Newsletter.Body', 'Text:'); 32 echo $form->textarea('Newsletter.body', array('cols'=>60, 'rows'=>17)); 33 echo $fck->load('NewsletterBody', 'Karamelo'); 34 ?> 35 </td> 23 </tr> 24 <tr><td colspan="2"> 25 <?php 26 echo $form->textarea('Newsletter.body', array('cols'=>60, 'rows'=>17)); 27 echo $fck->load('NewsletterBody', 'Karamelo'); 28 ?> 29 </td> 36 30 </tr> 37 31 <tr> 38 <td> 39 <?php 40 echo $form->label('Newsletter.status', 'Published:'); 41 echo $form->checkbox('Newsletter.status'); 42 ?> 43 </td> 44 <td> 45 <?php 46 echo $form->label('Newsletter.end', 'Finish edition:' ); 47 echo $form->checkbox('Newsletter.end'); 48 ?> 49 </td> 50 </tr> 51 <tr><td colspan="2"></fieldset> 52 <?php echo $form->end('Save'); ?> 32 <td> 33 <?php 34 echo $form->label('Newsletter.status', __('Published', true)); 35 echo $form->checkbox('Newsletter.status'); 36 ?> 37 </td> 38 <td> 39 <?php 40 echo $form->label('Newsletter.end', __('Finish edition', true) ); 41 echo $form->checkbox('Newsletter.end'); 42 ?> 43 </td> 44 </tr> 45 <tr><td colspan="2"> 46 <?php echo $form->end(__('Save', true)); ?> 47 </fieldset> 53 48 </td></tr> 54 49 </table> -
trunk/app/views/newsletters/admin_listing.ctp
r277 r809 1 <?php echo $html->addCrumb('Control Tools', '/admin/entries/start'); ?> 1 <?php 2 echo $html->addCrumb('Control Panel', '/admin/entries/start'); 3 echo $html->getCrumbs(' / '); 2 4 3 <?php echo $html->getCrumbs(' / '); ?> 5 echo $html->div('title_section', __('Newsletters', true)); 4 6 5 <div class="title_section">Newsletters</div> 6 7 <p> 8 <?php 9 echo $html->link($html->image('actions/new.png', array("alt"=>"Add entry", "title"=>"Add entry")), '/admin/newsletters/add', null, false, false); 7 echo $html->link($html->image('actions/new.png', array('alt'=>__('Add new', true), 'title'=>__('Add new', true))), '/admin/newsletters/add', null, false, false); 10 8 ?> 11 </p>12 9 <table class="tbadmin"> 13 10 <?php 14 $th = array ('Edit', 'Title', 'Status', 'Delivered', 'Send', 'Delete');11 $th = array(__('Edit', true), __('Title', true), 'Status', __('Delivered', true), __('Sent', true), __('Delete', true)); 15 12 echo $html->tableHeaders($th); 16 foreach ($data as $val) {17 $delivered = ($val['Newsletter']['delivered'] == 0) ? 'No' : 'Yes';13 foreach ($data as $val): 14 $delivered = ($val['Newsletter']['delivered'] == 0) ? 'No' : __('Yes', true); 18 15 $tr = array ( 19 16 $gags->sendEdit($val['Newsletter']['id'], 'newsletters'), … … 21 18 $gags->setStatus($val['Newsletter']['status']), 22 19 $delivered, 23 $html->link($html->image('admin/send.gif', array( "alt"=>"Send", "title"=>"Send")),20 $html->link($html->image('admin/send.gif', array('alt'=>__('Send', true), 'title'=>__('Send', true))), 24 21 '/admin/newsletters/send/'.$val['Newsletter']['id'], null, null, false), 25 22 $gags->confirmDel($val['Newsletter']['id'], 'newsletters') … … 28 25 echo $html->tableCells($tr, array("class"=>"altRow", "onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='altRow'"), 29 26 array('class'=>'evenRow',"onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='evenRow'")); 30 } 27 endforeach; 31 28 ?> 32 29 </table> 33 34 30 <?php 35 31 //echo $pagination; -
trunk/app/views/newsletters/display.ctp
r541 r809 1 1 <?php 2 2 3 echo $html->div('title_ section', 'Newsletters');3 echo $html->div('title_portal', __('Newsletters', true)); 4 4 5 if ( count($data) == 0):6 echo $html-> div('notice', 'Newsletter not yet done');5 if ( count($data) === 0): 6 echo $html->para('notice', __('No published newsletters yet', true)); 7 7 endif; 8 8 //die(var_dump($data)); 9 9 10 foreach ($data as $val):10 foreach ($data as $val): 11 11 $tmp = $html->div('news_title', $val['Newsletter']['title']); 12 12 $tmp .= $html->div('news_date', $val['Newsletter']['created']); 13 13 $tmp .= $html->div('news_body', $val['Newsletter']['body']); 14 15 14 echo $html->div('wrapnew', $tmp); 16 15 endforeach; 17 16 18 17 if ( $session->check('Auth.User') ): 19 echo $html->para(null, $html->link( 'Subscribe to newsletter', '/newsletters/subscribe'));18 echo $html->para(null, $html->link(__('Subscribe to newsletter', true), '/newsletters/subscribe')); 20 19 endif; 21 20 ?>
