summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/admin/konfiguration.phtml54
-rw-r--r--views/css/admin.css1
-rw-r--r--views/mods/mod_export/product_index_tab.phtml57
-rw-r--r--views/mods/mod_export/profil.phtml45
-rw-r--r--views/mods/mod_export/profillist.phtml11
-rw-r--r--views/mods/mod_export/settings_edit.phtml15
-rw-r--r--views/order/index.phtml15
-rw-r--r--views/produkt/index.phtml18
8 files changed, 141 insertions, 75 deletions
diff --git a/views/admin/konfiguration.phtml b/views/admin/konfiguration.phtml
index 02fd09b..518d2a7 100644
--- a/views/admin/konfiguration.phtml
+++ b/views/admin/konfiguration.phtml
@@ -23,59 +23,7 @@
<div class="panel-heading clearfix">
<h3 class="panel-title"><?php echo __('Allgemeine Einstellungen', 'wpsg'); ?></h3>
</div>
- <div class="panel-body">
- <?php if ($this->hasMod('wpsg_mod_core')) { ?>
-
- <?php if ($this->arLizenz['l'] == 0) { ?>
- <?php
-
- if ($this->getDemoDays() < 0)
- {
- $strText = wpsg_translate(__('Vor #1# Tage(n) abgelaufen.', 'wpsg'), abs($this->getDemoDays()));
-
- } else {
-
- $strText = wpsg_translate(__('#1# Tage verbleibend.', 'wpsg'), $this->getDemoDays());
-
- }
-
- echo wpsg_drawForm_Text(__('Lizenzende', 'wpsg'), $strText, '', array('help' => 'DemoMode'));
-
- ?>
-
- <?php } else { ?>
-
- <?php
-
- $strText = '';
- switch ($this->arLizenz['l'])
- {
-
- case '1': $strText = __('Light Version', 'wpsg'); break;
- case '2': $strText = __('Pro Version', 'wpsg'); break;
- case '3': $strText = __('Enterprise Version', 'wpsg'); break;
- default: die();
-
- }
-
- echo wpsg_drawForm_Text(__('Lizenzstatus', 'wpsg'), $strText);
-
- ?>
- <?php } ?>
- <?php } else { ?>
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">&nbsp;</div>
- <div class="wpsg_form_right">
- <?php echo wpsg_translate(
- __('<span style="color:red; font-weight:bold;">Weitere Funktionen in der Vollversion.</span><br />[ <a target="_blank" href="#1#">Vollversion kaufen</a> ] [ <a target="_blank" href="#2#">Weitere Infos</a> ]', 'wpsg'),
- 'http://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/',
- 'http://wpshopgermany.de/'
- ); ?>
- </div>
- <div class="wpsg_clear"></div>
- </div>
- <?php } ?>
-
+ <div class="panel-body">
<?php if ($this->get_option("wpsg_version_installed", true) != WPSG_VERSION) { ?>
<div class="wpsg_form_field">
<div class="wpsg_form_left">
diff --git a/views/css/admin.css b/views/css/admin.css
index 2598235..1265c70 100644
--- a/views/css/admin.css
+++ b/views/css/admin.css
@@ -11,6 +11,7 @@
#wpsg-bs nav.navbar li { margin-bottom:0px; }
#wpsg-bs nav.navbar .active { margin-right:2px; }
#wpsg-bs nav.navbar .glyphicon { margin-right:10px; }
+#wpsg-bs .wpsg-export,
#wpsg-bs .wpsg-filter-tab,
#wpsg-bs .wpsg-filter { border-top:1px solid #E0E0E0; padding:15px; }
#wpsg-bs .pagination_wrap { text-align:right; padding-right:20px; }
diff --git a/views/mods/mod_export/product_index_tab.phtml b/views/mods/mod_export/product_index_tab.phtml
new file mode 100644
index 0000000..493198d
--- /dev/null
+++ b/views/mods/mod_export/product_index_tab.phtml
@@ -0,0 +1,57 @@
+<?php
+
+ /**
+ * Template für die Integration der Profilauswahl in die Produktverwaltung (Übersicht)
+ */
+
+ $arProfile = $this->callMod('wpsg_mod_export', 'getProfile', array(wpsg_mod_export::TYPE_PRODUCT));
+
+?>
+
+<?php if (wpsg_isSizedArray($arProfile)) { ?>
+<div class="wpsg-export container-fluid form-horizontal" style="display:none;">
+
+ <form class="container-fluid form-horizontal" target="_blank" method="post" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=handleExport&noheader=1" onsubmit="wpsg_mod_export_serializefilter();">
+
+ <div class="row">
+ <div class="col-lg-4">
+
+ <?php foreach ($arProfile as $p) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_export_profile[]', $p['name'], false, array('value' => $p['id'], 'noHidden' => true)); ?>
+ <?php } ?>
+
+ <br /><?php echo wpsg_drawForm_SubmitButton(__('Export starten')); ?>
+
+ </div>
+ </div>
+
+ <input type="hidden" name="filter" id="wpsg_mod_export_filter" value="" />
+
+</form>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_export_serializefilter()
+ {
+
+ jQuery('#wpsg_mod_export_filter').val(jQuery('#filter_form').serialize());
+
+ }
+
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg_showhide_export').off('click').on('click', function() {
+
+ jQuery(this).toggleClass('active');
+ jQuery('.wpsg-export').toggle(250);
+
+ return false;
+
+ } );
+
+ } );
+
+/* ]]> */</script>
+<?php } ?> \ No newline at end of file
diff --git a/views/mods/mod_export/profil.phtml b/views/mods/mod_export/profil.phtml
index b0375ec..b703055 100644
--- a/views/mods/mod_export/profil.phtml
+++ b/views/mods/mod_export/profil.phtml
@@ -38,8 +38,12 @@
<div class="wpsg_mod_export_format wpsg_mod_export_format_<?php echo wpsg_mod_export::FORMAT_XML; ?>" style="display:<?php echo (($this->view['profil']['format'] == wpsg_mod_export::FORMAT_XML)?'block':'none'); ?>;">
<?php echo wpsg_drawForm_Text('Root-Tagname', $this->view['profil']['xml_roottag'], 'xml_roottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
- <?php echo wpsg_drawForm_Text('Bestellung-Tagname', $this->view['profil']['xml_ordertag'], 'xml_ordertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
- <?php echo wpsg_drawForm_Text('Produkt-Root-Tagname', $this->view['profil']['xml_productroottag'], 'xml_productroottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+
+ <?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
+ <?php echo wpsg_drawForm_Text('Bestellung-Tagname', $this->view['profil']['xml_ordertag'], 'xml_ordertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php echo wpsg_drawForm_Text('Produkt-Root-Tagname', $this->view['profil']['xml_productroottag'], 'xml_productroottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ <?php } ?>
+
<?php echo wpsg_drawForm_Text('Produkt-Tagname', $this->view['profil']['xml_producttag'], 'xml_producttag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
</div>
@@ -49,12 +53,16 @@
</div>
<br />
-
- <?php echo wpsg_drawForm_Checkbox('order_onetime', __('Bestellungen nur einmalig exportieren', 'wpsg'), $this->view['profil']['order_onetime'], array('label' => __('Optionen', 'wpsg'), 'inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
- <div class="wpsg_mod_export_format wpsg_mod_export_format_<?php echo wpsg_mod_export::FORMAT_CSV; ?>" style="display:<?php echo (($this->view['profil']['format'] == wpsg_mod_export::FORMAT_CSV)?'block':'none'); ?>">
- <?php echo wpsg_drawForm_Checkbox('order_online', __('Eine Zeile pro Bestellung', 'wpsg'), $this->view['profil']['order_online'], array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
- </div>
+ <?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
+
+ <?php echo wpsg_drawForm_Checkbox('order_onetime', __('Bestellungen nur einmalig exportieren', 'wpsg'), $this->view['profil']['order_onetime'], array('label' => __('Optionen', 'wpsg'), 'inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+
+ <div class="wpsg_mod_export_format wpsg_mod_export_format_<?php echo wpsg_mod_export::FORMAT_CSV; ?>" style="display:<?php echo (($this->view['profil']['format'] == wpsg_mod_export::FORMAT_CSV)?'block':'none'); ?>">
+ <?php echo wpsg_drawForm_Checkbox('order_online', __('Eine Zeile pro Bestellung', 'wpsg'), $this->view['profil']['order_online'], array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+ </div>
+
+ <?php } ?>
<div class="wpsg_mod_export_format wpsg_mod_export_format_<?php echo wpsg_mod_export::FORMAT_CSV; ?>" style="display:<?php echo (($this->view['profil']['format'] == wpsg_mod_export::FORMAT_CSV)?'block':'none'); ?>">
@@ -81,6 +89,7 @@
<?php echo wpsg_drawForm_Text(__('Cron Pfad', 'wpsg'), WPSG_PATH.DIRECTORY_SEPARATOR.'cron.php', false, array('noP' => false)); ?>
<?php echo wpsg_drawForm_Text(__('Cron URL', 'wpsg'), '<a href="'.WPSG_PLUGIN_URL.'wpshopgermany/cron.php">'.WPSG_PLUGIN_URL.'wpshopgermany/cron.php</a>', false, array('noP' => false)); ?>
+ <?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
<fieldset id="wpsg_mod_export_orderfilter">
<legend><div class="col-sm-offset-6"><?php echo __('Bestellfilter', 'wpsg'); ?></div></legend>
@@ -173,6 +182,28 @@
</form>
</fieldset>
+ <?php } else if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_PRODUCT) { ?>
+ <fieldset id="wpsg_mod_export_productfilter">
+
+ <legend><div class="col-sm-offset-6"><?php echo __('Produktfilter', 'wpsg'); ?></div></legend>
+
+ <form id="wpsg_mod_export_searchfilter">
+
+ <?php echo wpsg_drawForm_Text(__('Suchfeld', 'wpsg'), wpsg_getStr($this->view['profil']['orderfilter']['s']), 'orderfilter_s', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+
+ <?php if ($this->hasMod('wpsg_mod_productgroups')) { $arProductGroupSelect = array('-1' => __('Alle Produktgruppen', 'wpsg')) + wpsg_productgroup::getProductgroupSelect(); ?>
+ <?php echo wpsg_drawForm_Text(__('Produktgruppe', 'wpsg'), $arProductGroupSelect[wpsg_getStr($this->view['profil']['orderfilter']['productgroup_ids'], '-1')], 'orderfilter_productgroup_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductGroupSelect)); ?>
+ <?php } ?>
+
+ <?php if ($this->hasMod('wpsg_mod_produktartikel')) { $temp = $this->callMod('wpsg_mod_produktartikel', 'getProductcategorySelect', array()); ?>
+ <?php $arProductCategorySelect = array(); foreach ($temp as $k => $v) $arProductCategorySelect[$v['term_id']] = $v['label']; ?>
+ <?php echo wpsg_drawForm_Text(__('Produktkategorie', 'wpsg'), $arProductCategorySelect[wpsg_getStr($this->view['profil']['orderfilter']['productcategory_ids'], '-1')], 'orderfilter_productcategory_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductCategorySelect)); ?>
+ <?php } ?>
+
+ </form>
+
+ </fieldset>
+ <?php } ?>
</div>
diff --git a/views/mods/mod_export/profillist.phtml b/views/mods/mod_export/profillist.phtml
index f73903f..4f5e039 100644
--- a/views/mods/mod_export/profillist.phtml
+++ b/views/mods/mod_export/profillist.phtml
@@ -5,7 +5,16 @@
*/
$arProfilSelect = array();
- foreach ($this->view['arProfile'] as $p) $arProfilSelect[$p['id']] = $p['name'];
+
+ foreach ($this->view['arProfile'] as $p)
+ {
+
+ $arProfilSelect[$p['id']] = $p['name'];
+
+ if ($p['export_type'] === wpsg_mod_export::TYPE_ORDER) $arProfilSelect[$p['id']] .= ' ('.__('Bestellexport', 'wpsg').')';
+ else if ($p['export_type'] === wpsg_mod_export::TYPE_PRODUCT) $arProfilSelect[$p['id']] .= ' ('.__('Produktexport', 'wpsg').')';
+
+ }
?>
diff --git a/views/mods/mod_export/settings_edit.phtml b/views/mods/mod_export/settings_edit.phtml
index 1c8fa18..39c0c16 100644
--- a/views/mods/mod_export/settings_edit.phtml
+++ b/views/mods/mod_export/settings_edit.phtml
@@ -96,15 +96,20 @@
} // function wpsg_mod_export_removeProfil(profil_id)
- function wpsg_mod_export_addProfil()
+ function wpsg_mod_export_addProfil(type)
{
jQuery('#wpsg_profil_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_addProfil&noheader=1',
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_addProfil&noheader=1',
+ data: {
+ type: type
+ },
success: function(data) {
+
jQuery("#wpsg_profil_list").html(data);
+
}
} );
@@ -126,7 +131,7 @@
},
success: function(data) {
- if (data != '1')
+ if (data != '1' && data != '0')
{
alert(data);
@@ -140,7 +145,9 @@
</script>
-<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil anlegen', 'wpsg'); ?></a>
+<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_ORDER; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Bestellungen anlegen', 'wpsg'); ?></a><br />
+<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_PRODUCT; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil für Produkte anlegen', 'wpsg'); ?></a>
+
<br /><br />
<div id="wpsg_profil_list"><?php echo $this->callMod('wpsg_mod_export', 'profilList'); ?></div> \ No newline at end of file
diff --git a/views/order/index.phtml b/views/order/index.phtml
index 95a6486..b6b55dc 100644
--- a/views/order/index.phtml
+++ b/views/order/index.phtml
@@ -32,12 +32,6 @@
</div>
</div>
- <?php foreach ($this->view['tabs'] as $tab_positions) { ?>
- <?php foreach ($tab_positions as $k => $tab) { ?>
- <div class="wpsg-order-tab-mods-content wpsg-filter-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
- <?php } ?>
- <?php } ?>
-
<div class="wpsg-filter wpsg-order-tab wpsg-order-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'none':'none'); ?>;">
<div class="row">
<div class="col-lg-4">
@@ -99,7 +93,14 @@
</div>
</div>
</div>
- </nav>
+
+ <?php foreach ($this->view['tabs'] as $tab_positions) { ?>
+ <?php foreach ($tab_positions as $k => $tab) { ?>
+ <div class="wpsg-order-tab-mods-content wpsg-filter-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
+ <?php } ?>
+ <?php } ?>
+
+ </nav>
<div class="pagination_wrap wpsg_status_link_wrap">
diff --git a/views/produkt/index.phtml b/views/produkt/index.phtml
index a1e7a2c..d862d08 100644
--- a/views/produkt/index.phtml
+++ b/views/produkt/index.phtml
@@ -21,18 +21,27 @@
<li role="presentation" class="<?php echo ((!isset($_REQUEST['action']))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt"><?php echo wpsg_translate(__("Produktübersicht (#1# Produkte)", "wpsg"), $this->view['countAll']); ?></a></li>
<li role="presentation" class="wpsg_showhide_filter <?php echo (($this->view['submit'] === true)?'active':''); ?>"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
+
+ <?php /* Integration Exportprofile */ ?>
+ <?php if ($this->hasMod('wpsg_mod_export')) { $arProfile = $this->callMod('wpsg_mod_export', 'getProfile', array(wpsg_mod_export::TYPE_PRODUCT)); ?>
+ <?php if (wpsg_isSizedArray($arProfile)) { ?>
+ <li role="presentation" class="wpsg_showhide_export"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-export"></span><?php echo __('Produktexport (Exportprofile)', 'wpsg'); ?></a></li>
+ <?php } ?>
+ <?php } ?>
+
</ul>
<ul class="nav navbar-nav navbar-right">
- <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=import"><span class="glyphicon glyphicon-import"></span><?php echo __("Import", "wpsg"); ?></a></li>
+ <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=import"><span class="glyphicon glyphicon-import"></span><?php echo __("Daten-Import", "wpsg"); ?></a></li>
<?php if (wpsg_isSizedArray($this->view['arData'])) { ?>
- <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Export", "wpsg"); ?></a></li>
+ <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Daten-Export", "wpsg"); ?></a></li>
<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
- <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=exportMedia&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Export mit Medien", "wpsg"); ?></a></li>
+ <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=exportMedia&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Daten-Export mit Medien", "wpsg"); ?></a></li>
<?php } ?>
<?php } ?>
</ul>
</div>
</div>
+
<div class="wpsg-filter container-fluid form-horizontal" style="display:<?php echo (($this->view['submit'] === true)?'block':'none'); ?>;">
<div class="row">
<div class="col-lg-4">
@@ -73,6 +82,9 @@
</div>
</div>
</div>
+
+ <?php echo $this->callMod('wpsg_mod_export', 'product_index_tab'); ?>
+
</nav>
<?php if ($this->hasMod('wpsg_mod_productgroups')) { $arProductgroupSelect = wpsg_productgroup::getProductgroupSelect($this->view['arFilter']); ?>