diff --git a/app/assets/javascripts/personal_conference/desktop/conference_pages.js b/app/assets/javascripts/personal_conference/desktop/conference_pages.js index 613a9dd..ceb2cd8 100644 --- a/app/assets/javascripts/personal_conference/desktop/conference_pages.js +++ b/app/assets/javascripts/personal_conference/desktop/conference_pages.js @@ -42,7 +42,10 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){ this.initializeConferencePapers.cancelpaper = function(){ o.highlight_sub_menu_item(0); } - + this.initializeConferencePapers.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(){ var new_id = $(this).prev().attr('value'); diff --git a/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb b/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb index 7f3603a..5701b0e 100644 --- a/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb +++ b/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb @@ -4,7 +4,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio @writing_conferences = WritingConference.where(create_user_id: current_user.id) page = params[:page] page ||= 1 - + @userid = current_user.id if @view_by.nil? @writing_conferences = @writing_conferences.asc(:paper_title) else diff --git a/app/models/writing_conference.rb b/app/models/writing_conference.rb index 8b5ab9e..fd27478 100644 --- a/app/models/writing_conference.rb +++ b/app/models/writing_conference.rb @@ -84,21 +84,13 @@ class WritingConference 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.conference_title if self.conference_title.present? + title << self.sponsor if self.sponsor.present? title << self.location if self.location.present? title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?) # title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})" - title.join(', ') + title.join(', ') end protected diff --git a/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb b/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb index d61d3bf..80de024 100644 --- a/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb +++ b/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb @@ -58,6 +58,10 @@ + +
+
Sync Conference Papers
+
diff --git a/app/views/panel/personal_conference/plugin/_profile.html.erb b/app/views/panel/personal_conference/plugin/_profile.html.erb index 081a3c5..e7efa7f 100644 --- a/app/views/panel/personal_conference/plugin/_profile.html.erb +++ b/app/views/panel/personal_conference/plugin/_profile.html.erb @@ -75,8 +75,9 @@ <% if is_admin? %>
- <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_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_conference_back_end_writing_conference_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_conference_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_conference_back_end_personal_conference_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_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>