<?php
$this->pageTitle = Yii::app()->name . ' - ' . IecsvModule::t('Import / Export');

$this->breadcrumbs = array(
    tt('Import / Export'),
);

$this->adminTitle = tt('Import / Export');

?>

<?php
$info = "
<div class='flash-notice'>
	<p>
		<strong>" . tt('Export') . "</strong>
	</p>
	<p>
		<strong>" . tt('You can export your listings into a .csv file. Exported fields are listed below.') . "</strong>
	</p>
	<p>
		" . tt('Fields_import_export') . "
	</p>
	<p>
		" . tt('2 variants of listings export are available.') . "
	</p>
	<p>
		" . tt('prices_from_season_module.') . "
	</p>
</div>
";
/* Yii::app()->user->setFlash(
  'info', $info
  ); */
echo $info;

?>

<div class="">
    <?php
    /* $this->widget('bootstrap.widgets.TbButton',
      array('buttonType' => 'button',
      'type' => 'info',
      'icon' => 'ok white',
      'label' => tt('Export'),
      'htmlOptions' => array(
      'onclick' => 'location.href="' . Yii::app()->baseUrl . '/iecsv/backend/main/viewExport";',
      )
      )); */
    echo AdminLteHelper::getLink(tt('Export'), array('/iecsv/backend/main/viewExport'), 'fa fa-cloud-upload', array('class' => 'btn btn-primary'));

    ?>
    &nbsp;
    <?php
    /* $this->widget('bootstrap.widgets.TbButton',
      array('buttonType' => 'button',
      'type' => 'success',
      'icon' => 'ok white',
      'label' => tt('Import'),
      'htmlOptions' => array(
      'onclick' => 'location.href="' . Yii::app()->baseUrl . '/iecsv/backend/main/viewImport";',
      )
      )); */
    echo AdminLteHelper::getLink(tt('Import'), array('/iecsv/backend/main/viewImport'), 'fa fa-cloud-download', array('class' => 'btn btn-success'));

    ?>
</div>

<br/>
<div class="">
    <?php
    $content = '';
    if (file_exists(Yii::getPathOfAlias('application.modules.iecsv') . DIRECTORY_SEPARATOR . 'manual_en.php')) {
        $content = file_get_contents(Yii::getPathOfAlias('application.modules.iecsv') . DIRECTORY_SEPARATOR . 'manual_en.php');
    }
    if (Yii::app()->language == 'ru' && file_exists(Yii::getPathOfAlias('application.modules.iecsv') . DIRECTORY_SEPARATOR . 'manual_ru.php')) {
        $content = file_get_contents(Yii::getPathOfAlias('application.modules.iecsv') . DIRECTORY_SEPARATOR . 'manual_ru.php');
    }
    ?>
    <div class="box box-default collapsed-box">
        <div class="box-header with-border">
            <h3 class="box-title"><a href="javascript: void(0)"
                                     data-widget="collapse"><?php echo tt('Help / Documentation of use this option'); ?></a>
            </h3>

            <div class="box-tools pull-right">
                <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
                </button>
            </div>
        </div>
        <div class="box-body">
            <?php echo $content; ?>
        </div>
    </div>
</div>