Commit 57116d7e authored by Patrick's avatar Patrick

i18n javascript in admin : import - export stock

parent 1b84f552
...@@ -216,6 +216,7 @@ class ProducerAdmin(ImportExportMixin, admin.ModelAdmin): ...@@ -216,6 +216,7 @@ class ProducerAdmin(ImportExportMixin, admin.ModelAdmin):
actions = [ actions = [
'export_xlsx_customer_prices', 'export_xlsx_customer_prices',
] ]
change_list_template = 'admin/producer_change_list.html'
def has_delete_permission(self, request, producer=None): def has_delete_permission(self, request, producer=None):
if request.user.groups.filter( if request.user.groups.filter(
......
This diff is collapsed.
...@@ -7,8 +7,8 @@ msgid "" ...@@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: repanier\n" "Project-Id-Version: repanier\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-08 02:19+0100\n" "POT-Creation-Date: 2017-03-09 08:58+0100\n"
"PO-Revision-Date: 2017-03-08 20:19+0100\n" "PO-Revision-Date: 2017-03-09 17:48+0100\n"
"Last-Translator: Patrick Colmant <pcolmant@gmail.com>\n" "Last-Translator: Patrick Colmant <pcolmant@gmail.com>\n"
"Language-Team: Patrick Colmant <pcolmant@gmail.com>\n" "Language-Team: Patrick Colmant <pcolmant@gmail.com>\n"
"Language: fr\n" "Language: fr\n"
...@@ -18,6 +18,14 @@ msgstr "" ...@@ -18,6 +18,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 1.7.1\n" "X-Generator: Poedit 1.7.1\n"
#: static/js/export_import_stock.js:4
msgid "Export stock"
msgstr "Exporter le stock"
#: static/js/export_import_stock.js:5
msgid "Import stock"
msgstr "Importer le stock"
#: static/js/is_order_confirm_send.js:4 #: static/js/is_order_confirm_send.js:4
msgid "✗🔓" msgid "✗🔓"
msgstr "✗🔓 - déverrouiller" msgstr "✗🔓 - déverrouiller"
......
(function($) { (function($) {
$(document).ready(function($) { $(document).ready(function($) {
if(location.pathname.indexOf('change') <= -1) { if(location.pathname.indexOf('change') <= -1) {
$(".object-tools").prepend('<li><a href="./export_stock/' + location.search + '">Export stock</a></li>'); $(".object-tools").prepend('<li><a href="./export_stock/' + location.search + '">' + gettext('Export stock')+ '</a></li>');
$(".object-tools").prepend('<li><a href="./import_stock/' + location.search + '">Import stock</a></li>'); $(".object-tools").prepend('<li><a href="./import_stock/' + location.search + '">' + gettext('Import stock')+ '</a></li>');
} }
// $(".object-tools").append('<li><a href="./is_order_confirm_send/' + location.search + '" class="addlink">&nbsp;&nbsp;🔐&nbsp;&nbsp;</a></li>'); // $(".object-tools").append('<li><a href="./is_order_confirm_send/' + location.search + '" class="addlink">&nbsp;&nbsp;🔐&nbsp;&nbsp;</a></li>');
}); });
......
{% extends "admin/change_list.html" %}
{% block extrahead %}
{{ block.super }}
<script type="text/javascript" src="../../../jsi18n"></script>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment