fixed file view on server for desktop

This commit is contained in:
Harry Bomrah 2013-10-14 16:40:52 +08:00 committed by saurabhbhatia
parent 4f04eca74f
commit 14ea611f8c
10 changed files with 22 additions and 20 deletions

View File

@ -71,11 +71,11 @@ module Panel::PersonalBook::Desktop::PersonalBooksHelper
def link_publication_file publication def link_publication_file publication
publication.writing_book_files.map{|file| publication.writing_book_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title_translations[I18n.locale.to_s]) "title" => (file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end

View File

@ -71,11 +71,11 @@ module Panel::PersonalConference::Desktop::ConferencePagesHelper
def link_publication_file publication def link_publication_file publication
publication.writing_conference_files.map{|file| publication.writing_conference_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title_translations[I18n.locale.to_s]) "title" => (file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end

View File

@ -71,11 +71,11 @@ module Panel::PersonalDiploma::Desktop::PersonalDiplomasHelper
def link_publication_file publication def link_publication_file publication
publication.writing_conference_files.map{|file| publication.writing_conference_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title_translations[I18n.locale.to_s]) "title" => (file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end

View File

@ -71,11 +71,11 @@ module Panel::PersonalExperience::Desktop::PersonalExperiencesHelper
def link_publication_file publication def link_publication_file publication
publication.writing_conference_files.map{|file| publication.writing_conference_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title_translations[I18n.locale.to_s]) "title" => file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end

View File

@ -64,11 +64,11 @@ module Panel::PersonalHonor::Desktop::PersonalHonorsHelper
def link_publication_file publication def link_publication_file publication
publication.writing_book_files.map{|file| publication.writing_book_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title_translations[I18n.locale.to_s]) "title" => (file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end

View File

@ -1,5 +1,6 @@
module Panel::PersonalJournal::Desktop::JournalPagesHelper module Panel::PersonalJournal::Desktop::JournalPagesHelper
def publication_record publication, view def publication_record publication, view
content_tag :li, content_tag :li,
"item" => "true", "item" => "true",
"data-id" => publication.id.to_s, "data-id" => publication.id.to_s,
@ -88,12 +89,13 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
def link_publication_file publication def link_publication_file publication
publication.writing_journal_files.map{|file| publication.writing_journal_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title[I18n.locale.to_s]) "title" => (file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end

View File

@ -71,11 +71,11 @@ module Panel::PersonalLab::Desktop::PersonalLabsHelper
def link_publication_file publication def link_publication_file publication
publication.lab_files.map{|file| publication.lab_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title_translations[I18n.locale.to_s]) "title" => (file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end

View File

@ -71,11 +71,11 @@ module Panel::PersonalPatent::Desktop::PersonalPatentsHelper
def link_publication_file publication def link_publication_file publication
publication.writing_patent_files.map{|file| publication.writing_patent_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title_translations[I18n.locale.to_s]) "title" => (file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end

View File

@ -72,11 +72,11 @@ module Panel::PersonalProject::Desktop::PersonalProjectsHelper
def link_publication_file publication def link_publication_file publication
publication.project_files.map{|file| publication.project_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title_translations[I18n.locale.to_s]) "title" => (file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end

View File

@ -72,11 +72,11 @@ module Panel::PersonalResearch::Desktop::PersonalResearchsHelper
def link_publication_file publication def link_publication_file publication
publication.research_files.map{|file| publication.research_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \ 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, file.file.url,
:class => "file", :class => "file",
"target" => "_blank", "target" => "_blank",
"title" => file.title_translations[I18n.locale.to_s]) "title" => (file.title_translations[I18n.locale.to_s] rescue nil))
}.inject(:+) }.inject(:+)
end end