Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
spen | a4e8c4d998 | |
spen | cb178e8df7 | |
Manson Wang | e6daaac575 |
|
@ -42,6 +42,10 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||||
this.initializeJournalPapers.cancelpaper = function(){
|
this.initializeJournalPapers.cancelpaper = function(){
|
||||||
o.highlight_sub_menu_item(0);
|
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(){
|
var uploadFiles = function(){
|
||||||
$('#add_plugin_file a.add').click(function(){
|
$('#add_plugin_file a.add').click(function(){
|
||||||
|
|
|
@ -277,7 +277,13 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @writing_journal.update_attributes(params[:writing_journal])
|
if @writing_journal.update_attributes(params[:writing_journal])
|
||||||
format.html { redirect_to(panel_personal_journal_back_end_writing_journals_url) }
|
|
||||||
|
if params[:writing_journal][:user_id]
|
||||||
|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:writing_journal][:user_id],:show_plugin_profile=>"WritingJournal")) }
|
||||||
|
else
|
||||||
|
format.html { redirect_to(panel_personal_journal_back_end_writing_journals_url) }
|
||||||
|
end
|
||||||
|
|
||||||
# format.js { render 'toggle_enable' }
|
# format.js { render 'toggle_enable' }
|
||||||
format.xml { head :ok }
|
format.xml { head :ok }
|
||||||
else
|
else
|
||||||
|
@ -296,7 +302,13 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
|
||||||
@writing_journal.destroy
|
@writing_journal.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to(panel_personal_journal_back_end_writing_journals_url) }
|
|
||||||
|
if params[:user_id]
|
||||||
|
format.html { redirect_to(admin_users_new_interface_url(:id=>[:user_id],:show_plugin_profile=>"WritingJournal")) }
|
||||||
|
else
|
||||||
|
format.html { redirect_to(panel_personal_journal_back_end_writing_journals_url) }
|
||||||
|
end
|
||||||
|
|
||||||
# format.xml { head :ok }
|
# format.xml { head :ok }
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,7 +7,7 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
|
||||||
page ||= 1
|
page ||= 1
|
||||||
|
|
||||||
@per_column = 5
|
@per_column = 5
|
||||||
|
@userid = current_user.id
|
||||||
case @view_by
|
case @view_by
|
||||||
when "abstract"
|
when "abstract"
|
||||||
@per_column = 1
|
@per_column = 1
|
||||||
|
|
|
@ -81,6 +81,7 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
|
||||||
"ajax-remote" => "delete",
|
"ajax-remote" => "delete",
|
||||||
"confirm-message" => t("sure?"),
|
"confirm-message" => t("sure?"),
|
||||||
"callback-method" => "paperDelete",
|
"callback-method" => "paperDelete",
|
||||||
|
"response-type" => "json",
|
||||||
"delete-item" => "true",
|
"delete-item" => "true",
|
||||||
:class => "journal_paper_delete admbg2 admtxt",
|
:class => "journal_paper_delete admbg2 admtxt",
|
||||||
:href => panel_personal_journal_desktop_journal_page_path(publication))
|
:href => panel_personal_journal_desktop_journal_page_path(publication))
|
||||||
|
|
|
@ -91,20 +91,14 @@ class WritingJournal
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
title = []
|
title = []
|
||||||
|
|
||||||
title << self.authors if self.authors.present?
|
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 if self.paper_title.present?
|
||||||
title << self.journal_title if self.journal_title.present?
|
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 << ( !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
|
end
|
||||||
|
|
||||||
def new_writing_journal_files=(var)
|
def new_writing_journal_files=(var)
|
||||||
|
|
|
@ -58,6 +58,9 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="hh1 hp sdm">
|
||||||
|
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_journal_paper_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Journal Papers</a></div>
|
||||||
|
</div>
|
||||||
<div class="hh1 hp sdm">
|
<div class="hh1 hp sdm">
|
||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,4 +71,4 @@
|
||||||
<%= publication_record w, @view_by%>
|
<%= publication_record w, @view_by%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="grid1"><%= t('personal_journal.year') %></th>
|
<th class="grid1"><%= t('personal_journal.year') %></th>
|
||||||
<th class="grid8"><%= t('module_name.personal_journal') %></th>
|
<th class="grid8"><%= t('module_name.personal_journal') %></th>
|
||||||
<th class="grid3"><%= t('personal_journal.authors') %></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -35,7 +34,6 @@
|
||||||
<td>
|
<td>
|
||||||
<%= link_to writing_journal.create_link, panel_personal_journal_front_end_writing_journal_path(writing_journal) %>
|
<%= link_to writing_journal.create_link, panel_personal_journal_front_end_writing_journal_path(writing_journal) %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= User.find(writing_journal.create_user_id).name rescue '' %></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<% # encoding: utf-8 %>
|
<% # encoding: utf-8 %>
|
||||||
|
|
||||||
|
<div class="writing_detail">
|
||||||
<table>
|
<table>
|
||||||
<caption> <%= t("module_name.personal_journal") %> </caption>
|
<caption> <%= t("module_name.personal_journal") %> </caption>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -63,7 +64,9 @@
|
||||||
<tr><th><%= t("personal_journal.url")%></th><td><%= link_to t(:url), @writing_journal.url, {:target => '_blank', :title => @writing_journal.url} if !@writing_journal.url.blank? %></td></tr>
|
<tr><th><%= t("personal_journal.url")%></th><td><%= link_to t(:url), @writing_journal.url, {:target => '_blank', :title => @writing_journal.url} if !@writing_journal.url.blank? %></td></tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<tr><th><%= t("personal_journal.authors")%></th><td><%= "#{User.from_id(@writing_journal.create_user_id).name rescue ''},#{@writing_journal.authors rescue ''}"%></td></tr>
|
<% if !@writing_journal.authors.blank? %>
|
||||||
|
<tr><th><%= t("personal_journal.authors")%></th><td><%= "#{@writing_journal.authors rescue ''}"%></td></tr>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if @writing_journal.writing_journal_files.size > 0 %>
|
<% if @writing_journal.writing_journal_files.size > 0 %>
|
||||||
<tr><th><%= t("personal_journal.file")%></th>
|
<tr><th><%= t("personal_journal.file")%></th>
|
||||||
|
@ -82,3 +85,4 @@
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
|
@ -40,7 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<table class="table table-condensed table-striped">
|
<table class="table table-condensed table-striped main-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
<% @writing_journals.each do |writing_journal| %>
|
<% @writing_journals.each do |writing_journal| %>
|
||||||
|
|
||||||
<tr class="<%= writing_journal.is_hidden ? "checkHide" : "" %>">
|
<tr id="<%= dom_id writing_journal %>" class="<%= writing_journal.is_hidden ? "checkHide" : "" %>">
|
||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<td>
|
<td>
|
||||||
<%= check_box_tag 'to_change[]', writing_journal.id.to_s, false, :class => "list-check" %>
|
<%= check_box_tag 'to_change[]', writing_journal.id.to_s, false, :class => "list-check" %>
|
||||||
|
@ -66,6 +66,16 @@
|
||||||
<td><%= writing_journal.year %></td>
|
<td><%= writing_journal.year %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to writing_journal.create_link, panel_personal_journal_front_end_writing_journal_path(writing_journal) %>
|
<%= link_to writing_journal.create_link, panel_personal_journal_front_end_writing_journal_path(writing_journal) %>
|
||||||
|
|
||||||
|
<div class="quick-edit">
|
||||||
|
<ul class="nav nav-pills hide">
|
||||||
|
<%if at_least_module_manager || writing_journal.writing_journal_category.cur_user_is_sub_manager_of(:edit)%>
|
||||||
|
<li><%= link_to t('edit'), edit_panel_personal_journal_back_end_writing_journal_path(writing_journal,:user_id => @user.id) %></li>
|
||||||
|
<li><%= link_to t(:delete_), panel_personal_journal_back_end_writing_journal_path(writing_journal,:user_id => @user.id), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
|
||||||
|
<% end -%>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<% if not @user%>
|
<% if not @user%>
|
||||||
<td><%= writing_journal.authors %></td>
|
<td><%= writing_journal.authors %></td>
|
||||||
|
@ -80,8 +90,9 @@
|
||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
<%= 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('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('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.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' %>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination pagination-centered">
|
<div class="pagination pagination-centered">
|
||||||
<%= paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
<%= paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||||
|
|
|
@ -11,6 +11,7 @@ en:
|
||||||
isbn : "ISSN(ISBN)"
|
isbn : "ISSN(ISBN)"
|
||||||
vol_no : "Vol.No"
|
vol_no : "Vol.No"
|
||||||
issue_no : "Issue.No"
|
issue_no : "Issue.No"
|
||||||
|
form_to: "From To"
|
||||||
form_to_start : "From"
|
form_to_start : "From"
|
||||||
form_to_end : "To"
|
form_to_end : "To"
|
||||||
total_pages : "Total Pages"
|
total_pages : "Total Pages"
|
||||||
|
|
|
@ -11,6 +11,7 @@ zh_tw:
|
||||||
isbn : "ISSN(ISBN)"
|
isbn : "ISSN(ISBN)"
|
||||||
vol_no : "卷數"
|
vol_no : "卷數"
|
||||||
issue_no : "期數"
|
issue_no : "期數"
|
||||||
|
form_to: "From To"
|
||||||
form_to_start : "起"
|
form_to_start : "起"
|
||||||
form_to_end : "訖"
|
form_to_end : "訖"
|
||||||
total_pages : "總頁數"
|
total_pages : "總頁數"
|
||||||
|
|
Loading…
Reference in New Issue