update: admin/controller/extension/module/retailcrm.php

update:      admin/view/template/extension/module/retailcrm.tpl
	update:      system/cron/export.php
This commit is contained in:
Dmitry Akolzin 2017-04-07 11:58:04 +03:00
parent eb1d80304e
commit 25158bc2c2
3 changed files with 10 additions and 1 deletions

View File

@ -242,6 +242,12 @@ class ControllerExtensionModuleRetailcrm extends Controller
$_data['catalog'] = $this->request->server['HTTPS'] ? HTTPS_CATALOG : HTTP_CATALOG; $_data['catalog'] = $this->request->server['HTTPS'] ? HTTPS_CATALOG : HTTP_CATALOG;
$_data['token'] = $this->request->get['token']; $_data['token'] = $this->request->get['token'];
if(file_exists(DIR_SYSTEM . '/cron/export_done.txt')) {
$_data['export_file'] = false;
} else {
$_data['export_file'] = true;
}
$this->response->setOutput( $this->response->setOutput(
$this->load->view('extension/module/retailcrm.tpl', $_data) $this->load->view('extension/module/retailcrm.tpl', $_data)
); );

View File

@ -5,8 +5,10 @@
<div class="page-header"> <div class="page-header">
<div class="container-fluid"> <div class="container-fluid">
<div class="pull-right"> <div class="pull-right">
<?php if ($export_file) : ?>
<button type="button" id="export" data-toggle="tooltip" title="Выгрузить клиентов и заказы" class="btn btn-success"><i class="fa fa-download"></i></button>
<?php endif; ?>
<button type="button" id="icml" data-toggle="tooltip" title="<?php echo $text_button_catalog; ?>" class="btn btn-success"><i class="fa fa-file-text-o"></i></button> <button type="button" id="icml" data-toggle="tooltip" title="<?php echo $text_button_catalog; ?>" class="btn btn-success"><i class="fa fa-file-text-o"></i></button>
<button type="button" id="export" data-toggle="tooltip" title="<?php echo $text_button_export; ?>" class="btn btn-success"><i class="fa fa-download"></i></button>
<button type="submit" form="form-retailcrm" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button> <button type="submit" form="form-retailcrm" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a></div> <a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1><?php echo $heading_title; ?></h1> <h1><?php echo $heading_title; ?></h1>

View File

@ -1,3 +1,4 @@
<?php <?php
$cli_action = 'extension/module/retailcrm/export'; $cli_action = 'extension/module/retailcrm/export';
require_once('dispatch.php'); require_once('dispatch.php');
$file = fopen(DIR_SYSTEM . '/cron/export_done.txt', "x");