Example #1
0
 /**
  * @abstract Constructor, initializes the module
  * @return Install_Admin
  * @access public
  */
 public function __construct($section_type = false, $class = false)
 {
     if ($section_type && $class) {
         $this->section_type = $section_type;
         director()->registerCmsSection($class, $section_type);
     }
 }
Example #2
0
 /**
  * @abstract Constructor, initializes the module
  * @return 
  * @access public
  */
 public function aspen_init()
 {
     if (LS == 'admin') {
         director()->registerPageSection('eventslib', 'Events Display', 'events_display');
     } else {
         director()->registerCmsSection('eventslib', 'events_display');
     }
 }
Example #3
0
 /**
  * @abstract Constructor, initializes the module
  * @return Install_Admin
  * @access public
  */
 public function __construct()
 {
     $this->APP = get_instance();
     director()->registerPageSection(__CLASS__, 'Course Display', 'course_display');
     director()->registerPageSection(__CLASS__, 'Course List Display', 'courselist_display');
     app()->setConfig('enable_uploads', true);
     // enable uploads
 }
Example #4
0
 /**
  * @abstract Constructor, initializes the module
  * @return 
  * @access public
  */
 public function aspen_init()
 {
     if (LS == 'admin') {
         director()->registerPageSection('formslib', 'Form Display', 'form_display');
     } else {
         director()->registerCmsSection('formslib', 'form_display');
     }
 }
Example #5
0
 /**
  * @abstract Constructor, initializes the module
  * @return 
  * @access public
  */
 public function aspen_init()
 {
     if (LS == 'admin') {
         director()->registerPageSection('newslib', 'News Display', 'news_display');
     } else {
         director()->registerCmsSection('newslib', 'news_display');
         director()->registerCmsSection('newslib', 'newsarch_display');
     }
 }
Example #6
0
 /**
  * @abstract Constructor, initializes the module
  * @return 
  * @access public
  */
 public function aspen_init()
 {
     if (LS == 'admin') {
         director()->registerPageSection('contactslib', 'Contact Display', 'contacts_display');
         director()->registerPageSection('contactslib', 'Contact Group Display', 'contactgroup_display');
     } else {
         director()->registerCmsSection('contactslib', 'contacts_display');
         director()->registerCmsSection('contactslib', 'contactgroup_display');
     }
 }
Example #7
0
 /**
  * @abstract Constructor, initializes the module
  * @return 
  * @access public
  */
 public function aspen_init()
 {
     if (LS == 'admin') {
         director()->registerPageSection('pageslib', 'Text Content', 'basic_editor');
         //			director()->registerPageSection('pageslib', 'Text with Image Content', 'imagetext_editor');
     } else {
         director()->registerCmsSection('pageslib', 'basic_editor');
         //			director()->registerCmsSection('pageslib', 'imagetext_editor');
     }
 }
Example #8
0
 /**
  * @abstract Performs a keyword search on the content index
  * @return mixed
  */
 public function search($add_params = false)
 {
     $type = get()->getAlnum('inmodule');
     $keyword = get()->getRaw('keyword');
     $results = false;
     // check if page needs to be rerouted for a special module search
     if ($type && array_key_exists($type, app()->config('search_pages'))) {
         $pages = app()->config('search_pages');
         $url = app()->cms_lib->url($pages[$type]);
         if ($url && app()->cms_lib->getPage('page_id') != $pages[$type]) {
             $get = app()->params->getRawSource('get');
             unset($get['redirected']);
             header("Location: " . $url . '?' . http_build_query($get));
             exit;
         }
     }
     // @todo this may need to be moved to a cron job
     app()->search->load_content();
     // call module override if it exists
     if ($type) {
         $results = director()->moduleSearch($type, $keyword, $add_params);
     }
     // if no results, run normal
     if (!$results && $keyword) {
         $model->enablePagination();
         $model = model()->open('search_content_index');
         $model->match($keyword);
         $model->paginate(get()->getRaw('page'), app()->config('search_results_per_page'));
         $results = $model->results();
         if ($results) {
             foreach ($results as $key => $result) {
                 $results[$key]['source_url'] = app()->cms_lib->url($result['source_page_id']);
             }
         }
     }
     $this->paginator_info['records'] = $results['TOTAL_RECORDS_FOUND'];
     $this->paginator_info['current'] = $results['CURRENT_PAGE'];
     $this->paginator_info['per_page'] = $results['RESULTS_PER_PAGE'];
     $this->paginator_info['pages'] = $results['TOTAL_PAGE_COUNT'];
     return $results ? $results : false;
 }
Example #9
0
					<?php 
}
?>
				</fieldset>
			</div>
		</div>
		<div class="frame">
			<h3 class="show-hide"><a id="sections" class="toggle-frame open" href="#" title="Click to Open/Close this Section">Hide</a> Page Sections</h3>
			<div id="sections-area" class="loadfirst clearfix">
				<fieldset id="sections-fieldset">
					<ul id="page-sections">
					<?php 
if (isset($sections) && is_array($sections) && count($sections)) {
    foreach ($sections as $section) {
        print '<li id="editor_' . $section['meta']['id'] . '_sort" class="list">' . "\n";
        director()->loadPageSection($section['meta']['section_type'], false, $section, false, false, $form);
        print '</li>';
    }
} else {
    print '<li id="none" class="empty">No page sections available. Select from the options below.</li>';
}
?>
					</ul>
					<div class="toolbox clearfix">
						<select name="add-section" id="add-section">
							<option value="0">Add a section&#8230;</option>
											
							<?php 
if (count($available_sections)) {
    foreach ($available_sections as $opt) {
        ?>
Example #10
0
 /**
  * @abstract Prints all content for the current page.
  * @return string
  * @access public
  */
 public function display_content($section = false)
 {
     $content = $this->getContent($section);
     if ($content) {
         foreach ($content as $section) {
             director()->displayPageSections($section, $this->page, $this->bits);
         }
         return true;
     } else {
         return false;
     }
 }
Example #11
0
NavBar::begin(['brandLabel' => 'ICINF3', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
$rol = "Guest";
if (!Yii::$app->user->isGuest) {
    $rol = ROL::findOne(Yii::$app->user->identity->ID_ROL)->ROL;
}
if ($rol == "Guest") {
    echo Nav::widget(guest());
} else {
    if ($rol == "Administrador") {
        echo Nav::widget(administrador());
    } else {
        if ($rol == "Decano") {
            echo Nav::widget(decano());
        } else {
            if ($rol == "Director") {
                echo Nav::widget(director());
            } else {
                if ($rol == "Docente") {
                    echo Nav::widget(docente());
                }
            }
        }
    }
}
NavBar::end();
?>

    <div class="container">
        <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
Example #12
0
 /**
  * @abstract Loads a new section from ajax request
  * @param string $section
  * @param integer $next_id
  * @param integer $page_id
  * @param string $template
  * @access public
  */
 public function ajax_loadBlankSection($section = false, $next_id = 0, $page_id = false, $template = false)
 {
     if ($section) {
         director()->loadPageSection($section, $next_id, false, $page_id, $template);
     }
 }