Add show plugin profile action
This commit is contained in:
parent
04a1cca4ce
commit
db5d423b33
|
@ -110,7 +110,13 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @diploma.update_attributes(params[:diploma])
|
if @diploma.update_attributes(params[:diploma])
|
||||||
|
|
||||||
|
if params[:diploma][:user_id]
|
||||||
|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:diploma][:user_id],:show_plugin_profile=>'Diploma')) }
|
||||||
|
else
|
||||||
format.html { redirect_to(panel_personal_diploma_back_end_diplomas_url) }
|
format.html { redirect_to(panel_personal_diploma_back_end_diplomas_url) }
|
||||||
|
end
|
||||||
|
|
||||||
# format.js { render 'toggle_enable' }
|
# format.js { render 'toggle_enable' }
|
||||||
format.xml { head :ok }
|
format.xml { head :ok }
|
||||||
else
|
else
|
||||||
|
@ -128,7 +134,13 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll
|
||||||
@diploma.destroy
|
@diploma.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
||||||
|
if params[:user_id]
|
||||||
|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>'Diploma')) }
|
||||||
|
else
|
||||||
format.html { redirect_to(panel_personal_diploma_back_end_diplomas_url) }
|
format.html { redirect_to(panel_personal_diploma_back_end_diplomas_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_diploma") %> </caption>
|
<caption> <%= t("module_name.personal_diploma") %> </caption>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -28,11 +29,11 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if !@diploma.start_date.blank? %>
|
<% if !@diploma.start_date.blank? %>
|
||||||
<tr><th><%= t("personal_diploma.start_date")%></th><td><%= @diploma.start_date %></td></tr>
|
<tr><th><%= t("personal_diploma.start_date")%></th><td><%= @diploma.start_date.strftime("%Y.%m") %></td></tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if !@diploma.end_date.blank? %>
|
<% if !@diploma.end_date.blank? %>
|
||||||
<tr><th><%= t("personal_diploma.end_date")%></th><td><%= @diploma.end_date %></td></tr>
|
<tr><th><%= t("personal_diploma.end_date")%></th><td><%= @diploma.end_date.strftime("%Y.%m")%></td></tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if !@diploma.language.blank? %>
|
<% if !@diploma.language.blank? %>
|
||||||
|
@ -43,3 +44,4 @@
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
|
@ -41,7 +41,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? %>
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
<% @diplomas.each do |diploma| %>
|
<% @diplomas.each do |diploma| %>
|
||||||
|
|
||||||
<tr class="<%= diploma.is_hidden ? "checkHide" : "" %>">
|
<tr id="<%= dom_id diploma %>" class="<%= diploma.is_hidden ? "checkHide" : "" %>">
|
||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<td>
|
<td>
|
||||||
<%= check_box_tag 'to_change[]', diploma.id.to_s, false, :class => "list-check" %>
|
<%= check_box_tag 'to_change[]', diploma.id.to_s, false, :class => "list-check" %>
|
||||||
|
@ -64,6 +64,14 @@
|
||||||
<td><%= diploma.start_date.strftime("%Y.%m") %> ~ <%= diploma.end_date.strftime("%Y.%m") %></td>
|
<td><%= diploma.start_date.strftime("%Y.%m") %> ~ <%= diploma.end_date.strftime("%Y.%m") %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to diploma.school_name, panel_personal_diploma_front_end_diploma_path(diploma) %>
|
<%= link_to diploma.school_name, panel_personal_diploma_front_end_diploma_path(diploma) %>
|
||||||
|
<div class="quick-edit">
|
||||||
|
<ul class="nav nav-pills hide">
|
||||||
|
<%if at_least_module_manager || diploma.diploma_category.cur_user_is_sub_manager_of(:edit)%>
|
||||||
|
<li><%= link_to t('edit'), edit_panel_personal_diploma_back_end_diploma_path(diploma,:user_id => @user.id) %></li>
|
||||||
|
<li><%= link_to t(:delete_), panel_personal_diploma_back_end_diploma_path(diploma,:user_id => @user.id), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
|
||||||
|
<% end -%>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue