Browse Source

Change

pull/245/head
sylor_huang@126.com 5 years ago
parent
commit
f3b88d77b0
3 changed files with 5 additions and 3 deletions
  1. +1
    -0
      app/controllers/admins/forum_sections_controller.rb
  2. +2
    -1
      app/views/admins/forum_sections/_new_forum.html.erb
  3. +2
    -2
      app/views/admins/forum_sections/new.js.erb

+ 1
- 0
app/controllers/admins/forum_sections_controller.rb 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


+ 2
- 1
app/views/admins/forum_sections/_new_forum.html.erb 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 %>


+ 2
- 2
app/views/admins/forum_sections/new.js.erb 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')

Loading…
Cancel
Save