Add show plugin profile action
This commit is contained in:
parent
308052cc15
commit
cec31ed345
|
@ -176,7 +176,13 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon
|
|||
|
||||
respond_to do |format|
|
||||
if @writing_patent.update_attributes(params[:writing_patent])
|
||||
format.html { redirect_to(panel_personal_patent_back_end_writing_patents_url) }
|
||||
|
||||
if params[:writing_patent][:user_id]
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:writing_patent][:user_id],:show_plugin_profile=>"WritingPatent")) }
|
||||
else
|
||||
format.html { redirect_to(panel_personal_patent_back_end_writing_patents_url) }
|
||||
end
|
||||
|
||||
# format.js { render 'toggle_enable' }
|
||||
format.xml { head :ok }
|
||||
else
|
||||
|
@ -195,7 +201,13 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon
|
|||
@writing_patent.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to(panel_personal_patent_back_end_writing_patents_url) }
|
||||
|
||||
if params[:user_id]
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingPatent")) }
|
||||
else
|
||||
format.html { redirect_to(panel_personal_patent_back_end_writing_patents_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_patent") %> </caption>
|
||||
<tbody>
|
||||
|
@ -28,14 +29,16 @@
|
|||
<% end %>
|
||||
|
||||
<% if !@writing_patent.publish_date.blank? %>
|
||||
<tr><th><%= t("personal_patent.publication_date")%></th><td><%= @writing_patent.publish_date %></td></tr>
|
||||
<tr><th><%= t("personal_patent.publication_date")%></th><td><%= @writing_patent.publish_date.strftime("%Y.%m") %></td></tr>
|
||||
<% end %>
|
||||
|
||||
<% if !@writing_patent.url.blank? %>
|
||||
<tr><th><%= t("personal_patent.url")%></th><td><%= link_to t(:url), @writing_patent.url, {:target => '_blank', :title => @writing_patent.url} if !@writing_patent.url.blank? %></td></tr>
|
||||
<% end %>
|
||||
|
||||
<tr><th><%= t("personal_patent.authors")%></th><td><%= "#{User.from_id(@writing_patent.create_user_id).name rescue ''},#{@writing_patent.authors rescue ''}"%></td></tr>
|
||||
<% if !@writing_patent.authors.blank? %>
|
||||
<tr><th><%= t("personal_patent.authors")%></th><td><%= "#{@writing_patent.authors rescue ''}"%></td></tr>
|
||||
<% end %>
|
||||
|
||||
<% if @writing_patent.writing_patent_files.size > 0 %>
|
||||
<tr><th><%= t("personal_patent.file")%></th>
|
||||
|
@ -53,3 +56,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 @@
|
|||
|
||||
<% @writing_patents.each do |writing_patent| %>
|
||||
|
||||
<tr class="<%= writing_patent.is_hidden ? "checkHide" : "" %>">
|
||||
<tr id="<%= dom_id writing_patent %>" class="<%= writing_patent.is_hidden ? "checkHide" : "" %>">
|
||||
<% if is_admin? %>
|
||||
<td>
|
||||
<%= check_box_tag 'to_change[]', writing_patent.id.to_s, false, :class => "list-check" %>
|
||||
|
@ -64,6 +64,14 @@
|
|||
<td><%= writing_patent.publish_date.strftime("%Y.%m") %></td>
|
||||
<td>
|
||||
<%= link_to writing_patent.patent_title, panel_personal_patent_front_end_writing_patent_path(writing_patent) %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<%if at_least_module_manager || writing_patent.writing_patent_category.cur_user_is_sub_manager_of(:edit)%>
|
||||
<li><%= link_to t('edit'), edit_panel_personal_patent_back_end_writing_patent_path(writing_patent,:user_id => @user.id) %></li>
|
||||
<li><%= link_to t(:delete_), panel_personal_patent_back_end_writing_patent_path(writing_patent,:user_id => @user.id), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
Loading…
Reference in New Issue