From f2903ae90325e489ba70376f0449ef6a0b149835 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 13 Jun 2016 09:45:11 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E8=B4=B4=E5=90=A7?= =?UTF-8?q?=E5=90=8E=E8=87=AA=E5=8A=A8=E8=B7=B3=E5=85=A5=E8=AF=A5=E8=B4=B4?= =?UTF-8?q?=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/create.js.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/forums/create.js.erb b/app/views/forums/create.js.erb index be99d724a..aae5122e4 100644 --- a/app/views/forums/create.js.erb +++ b/app/views/forums/create.js.erb @@ -1,6 +1,7 @@ <%if @save_flag%> -$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle(); -$('#reorder_time').click(); +//$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle(); +//$('#reorder_time').click(); + window.location.href= "http://"+"<%= Setting.host_name%>"+"/forums/" + "<%= @forum.id%>" <%else%> $("#error").html("<%= @forum.errors.full_messages[0]%>").show(); <%end %> \ No newline at end of file From e86419c28bfa4bbff08a6f9cc1769ea95026aa43 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 13 Jun 2016 13:35:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=87=8C=E9=9D=A2=E6=A0=8F=E7=9B=AE=E7=B1=BB=E5=9E=8B=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BA=E5=B8=96=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/org_subfields_controller.rb | 5 +++-- app/views/org_subfields/create.js.erb | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb index 159648f34..38f5879e5 100644 --- a/app/controllers/org_subfields_controller.rb +++ b/app/controllers/org_subfields_controller.rb @@ -14,9 +14,10 @@ class OrgSubfieldsController < ApplicationController SubfieldSubdomainDir.create(:org_subfield_id => @subfield.id, :name => params[:sub_dir].downcase) end end - @subfield.update_attributes(:field_type => params[:field_type]) + #默认类型为帖子 + @subfield.update_attributes(:field_type => params[:field_type]||"Post") # admin配置的类型 - update_status_by_type(@subfield, params[:field_type]) + update_status_by_type(@subfield, params[:field_type]||"Post") else @res = false end diff --git a/app/views/org_subfields/create.js.erb b/app/views/org_subfields/create.js.erb index 952ed7b2c..a65f53719 100644 --- a/app/views/org_subfields/create.js.erb +++ b/app/views/org_subfields/create.js.erb @@ -4,6 +4,8 @@ $("#sub_field_left_lists").html(""); $("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>"); $("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>"); + //默认选中第一个 + $("input[name='field_type']").get(0).checked=true; <% end %> $("#subfield_name").val(""); $("#sub_dir").val(""); \ No newline at end of file From 44c9265fee20616107f9a484e6e77ee253929eda Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 13 Jun 2016 15:29:15 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E4=B8=AA=E6=80=A7=E7=AD=BE=E5=90=8D=E5=A2=9E=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=AF=86=E5=88=ABurl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layouts/_user_brief_introduction.html.erb | 14 ++++++++------ app/views/layouts/new_base_user.html.erb | 7 ++++--- app/views/users/edit_brief_introduction.js.erb | 3 ++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/views/layouts/_user_brief_introduction.html.erb b/app/views/layouts/_user_brief_introduction.html.erb index 3b0500fed..4b2645129 100644 --- a/app/views/layouts/_user_brief_introduction.html.erb +++ b/app/views/layouts/_user_brief_introduction.html.erb @@ -1,8 +1,10 @@ -<% if user.user_extensions && user.user_extensions.brief_introduction && !user.user_extensions.brief_introduction.empty? %> - <%= user.user_extensions.brief_introduction %> -<% else%> - 这位童鞋很懒,什么也没有留下~ -<% end %> + + <% if user.user_extensions && user.user_extensions.brief_introduction && !user.user_extensions.brief_introduction.empty? %> + <%= user.user_extensions.brief_introduction %> + <% else%> + 这位童鞋很懒,什么也没有留下~ + <% end %> + <% if User.current == user%> <%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_user_introduction();"%> -<% end%> \ No newline at end of file +<% end %> diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index e43aa499f..d67b2d3f3 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -139,9 +139,9 @@
- <%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %> -
+