示例#1
0
文件: auth.php 项目: greor/satin-spb
 public function before()
 {
     Session::$default = 'admin';
     $template = $this->template;
     $this->template = NULL;
     parent::before();
     if ($this->auto_render === TRUE) {
         $this->template = View_Admin::factory($template);
     }
     $this->acl = A2::instance('admin/a2');
     $this->config = Kohana::$config->load($this->config)->as_array();
 }
示例#2
0
 public function hook_callback($content, $orm)
 {
     $request = $this->request;
     $back_url = $request->url();
     $query_array = $request->query();
     if (!empty($query_array)) {
         $back_url .= '?' . http_build_query($query_array);
     }
     $back_url .= '#tab-' . $this->tab_code;
     unset($query_array);
     $query_array = array('group' => $this->blog_group, 'blog' => $orm->blog_id, 'back_url' => $back_url, 'content_only' => TRUE);
     $query_array = Paginator::query($request, $query_array);
     $link = Route::url('modules', array('controller' => $this->controller_name, 'query' => Helper_Page::make_query_string($query_array)));
     $html_blog = Request::factory($link)->execute()->body();
     $tab_nav_html = View_Admin::factory('layout/tab/nav', array('code' => $this->tab_code, 'title' => '<b>' . __('Blog') . '</b>'));
     $tab_pane_html = View_Admin::factory('layout/tab/pane', array('code' => $this->tab_code, 'content' => $html_blog));
     return str_replace(array('<!-- #tab-nav-insert# -->', '<!-- #tab-pane-insert# -->'), array($tab_nav_html . '<!-- #tab-nav-insert# -->', $tab_pane_html . '<!-- #tab-pane-insert# -->'), $content);
 }
示例#3
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
$labels = $orm->labels();
$required = $orm->required_fields();
/**** mode ****/
echo View_Admin::factory('form/control', array('field' => 'mode', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::select('mode', $mode_options, $orm->mode, array('id' => 'mode_field', 'class' => 'input-xxlarge'))));
/**** embed_code ****/
echo View_Admin::factory('form/control', array('field' => 'embed_code', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::textarea('embed_code', $orm->embed_code, array('id' => 'embed_code_field', 'class' => 'text-area-clear'))));
?>
<script>
$(function(){
	$("#mode_field").on("change", function(){
		if ($(this).val() !== "external") {
			$("#embed_code_field").prop("disabled", true);
		} else {
			$("#embed_code_field").prop("disabled", false);
		}
	}).triggerHandler("change");
});
</script>	
示例#4
0
文件: seo.php 项目: greor/satin-spb
defined('SYSPATH') or die('No direct access allowed.');
$output_vars_wrapper = empty($output_vars_wrapper) ? '' : $output_vars_wrapper;
$hide_toggle = FALSE;
if (!empty($item->title_tag) or !empty($item->keywords_tag) or !empty($item->description_tag)) {
    $hide_toggle = TRUE;
}
$controll_name = 'meta_tags';
if (!empty($output_vars_wrapper)) {
    $controll_name = "{$output_vars_wrapper}[{$controll_name}]";
}
$control_id = str_replace(array('[', ']'), '_', $controll_name) . '_field';
echo View_Admin::factory('form/control', array('field' => 'meta_tags', 'errors' => array(), 'labels' => array('meta_tags' => __('Additional params')), 'required' => array(), 'controls' => Form::hidden($controll_name, '0') . Form::checkbox($controll_name, '1', $hide_toggle, array('id' => $control_id, 'class' => 'toggle-switcher', 'data-switch-group' => $output_vars_wrapper . '_meta_tags')), 'control_id' => $control_id));
$controll_name = 'title_tag';
if (!empty($output_vars_wrapper)) {
    $controll_name = "{$output_vars_wrapper}[{$controll_name}]";
}
$control_id = str_replace(array('[', ']'), '_', $controll_name) . '_field';
echo View_Admin::factory('form/control', array('field' => 'title_tag', 'group_class' => 'hide_toggle ' . $output_vars_wrapper . '_meta_tags', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::input($controll_name, $item->title_tag, array('id' => $control_id, 'class' => 'input-xxlarge')), 'control_id' => $control_id));
$controll_name = 'keywords_tag';
if (!empty($output_vars_wrapper)) {
    $controll_name = "{$output_vars_wrapper}[{$controll_name}]";
}
$control_id = str_replace(array('[', ']'), '_', $controll_name) . '_field';
echo View_Admin::factory('form/control', array('field' => 'keywords_tag', 'group_class' => 'hide_toggle ' . $output_vars_wrapper . '_meta_tags', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::input($controll_name, $item->keywords_tag, array('id' => $control_id, 'class' => 'input-xxlarge')), 'control_id' => $control_id));
$controll_name = 'description_tag';
if (!empty($output_vars_wrapper)) {
    $controll_name = "{$output_vars_wrapper}[{$controll_name}]";
}
$control_id = str_replace(array('[', ']'), '_', $controll_name) . '_field';
echo View_Admin::factory('form/control', array('field' => 'description_tag', 'group_class' => 'hide_toggle ' . $output_vars_wrapper . '_meta_tags', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::textarea($controll_name, $item->description_tag, array('id' => $control_id, 'class' => 'text-area-clear')), 'control_id' => $control_id));
示例#5
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
echo View_Admin::factory('layout/breadcrumbs', array('breadcrumbs' => $breadcrumbs));
$query_array = array('group' => $GROUP_KEY, 'album' => $ALBUM_ID);
$action = Route::url('modules', array('controller' => $CONTROLLER_NAME['multiupload'], 'action' => 'upload', 'query' => Helper_Page::make_query_string($query_array)));
?>
	<div class="row">
		<div class="span4">
			<div class="form-inline">
				<label for="js-album"><?php 
echo __('Album');
?>
:</label>
<?php 
echo Form::select('album_id', array('' => '') + $albums, FALSE, array('id' => 'js-album'));
?>
			</div>
		</div>
		<div class="span5">
			<div class="form-inline pull-right" style="padding-top: 5px;">
				<label for="js-to-head" class="checkbox-label"><?php 
echo __('Add to head');
?>
</label>
<?php 
echo Form::checkbox('to_head', 1, FALSE, array('id' => 'js-to-head', 'style' => 'margin: -1px 0 0 5px'));
?>
			
			</div>
		</div>
示例#6
0
文件: main.php 项目: greor/satin-spb
/**** can_hiding ****/
if (IS_MASTER_SITE) {
    echo View_Admin::factory('form/checkbox', array('field' => 'can_hiding', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'orm_helper' => $helper_orm));
}
/**** parent_id ****/
echo View_Admin::factory('form/control', array('field' => 'parent_id', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::select('parent_id', array(0 => __('- Root page -')) + $pages, (int) $orm->parent_id, array('id' => 'parent_id_field', 'class' => 'input-xxlarge'))));
/**** uri ****/
echo View_Admin::factory('form/control', array('field' => 'uri', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::input('uri', $orm->uri, array('id' => 'uri_field', 'class' => 'input-xxlarge')) . '<label>URL: <div id="uri-preview" base="/base_uri/"></div></label>'));
/**** status ****/
echo View_Admin::factory('form/control', array('field' => 'status', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::select('status', Kohana::$config->load('_pages.status'), (int) $orm->status, array('id' => 'status_field', 'class' => 'input-xxlarge'))));
/**** page_type ****/
echo View_Admin::factory('form/page_type', array('type_field' => 'type', 'data_field' => 'data', 'page' => $orm, 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'modules' => $modules, 'pages_list' => $pages));
/**** title ****/
echo View_Admin::factory('form/control', array('field' => 'title', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::input('title', $orm->title, array('id' => 'title_field', 'class' => 'input-xxlarge'))));
/**** additional params block ****/
echo View_Admin::factory('form/seo', array('item' => $orm, 'errors' => $errors, 'labels' => $labels, 'required' => $required));
echo '
		<ul id="base_uri_list" style="display:none;">
			<li id="page_id_0">/</li>
	';
foreach ($base_uri_list as $id => $base_uri) {
    echo '<li id="page_id_', $id, '">/', $base_uri, '/</li>';
}
echo '
		</ul>
	';
?>
	<script>
		$(function(){
			var $uriPreview = $('#uri-preview');
			$('#uri_field').change(function(){
示例#7
0
文件: base.php 项目: greor/satin-spb
 protected function layout_aside()
 {
     return $this->layout_aside ? View_Admin::factory($this->layout_aside) : '';
 }
示例#8
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
$required = empty($required) ? array() : $required;
$errors = empty($errors) ? array() : $errors;
$tooltip = empty($tooltip) ? '' : $tooltip;
$group_class = empty($group_class) ? '' : $group_class;
$controls_class = empty($controls_class) ? '' : $controls_class;
$control_id = empty($control_id) ? $field . '_field' : $control_id;
$_control = Form::hidden($field, '') . Form::checkbox($field, '1', (bool) $orm_helper->orm()->{$field}, array('id' => $control_id));
echo View_Admin::factory('form/control', array('field' => $field, 'labels' => $labels, 'errors' => $errors, 'required' => $required, 'tooltip' => $tooltip, 'group_class' => $group_class, 'controls_class' => $controls_class, 'control_id' => $control_id, 'controls' => $_control));
示例#9
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
$orm = $helper_orm->orm();
$labels = $orm->labels();
$required = $orm->required_fields();
/**** for_all ****/
if (IS_MASTER_SITE) {
    echo View_Admin::factory('form/checkbox', array('field' => 'for_all', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'orm_helper' => $helper_orm));
}
/**** active ****/
echo View_Admin::factory('form/checkbox', array('field' => 'active', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'orm_helper' => $helper_orm));
/**** title ****/
echo View_Admin::factory('form/control', array('field' => 'title', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::input('title', $orm->title, array('id' => 'title_field', 'class' => 'input-xxlarge'))));
/**** public_date ****/
echo View_Admin::factory('form/date', array('field' => 'public_date', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'orm' => $orm));
/**** image_1 ****/
echo View_Admin::factory('form/image', array('field' => 'image_1', 'value' => $orm->image_1, 'orm_helper' => $helper_orm, 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'help_text' => Arr::get($field_hints, 'image_1')));
/**** image_2 ****/
echo View_Admin::factory('form/image', array('field' => 'image_2', 'value' => $orm->image_2, 'orm_helper' => $helper_orm, 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'help_text' => Arr::get($field_hints, 'image_2')));
/**** link ****/
echo View_Admin::factory('form/control', array('field' => 'link', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::input('link', $orm->link, array('id' => 'link_field', 'class' => 'input-xxlarge'))));
示例#10
0
	</div>
	<div class="clearfix"></div>
	<br>
	
	<div class="js-row-holder"></div>
	
	<script id="tpl-row" type="text/x-tmpl-mustache">
<?php 
echo View_Admin::factory('forms/structure/tpl/row', array('field_types' => $fields_types));
?>
	</script>
<?php 
foreach ($fields_types as $_k => $_v) {
    echo '
			<script id="tpl-settings-' . $_k . '" type="text/x-tmpl-mustache">
				' . View_Admin::factory('forms/structure/tpl/fields/' . $_k) . '
			</script>
		';
}
?>
	
	<script>
		window.renderRows = <?php 
echo json_encode($fields);
?>
;
	</script>
	<script type="text/javascript" src="<?php 
echo $ASSETS;
?>
js/forms.js"></script>
示例#11
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
$orm = $helper_orm->orm();
$labels = $orm->labels();
$required = $orm->required_fields();
/**** active ****/
echo View_Admin::factory('form/checkbox', array('field' => 'active', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'orm_helper' => $helper_orm));
/**** owner_id ****/
echo View_Admin::factory('form/control', array('field' => 'owner_id', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::select('owner_id', $albums_list, (int) $orm->owner_id, array('id' => 'owner_id_field', 'class' => 'input-xxlarge'))));
/**** title ****/
echo View_Admin::factory('form/control', array('field' => 'title', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::input('title', $orm->title, array('id' => 'title_field', 'class' => 'input-xxlarge'))));
/**** image ****/
echo View_Admin::factory('form/image', array('field' => 'image', 'value' => $orm->image, 'orm_helper' => $helper_orm, 'errors' => $errors, 'labels' => $labels, 'required' => $required));
示例#12
0
$query_array = Paginator::query(Request::current(), $query_array);
$action = Route::url('modules', array('controller' => $CONTROLLER_NAME['config'], 'query' => Helper_Page::make_query_string($query_array)));
echo View_Admin::factory('layout/error')->bind('errors', $errors);
?>

	<form method="post" action="<?php 
echo $action;
?>
" enctype="multipart/form-data" class="form-horizontal" >
		<div class="tabbable">
			<ul class="nav nav-tabs kr-nav-tsbs">
<?php 
echo '<li class="active">', HTML::anchor('#tab-main', __('Main'), array('data-toggle' => 'tab')), '</li>';
?>
				<!-- #tab-nav-insert# -->
			</ul>
			<div class="tab-content kr-tab-content">
				<div class="tab-pane kr-tab-pane active" id="tab-main">
<?php 
echo View_Admin::factory('modules/promo/config/tab/main', array('orm' => $orm, 'mode_options' => $mode_options, 'errors' => $errors));
?>
				</div>
				<!-- #tab-pane-insert# -->
			</div>
		</div>
<?php 
echo View_Admin::factory('form/submit_save');
?>
	
	</form>
示例#13
0
文件: edit.php 项目: greor/satin-spb
		<div class="tabbable">
			<ul class="nav nav-tabs kr-nav-tsbs">
<?php 
echo '<li class="active">', HTML::anchor('#tab-main', __('Main'), array('data-toggle' => 'tab')), '</li>';
echo '<li>', HTML::anchor('#tab-properties', __('Properties'), array('data-toggle' => 'tab')), '</li>';
?>
			</ul>
			<div class="tab-content kr-tab-content">
				<div class="tab-pane kr-tab-pane active" id="tab-main">
<?php 
echo View_Admin::factory('sites/tab/main', array('helper_orm' => $helper_orm, 'errors' => $errors));
?>
				</div>
				<div class="tab-pane kr-tab-pane" id="tab-properties">
<?php 
echo View_Admin::factory('form/property/list', array('properties' => $properties));
?>
				</div>
			</div>
		</div>
		<div class="form-actions">
			<button class="btn btn-primary" type="submit" name="submit" value="save" ><?php 
echo __('Save');
?>
</button>
<?php 
if (IS_SUPER_USER) {
    ?>
				<button class="btn btn-primary" type="submit" name="submit" value="save_and_exit" ><?php 
    echo __('Save and Exit');
    ?>
示例#14
0
	<div class="tabbable">
<?php 
$nav_tpl = '
			<li class="{CLASS}">
				<a href="#{ID}" data-toggle="tab">{TITLE}</a>
			</li>
		';
$content_tpl = '
			<div class="tab-pane {CLASS}" id="{ID}">{CONTENT}</div>
		';
$nav_list = $content_list = array();
$class = 'active';
foreach ($item['value'] as $_t => $_i) {
    $_id = md5($_i['name']);
    $nav_list[] = str_replace(array('{CLASS}', '{ID}', '{TITLE}'), array($class, $_id, __($_t)), $nav_tpl);
    $_content = View_Admin::factory('form/property/field', array('item' => $_i, 'title' => $_t));
    $content_list[] = str_replace(array('{CLASS}', '{ID}', '{CONTENT}'), array($class, $_id, $_content), $content_tpl);
    $class = '';
}
?>
	
		<ul class="nav nav-tabs"><?php 
echo implode('', $nav_list);
?>
</ul>
		<div class="tab-content"><?php 
echo implode('', $content_list);
?>
</div>
	</div>
示例#15
0
文件: field.php 项目: greor/satin-spb
<?php

defined('SYSPATH') or die('No direct access allowed.');
$field = "properties[{$item['name']}]";
$control_id = md5($field);
$labels = array($field => __('Value'));
switch ($item['type']) {
    case 'structure':
        echo View_Admin::factory('form/property/structure', array('item' => $item));
        break;
    case 'enum':
        echo View_Admin::factory('form/property/enum', array('item' => $item, 'field' => $field, 'control_id' => $control_id, 'labels' => $labels));
        break;
    case 'simple':
        echo View_Admin::factory('form/control', array('field' => $field, 'labels' => $labels, 'control_id' => $control_id, 'controls' => Form::input($field, $item['value'], array('id' => $control_id, 'class' => 'input-xxlarge', 'placeholder' => __($title)))));
        break;
    case 'text':
        $class = empty($item['params']['editor']) ? 'text-area-clear' : 'text_editor';
        echo View_Admin::factory('form/control', array('field' => $field, 'labels' => $labels, 'control_id' => $control_id, 'controls' => Form::textarea($field, $item['value'], array('id' => $control_id, 'class' => $class, 'placeholder' => __($title)))));
        break;
    case 'file':
        echo View_Admin::factory('form/property/file', array('field' => $field, 'labels' => $labels, 'control_id' => $control_id, 'value' => $item['value']));
        break;
}
示例#16
0
文件: list.php 项目: greor/satin-spb
<?php

defined('SYSPATH') or die('No direct access allowed.');
foreach ($properties as $_title => $_item) {
    echo '<fieldset>';
    echo '<legend>', Helper_Property::label($_item['name']), '</legend>';
    echo View_Admin::factory('form/property/field', array('item' => $_item, 'title' => $_title));
    echo '</fieldset>';
}
示例#17
0
				</td>
				<td>
<?php 
    echo View_Admin::factory('layout/list/image', array('field' => 'image_1', 'orm_helper' => $orm_helper, 'value' => $_orm->image_1));
    ?>
				
				</td>
				<td>
<?php 
    echo '<div class="btn-group">';
    echo View_Admin::factory('layout/controls/hide', array('orm' => $_orm, 'hided_list' => $hided_list, 'visibility_on_tpl' => $visibility_on_tpl, 'visibility_off_tpl' => $visibility_off_tpl));
    if ($ACL->is_allowed($USER, $_orm, 'edit')) {
        echo HTML::anchor(str_replace('{id}', $_orm->id, $edit_tpl), '<i class="icon-edit"></i> ' . __('Edit'), array('class' => 'btn', 'title' => __('Edit')));
        echo '<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>';
        echo '<ul class="dropdown-menu">';
        echo View_Admin::factory('layout/controls/position', array('orm' => $_orm, 'first_tpl' => $first_tpl, 'up_tpl' => $up_tpl, 'down_tpl' => $down_tpl, 'last_tpl' => $last_tpl));
        echo '<li>', HTML::anchor(str_replace('{id}', $_orm->id, $delete_tpl), '<i class="icon-remove"></i> ' . __('Delete'), array('class' => 'delete_button', 'title' => __('Delete'))), '</li>';
        echo '</ul>';
    } else {
        echo HTML::anchor(str_replace('{id}', $_orm->id, $view_tpl), '<i class="icon-file"></i> ' . __('View'), array('class' => 'btn', 'title' => __('View')));
    }
    echo '</div>';
    ?>
				
				</td>
			</tr>
<?php 
}
?>
		</tbody>
	</table>
示例#18
0
文件: enum.php 项目: greor/satin-spb
<?php

defined('SYSPATH') or die('No direct access allowed.');
if ($item['multiple'] == TRUE) {
    foreach ($item['set'] as $_conf) {
        $_key = $_conf['key'];
        $_field = "{$field}[{$_key}]";
        $_control_id = md5($_field);
        $_checked = FALSE;
        foreach ($item['value'] as $_val) {
            if ($_key == $_val['key']) {
                $_checked = TRUE;
                break;
            }
        }
        echo View_Admin::factory('form/control', array('field' => $_field, 'labels' => array($_field => $_conf['value']), 'control_id' => $_control_id, 'controls' => Form::hidden($_field, '') . Form::checkbox($_field, $_key, $_checked, array('id' => $_control_id))));
    }
} else {
    $_selected = reset($item['value']);
    $_field = "{$field}[]";
    $_control_id = md5($_field);
    foreach ($item['set'] as $_conf) {
        $options[$_conf['key']] = __($_conf['value']);
    }
    $script = $class = '';
    if ($icons = Arr::path($item, 'params.icons')) {
        $class = ' js-image-select';
        $script = '<script>var set_' . $_control_id . '=' . json_encode($icons) . '</script>';
    }
    echo View_Admin::factory('form/control', array('field' => $_field, 'labels' => array($_field => __('Value')), 'control_id' => $_control_id, 'controls' => Form::select($_field, array('' => '') + $options, $_selected['key'], array('id' => $_control_id, 'class' => 'input-xxlarge' . $class)) . $script));
}
示例#19
0
文件: date.php 项目: greor/satin-spb
if ($orm->loaded() and !empty($orm->{$field}) and $orm->{$field} !== '0000-00-00 00:00:00') {
    $date_ts = strtotime($orm->{$field});
    $_date = date('Y-m-d', $date_ts);
    $_time = date('H:i', $date_ts);
} elseif ($set_default) {
    $_date = date('Y-m-d');
    $_time = date('H:i');
} else {
    $_date = '';
    $_time = '';
}
$attr_ext = array();
if ($readonly) {
    $attr_ext['readonly'] = 'readonly';
}
echo View_Admin::factory('form/control', array('field' => $field, 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::input($controll_name_1, $_date, array('id' => $control_id, 'class' => 'input-small date_' . $uniqid) + $attr_ext) . Form::input($controll_name_2, $_time, array('class' => 'input-mini time_' . $uniqid) + $attr_ext)));
unset($controll_name_1);
unset($controll_name_2);
if (!$readonly) {
    ?>
	<script>
	$(document).ready(function(){
		$('.time_<?php 
    echo $uniqid;
    ?>
').timepicker({});
		$('.date_<?php 
    echo $uniqid;
    ?>
').datepicker({
			 changeYear: true,
示例#20
0
文件: index.php 项目: greor/satin-spb
echo Form::input('file', '', array('id' => 'file', 'class' => 'input-xlarge'));
?>
				
					<button id="js-load-file" type="button" class="btn">Загрузить</button>&nbsp;&nbsp;<i id="js-loaded-status" class="icon-ok"></i>
				</div>
			</div>
			<div id="js-info-holder"></div>
			<div class="ajax-bg"></div>
		</div>
		
		<div id="js-status" class="alert">Импорт успешно завершен!</div>
	
		<div class="progress progress-striped active">
			<div id="js-bar" class="bar" style="width: 0%;"></div>
		</div>
	
		<div id="js-log" class="panel panel-default panel-log">
			<div class="panel-body text-left"></div>
		</div>
	
		<div class="form-actions">
			<button id="js-button" class="btn btn-primary has-spinner" type="button" name="submit" value="save" ><?php 
echo __('Next step');
?>
</button>
		</div>
	</form>
	
<?php 
echo View_Admin::factory('import/script', array('size_options' => $size_options));
示例#21
0
    if ((bool) $_orm->active) {
        echo '<i class="icon-eye-open"></i>&nbsp;';
    } else {
        echo '<i class="icon-eye-open" style="background: none;"></i>&nbsp;';
    }
    echo HTML::chars($_orm->title);
    ?>
				</td>
				<td><?php 
    echo $_orm->public_date;
    ?>
</td>
				<td>
<?php 
    echo '<div class="btn-group">';
    echo View_Admin::factory('layout/controls/hide', array('orm' => $_orm, 'hided_list' => $hided_list, 'visibility_on_tpl' => $visibility_on_tpl, 'visibility_off_tpl' => $visibility_off_tpl));
    if ($ACL->is_allowed($USER, $_orm, 'edit')) {
        echo HTML::anchor(str_replace('{id}', $_orm->id, $edit_tpl), '<i class="icon-edit"></i> ' . __('Edit'), array('class' => 'btn', 'title' => __('Edit')));
        echo '<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>';
        echo '<ul class="dropdown-menu">';
        echo '<li>', HTML::anchor(str_replace('{id}', $_orm->id, $delete_tpl), '<i class="icon-remove"></i> ' . __('Delete'), array('class' => 'delete_button', 'title' => __('Delete'))), '</li>';
        echo '</ul>';
    } else {
        echo HTML::anchor(str_replace('{id}', $_orm->id, $view_tpl), '<i class="icon-file"></i> ' . __('View'), array('class' => 'btn', 'title' => __('View')));
    }
    echo '</div>';
    ?>
				
				</td>
			</tr>
<?php 
示例#22
0
<body>
	<div class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
<?php 
echo HTML::anchor(URL::site(), $SITE['name'], array('class' => 'brand'));
?>
				<div class="nav-collapse collapse">
<?php 
echo View_Admin::factory('layout/menu/top', array('menu' => $menu));
echo View_Admin::factory('layout/site_switcher');
?>
				
				</div>
			</div>
		</div>
	</div>
	<div class="container container-main">
		<div class="row">
			<div class="span3 aside">
<?php 
echo $aside;
?>
			</div>
			<div id="main" class="span9 container-inner">
				<div class="page-header">
示例#23
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
echo View_Admin::factory('layout/breadcrumbs', array('breadcrumbs' => $breadcrumbs));
$orm = $helper_orm->orm();
$labels = $orm->labels();
$required = $orm->required_fields();
?>
	<form method="post" action="#" class="form-horizontal" >	
<?php 
/**** owner_id ****/
echo View_Admin::factory('form/control', array('field' => 'owner_id', 'labels' => $labels, 'required' => $required, 'controls' => Form::input('owner_id', $album['title'], array('id' => 'owner_id_field', 'class' => 'input-xxlarge', 'readonly' => 'readonly'))));
/**** title ****/
echo View_Admin::factory('form/control', array('field' => 'title', 'labels' => $labels, 'required' => $required, 'controls' => Form::input('title', $orm->title, array('id' => 'title_field', 'class' => 'input-xxlarge', 'readonly' => 'readonly'))));
/**** image ****/
echo View_Admin::factory('form/image', array('field' => 'image', 'value' => $orm->image, 'orm_helper' => $helper_orm, 'labels' => $labels, 'required' => $required, 'image_only' => TRUE));
/**** text ****/
$text = empty($orm->text) ? '<span class="plaintext">' . __('no text') . '<span>' : $orm->text;
echo View_Admin::factory('form/control', array('field' => 'text', 'labels' => $labels, 'required' => $required, 'controls' => $text));
echo View_Admin::factory('form/back_button', array('link' => $BACK_URL));
?>
	</form>
示例#24
0
文件: list.php 项目: greor/satin-spb
<?php

defined('SYSPATH') or die('No direct access allowed.');
echo View_Admin::factory('layout/breadcrumbs', array('breadcrumbs' => $breadcrumbs));
if (Request::current()->is_initial()) {
    echo View_Admin::factory('layout/select', array('options' => $OWNER_LIST, 'selected' => $OWNER, 'name' => 'owner'));
}
if ($list->count() <= 0) {
    return;
}
$query_array = array('owner' => $OWNER);
if (!empty($BACK_URL)) {
    $query_array['back_url'] = $BACK_URL;
}
$query_array = Paginator::query(Request::current(), $query_array);
$edit_tpl = Route::url('admin', array('controller' => $CONTROLLER_NAME['structure'], 'action' => 'edit', 'id' => '{id}', 'query' => Helper_Page::make_query_string($query_array)));
$delete_tpl = Route::url('admin', array('controller' => $CONTROLLER_NAME['structure'], 'action' => 'delete', 'id' => '{id}', 'query' => Helper_Page::make_query_string($query_array)));
?>
	<table class="table table-bordered table-striped">
		<colgroup>
			<col class="span1">
			<col class="span4">
			<col class="span1">
			<col class="span1">
			<col class="span2">
		</colgroup>
		<thead>
			<tr>
				<th><?php 
echo __('ID');
?>
示例#25
0
<?php 
echo View_Admin::factory('modules/blog/element/tab/main', array('helper_orm' => $helper_orm, 'errors' => $errors, 'blogs_list' => $blogs_list, 'preview_link' => $preview_link));
?>
				</div>
				<div class="tab-pane kr-tab-pane" id="tab-description">
<?php 
echo View_Admin::factory('modules/blog/element/tab/description', array('helper_orm' => $helper_orm, 'errors' => $errors));
?>
				</div>
<?php 
if (!empty($properties)) {
    ?>
				
					<div class="tab-pane kr-tab-pane" id="tab-properties">
<?php 
    echo View_Admin::factory('form/property/list', array('properties' => $properties));
    ?>
					</div>
<?php 
}
?>
					
				<!-- #tab-pane-insert# -->
			</div>
		</div>
<?php 
echo View_Admin::factory('form/submit_buttons');
?>
	
	</form>
示例#26
0
				
				</td>
			</tr>
<?php 
}
?>
		</tbody>
<?php 
if ($acl_album_can_edit and $is_initial_request) {
    echo View_Admin::factory('modules/photo/element/group/form');
}
?>
	</table>
<?php 
if ($acl_album_can_edit and $is_initial_request) {
    echo View_Admin::factory('modules/photo/element/group/script');
}
if (empty($BACK_URL)) {
    $query_array = array('group' => $GROUP_KEY, 'album' => $ALBUM_ID);
    $filter_query = Request::current()->query('filter');
    if (!empty($filter_query)) {
        $query_array['filter'] = $filter_query;
    }
    if (!empty($BACK_URL)) {
        $query_array['back_url'] = $BACK_URL;
    }
    $link = Route::url('modules', array('controller' => $CONTROLLER_NAME['element'], 'query' => Helper_Page::make_query_string($query_array)));
} else {
    $link = $BACK_URL;
}
echo $paginator->render($link);
示例#27
0
<?php

defined('SYSPATH') or die('No direct access allowed.');
$orm = $helper_orm->orm();
$labels = $orm->labels();
$required = $orm->required_fields();
/**** description ****/
echo View_Admin::factory('form/control', array('field' => 'description', 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls' => Form::textarea('description', $orm->description, array('id' => 'description_field', 'class' => 'text_editor'))));
示例#28
0
文件: song.php 项目: greor/satin-spb
<?php

defined('SYSPATH') or die('No direct access allowed.');
$required = empty($required) ? array() : $required;
$errors = empty($errors) ? array() : $errors;
$controls = Form::hidden($field, $value, array('id' => 'song_id_hidden'));
$controls .= '<div class="input-append input-song">' . Form::input('disabled_field[song_name]', $song_name, array('class' => 'input-xlarge', 'readonly' => 'readonly', 'id' => 'song_id_name'));
$controls .= HTML::anchor('#', __('Edit'), array('class' => 'btn js-action-edit', 'data-source' => $singers_list_link)) . '</div>';
echo View_Admin::factory('form/control', array('field' => $field, 'errors' => $errors, 'labels' => $labels, 'required' => $required, 'controls_class' => 'song-controls', 'controls' => $controls));
echo View_Admin::factory('form/song/modal');
?>
	<script type="text/javascript" src="<?php 
echo $ASSETS;
?>
vendor/dynatable-0.3.1/jquery.dynatable.js"></script>
	<script type="text/javascript" src="<?php 
echo $ASSETS;
?>
js/songs.js"></script>