diff --git a/app/assets/javascripts/personal_book/desktop/personal_books.js b/app/assets/javascripts/personal_book/desktop/personal_books.js index b744239..2006c0d 100644 --- a/app/assets/javascripts/personal_book/desktop/personal_books.js +++ b/app/assets/javascripts/personal_book/desktop/personal_books.js @@ -92,6 +92,16 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t width: $(".overview").width() - 20 }); } + + this.initializePersonalBook.syncComplete = function(){ + o.notify("Sync Complete","success"); + o.sub_menu_item($("div[content-type=menu] a").eq(0)); + } + + this.initializePersonalBook.syncComplete = function(){ + o.notify("Sync Complete","success"); + o.sub_menu_item($("div[content-type=menu] a").eq(0)); + } this.initializePersonalBook.coAuthorformCallback = function(data){ if(data.success){ diff --git a/app/controllers/panel/personal_book/desktop/personal_books_controller.rb b/app/controllers/panel/personal_book/desktop/personal_books_controller.rb index 8036348..a324a96 100644 --- a/app/controllers/panel/personal_book/desktop/personal_books_controller.rb +++ b/app/controllers/panel/personal_book/desktop/personal_books_controller.rb @@ -7,7 +7,7 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl page ||= 1 @per_column = 5 - + @userid = current_user.id case @view_by when "abstract" @per_column = 1 @@ -70,4 +70,4 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl def books_window render :layout => false end -end \ No newline at end of file +end diff --git a/app/models/writing_book.rb b/app/models/writing_book.rb index e6359f9..b855aaa 100644 --- a/app/models/writing_book.rb +++ b/app/models/writing_book.rb @@ -84,20 +84,13 @@ class WritingBook def create_link title = [] - title << self.authors if self.authors.present? - - # title << self.paper_title if self.paper_title.present? + # title = ["#{self.extracted_chapters}"] if self.extracted_chapters.present? + title << self.paper_title if self.paper_title.present? title << self.book_title if self.book_title.present? title << self.publisher if self.publisher.present? - title << self.isbn if self.isbn.present? - - if !self.publish_date.nil? - pd = self.publish_date.strftime("%Y-%m-%d").split('-') - title << pd[0]+"/"+pd[1] - end - + title << self.pages if self.pages.present? # title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" - title.join(', ') + title.join(', ') end protected diff --git a/app/views/panel/personal_book/desktop/personal_books/index.html.erb b/app/views/panel/personal_book/desktop/personal_books/index.html.erb index 2dee7a9..d893e3c 100644 --- a/app/views/panel/personal_book/desktop/personal_books/index.html.erb +++ b/app/views/panel/personal_book/desktop/personal_books/index.html.erb @@ -57,6 +57,9 @@ +
+
Sync Books
+
@@ -67,4 +70,4 @@ <%= publication_record w, @view_by%> <% end %> - \ No newline at end of file + diff --git a/app/views/panel/personal_book/plugin/_profile.html.erb b/app/views/panel/personal_book/plugin/_profile.html.erb index d9df9f3..ee6aa78 100644 --- a/app/views/panel/personal_book/plugin/_profile.html.erb +++ b/app/views/panel/personal_book/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_book_back_end_personal_book_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_book_back_end_writing_book_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_book_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_book_back_end_personal_book_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_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %>