diff --git a/app/assets/images/icon_small/docx_file.svg b/app/assets/images/icon_small/docx_file.svg deleted file mode 100644 index 004bcb798..000000000 --- a/app/assets/images/icon_small/docx_file.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/assets/images/icon_small/excel-document.svg b/app/assets/images/icon_small/excel-document.svg new file mode 100644 index 000000000..44729839c --- /dev/null +++ b/app/assets/images/icon_small/excel-document.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/images/icon_small/powerpoint-document.svg b/app/assets/images/icon_small/powerpoint-document.svg new file mode 100644 index 000000000..250bccb56 --- /dev/null +++ b/app/assets/images/icon_small/powerpoint-document.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/images/icon_small/pptx_file.svg b/app/assets/images/icon_small/pptx_file.svg deleted file mode 100644 index 28409939a..000000000 --- a/app/assets/images/icon_small/pptx_file.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/assets/images/icon_small/word-document.svg b/app/assets/images/icon_small/word-document.svg new file mode 100644 index 000000000..114389b0e --- /dev/null +++ b/app/assets/images/icon_small/word-document.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/images/icon_small/xslx_file.svg b/app/assets/images/icon_small/xslx_file.svg deleted file mode 100644 index 13973e3e6..000000000 --- a/app/assets/images/icon_small/xslx_file.svg +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/assets/images/office/Excel-color_16x16x32.png b/app/assets/images/office/Excel-color_16x16x32.png deleted file mode 100644 index 5d4f705c4..000000000 Binary files a/app/assets/images/office/Excel-color_16x16x32.png and /dev/null differ diff --git a/app/assets/images/office/Excel-xlsx_20x20x32.png b/app/assets/images/office/Excel-xlsx_20x20x32.png deleted file mode 100644 index b6f683372..000000000 Binary files a/app/assets/images/office/Excel-xlsx_20x20x32.png and /dev/null differ diff --git a/app/assets/images/office/PowerPoint-Color_16x16x32.png b/app/assets/images/office/PowerPoint-Color_16x16x32.png deleted file mode 100644 index cfa3a6bf9..000000000 Binary files a/app/assets/images/office/PowerPoint-Color_16x16x32.png and /dev/null differ diff --git a/app/assets/images/office/PowerPoint-pptx_20x20x32.png b/app/assets/images/office/PowerPoint-pptx_20x20x32.png deleted file mode 100644 index 2fdb3cb5f..000000000 Binary files a/app/assets/images/office/PowerPoint-pptx_20x20x32.png and /dev/null differ diff --git a/app/assets/images/office/Word-color_16x16x32.png b/app/assets/images/office/Word-color_16x16x32.png deleted file mode 100644 index a6b7889c8..000000000 Binary files a/app/assets/images/office/Word-color_16x16x32.png and /dev/null differ diff --git a/app/assets/images/office/Word-docx_20x20x32.png b/app/assets/images/office/Word-docx_20x20x32.png deleted file mode 100644 index 69e8ab3d1..000000000 Binary files a/app/assets/images/office/Word-docx_20x20x32.png and /dev/null differ diff --git a/app/assets/images/office/ms-excel-active.svg b/app/assets/images/office/ms-excel-active.svg index 47a97c318..6e2b0afed 100644 --- a/app/assets/images/office/ms-excel-active.svg +++ b/app/assets/images/office/ms-excel-active.svg @@ -1,15 +1 @@ - - - - 1DBED704-6E88-4AE3-B2F9-3410F58D52C1 - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +Excel_32x \ No newline at end of file diff --git a/app/assets/images/office/ms-excel-inactive.svg b/app/assets/images/office/ms-excel-inactive.svg index 82d34f527..6ee8f4898 100644 --- a/app/assets/images/office/ms-excel-inactive.svg +++ b/app/assets/images/office/ms-excel-inactive.svg @@ -1,15 +1 @@ - - - - 4C8BB196-A5E9-45E1-A350-99BB0AD162B7 - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +Excel_32x \ No newline at end of file diff --git a/app/assets/images/office/ms-pwrpt-active.svg b/app/assets/images/office/ms-pwrpt-active.svg index 7d8cec25e..105a24e45 100644 --- a/app/assets/images/office/ms-pwrpt-active.svg +++ b/app/assets/images/office/ms-pwrpt-active.svg @@ -1,15 +1 @@ - - - - 20B71793-99D3-4CCE-9F03-A003272E0F54 - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +PowerPoint_32x \ No newline at end of file diff --git a/app/assets/images/office/ms-pwrpt-inactive.svg b/app/assets/images/office/ms-pwrpt-inactive.svg index 27ae531bd..22c726f54 100644 --- a/app/assets/images/office/ms-pwrpt-inactive.svg +++ b/app/assets/images/office/ms-pwrpt-inactive.svg @@ -1,15 +1 @@ - - - - 7D86E2E5-6A35-46CC-B7FA-7880CD9FA8DB - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +PowerPoint_32x \ No newline at end of file diff --git a/app/assets/images/office/ms-word-active.svg b/app/assets/images/office/ms-word-active.svg index e9a0450be..bd2384dde 100644 --- a/app/assets/images/office/ms-word-active.svg +++ b/app/assets/images/office/ms-word-active.svg @@ -1,15 +1 @@ - - - - 58A7CABD-8C13-4F38-A224-E58B3FEF6D9B - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +Word_32x \ No newline at end of file diff --git a/app/assets/images/office/ms-word-inactive.svg b/app/assets/images/office/ms-word-inactive.svg index 166bbb5fd..d4fe2c927 100644 --- a/app/assets/images/office/ms-word-inactive.svg +++ b/app/assets/images/office/ms-word-inactive.svg @@ -1,15 +1 @@ - - - - 31E0F97F-2288-43F7-8844-5D70AE3003E4 - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +Word_32x \ No newline at end of file diff --git a/app/assets/stylesheets/application.sass.scss b/app/assets/stylesheets/application.sass.scss index f7ac29dd3..7212f922a 100644 --- a/app/assets/stylesheets/application.sass.scss +++ b/app/assets/stylesheets/application.sass.scss @@ -141,6 +141,7 @@ @import "steps"; @import "system_notifications"; @import "tiny_mce"; +@import "office"; // Addons diff --git a/app/assets/stylesheets/my_modules.scss b/app/assets/stylesheets/my_modules.scss index 9e03bcb64..19a45e133 100644 --- a/app/assets/stylesheets/my_modules.scss +++ b/app/assets/stylesheets/my_modules.scss @@ -106,6 +106,10 @@ html { border-top: 0; } + img { + width: 32px; + } + label.btn { background-color: $color-white; color: $color-emperor; diff --git a/app/assets/stylesheets/office.scss b/app/assets/stylesheets/office.scss new file mode 100644 index 000000000..58998981f --- /dev/null +++ b/app/assets/stylesheets/office.scss @@ -0,0 +1,23 @@ +.sn-icon-file-word::before, +.sn-icon-file-powerpoint::before, +.sn-icon-file-excel::before { + background-repeat: no-repeat; + background-size: 1rem auto; + content: '' !important; + display: inline-block; + height: 1rem; + vertical-align: middle; + width: 1rem; +} + +.sn-icon-file-word::before { + background-image: url('/images/office/word-document.svg'); +} + +.sn-icon-file-powerpoint::before { + background-image: url('/images/office/powerpoint-document.svg'); +} + +.sn-icon-file-excel::before { + background-image: url('/images/office/excel-document.svg'); +} diff --git a/app/assets/stylesheets/shared_styles/constants/colors.scss b/app/assets/stylesheets/shared_styles/constants/colors.scss index d2f8679b8..1dd534a62 100644 --- a/app/assets/stylesheets/shared_styles/constants/colors.scss +++ b/app/assets/stylesheets/shared_styles/constants/colors.scss @@ -82,9 +82,9 @@ $brand-complementary: #ffcf26; $brand-warning-light: #fbebd3; // MS Office colors: -$office-ms-word: #2b579a; -$office-ms-excel: #217346; -$office-ms-powerpoint: #d24726; +$office-ms-word: #1759BC; +$office-ms-excel: #0F7B41; +$office-ms-powerpoint: #C33E1B; // MarvinJS color: $marvinjs-color: #29999c; diff --git a/app/helpers/file_icons_helper.rb b/app/helpers/file_icons_helper.rb index 7c01548d3..3a4d7e3dd 100644 --- a/app/helpers/file_icons_helper.rb +++ b/app/helpers/file_icons_helper.rb @@ -3,6 +3,8 @@ module FileIconsHelper def wopi_file?(asset) file_ext = asset.file_name.split('.').last&.downcase + return true if ENV['WOPI_TEST_ENABLED'] == 'true' && %w(wopitest wopitestx).include?(file_ext) + %w(ods xls xlsb xlsm xlsx odp pot potm potx pps ppsm ppsx ppt pptm pptx doc docm docx dot dotm dotx odt rtf).include?(file_ext) end @@ -37,11 +39,11 @@ module FileIconsHelper def file_extension_icon(asset, report = false) file_ext = asset.file_name.split('.').last&.downcase if Constants::FILE_TEXT_FORMATS.include?(file_ext) - image_link = 'icon_small/docx_file.svg' + image_link = 'icon_small/word-document.svg' elsif Constants::FILE_TABLE_FORMATS.include?(file_ext) - image_link = 'icon_small/xslx_file.svg' + image_link = 'icon_small/excel-document.svg' elsif Constants::FILE_PRESENTATION_FORMATS.include?(file_ext) - image_link = 'icon_small/pptx_file.svg' + image_link = 'icon_small/powerpoint-document.svg' elsif asset.file.attached? && asset.file.metadata['asset_type'] == 'marvinjs' image_link = 'icon_small/marvinjs_file.svg' elsif asset.file.attached? && asset.file.metadata['asset_type'] == 'gene_sequence' @@ -64,11 +66,11 @@ module FileIconsHelper def file_application_url(asset) file_ext = asset.file_name.split('.').last&.downcase if Constants::FILE_TEXT_FORMATS.include?(file_ext) - 'icon_small/docx_file.svg' + 'icon_small/word-document.svg' elsif Constants::FILE_TABLE_FORMATS.include?(file_ext) - 'icon_small/xslx_file.svg' + 'icon_small/excel-document.svg' elsif Constants::FILE_PRESENTATION_FORMATS.include?(file_ext) - 'icon_small/pptx_file.svg' + 'icon_small/powerpoint-document.svg' end end diff --git a/app/javascript/vue/reports/renderers/pdf.vue b/app/javascript/vue/reports/renderers/pdf.vue index 15e6302f0..07992e172 100644 --- a/app/javascript/vue/reports/renderers/pdf.vue +++ b/app/javascript/vue/reports/renderers/pdf.vue @@ -21,7 +21,7 @@ class="file-preview-link flex items-center gap-1 pdf hover:no-underline whitespace-nowrap" :data-preview-url="pdf.preview_url"> - + {{ i18n.t('projects.reports.index.pdf') }} diff --git a/app/utilities/wopi_util.rb b/app/utilities/wopi_util.rb index 74da50292..4d3e756ba 100644 --- a/app/utilities/wopi_util.rb +++ b/app/utilities/wopi_util.rb @@ -108,9 +108,9 @@ module WopiUtil def create_wopi_file_activity(current_user, started_editing) action = if started_editing - t('activities.wupi_file_editing.started') + t('activities.wopi_file_editing.started') else - t('activities.wupi_file_editing.finished') + t('activities.wopi_file_editing.finished') end if @assoc.class == Step default_step_items = diff --git a/config/initializers/constants.rb b/config/initializers/constants.rb index 4ebb75ae5..9f7f0bca7 100644 --- a/config/initializers/constants.rb +++ b/config/initializers/constants.rb @@ -298,7 +298,7 @@ class Constants # Other #============================================================================= - FILE_TEXT_FORMATS = %w(doc docm docx dot dotm dotx odt rtf).freeze + FILE_TEXT_FORMATS = %w(doc docm docx dot dotm dotx odt rtf wopitest wopitestx).freeze FILE_TABLE_FORMATS = %w(csv ods xls xlsb xlsm xlsx).freeze @@ -306,7 +306,7 @@ class Constants %w(odp pot potm potx pps ppsm ppsx ppt pptm pptx).freeze WOPI_EDITABLE_FORMATS = %w( - docx docm odt xlsx xlsm xlsb ods pptx ppsx odp + docx docm odt xlsx xlsm xlsb ods pptx ppsx odp wopitest wopitestx ).freeze TEXT_EXTRACT_FILE_TYPES = [ diff --git a/config/locales/en.yml b/config/locales/en.yml index 846508089..063a05e0f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1922,9 +1922,9 @@ en: success_flash: "File result successfully deleted." wopi_open_file: "Open in %{app}" wopi_edit_file: "Open in %{app}" - wopi_word: "MS Word online" - wopi_excel: "Excel online" - wopi_powerpoint: "PowerPoint online" + wopi_word: "Microsoft Word for the Web" + wopi_excel: "Microsoft Excel for the Web" + wopi_powerpoint: "Microsoft PowerPoint for the Web" error_flash: 'Something went wrong! Please try again later.' result_tables: @@ -3011,7 +3011,7 @@ en: text: "text" table: "table" asset: "file" - wupi_file_editing: + wopi_file_editing: started: "editing started" finished: "editing finished" file_editing: @@ -3619,7 +3619,7 @@ en: clone_btn: "Copy" import: "Import" import_eln: "SciNote file (.eln)" - import_docx: "MS Word (.docx)" + import_docx: "Microsoft Word (.docx)" beta: "BETA" import_protocols_io: "From Protocols.io" modal_import_json_upload: "Upload" @@ -4015,19 +4015,19 @@ en: placeholder: modified_label: "Modified:" size_label: "Size: %{size}" - wopi_supported_text_formats_title: 'Only .docx, .docm, .odt file formats are supported for editing in Word Online.' - wopi_supported_table_formats_title: 'Only .xlsx, .xlsm, .xlsb, .ods file formats are supported for editing in Excel Online.' - wopi_supported_presentation_formats_title: 'Only .pptx, ppsx, .odp file formats are supported for editing in PowerPoint Online.' + wopi_supported_text_formats_title: 'Only .docx, .docm, .odt file formats are supported for editing in Word for the web.' + wopi_supported_table_formats_title: 'Only .xlsx, .xlsm, .xlsb, .ods file formats are supported for editing in Excel for the web.' + wopi_supported_presentation_formats_title: 'Only .pptx, ppsx, .odp file formats are supported for editing in PowerPoint for the web.' create_wopi_file: - button_text: 'New MS Office file' + button_text: 'New Microsoft Office file' li_text: "Office file" - modal_title: 'Create new Microsoft Office Online document' + modal_title: 'Create new Microsoft Office document' text_field_label: 'Document name' type_select_label: 'Document type' text_field_placeholder: 'Enter document name...' - ms_word: 'Word
Online' - ms_excel: 'Excel
Online' - ms_powerpoint: 'PowerPoint
Online' + ms_word: 'Microsoft
Word' + ms_excel: 'Microsoft
Excel' + ms_powerpoint: 'Microsoft
PowerPoint' create_document_button: 'Create document' errors: forbidden: 'You do not have permission to add files.' diff --git a/public/images/office/Excel-color_16x16x32.png b/public/images/office/Excel-color_16x16x32.png deleted file mode 100644 index 5d4f705c4..000000000 Binary files a/public/images/office/Excel-color_16x16x32.png and /dev/null differ diff --git a/public/images/office/Excel-xlsx_20x20x32.png b/public/images/office/Excel-xlsx_20x20x32.png deleted file mode 100644 index b6f683372..000000000 Binary files a/public/images/office/Excel-xlsx_20x20x32.png and /dev/null differ diff --git a/public/images/office/PowerPoint-Color_16x16x32.png b/public/images/office/PowerPoint-Color_16x16x32.png deleted file mode 100644 index cfa3a6bf9..000000000 Binary files a/public/images/office/PowerPoint-Color_16x16x32.png and /dev/null differ diff --git a/public/images/office/PowerPoint-pptx_20x20x32.png b/public/images/office/PowerPoint-pptx_20x20x32.png deleted file mode 100644 index 2fdb3cb5f..000000000 Binary files a/public/images/office/PowerPoint-pptx_20x20x32.png and /dev/null differ diff --git a/public/images/office/Word-color_16x16x32.png b/public/images/office/Word-color_16x16x32.png deleted file mode 100644 index a6b7889c8..000000000 Binary files a/public/images/office/Word-color_16x16x32.png and /dev/null differ diff --git a/public/images/office/Word-docx_20x20x32.png b/public/images/office/Word-docx_20x20x32.png deleted file mode 100644 index 69e8ab3d1..000000000 Binary files a/public/images/office/Word-docx_20x20x32.png and /dev/null differ diff --git a/public/images/office/excel-document.svg b/public/images/office/excel-document.svg new file mode 100644 index 000000000..44729839c --- /dev/null +++ b/public/images/office/excel-document.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/public/images/office/ms-excel-active.svg b/public/images/office/ms-excel-active.svg index 47a97c318..6e2b0afed 100644 --- a/public/images/office/ms-excel-active.svg +++ b/public/images/office/ms-excel-active.svg @@ -1,15 +1 @@ - - - - 1DBED704-6E88-4AE3-B2F9-3410F58D52C1 - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +Excel_32x \ No newline at end of file diff --git a/public/images/office/ms-excel-inactive.svg b/public/images/office/ms-excel-inactive.svg index 82d34f527..6ee8f4898 100644 --- a/public/images/office/ms-excel-inactive.svg +++ b/public/images/office/ms-excel-inactive.svg @@ -1,15 +1 @@ - - - - 4C8BB196-A5E9-45E1-A350-99BB0AD162B7 - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +Excel_32x \ No newline at end of file diff --git a/public/images/office/ms-pwrpt-active.svg b/public/images/office/ms-pwrpt-active.svg index 7d8cec25e..105a24e45 100644 --- a/public/images/office/ms-pwrpt-active.svg +++ b/public/images/office/ms-pwrpt-active.svg @@ -1,15 +1 @@ - - - - 20B71793-99D3-4CCE-9F03-A003272E0F54 - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +PowerPoint_32x \ No newline at end of file diff --git a/public/images/office/ms-pwrpt-inactive.svg b/public/images/office/ms-pwrpt-inactive.svg index 27ae531bd..22c726f54 100644 --- a/public/images/office/ms-pwrpt-inactive.svg +++ b/public/images/office/ms-pwrpt-inactive.svg @@ -1,15 +1 @@ - - - - 7D86E2E5-6A35-46CC-B7FA-7880CD9FA8DB - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +PowerPoint_32x \ No newline at end of file diff --git a/public/images/office/ms-word-active.svg b/public/images/office/ms-word-active.svg index e9a0450be..bd2384dde 100644 --- a/public/images/office/ms-word-active.svg +++ b/public/images/office/ms-word-active.svg @@ -1,15 +1 @@ - - - - 58A7CABD-8C13-4F38-A224-E58B3FEF6D9B - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +Word_32x \ No newline at end of file diff --git a/public/images/office/ms-word-inactive.svg b/public/images/office/ms-word-inactive.svg index 166bbb5fd..d4fe2c927 100644 --- a/public/images/office/ms-word-inactive.svg +++ b/public/images/office/ms-word-inactive.svg @@ -1,15 +1 @@ - - - - 31E0F97F-2288-43F7-8844-5D70AE3003E4 - Created with sketchtool. - - - - - - - - - - \ No newline at end of file +Word_32x \ No newline at end of file diff --git a/public/images/office/powerpoint-document.svg b/public/images/office/powerpoint-document.svg new file mode 100644 index 000000000..250bccb56 --- /dev/null +++ b/public/images/office/powerpoint-document.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/public/images/office/word-document.svg b/public/images/office/word-document.svg new file mode 100644 index 000000000..114389b0e --- /dev/null +++ b/public/images/office/word-document.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/vendor/assets/stylesheets/sn-icon-font.css b/vendor/assets/stylesheets/sn-icon-font.css index d91be63ac..d053c6666 100644 --- a/vendor/assets/stylesheets/sn-icon-font.css +++ b/vendor/assets/stylesheets/sn-icon-font.css @@ -245,15 +245,6 @@ .sn-icon-files:before { content: "\e948"; } -.sn-icon-file-word:before { - content: "\e949"; -} -.sn-icon-file-powerpoint:before { - content: "\e94a"; -} -.sn-icon-file-excel:before { - content: "\e94b"; -} .sn-icon-export:before { content: "\e94c"; }