From ff763bd6d6bf243d180d245748cca5d120f85110 Mon Sep 17 00:00:00 2001 From: Manson Wang Date: Mon, 10 Feb 2014 18:30:49 +0800 Subject: [PATCH] ntu_mb --- app/models/writing_book.rb | 2 ++ app/views/panel/personal_book/plugin/_profile.html.erb | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/writing_book.rb b/app/models/writing_book.rb index e6359f9..1e99ac6 100644 --- a/app/models/writing_book.rb +++ b/app/models/writing_book.rb @@ -94,6 +94,8 @@ class WritingBook if !self.publish_date.nil? pd = self.publish_date.strftime("%Y-%m-%d").split('-') title << pd[0]+"/"+pd[1] + elsif !self.year.blank? + title << self.year end # title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" diff --git a/app/views/panel/personal_book/plugin/_profile.html.erb b/app/views/panel/personal_book/plugin/_profile.html.erb index 5982c5d..9d0beb9 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' %>