示例#1
0
					<?php 
echo HTML::anchor(Route::url('b_shop', ['controller' => 'customers', 'action' => 'edit', 'id' => $obj->id]), 'Редактировать профиль');
?>
				</td>
			</tr-->
		</table>

	</div>
	<div class="span8">

		<h3>Заказы клиента</h3>
		<?php 
// Create table body
$table_body = [];
foreach ($orders as $o) {
    $table_body[] = [$o->id, HTML::anchor(Route::url('b_shop', ['controller' => 'orders', 'action' => 'edit', 'id' => $o->id]), '№' . $o->number, ['data-toggle' => 'tooltip', 'data-original-title' => 'Редактировать заказ']), Format::price($o->total), Date::format($o->created, Date::FULL), $o->status->get_title(), TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]) . TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $o->id])];
}
// Create table
echo TB_Table::open();
echo TB_Table::colgroup([50, 100, 0, 0, 0]);
echo TB_Table::headers_sorter(['id' => ['string', __('#ID')], 'number' => ['string', __('Номер')], 'total' => ['string', __('Сумма')], 'created' => ['string', __('Дата заказа')], '_status' => ['none', __('Статус')], '_action' => ['none', __('settings.actions')]]);
echo TB_Table::body($table_body);
echo TB_Table::close();
?>

		<span class="badge badge-info">
			Заказов: <?php 
echo $total_items;
?>
		</span>
		<br>
示例#2
0
            ?>
						<span class="text-muted"><i class="fa fa-lg fa-fw"></i></span>
					<?php 
        }
        ?>

					<?php 
        echo TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]);
        ?>

					<?php 
        echo TB::act('f_products', ['slug' => $o->slug]);
        ?>

					<?php 
        echo TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $o->id], __('shop.category_confirm_delete'));
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
	</table>

	<?php 
    echo $pag;
    ?>

	<p><span class="badge"><?php 
    echo __('shop.category_total') . ': ' . $total_items;
    ?>
示例#3
0
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
     <!-- jQuery -->
    <script src="<?php 
echo base_url();
?>
assets/js/jquery.js"></script>
   
    <!-- Bootstrap Core JavaScript -->
    <script src="<?php 
echo base_url();
?>
assets/js/bootstrap.min.js"></script>
    <?php 
echo Tb::modal(array('id' => 'modal_confirm', 'header' => 'Delete', 'body' => '<strong>Apakah Anda yakin ingin menghapus user ini?</strong>', 'footer' => array(Tb::button('Ya', array('onclick' => "deleted('user')", 'color' => Tb::BUTTON_COLOR_WARNING)), TB::button('Tidak', array('data-dismiss' => 'modal')))));
?>
    <script type="text/javascript" src="<?php 
echo base_url() . 'ajax/general.js';
?>
"></script>
</head>

<body>
    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <!-- Brand and toggle get grouped for better mobile display -->
            <?php 
$this->load->view("admin/templates/header");
示例#4
0
    <link href="<?php 
echo base_url();
?>
assets/css/font-awesome.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
   <?php 
echo Tb::modal(array('id' => 'modal_confirm', 'header' => 'Delete', 'body' => '<strong>Apakah Anda yakin ingin menghapus video ini?</strong>', 'footer' => array(Tb::button('Ya', array('onclick' => "deleted('video')", 'color' => Tb::BUTTON_COLOR_WARNING)), TB::button('Tidak', array('data-dismiss' => 'modal')))));
?>
    <?php 
echo Tb::modal(array('id' => 'modal_approve', 'header' => 'Approve', 'body' => '<strong>Apakah Anda yakin ingin meng-approve video ini?</strong>', 'footer' => array(Tb::button('Ya', array('onclick' => "approve('video')", 'color' => Tb::BUTTON_COLOR_WARNING)), TB::button('Tidak', array('data-dismiss' => 'modal')))));
?>
    <script type="text/javascript" src="<?php 
echo base_url() . 'ajax/general.js';
?>
"></script>

</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <!-- Brand and toggle get grouped for better mobile display -->
示例#5
0
            ?>
					<?php 
        } else {
            ?>
						<span class="text-muted"><i class="fa fa-lg fa-fw"></i></span>
					<?php 
        }
        ?>
					<?php 
        echo TB::act($request->routename, ['action' => 'edit', 'id' => $o->id]);
        ?>
					<?php 
        echo TB::act('f_static', ['slug' => $o->slug]);
        ?>
					<?php 
        echo TB::act($request->routename, ['action' => 'delete', 'id' => $o->id], __('static.confirm_delete'));
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
	</table>

	<?php 
    echo $pag;
    ?>

	<p><span class="badge"><?php 
    echo __('static.total_pages') . ': ' . $total_items;
    ?>
示例#6
0
defined('SYSPATH') or die('No direct script access.');
?>


<label class="col-sm-1 control-label"><?php 
echo __('shop.product');
?>
:</label>
<label class="col-sm-11 control-label"><?php 
echo $o_product->title;
?>
</label>

<?php 
echo TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o_product->id]) => __('shop.product_edit')]);
?>

<?php 
if (count($o_images) > 0) {
    ?>

<p class="comments">Drag & drop images to change the order:</p>	

<ul id="sortable_images" class="ui-sortable list-group pull-left">
	<?php 
    foreach ($o_images as $o) {
        ?>
		<li class="ui-state-default list-group-item" id="image_<?php 
        echo $o->id;
        ?>
示例#7
0
</td>
				<td style="white-space: nowrap"><?php 
        echo Model_Shop_Product::get_status_title($o->status);
        ?>
</td>
				<td><?php 
        echo TB::change('enabled', $o->id, $o->enabled, ['module' => $module]);
        ?>
</td>
				<td class="icon_actions">
					<?php 
        echo TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]);
        ?>

					<?php 
        echo TB::act($request->routename, ['controller' => $request->controller, 'action' => 'undelete', 'id' => $o->id], __('shop.product_confirm_undelete'));
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
	</table>

	<?php 
    echo $pag;
    ?>

	<p><span class="badge"><?php 
    echo __('shop.product_total') . ': ' . $total_items;
    ?>
示例#8
0
<?php

defined('SYSPATH') or die('No direct script access.');
if ($pg->total_items > 0) {
    // Create table body
    $table_body = [];
    foreach ($obj as $o) {
        $table_body[] = [HTML::anchor(Route::url('b_shop', ['controller' => 'customers', 'action' => 'view', 'id' => $o->id]), $o->fio, ['data-toggle' => 'tooltip', 'data-original-title' => 'Редактировать профиль']), Format::mobile($o->phone), $o->email, HTML::anchor(Route::url('b_shop', ['controller' => 'customers', 'action' => 'view', 'id' => $o->id]), '<span class="badge badge-info"> ' . $o->orders->count_all() . '&nbsp;&nbsp;' . '<i class="icon icon-eye-open"></i>' . '</span>', ['data-toggle' => 'tooltip', 'data-original-title' => 'Профиль и заказы клиента']), Format::price(Model_Shop_Customer::total($o->id)), TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]) . TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $o->id])];
    }
    // Create table
    echo TB_Table::open();
    echo TB_Table::colgroup([0, 0, 0, 0, 0, 0]);
    echo TB_Table::headers_sorter(['fio' => ['string', __('Клиент')], 'phone' => ['string', __('Телефон')], 'email' => ['string', __('Email')], '_orders' => ['none', __('Заказы')], '_total' => ['none', __('На сумму')], '_action' => ['none', __('settings.actions')]]);
    echo TB_Table::body($table_body);
    echo TB_Table::close();
    echo '<span class="badge badge-info">Всего клиентов: ' . $pg->total_items . '</span>';
    echo $pg;
} else {
    ?>

	<div class="alert alert-block alert-info">
		<button type="button" class="close" data-dismiss="alert">&times;</button>
		Клиентов нет.
	</div>

<?php 
}
示例#9
0
文件: TB.php 项目: eok8177/shopCMS
 /**
  * Anchors of actions in list table
  *
  * @param string $name route name
  * @param array $params route url params
  * @param string $title title for display
  *
  * @return string
  */
 public static function act($name, array $params, $title = '')
 {
     if (Arr::get($params, 'action') == 'add') {
         return HTML::anchor(Route::url($name, $params), '<i class="fa fa-plus fa-lg fa-fw"></i>', ['data-toggle' => 'tooltip', 'title' => $title ? $title : __('settings.act_add')]);
     } elseif (Arr::get($params, 'action') == 'edit') {
         return HTML::anchor(Route::url($name, $params), $title ? $title : '<i class="fa fa-pencil fa-lg fa-fw"></i>', ['data-toggle' => 'tooltip', 'title' => __('settings.act_edit')]);
     } elseif (Arr::get($params, 'action') == 'filter') {
         return HTML::anchor(Route::url($name, $params), $title, ['data-toggle' => 'tooltip', 'title' => __('settings.act_filter')]);
     } elseif (Arr::get($params, 'action') == 'delete') {
         $title = $title ? $title : __('settings.act_delete');
         if (self::$is_running_delete === false) {
             Assets::instance()->add_inlineJS("\n\t\t\t\t\t\$('.delete').click(function(e){\n\t\t\t\t\t\tif ( ! confirm('{$title}')) { return false; }\n\t\t\t\t\t});\n\t\t\t\t");
             self::$is_running_delete = true;
         }
         return HTML::anchor(Route::url($name, $params), '<i class="fa fa-trash-o fa-lg fa-fw text-danger"></i>', ['class' => 'delete', 'data-toggle' => 'tooltip', 'title' => __('settings.act_delete')]);
     } elseif (Arr::get($params, 'action') == 'undelete') {
         $title = $title ? $title : __('settings.act_delete');
         if (self::$is_running_delete === false) {
             Assets::instance()->add_inlineJS("\n\t\t\t\t\t\$('.delete').click(function(e){\n\t\t\t\t\t\tif ( ! confirm('{$title}')) { return false; }\n\t\t\t\t\t});\n\t\t\t\t");
             self::$is_running_delete = true;
         }
         return HTML::anchor(Route::url($name, $params), '<i class="fa fa-arrow-up fa-lg fa-fw text-success"></i>', ['class' => 'delete', 'data-toggle' => 'tooltip', 'title' => __('settings.act_undelete')]);
     } elseif (Arr::get($params, 'slug')) {
         return HTML::anchor(Route::url($name, $params), $title ? $title : '<i class="fa fa-eye fa-fw"></i>', ['target' => '_blank', 'data-toggle' => 'tooltip', 'title' => __('settings.act_view_link')]);
     }
     return '';
 }
示例#10
0
文件: Table.php 项目: eok8177/shopCMS
 /**
  * Wrap a supplementary column in a column if it isn't
  *
  * @param string $name  The column's name
  * @param string $value Its value
  *
  * @return string A <td> tag
  */
 private static function appendColumn($name, $value)
 {
     return TB::starts_with($value, '<td') ? $value : '<td class="column-' . $name . '">' . $value . '</td>';
 }
示例#11
0
?>
							<?php 
echo __('shop.product_enabled');
?>
						</label>
					</div>
				</div>
			</div>


			<?php 
echo View::factory('backend/v_fileuploads', ['config_img' => 'product_images', 'module' => 'shop', 'controller' => 'product', 'obj' => ['id' => $obj->id, 'is_edit' => TRUE], 'actions' => ['upload' => 'image_mupload', 'delete' => 'image_mdelete', 'rotate' => 'image_mrotate', 'crop' => 'image_crop']]);
?>

			<?php 
echo count($obj->images->find_all()) > 1 ? '<div class="col-sm-10 col-xs-12 pull-right">' . TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'order', 'id' => $obj->id]) => __('shop.order_images')]) . '</div>' : '';
?>

		</div>
		<div class="tab-pane fade" id="tab_seo">

			<?php 
echo View::factory('backend/v_seo', ['s' => [$obj->slug, __('shop.product_slug_h')], 't' => [$obj->meta_t, __('shop.product_meta_t_h')], 'd' => [$obj->meta_d, __('shop.product_meta_d_h')], 'k' => [$obj->meta_k, __('shop.product_meta_k_h')]])->bind('errors', $errors);
?>

		</div>
	</div>

<?php 
echo TB_Form::btns_save();
?>
示例#12
0
<?php

defined('SYSPATH') or die('No direct script access.');
if ($total_items > 0) {
    $table_body = [];
    foreach ($obj as $o) {
        $table_body[] = [HTML::anchor('http://novaposhta.ua/office/list?city=' . $o->DescriptionRu, $o->DescriptionRu, ['target' => '_blank', 'data-toggle' => 'tooltip', 'data-original-title' => 'Отделения в населенном пункте'])];
    }
    echo '<div class="btns-top">';
    // echo TB_Button::link(ADMIN . '/novaposhta/npupdate', ' Обновить базу для Новой Почты', ['class' => 'btn-small'])->with_icon('refresh');
    echo TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'npupdate']) => __('shop.novaposhta_update')]);
    echo '</div>';
    // Create table
    echo TB_Table::open();
    echo TB_Table::headers_sorter(['title' => ['string', __('Населенный пункт')]]);
    echo TB_Table::body($table_body);
    echo TB_Table::close();
    echo '<span class="badge badge-info">Всего населенных пунктов: ' . $total_items . '</span>';
    if (isset($pg)) {
        echo $pg;
    }
}
示例#13
0
</td>
				<td><?php 
        echo $order->status->get_title();
        ?>
</td>
				<td>
					<?php 
        echo HTML::anchor(Route::url('b_shop', ['controller' => 'customers', 'action' => 'view', 'id' => $order->customer->id]), $order->customer->fio, ['data-toggle' => 'tooltip', 'data-original-title' => 'Профиль и заказы клиента']);
        ?>
				</td>
				<td><?php 
        echo Format::mobile($order->customer->phone);
        ?>
</td>
				<td><?php 
        echo TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $order->id]) . TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $order->id]);
        ?>
</td>
			</tr>
		<?php 
    }
    ?>
	</table>

<?php 
} else {
    ?>

	<div class="alert alert-block alert-info">
		<button type="button" class="close" data-dismiss="alert">&times;</button>
		Заказов нет.
示例#14
0
</td>
				<td><?php 
        echo TB::change('enabled', $o->id, $o->enabled, ['module' => $module]);
        ?>
</td>
				<td class="icon_actions">
					<?php 
        echo TB::act($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o->id]);
        ?>

					<?php 
        echo TB::act('f_publication', ['slug' => $o->slug]);
        ?>

					<?php 
        echo TB::act($request->routename, ['controller' => $request->controller, 'action' => 'delete', 'id' => $o->id], __('publications.page_confirm_delete'));
        ?>
				</td>
			</tr>
		<?php 
    }
    ?>
	</table>

	<?php 
    echo $pag;
    ?>

	<p><span class="badge"><?php 
    echo __('publications.page_total') . ': ' . $total_items;
    ?>