diff --git a/app/assets/javascripts/personal_journal/desktop/journal_pages.js b/app/assets/javascripts/personal_journal/desktop/journal_pages.js index 5da6a9d..3fee6f7 100644 --- a/app/assets/javascripts/personal_journal/desktop/journal_pages.js +++ b/app/assets/javascripts/personal_journal/desktop/journal_pages.js @@ -42,6 +42,10 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // this.initializeJournalPapers.cancelpaper = function(){ o.highlight_sub_menu_item(0); } + this.initializeJournalPapers.syncComplete = function(){ + o.notify("Sync Complete","success"); + o.sub_menu_item($("div[content-type=menu] a").eq(0)); + } var uploadFiles = function(){ $('#add_plugin_file a.add').click(function(){ diff --git a/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb b/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb index 5948148..5a7c5e8 100644 --- a/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb +++ b/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb @@ -7,7 +7,7 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr page ||= 1 @per_column = 5 - + @userid = current_user.id case @view_by when "abstract" @per_column = 1 diff --git a/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb b/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb index 785cb0c..2e95d1c 100644 --- a/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb +++ b/app/helpers/panel/personal_journal/desktop/journal_pages_helper.rb @@ -81,6 +81,7 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper "ajax-remote" => "delete", "confirm-message" => t("sure?"), "callback-method" => "paperDelete", + "response-type" => "json", "delete-item" => "true", :class => "journal_paper_delete admbg2 admtxt", :href => panel_personal_journal_desktop_journal_page_path(publication)) diff --git a/app/models/writing_journal.rb b/app/models/writing_journal.rb index 415198b..2ca3846 100644 --- a/app/models/writing_journal.rb +++ b/app/models/writing_journal.rb @@ -90,21 +90,13 @@ class WritingJournal end def create_link - title = [] - - title << self.authors if self.authors.present? - - if !self.publication_date.nil? - pd = self.publication_date.strftime("%Y-%m-%d").split('-') - title << pd[0] - end - title << self.paper_title if self.paper_title.present? + title = ["#{self.paper_title}"] title << self.journal_title if self.journal_title.present? - title << self.vol_no if (self.vol_no.present? && self.vol_no != "0") - title << self.issue_no if (self.issue_no.present? && self.issue_no != "0") - title << "pp"+self.form_to_start+"-"+self.form_to_end if (self.form_to_start.present? && self.form_to_start != "0") title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil) - title.join(', ') + 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(', ') end def new_writing_journal_files=(var) diff --git a/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb b/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb index 07007f4..5e68aa5 100644 --- a/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb +++ b/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb @@ -58,6 +58,9 @@ +
+
Sync Journal Papers
+
@@ -68,4 +71,4 @@ <%= publication_record w, @view_by%> <% end %> - \ No newline at end of file + diff --git a/app/views/panel/personal_journal/plugin/_profile.html.erb b/app/views/panel/personal_journal/plugin/_profile.html.erb index 124439f..3813ce3 100644 --- a/app/views/panel/personal_journal/plugin/_profile.html.erb +++ b/app/views/panel/personal_journal/plugin/_profile.html.erb @@ -80,8 +80,9 @@ <% if is_admin? %>
- <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_journal_back_end_personal_journal_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %> - <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_journal_back_end_writing_journal_path(:user_id => @user.id), :class => 'btn btn-primary' %> + <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_journal_paper_data_path(:user_id => @user.id), :class => 'btn btn-primary' %> + <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_journal_back_end_personal_journal_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %> + <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_journal_back_end_writing_journal_path(:user_id => @user.id), :class => 'btn btn-primary' %>