Esempio n. 1
0
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$text = $this->task == 'edit' ? Lang::txt('COM_EVENTS_EDIT') : Lang::txt('COM_EVENTS_NEW');
Toolbar::title(Lang::txt('COM_EVENTS_EVENT') . ': ' . $text, 'event.png');
Toolbar::save();
Toolbar::cancel();
Toolbar::spacer();
Toolbar::help('event');
$xprofilec = \Hubzero\User\Profile::getInstance($this->row->created_by);
$xprofilem = \Hubzero\User\Profile::getInstance($this->row->modified_by);
$userm = is_object($xprofilem) ? $xprofilem->get('name') : '';
$userc = is_object($xprofilec) ? $xprofilec->get('name') : '';
$params = new \Hubzero\Html\Parameter($this->row->params, PATH_CORE . DS . 'components' . DS . $this->option . DS . 'events.xml');
?>
<script type="text/javascript" src="../core/components/<?php 
echo $this->option;
?>
/site/assets/js/calendar.rc4.js"></script>
<script type="text/javascript">
var HUB = {};

/*window.addEvent('domready', function() {
	myCal1 = new Calendar({ publish_up: 'Y-m-d' }, { direction: 1, tweak: {x: 6, y: 0} });
	myCal2 = new Calendar({ publish_down: 'Y-m-d' }, { direction: 1, tweak: {x: 6, y: 0} });
});*/
</script>

<script type="text/javascript" src="../core/components/<?php 
Esempio n. 2
0
			<?php 
if ($this->plugins) {
    foreach ($this->plugins as $plugin) {
        if (!isset($plugin->events) || !$plugin->events) {
            continue;
        }
        foreach ($plugin->events as $event) {
            $data = '';
            $style = 'none';
            if ($event['name'] == $this->row->get('event')) {
                $style = 'block';
                $data = $this->row->get('params');
            }
            $out = null;
            if ($event['params']) {
                $param = new \Hubzero\Html\Parameter(is_object($data) ? $data->toString() : $data, PATH_CORE . DS . 'plugins' . DS . 'cron' . DS . $plugin->plugin . DS . $plugin->plugin . '.xml');
                $param->addElementPath(PATH_CORE . DS . 'plugins' . DS . 'cron' . DS . $plugin->plugin);
                //$out = $param->render('params', $event['params']);
                $html = array();
                if ($prm = $param->getParams('params', $event['params'])) {
                    foreach ($prm as $p) {
                        $html[] = '<div class="input-wrap">';
                        if ($p[0]) {
                            $html[] = $p[0];
                            $html[] = $p[1];
                        } else {
                            $html[] = $p[1];
                        }
                        $html[] = '</div>';
                    }
                }
Esempio n. 3
0
								<option value="2"<?php 
echo $params->get('preview', '') == '2' ? 'selected="selected"' : '';
?>
><?php 
echo Lang::txt('COM_COURSES_PREVIEW_YES_FIRST_UNIT');
?>
</option>
							</select>
						</div>
					</fieldset>

					<?php 
if ($plugins = Event::trigger('courses.onSectionEdit')) {
    $data = $this->row->get('params');
    foreach ($plugins as $plugin) {
        $param = new \Hubzero\Html\Parameter(is_object($data) ? $data->toString() : $data, PATH_CORE . DS . 'plugins' . DS . 'courses' . DS . $plugin['name'] . DS . $plugin['name'] . '.xml');
        $out = $param->render('params', 'onSectionEdit');
        if (!$out) {
            continue;
        }
        ?>
								<fieldset class="adminform eventparams" id="params-<?php 
        echo $plugin['name'];
        ?>
">
									<legend><?php 
        echo Lang::txt('COM_COURSES_FIELDSET_PARAMETERS', $plugin['title']);
        ?>
</legend>
									<div class="input-wrap">
										<?php 
Esempio n. 4
0
 /**
  * View of items
  *
  * @return	   string
  */
 public function page()
 {
     // Get default view from owner params
     $mparams = new \Hubzero\Html\Parameter($this->model->member()->params);
     $defaultView = $mparams->get('todo_layout', 'pinboard');
     // Incoming
     $layout = Request::getVar('l', $defaultView) == 'pinboard' ? 'pinboard' : 'list';
     $mine = isset($this->_mine) ? $this->_mine : Request::getInt('mine', 0);
     // Output HTML
     $view = new \Hubzero\Plugin\View(array('folder' => 'projects', 'element' => 'todo', 'name' => 'view', 'layout' => $layout));
     // Filters for returning results
     $view->filters = array('projects' => array($this->model->get('id')), 'limit' => Request::getInt('limit', $this->params->get('limit', 50)), 'start' => Request::getInt('limitstart', 0), 'todolist' => Request::getWord('list', ''), 'state' => isset($this->_state) ? $this->_state : Request::getInt('state', 0), 'mine' => $mine, 'assignedto' => $mine == 1 ? $this->_uid : 0, 'sortby' => Request::getVar('sortby', 'priority'), 'sortdir' => Request::getVar('sortdir', 'ASC'), 'layout' => $layout);
     $view->option = $this->_option;
     $view->database = $this->_database;
     $view->model = $this->model;
     $view->uid = $this->_uid;
     $view->title = $this->_area['title'];
     $view->todo = $this->todo;
     // Update view preference if changed
     if ($layout != $defaultView) {
         $objO = $this->model->table('Owner');
         $objO->saveParam($this->model->get('id'), $this->_uid, $param = 'todo_layout', $layout);
     }
     return $view->loadTemplate();
 }
Esempio n. 5
0
						<option value="manual"<?php 
echo $params->get('progress_calculation', '') == 'manual' ? 'selected="selected"' : '';
?>
><?php 
echo Lang::txt('COM_COURSES_PROGRESS_CALCULATION_MANUAL');
?>
</option>
					</select>
				</div>
			</fieldset>

			<?php 
if ($plugins = Event::trigger('courses.onOfferingEdit')) {
    $data = $this->row->get('params');
    foreach ($plugins as $plugin) {
        $param = new \Hubzero\Html\Parameter(is_object($data) ? $data->toString() : $data, PATH_CORE . DS . 'plugins' . DS . 'courses' . DS . $plugin['name'] . DS . $plugin['name'] . '.xml');
        $out = $param->render('params', 'onOfferingEdit');
        if (!$out) {
            continue;
        }
        ?>
						<fieldset class="adminform eventparams" id="params-<?php 
        echo $plugin['name'];
        ?>
">
							<legend><?php 
        echo Lang::txt('COM_COURSES_FIELDSET_PARAMETERS', $plugin['title']);
        ?>
</legend>
							<?php 
        echo $out;
Esempio n. 6
0
    echo ' selected="selected"';
}
?>
><?php 
echo Lang::txt('COM_COURSES_TRASHED');
?>
</option>
					</select>
				</div>
			</fieldset>

			<?php 
if ($plugins = Event::trigger('courses.onCourseEdit')) {
    $data = $this->row->get('params');
    foreach ($plugins as $plugin) {
        $param = new \Hubzero\Html\Parameter(is_object($data) ? $data->toString() : $data, PATH_CORE . DS . 'plugins' . DS . 'courses' . DS . $plugin['name'] . DS . $plugin['name'] . '.xml');
        $out = $param->render('params', 'onCourseEdit');
        if (!$out) {
            continue;
        }
        ?>
					<fieldset class="adminform eventparams" id="params-<?php 
        echo $plugin['name'];
        ?>
">
						<legend><?php 
        echo Lang::txt('COM_COURSES_FIELDSET_PARAMETERS', $plugin['title']);
        ?>
</legend>
						<?php 
        echo $out;
Esempio n. 7
0
}
?>
><?php 
echo Lang::txt('JYes');
?>
</option>
			</select>
		</p>

<?php 
if ($plugins = Event::trigger('courses.onAssetgroupEdit')) {
    $data = $ag->get('params');
    foreach ($plugins as $plugin) {
        $p = Plugin::byType('courses', $plugin['name']);
        $default = new \Hubzero\Config\Registry($p->params);
        $param = new \Hubzero\Html\Parameter(is_object($data) ? $data->toString() : $data, PATH_CORE . DS . 'plugins' . DS . 'courses' . DS . $plugin['name'] . DS . $plugin['name'] . '.xml');
        foreach ($default->toArray() as $k => $v) {
            if (substr($k, 0, strlen('default_')) == 'default_') {
                $param->def(substr($k, strlen('default_')), $default->get($k, $v));
            }
        }
        $out = $param->render('params', 'onAssetgroupEdit');
        if (!$out) {
            continue;
        }
        ?>
			<fieldset class="eventparams" id="params-<?php 
        echo $plugin['name'];
        ?>
">
				<legend><?php