Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SAMBUMBA
pasteque-server
Commits
eb6ad5b2
Commit
eb6ad5b2
authored
Apr 10, 2015
by
Julien Fastré
Browse files
add export for providers
parent
587849e0
Changes
4
Show whitespace changes
Inline
Side-by-side
modules/base_products/actions/providers.php
View file @
eb6ad5b2
...
...
@@ -47,6 +47,8 @@ $providers = \Pasteque\providersService::getAll();
\
i18n
(
'Add a provider'
,
PLUGIN_NAME
),
'img/btn_add.png'
);
?>
</li>
<li>
<?php
\
Pasteque\tpl_btn
(
'btn'
,
\
Pasteque\get_module_url_action
(
PLUGIN_NAME
,
"providersManagement"
),
\
i18n
(
'Import providers'
,
PLUGIN_NAME
),
'img/btn_add.png'
);
?>
</li>
<li>
<?php
\
Pasteque\tpl_btn
(
'btn bt_export '
,
\
Pasteque\get_report_url
(
PLUGIN_NAME
,
"providers_export"
),
\
i18n
(
'Export Providers'
,
PLUGIN_NAME
),
'img/btn_add.png'
);
?>
</li>
</ul>
</div>
...
...
modules/base_products/languages/default.locale
View file @
eb6ad5b2
...
...
@@ -25,6 +25,7 @@
"Providers": "Providers",
"Edit a provider": "Edit a provider",
"Export Providers":"Export Providers",
"Import providers": "Import providers",
"Import providers from csv file": "Import providers from csv file",
"Add a provider": "Add a provider",
...
...
modules/base_products/languages/fr.locale
View file @
eb6ad5b2
...
...
@@ -25,6 +25,7 @@
"Providers": "Fournisseurs",
"Edit a provider": "Éditer un fournisseur",
"Export Providers":"Exporter les fournisseurs",
"Import providers": "Importer des fournisseurs",
"Import providers from csv file": "Importer des fournisseurs depuis un fichier CSV",
"Add a provider": "Ajouter un fournisseur",
...
...
modules/base_products/reports/providers_export.php
0 → 100644
View file @
eb6ad5b2
<?php
// Pastèque Web back office, Users module
//
// Copyright (C) 2015 Scil (http://scil.coop)
//
// This file is part of Pastèque.
//
// Pastèque is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pastèque is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pastèque. If not, see <http://www.gnu.org/licenses/>.
namespace
BaseProducts
;
$sql
=
"SELECT `NAME`, `DISPORDER` FROM `PROVIDERS` "
;
$fields
=
array
(
'NAME'
,
'DISPORDER'
);
$headers
=
array
(
\
i18n
(
"Provider.label"
),
\
i18n
(
"Provider.dispOrder"
));
$report
=
new
\
Pasteque\Report
(
PLUGIN_NAME
,
"providers_export"
,
\
i18n
(
"Export providers"
,
PLUGIN_NAME
),
$sql
,
$headers
,
$fields
);
\
Pasteque\register_report
(
$report
);
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment