示例#1
0
 public function admin()
 {
     $data = array('action' => 'edit', 'name' => $this->name, 'role' => User::instance()->get_role());
     Event::run('steamcore.aclcheck', $data);
     $root = ORM::factory('pages_position')->where('lft', 0)->find();
     $xml = $root->render_descendants('pages', false)->render();
     $l = xsl::translate_string($xml, 'pages_admin', array(), array('pages_helper::check_acl'));
     $pages = pages_helper::get_pages($root = true);
     $move = View::factory('pageadmin/movepage', array('pagelist' => $pages))->render();
     $c = View::factory('pages/pages', array('list' => $l, 'controller' => 'pages', 'move' => $move))->render();
     $content = array();
     $content['content'] = new stdClass();
     $content['content']->title = 'Pages';
     $content['content']->copy = $c;
     $container = Container::instance(3)->render($content);
     Display::instance()->display($container);
 }
示例#2
0
</li>
					<?php 
    }
    ?>
				</ul>
			</div>
		</nav>
		<?php 
    if (uri::getURI() == '' && (users_helper::isLoggedin() && config::item('homepage_user', 'users') == 'default' || !users_helper::isLoggedin() && config::item('homepage_public', 'users') == 'default')) {
        ?>
			<section class="homepage-top">
				<div class="splash clearfix">
					<div class="promo-text">
						<div class="text">
							<?php 
        echo pages_helper::getPage(array('location' => 'site/homepage'));
        ?>
						</div>
						<div class="action">
							<?php 
        if (!users_helper::isLoggedin()) {
            ?>
								<?php 
            echo html_helper::anchor('users/signup', __('signup', 'system_navigation'), array('class' => 'button large success users-signup'));
            ?>
								<?php 
            echo html_helper::anchor('users/login', __('login', 'system_navigation'), array('class' => 'button large important users-login'));
            ?>
							<?php 
        } else {
            ?>
if ($m = Session::instance()->get('message')) {
    ?>
		<p class="success"><?php 
    echo $m;
    ?>
</p>
	<?php 
}
?>

	<?php 
echo form::open('page_plugins/add_plugin_instance');
?>
	<fieldset>
		<?php 
echo form::dropdown('page_id', pages_helper::get_plugin_pages());
?>
		<?php 
echo form::dropdown('plugin_id', plugins::get_all());
?>
		<?php 
echo form::submit('submit', 'Add new plugin');
?>
	</fieldset>
	<?php 
echo form::close();
?>

	<div class="display-container">
		<?php 
echo form::open('page_plugins/edit_plugin_instance');