Show
Ignore:
Timestamp:
07/11/08 14:28:03 (4 months ago)
Author:
aarkerio
Message:

Update FAQS

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/faqs/admin_listing.ctp

    r306 r642  
    44  echo $javascript->link('fckeditor/fckeditor'); 
    55endif; 
    6 ?> 
    7 <script type="text/javascript"> 
    8    window.onload = timedMsg; 
    9 </script> 
    10 <?php  
    11 $session->flash(); 
    12 echo $html->addCrumb('Control Tools', '/admin/entries/start'); 
    13 echo $html->addCrumb('FAQs', '/admin/catfaqs/listing');  
    14 echo $html->getCrumbs(' / ');  
    15 ?> 
    16 <div class="title_section">Questions &amp; answers</div> 
    17 <p> 
    18 <?php 
    19  echo '<div id="loading" style="display: none;">'; 
    20                   echo $html->image("static/loading.gif", array("alt"=>"Loading")); 
    21  echo '</div>'; 
     6 
     7 echo $html->addCrumb('Control Panel', '/admin/entries/start'); 
     8 echo $html->addCrumb('FAQs', '/admin/catfaqs/listing');  
     9 echo $html->getCrumbs(' / ');  
     10 
     11 echo $html->div('title_section', __('Questions & answers', true)); 
     12     
     13 echo $html->div(null, $html->image("static/loading.gif", array('alt'=>'Loading')), array('id'=>'loading', 'style'=>'display:none')); 
    2214     
    23  echo  $ajax->link($html->image('actions/new.png', array("alt"=>"Add new FAQ", "title"=>"Add new FAQ")),'/admin/faqs/add/'.$catfaq_id,  
     15 echo  $ajax->link($html->image('actions/new.png', array('alt'=>__('Add new', true), 'title'=>__('Add new', true))),'/admin/faqs/add/'.$catfaq_id,  
    2416     array("update" => "updater","loading"=>"Element.show('loading');Element.hide('updater');", "complete"=>"Element.hide('loading');Effect.Appear('updater')"),  
    2517                null, false); 
    2618 
    27 echo $ajax->div('updater'); 
    28 echo $ajax->divEnd('updater'); 
    29 ?></p> 
    30 <?php 
    31 foreach ($data as $val) 
    32 { 
    33    echo '<div style="padding:6px 3px 28px 4px;margin:10px 0 5px 0;border:1px dotted gray;">'; 
    34         echo '<div class="butonright">'. $gags->sendEdit($val['Faq']['id'], 'faqs')   . '</div>'; 
     19echo $ajax->div('updater') . $ajax->divEnd('updater'); 
     20 
     21foreach ($data as $val): 
     22   echo '<div style="padding:28px 6px 29px 5px;margin:10px 0 5px 0;border:1px dotted gray;">'; 
     23        echo $html->div('butonright', $gags->sendEdit($val['Faq']['id'], 'faqs')); 
    3524        echo '<b>'.$val['Faq']['question'] . '</b><br />'; 
    36         echo '<p style="margin-left:15px;">'. $val['Faq']['answer']  . '</p>'; 
    37         echo '<div class="butonright">'. $gags->confirmDel($val['Faq']['id'], 'faqs') . '</div>'; 
     25        echo $html->div(null, $val['Faq']['answer']); 
     26        echo $html->div('butonright', $gags->confirmDel($val['Faq']['id'], 'faqs')); 
    3827   echo '</div>'; 
    39 } 
     28endforeach; 
    4029?>