Fixed Import data to import journal level types, fixed writing journal
This commit is contained in:
parent
e29b08d0dc
commit
2a41e3440e
|
@ -213,7 +213,7 @@ class Admin::ImportDataController < OrbitBackendController
|
||||||
endpage:(paper_node>"EndPage").text,
|
endpage:(paper_node>"EndPage").text,
|
||||||
subgroup:(paper_node>"subgroup").text,
|
subgroup:(paper_node>"subgroup").text,
|
||||||
remarks: (paper_node>"Remarks").text,
|
remarks: (paper_node>"Remarks").text,
|
||||||
cate: ((paper_node>"subgroup")>"group").text
|
cate: ((paper_node>"subgroup")>"Group").text
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if @journal_papers.present?
|
if @journal_papers.present?
|
||||||
|
@ -241,6 +241,13 @@ class Admin::ImportDataController < OrbitBackendController
|
||||||
@journal_paper.vol_no = b[:volumeno]
|
@journal_paper.vol_no = b[:volumeno]
|
||||||
@journal_paper.form_to_start = b[:beginpage]
|
@journal_paper.form_to_start = b[:beginpage]
|
||||||
@journal_paper.form_to_end = b[:endpage]
|
@journal_paper.form_to_end = b[:endpage]
|
||||||
|
if !b[:cate].blank?
|
||||||
|
@level_type = JournalLevelType.where(:key => b[:cate])
|
||||||
|
if @level_type.present?
|
||||||
|
@journal_paper.journal_level_type_ids = ["#{@level_type.first.id}"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
@journal_paper.create_user_id = hash.id
|
@journal_paper.create_user_id = hash.id
|
||||||
@journal_paper.save!
|
@journal_paper.save!
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_book_back_end_writing_book_paper_type_quick_edit_path(list_paper_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
<a href="<%= panel_personal_book_back_end_writing_book_paper_type_quick_edit_path(list_paper_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
||||||
<%= link_to show_toggle_archive_btn(list_paper_type),
|
<%= link_to 'Delete',
|
||||||
polymorphic_path([:panel, :personal_book, :back_end, list_paper_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_book, :back_end, list_paper_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
|
@ -92,8 +92,10 @@ class WritingJournal
|
||||||
def create_link
|
def create_link
|
||||||
title = ["#{self.paper_title}"]
|
title = ["#{self.paper_title}"]
|
||||||
title << self.journal_title if self.journal_title.present?
|
title << self.journal_title if self.journal_title.present?
|
||||||
title.join(', ')
|
|
||||||
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
|
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
|
||||||
|
title << "Volume No: "+self.vol_no if (self.vol_no.present? && self.vol_no != "0")
|
||||||
|
title << "From Page: "+self.form_to_start if (self.form_to_start.present? && self.form_to_start != "0")
|
||||||
|
title << "To Page: "+self.form_to_end if (self.form_to_end.present? && self.form_to_end != "0")
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_journal_back_end_writing_journal_level_type_quick_edit_path(list_level_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
<a href="<%= panel_personal_journal_back_end_writing_journal_level_type_quick_edit_path(list_level_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
||||||
<%= link_to show_toggle_archive_btn(list_level_type),
|
<%= link_to "Delete",
|
||||||
polymorphic_path([:panel, :personal_journal, :back_end, list_level_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_journal, :back_end, list_level_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
Loading…
Reference in New Issue