Add show plugin profile action
This commit is contained in:
parent
43a34f0b9f
commit
99a5cf6329
|
@ -101,7 +101,13 @@ class Panel::PersonalResearch::BackEnd::ResearchsController < OrbitBackendContro
|
|||
|
||||
respond_to do |format|
|
||||
if @research.update_attributes(params[:research])
|
||||
format.html { redirect_to(panel_personal_research_back_end_researchs_url) }
|
||||
|
||||
if params[:research][:user_id]
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:research][:user_id],:show_plugin_profile=>"Research")) }
|
||||
else
|
||||
format.html { redirect_to(panel_personal_research_back_end_researchs_url) }
|
||||
end
|
||||
|
||||
# format.js { render 'toggle_enable' }
|
||||
format.xml { head :ok }
|
||||
else
|
||||
|
@ -119,7 +125,13 @@ class Panel::PersonalResearch::BackEnd::ResearchsController < OrbitBackendContro
|
|||
@research.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to(panel_personal_research_back_end_researchs_url) }
|
||||
|
||||
if params[:user_id]
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Research")) }
|
||||
else
|
||||
format.html { redirect_to(panel_personal_research_back_end_researchs_url) }
|
||||
end
|
||||
|
||||
# format.xml { head :ok }
|
||||
format.js
|
||||
end
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<% # encoding: utf-8 %>
|
||||
|
||||
<div class="writing_detail">
|
||||
<table>
|
||||
<caption> <%= t("module_name.personal_research") %> </caption>
|
||||
<tbody>
|
||||
|
@ -20,14 +21,16 @@
|
|||
<% end %>
|
||||
|
||||
<% if !@research.publish_date.blank? %>
|
||||
<tr><th><%= t("personal_research.publication_date")%></th><td><%= @research.publish_date %></td></tr>
|
||||
<tr><th><%= t("personal_research.publication_date")%></th><td><%= @research.publish_date.strftime("%Y.%m") %></td></tr>
|
||||
<% end %>
|
||||
|
||||
<% if !@research.url.blank? %>
|
||||
<tr><th><%= t("personal_research.url")%></th><td><%= link_to t(:url), @research.url, {:target => '_blank', :title => @research.url} if !@research.url.blank? %></td></tr>
|
||||
<% end %>
|
||||
|
||||
<tr><th><%= t("personal_research.authors")%></th><td><%= "#{User.from_id(@research.create_user_id).name rescue ''},#{@research.authors rescue ''}"%></td></tr>
|
||||
<% if !@research.authors.blank? %>
|
||||
<tr><th><%= t("personal_research.authors")%></th><td><%= "#{@research.authors rescue ''}"%></td></tr>
|
||||
<% end %>
|
||||
|
||||
<% if @research.research_files.size > 0 %>
|
||||
<tr><th><%= t("personal_research.file")%></th>
|
||||
|
@ -45,3 +48,4 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</div>
|
||||
<% end -%>
|
||||
|
||||
<table class="table table-condensed table-striped">
|
||||
<table class="table table-condensed table-striped main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<% if is_admin? %>
|
||||
|
@ -55,7 +55,7 @@
|
|||
|
||||
<% @researchs.each do |research| %>
|
||||
|
||||
<tr class="<%= research.is_hidden ? "checkHide" : "" %>">
|
||||
<tr id="<%= dom_id research %>"class="<%= research.is_hidden ? "checkHide" : "" %>">
|
||||
<% if is_admin? %>
|
||||
<td>
|
||||
<%= check_box_tag 'to_change[]', research.id.to_s, false, :class => "list-check" %>
|
||||
|
@ -64,6 +64,14 @@
|
|||
<td><%= research.publish_date.strftime("%Y.%m") %></td>
|
||||
<td>
|
||||
<%= link_to research.research_title, panel_personal_research_front_end_research_path(research) %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<%if at_least_module_manager || research.research_category.cur_user_is_sub_manager_of(:edit)%>
|
||||
<li><%= link_to t('edit'), edit_panel_personal_research_back_end_research_path(research,:user_id => @user.id) %></li>
|
||||
<li><%= link_to t(:delete_), panel_personal_research_back_end_research_path(research,:user_id => @user.id), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
Loading…
Reference in New Issue