diff --git a/vendor/built_in_modules/personal_book/app/helpers/panel/personal_book/desktop/personal_books_helper.rb b/vendor/built_in_modules/personal_book/app/helpers/panel/personal_book/desktop/personal_books_helper.rb index 8ea06188a..dcea2c10e 100644 --- a/vendor/built_in_modules/personal_book/app/helpers/panel/personal_book/desktop/personal_books_helper.rb +++ b/vendor/built_in_modules/personal_book/app/helpers/panel/personal_book/desktop/personal_books_helper.rb @@ -71,11 +71,11 @@ module Panel::PersonalBook::Desktop::PersonalBooksHelper def link_publication_file publication publication.writing_book_files.map{|file| link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title_translations[I18n.locale.to_s]) + "title" => (file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end diff --git a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb index c09f6b2a3..c1afa89a3 100644 --- a/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb +++ b/vendor/built_in_modules/personal_conference/app/helpers/panel/personal_conference/desktop/conference_pages_helper.rb @@ -71,11 +71,11 @@ module Panel::PersonalConference::Desktop::ConferencePagesHelper def link_publication_file publication publication.writing_conference_files.map{|file| link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title_translations[I18n.locale.to_s]) + "title" => (file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end diff --git a/vendor/built_in_modules/personal_diploma/app/helpers/panel/personal_diploma/desktop/personal_diplomas_helper.rb b/vendor/built_in_modules/personal_diploma/app/helpers/panel/personal_diploma/desktop/personal_diplomas_helper.rb index d7703237c..181daacb5 100644 --- a/vendor/built_in_modules/personal_diploma/app/helpers/panel/personal_diploma/desktop/personal_diplomas_helper.rb +++ b/vendor/built_in_modules/personal_diploma/app/helpers/panel/personal_diploma/desktop/personal_diplomas_helper.rb @@ -71,11 +71,11 @@ module Panel::PersonalDiploma::Desktop::PersonalDiplomasHelper def link_publication_file publication publication.writing_conference_files.map{|file| link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title_translations[I18n.locale.to_s]) + "title" => (file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end diff --git a/vendor/built_in_modules/personal_experience/app/helpers/panel/personal_experience/desktop/personal_experiences_helper.rb b/vendor/built_in_modules/personal_experience/app/helpers/panel/personal_experience/desktop/personal_experiences_helper.rb index cc5f9f5a2..cbd39362d 100644 --- a/vendor/built_in_modules/personal_experience/app/helpers/panel/personal_experience/desktop/personal_experiences_helper.rb +++ b/vendor/built_in_modules/personal_experience/app/helpers/panel/personal_experience/desktop/personal_experiences_helper.rb @@ -71,11 +71,11 @@ module Panel::PersonalExperience::Desktop::PersonalExperiencesHelper def link_publication_file publication publication.writing_conference_files.map{|file| link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title_translations[I18n.locale.to_s]) + "title" => file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end diff --git a/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb b/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb index b349dd8d3..6505de753 100644 --- a/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb +++ b/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb @@ -64,11 +64,11 @@ module Panel::PersonalHonor::Desktop::PersonalHonorsHelper def link_publication_file publication publication.writing_book_files.map{|file| link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title_translations[I18n.locale.to_s]) + "title" => (file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end diff --git a/vendor/built_in_modules/personal_journal/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb b/vendor/built_in_modules/personal_journal/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb index 89c82dbdf..785cb0ca1 100644 --- a/vendor/built_in_modules/personal_journal/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb +++ b/vendor/built_in_modules/personal_journal/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb @@ -1,5 +1,6 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper def publication_record publication, view + content_tag :li, "item" => "true", "data-id" => publication.id.to_s, @@ -88,12 +89,13 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper def link_publication_file publication publication.writing_journal_files.map{|file| + link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title[I18n.locale.to_s]) + "title" => (file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end diff --git a/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb b/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb index 05d5d66d0..874d59252 100644 --- a/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb +++ b/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb @@ -71,11 +71,11 @@ module Panel::PersonalLab::Desktop::PersonalLabsHelper def link_publication_file publication publication.lab_files.map{|file| link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title_translations[I18n.locale.to_s]) + "title" => (file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end diff --git a/vendor/built_in_modules/personal_patent/app/helpers/panel/personal_patent/desktop/personal_patents_helper.rb b/vendor/built_in_modules/personal_patent/app/helpers/panel/personal_patent/desktop/personal_patents_helper.rb index 8a6781d4a..e1e7af4d9 100644 --- a/vendor/built_in_modules/personal_patent/app/helpers/panel/personal_patent/desktop/personal_patents_helper.rb +++ b/vendor/built_in_modules/personal_patent/app/helpers/panel/personal_patent/desktop/personal_patents_helper.rb @@ -71,11 +71,11 @@ module Panel::PersonalPatent::Desktop::PersonalPatentsHelper def link_publication_file publication publication.writing_patent_files.map{|file| link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title_translations[I18n.locale.to_s]) + "title" => (file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end diff --git a/vendor/built_in_modules/personal_project/app/helpers/panel/personal_project/desktop/personal_projects_helper.rb b/vendor/built_in_modules/personal_project/app/helpers/panel/personal_project/desktop/personal_projects_helper.rb index b7ae89f48..38af0aa93 100644 --- a/vendor/built_in_modules/personal_project/app/helpers/panel/personal_project/desktop/personal_projects_helper.rb +++ b/vendor/built_in_modules/personal_project/app/helpers/panel/personal_project/desktop/personal_projects_helper.rb @@ -72,11 +72,11 @@ module Panel::PersonalProject::Desktop::PersonalProjectsHelper def link_publication_file publication publication.project_files.map{|file| link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title_translations[I18n.locale.to_s]) + "title" => (file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end diff --git a/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb b/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb index 27169d890..d625779c4 100644 --- a/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb +++ b/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb @@ -72,11 +72,11 @@ module Panel::PersonalResearch::Desktop::PersonalResearchsHelper def link_publication_file publication publication.research_files.map{|file| link_to(image_tag(check_file_type(file.file.url)) + \ - content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"), + content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"), file.file.url, :class => "file", "target" => "_blank", - "title" => file.title_translations[I18n.locale.to_s]) + "title" => (file.title_translations[I18n.locale.to_s] rescue nil)) }.inject(:+) end