Changeset 405 for trunk/news_admin


Ignore:
Timestamp:
08/20/08 10:39:41 (16 years ago)
Author:
rafaelraymundo
Message:

Devolução das modificações do modulo de NEWS(Boletins internos) para a comunidade.
Modificações: a) Desvinculação de template do cliente via cogido fonte;
b) Traduções dos titulo das notícias em ingles; c) Inclusão de moldura do canto direito(título de cada notícia)/modificação de template.
Modificado por Lavoisier Rodrigues/SERPRO

Location:
trunk/news_admin
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/news_admin/inc/class.uinews.inc.php

    r49 r405  
    109109                        $var['cat_name'] = ($this->cat_id != 'all') ? $this->bo->catbo->id2name($this->cat_id) : lang('All news'); 
    110110                        $this->template->set_var($var); 
    111                         $this->template->parse('_category','category'); 
    112  
     111                        $this->template->parse('_category','category');                         
     112                     
    113113                        $this->template->set_var('icon',$GLOBALS['phpgw']->common->image('news_admin','news-corner.gif')); 
    114  
     114                        $this->template->set_var('icon-right',$GLOBALS['phpgw']->common->image('news_admin','news-corner-right.gif')); 
     115                     
    115116                        foreach($news as $newsitem) 
    116117                        { 
    117118                                $var = Array( 
    118119                                        'subject' => $newsitem['subject'], 
    119                                         'submitedby' => 'Submitted by ' . $GLOBALS['phpgw']->common->grab_owner_name($newsitem['submittedby']) . ' on ' . $GLOBALS['phpgw']->common->show_date($newsitem['date']), 
     120                                        'submitedby' => lang('Submitted by') . ' ' . $GLOBALS['phpgw']->common->grab_owner_name($newsitem['submittedby']) . ' ' . lang('on') . ' ' . $GLOBALS['phpgw']->common->show_date($newsitem['date']), 
    120121                                        'content' => $newsitem['content'], 
    121122                                ); 
     
    162163                                'width'     => '100%', 
    163164                                'outerborderwidth' => '0', 
    164                                 'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/default','bg_filler') 
     165                                'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/' . ($GLOBALS['phpgw_info']['server']['template_set'] ? $GLOBALS['phpgw_info']['server']['template_set'] : 'default'), 'bg_filler') 
    165166                        )); 
    166167 
     
    223224                                '_news' => 'news_' . $section . '.tpl' 
    224225                        )); 
     226                    
    225227                        $this->template->set_block('_news','news_form'); 
    226228                        $this->template->set_block('_news','row'); 
     
    240242 
    241243                        $this->template->set_var('icon',$GLOBALS['phpgw']->common->image('news_admin','news-corner.gif')); 
     244                        $this->template->set_var('icon-right',$GLOBALS['phpgw']->common->image('news_admin','news-corner-right.gif')); 
    242245 
    243246                        foreach($news as $newsitem) 
     
    245248                                $var = Array( 
    246249                                        'subject'=> $newsitem['subject'], 
    247                                         'submitedby' => 'Submitted by ' . $GLOBALS['phpgw']->common->grab_owner_name($newsitem['submittedby']) . ' on ' . $GLOBALS['phpgw']->common->show_date($newsitem['date']), 
     250                                        'submitedby' => lang('Submitted by') . ' ' . $GLOBALS['phpgw']->common->grab_owner_name($newsitem['submittedby']) . ' ' .  lang('on') . ' ' . $GLOBALS['phpgw']->common->show_date($newsitem['date']), 
    248251                                        'content'    => nl2br($newsitem['content']) 
    249252                                ); 
     
    266269                                $out .= '<center><a href="' . $GLOBALS['phpgw']->link('/index.php',$link_values) . '">View news archives</a></center>'; 
    267270                        } 
     271                         
    268272                        return $out; 
    269273                } 
     
    277281                        } 
    278282                        if($_POST['submitit']) 
    279                         { 
    280                                 $_POST['news']['is_html'] = '1'; 
     283                        {                                                                 
    281284                                $this->news_data = $_POST['news']; 
    282285                                if(!$this->news_data['subject']) 
     
    404407 
    405408                function modify($type = 'edit') 
    406                 { 
    407                         include_once("fckeditor.php"); 
    408                          
     409                {                         
     410                        include_once("fckeditor.php");                                                 
     411                        $this->news_data['is_html'] = ($type == 'add' ? '1' : $this->news_data['is_html'] );  
    409412                        $options = $this->bo->get_options($this->news_data); 
    410413                        $GLOBALS['phpgw']->common->phpgw_header(); 
     
    425428 
    426429                        $category_list = $this->selectlist('write', (int)$this->news_data['category']); 
    427                          
    428                         if ($category_list == '') 
     430                         
     431                        if ($category_list == '') 
    429432                                $this->deny(); 
    430433 
     
    436439                                ) 
    437440                        ); 
    438                          
    439                         $oFCKeditor = new FCKeditor('news[content]') ; 
    440                         $oFCKeditor->BasePath = 'news_admin/templates/celepar/fckeditor/'; 
     441                         
     442                        $oFCKeditor = new FCKeditor('news[content]') ;                         
     443                        $oFCKeditor->BasePath = 'news_admin/templates/' . ($GLOBALS['phpgw_info']['server']['template_set'] ? $GLOBALS['phpgw_info']['server']['template_set'] : 'default') . '/fckeditor/'; 
    441444                        $oFCKeditor->ToolbarSet = 'ExpressoLivre'; 
    442                         $oFCKeditor->Value = $this->news_data['content']; 
    443                          
     445                        $oFCKeditor->Value = $this->news_data['content'];                                         
    444446                        $this->template->set_var(array( 
    445447                                'form_button' => '<input type="submit" name="submitit" value="' . lang('save') . '">', 
     
    465467                                'value_end_y' =>  $this->sbox->getYears('news[end_y]',date('Y',$this->news_data['end']),date('Y')), 
    466468                                'label_is_html' => lang('Contains HTML'), 
    467                                 'value_is_html' => '<input type="checkbox" value="1" name="news[is_html]  checked="1""' . ($this->news_data['is_html'] ? ' checked="1"' : '') .'>', 
    468                         )); 
    469                          
     469                                'value_is_html' => '<input type="checkbox" value="1" name="news[is_html]" ' . ($this->news_data['is_html'] ? ' checked="1"' : '') .'>', 
     470                        )); 
     471                                                                 
    470472                        $this->template->pfp('out','form'); 
    471473                } 
     
    482484                        $GLOBALS['phpgw']->common->phpgw_header(); 
    483485                        echo parse_navbar(); 
    484  
    485                         $category_list = $this->selectlist('write', (int)$this->news_data['category']); 
     486                         
     487                        $category_list = $this->selectlist('write', (int)$this->news_data['category']); 
    486488                        if ($category_list == '') 
    487489                                $this->deny(); 
    488  
     490                                 
    489491                        $this->template->set_block('main','category'); 
    490492                        $var['lang_read'] = lang('Read'); 
     
    553555                        $this->template->pfp('out','list'); 
    554556                } 
    555                  
     557                 
    556558                function deny() 
    557559                { 
     
    559561                        $GLOBALS['phpgw']->common->phpgw_exit(True); 
    560562                } 
    561  
     563         
    562564        } 
    563565?> 
  • trunk/news_admin/templates/celepar/read.tpl

    r45 r405  
    1717     <b>{subject}</b>&nbsp; 
    1818    </td> 
    19     <td align="left" width="1%" bgcolor="#FFFFFF"> 
    20      &nbsp; 
    21     </td> 
     19    <td width="13" valign="top" valign="top"> 
     20     <img src="{icon-right}" align="top"> 
     21    </td>     
    2222   </tr> 
    2323   <tr> 
  • trunk/news_admin/templates/default/read.tpl

    r2 r405  
    1717     <b>{subject}</b>&nbsp; 
    1818    </td> 
    19     <td align="left" width="1%" bgcolor="#FFFFFF"> 
    20      &nbsp; 
    21     </td> 
     19    <td width="13" valign="top" valign="top"> 
     20     <img src="{icon-right}" align="top"> 
     21    </td>     
    2222   </tr> 
    2323   <tr> 
Note: See TracChangeset for help on using the changeset viewer.