This commit is contained in:
sylor_huang@126.com 2020-10-14 09:40:25 +08:00
parent 5639a69f78
commit f3b88d77b0
3 changed files with 5 additions and 3 deletions

View File

@ -23,6 +23,7 @@ class Admins::ForumSectionsController < Admins::BaseController
def new
@parent_id = params[:parent_id]
@forum_section = ForumSection.new
end
def create

View File

@ -1,6 +1,7 @@
<div class="task-popup" style="width:500px;">
<div class="task-popup-title clearfix f14">
<%= parent_id.present? ? "新建二级版块" : "新建一级版块" %>
<%= is_create == "1" ? "新建" : "编辑"%>
<%= parent_id.present? ? "二级版块" : "一级版块" %>
</div>
<%= form_tag(admins_forum_sections_path, method: :post, class: "", remote: true) do %>
<%= hidden_field_tag :parent_id,parent_id %>

View File

@ -1,2 +1,2 @@
var htmlvalue = "<%= j render :partial => 'admins/forum_sections/new_forum', locals: {parent_id: @parent_id} %>";
pop_box_new(htmlvalue, 520, 400);
var htmlvalue = "<%= j render :partial => 'admins/forum_sections/new_forum', locals: {parent_id: @parent_id, is_create: "1", forum_section: @forum_section} %>";
$('#identifier').modal('show')