Add show plugin profile action
This commit is contained in:
parent
22c2942f8e
commit
15cce36f9a
|
@ -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])
|
||||||
|
|
||||||
|
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) }
|
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|
|
||||||
|
|
||||||
|
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) }
|
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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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