diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index 050756058..9452d97fc 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -342,6 +342,22 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda']) $scope.clear = function () { $scope.csv.result = null; }; + // download CSV example file + $scope.downloadCSVExample = function () { + var element = document.getElementById('downloadLink'); + var csvRows = [ + // column header line + ['title', 'text'], + // example entries + ['Demo 1', 'Demo text 1'], + ['Demo 2', 'Demo text 2'] + + ]; + var csvString = csvRows.join("%0A"); + element.href = 'data:text/csv;charset=utf-8,' + csvString; + element.download = 'agenda-example.csv'; + element.target = '_blank'; + } } ]); diff --git a/openslides/agenda/static/templates/agenda/item-import.html b/openslides/agenda/static/templates/agenda/item-import.html index 2d08fa05c..4fba723ee 100644 --- a/openslides/agenda/static/templates/agenda/item-import.html +++ b/openslides/agenda/static/templates/agenda/item-import.html @@ -69,9 +69,7 @@ Keep each item in a single line.
'title, text'
'identifier, title, text, reason, submitter, category'