@@ -, +, @@ --Adds instructions to each stage of the uploader --Consolidates quote tool css into quotes.css --- koha-tmpl/intranet-tmpl/prog/en/css/quotes.css | 41 +++++++++++++++ koha-tmpl/intranet-tmpl/prog/en/css/uploader.css | 10 ---- .../prog/en/includes/quotes-upload-toolbar.inc | 3 +- .../prog/en/modules/tools/quotes-upload.tt | 53 +++++++++++++++---- 4 files changed, 84 insertions(+), 23 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/quotes.css --- a/koha-tmpl/intranet-tmpl/prog/en/css/quotes.css +++ a/koha-tmpl/intranet-tmpl/prog/en/css/quotes.css @@ -0,0 +1,41 @@ +#quotes_editor_wrapper { + position : relative; + top : 15px; +} + +#footer { + visibility : hidden; + position : relative; + top : 10px; + height : 25px; +} + +#instructions li { + list-style-type : disc; +} + +#instructions div { + margin-left : 10px; +} + +#file_editor_inst { + visibility : hidden; + position : absolute; +} + +#file_uploader { + visibility :visible; + position :relative; +} + +#file_upload { + position : relative; + top : -1px; + margin-left : 10px; +} + +#quotes_editor { + float : left; + width : 100%; + visibility :hidden; +} --- a/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css +++ a/koha-tmpl/intranet-tmpl/prog/en/css/uploader.css @@ -37,13 +37,3 @@ top: 50%; width: 250px; } - -#file_uploader { - position: relative; - top: -24px; -} - -#file_upload { - position: relative; - top: -1px; -} --- a/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-upload-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/quotes-upload-toolbar.inc @@ -33,10 +33,9 @@ //]]> -
+ --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt @@ -3,6 +3,7 @@ [% INCLUDE 'doc-head-close.inc' %] + [% INCLUDE 'datatables-strings.inc' %] @@ -134,6 +135,14 @@ for(var i=0; i 512) { - if (!confirm(evt.target.files[0].name+' is '+fileSizeInK+' K in size. Do you really want to upload this file?')) { + if (!confirm(evt.target.files[0].name+' '+fileSizeInK+_(' KB Do you really want to upload this file?'))) { parent.location='quotes-upload.pl'; return; } @@ -256,10 +268,10 @@ success : function(){ var response = JSON.parse(jqXHR.responseText); if (response.success) { - $("#server_response").text(response.records+' quotes saved.'); + $("#server_response").text(response.records+_(' quotes saved.')); } else { - $("#server_response").text('An error has occurred. '+response.records+' quotes saved. Please ask your administrator to check the server log for more details.'); + $("#server_response").text(+response.records+_(' quotes saved, but an error has occurred. Please ask your administrator to check the server log for more details.')); } $("#server_response").fadeIn(200); }, @@ -271,9 +283,9 @@ return this.id; }).get().join(', '); if (!idsToDelete) { - alert('Please select a quote(s) by clicking the quote id(s) you desire to delete.'); + alert(_('Please select a quote(s) by clicking the quote id(s) you desire to delete.')); } - else if (confirm('Are you sure you wish to delete quote(s) '+idsToDelete+'?')) { + else if (confirm(_('Are you sure you wish to delete quote(s) ')+idsToDelete+'?')) { oTable.$('.selected').each(function(){ oTable.fnDeleteRow(this); }); @@ -300,16 +312,35 @@
[% INCLUDE 'quotes-upload-toolbar.inc' %]

Quote uploader

-
+
+
+ Instructions +
+
    +
  • The quote uploader accepts standard csv files with two columns: "source","text"
  • +
  • Click the "Choose File" button and select the csv file to be uploaded.
  • +
  • The file will be imported into an editable table for review prior to saving.
  • +
+
+
+
    +
  • Click on any field to edit the contents; Press the <Enter> key to save edit.
  • +
  • Click on one or more quote numbers to select entire quotes for deletion; Click the 'Delete Quote(s)' button to delete selected quotes.
  • +
  • Click the 'Save Quotes' button in the toolbar to save the entire batch of quotes.
  • +
+
+
+
+
Upload quotes -
+
0%
Server Response
- + @@ -326,7 +357,7 @@
Source
-
--