Compare commits

..

1 Commits

Author SHA1 Message Date
Manson Wang 4c8701c63f ntu_mb 2014-02-10 18:36:25 +08:00
6 changed files with 10 additions and 37 deletions

View File

@ -277,13 +277,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
respond_to do |format|
if @writing_journal.update_attributes(params[:writing_journal])
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.html { redirect_to(panel_personal_journal_back_end_writing_journals_url) }
# format.js { render 'toggle_enable' }
format.xml { head :ok }
else
@ -302,13 +296,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
@writing_journal.destroy
respond_to do |format|
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.html { redirect_to(panel_personal_journal_back_end_writing_journals_url) }
# format.xml { head :ok }
format.js
end

View File

@ -97,6 +97,8 @@ class WritingJournal
if !self.publication_date.nil?
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
title << pd[0]
elsif !self.year.blank?
title << self.year
end
title << self.paper_title if self.paper_title.present?
title << self.journal_title if self.journal_title.present?

View File

@ -1,6 +1,5 @@
<% # encoding: utf-8 %>
<div class="writing_detail">
<table>
<caption> <%= t("module_name.personal_journal") %> </caption>
<tbody>
@ -64,9 +63,7 @@
<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 %>
<% if !@writing_journal.authors.blank? %>
<tr><th><%= t("personal_journal.authors")%></th><td><%= "#{@writing_journal.authors rescue ''}"%></td></tr>
<% 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.writing_journal_files.size > 0 %>
<tr><th><%= t("personal_journal.file")%></th>
@ -85,4 +82,3 @@
</tbody>
</table>
</div>

View File

@ -40,7 +40,7 @@
</div>
<% end -%>
<table class="table table-condensed table-striped main-list">
<table class="table table-condensed table-striped">
<thead>
<tr>
<% if is_admin? %>
@ -57,7 +57,7 @@
<% @writing_journals.each do |writing_journal| %>
<tr id="<%= dom_id writing_journal %>" class="<%= writing_journal.is_hidden ? "checkHide" : "" %>">
<tr class="<%= writing_journal.is_hidden ? "checkHide" : "" %>">
<% if is_admin? %>
<td>
<%= check_box_tag 'to_change[]', writing_journal.id.to_s, false, :class => "list-check" %>
@ -66,16 +66,6 @@
<td><%= writing_journal.year %></td>
<td>
<%= 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>
<% if not @user%>
<td><%= writing_journal.authors %></td>
@ -87,17 +77,16 @@
</tbody>
</table>
<% if is_admin? %>
<div class="bottomnav clearfix">
<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('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' %>
</div>
<div class="pagination pagination-centered">
<%= paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div>
</div>
<% end %>
<div id="dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="Delete item" aria-hidden="true">
<div class="modal-header">

View File

@ -11,7 +11,6 @@ en:
isbn : "ISSN(ISBN)"
vol_no : "Vol.No"
issue_no : "Issue.No"
form_to: "From To"
form_to_start : "From"
form_to_end : "To"
total_pages : "Total Pages"

View File

@ -11,7 +11,6 @@ zh_tw:
isbn : "ISSN(ISBN)"
vol_no : "卷數"
issue_no : "期數"
form_to: "From To"
form_to_start : "起"
form_to_end : "訖"
total_pages : "總頁數"