diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index 48ab1309f..1aeb9622a 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -87,6 +87,7 @@ Rails.application.config.assets.precompile += %w(repository_columns/index.js)
Rails.application.config.assets.precompile += %w(repositories/show.js)
Rails.application.config.assets.precompile += %w(sidebar_toggle.js)
Rails.application.config.assets.precompile += %w(reports/reports_datatable.js)
+Rails.application.config.assets.precompile += %w(reports/save_pdf_to_inventory.js)
# Libraries needed for Handsontable formulas
Rails.application.config.assets.precompile += %w(lodash.js)
diff --git a/config/locales/en.yml b/config/locales/en.yml
index bf3c7c13c..2c5b5eec5 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -315,6 +315,7 @@ en:
nav_title: "Report for: "
nav_print: "Print"
nav_pdf: "Download PDF"
+ save_PDF_to_inventory: "Save PDF to Inventory"
nav_save: "Save"
nav_close: "Close"
nav_sort_by: "Sort by"
@@ -324,6 +325,21 @@ en:
sidebar_title: "Navigation"
global_sort: "Sorting whole report will undo any custom sorting you might have done. Proceed?"
unsaved_work: "Are you sure you want to leave this page? All unsaved data will be lost."
+ no_content_for_PDF_html: "
No content
"
+ no_permissions: "You don't have permissions on that repository"
+ save_PDF_to_inventory_modal:
+ description_one: "Here you can save PDF report to an inventory item."
+ description_two: "First select an inventory, then a column and finally the item within tne inventory to which you would like to save the PDF report to. Note that the column has to be of type \"file\"."
+ inventory: "Select inventory:"
+ inventory_column: "Select inventory column:"
+ inventory_item: "Select inventory item:"
+ no_inventories: "No inventories available!"
+ success_flash: "Report successfully saved to Inventory item."
+ asset_present_warning_html: "The selected cell already contains a file. If you would like to replace the file click Save. Replacing the file will have the following consequences:
previous file will be permanently deleted;
new file will be added to the Inventory item.
"
+ no_items: "Selected Inventory does not contain any items yet. Add the first item"
+ here: "here"
+ no_columns: "You do not have any Inventories with File columns. Add a File column to existing Inventory or create a new Inventory."
+ nothing_selected: "Nothing selected"
elements:
modals:
project_contents:
diff --git a/config/routes.rb b/config/routes.rb
index 16644d322..f22b1c865 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -193,6 +193,13 @@ Rails.application.routes.draw do
get 'reports/datatable', to: 'reports#datatable'
post 'reports/visible_projects', to: 'reports#visible_projects',
defaults: { format: 'json' }
+ post 'reports/available_repositories', to: 'reports#available_repositories',
+ defaults: { format: 'json' }
+ post 'reports/save_pdf_to_inventory_item',
+ to: 'reports#save_pdf_to_inventory_item',
+ defaults: { format: 'json' }
+ post 'file_columns', to: 'repository_columns#file_columns',
+ defaults: { format: 'json' }
post 'reports/destroy', to: 'reports#destroy'
resources :projects, except: [:new, :destroy] do
@@ -491,6 +498,9 @@ Rails.application.routes.draw do
end
end
+ post 'available_rows', to: 'repository_rows#available_rows',
+ defaults: { format: 'json' }
+
post 'repository_list_items', to: 'repository_list_items#search',
defaults: { format: 'json' }