<?php
class Pampa_Controller_Action_Site extends Pampa_Controller_Action {

  public function init(){
    parent::init();
  }

  /**
   * the predispatch method verify if the
   * user is logged in pampa cms
   */
  public function preDispatch(){
    // get the auth
    $cmsAuth = Pampa_Auth_Cms::getInstance();
    if($cmsAuth->hasIdentity()){
      // add the javascripts
      $this->view->headScript()
                 ->appendFile("cms/js/colorbox/js/jquery.colorbox-min.js", "text/javascript")
                 ->appendFile("cms/js/PampaExtras.min.js", "text/javascript")
                 ->appendFile("cms/js/PampaSiteUI.min.js", "text/javascript");

      // add the css
      $this->view->headLink()
                 ->appendStylesheet('cms/js/colorbox/css/colorbox.css')
                 ->appendStylesheet('cms/css/pampa.site.ui.css');
    }
  }

}