From 33b5f821c4688d0795e122b01225d59c97bf9a38 Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Fri, 15 Aug 2014 11:21:11 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=B4=E5=90=A7?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=B8=8D=E8=83=BD=E5=88=A0=E9=99=A4=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_tag_name.html.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index f5057aba3..7ecb25a9e 100644 --- a/app/views/tags/_tag_name.html.erb +++ b/app/views/tags/_tag_name.html.erb @@ -70,7 +70,14 @@ :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> + <% when '5' %> + <% if Forum.find(params[:id]) %> + <% if Forum.find(params[:id]).creator_id == User.current.id %> + <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, + :taggable_id => obj.id, :taggable_type => object_flag %> + <% end %> + <% end %> <% when '6' %> <% if (User.current.logged? && User.current.admin? From 19c5ebf4506b537f68a5c872d008a03f13d3798b Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Fri, 15 Aug 2014 14:07:13 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=B4=E5=90=A7?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=9C=89=E5=88=A0=E9=99=A4=E6=A0=87=E8=AF=86?= =?UTF-8?q?=E5=90=8E=E5=88=A0=E9=99=A4=E5=A4=B1=E8=B4=A5=E7=9A=84bug?= =?UTF-8?q?=EF=BC=9B=20=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4=E5=90=8E?= =?UTF-8?q?=E6=B2=A1=E5=88=B7=E6=96=B0=E7=9A=84bug=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/tags_helper.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb index 8e9e6bbb9..17b68c3f6 100644 --- a/app/helpers/tags_helper.rb +++ b/app/helpers/tags_helper.rb @@ -12,6 +12,8 @@ module TagsHelper @obj = Issue.find_by_id(obj_id) when '4' @obj = Bid.find_by_id(obj_id) + when '5' + @obj = Forum.find_by_id(obj_id) when '6' @obj = Attachment.find_by_id(obj_id) when '7' @@ -44,6 +46,8 @@ module TagsHelper if user.id == obj_id @result = true end + when '5' + @result = is_forum_manager?(user.id,obj_id) when '7' if user.id == obj_id @result = true @@ -56,6 +60,17 @@ module TagsHelper end +# 判断用户是否是贴吧的管理员 +# add by chenmin +def is_forum_manager?(user_id,forum_id) + @result = false + @user_id = Forum.find(forum_id).creator_id; + if @user_id == user.id + @result = true + end + return @result +end + def tagname_val ("#tag_name_name").value end \ No newline at end of file From e44ece80f6d29d6f05394063c7d2cac4814da469 Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Fri, 15 Aug 2014 14:45:04 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E8=B4=B4=E5=AD=90=E4=B8=BB=E9=A2=98=E8=B6=85=E5=87=BA?= =?UTF-8?q?=E8=BE=B9=E7=95=8Cbug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_project_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 3002cb769..1327f13e9 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -53,7 +53,7 @@ <% end %> -
<%= l(:label_class_period) %> * - <%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时" %> <%= l(:label_class_hour)%> + <%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时",:maxlength=>5 %> <%= l(:label_class_hour)%> |
<%= l(:label_class_period) %> * - <%= text_field_tag :class_period, nil, :placeholder => "在此输入课时" %><%= l(:label_class_hour)%> + <%= text_field_tag :class_period, nil, :placeholder => "在此输入课时",:maxlength=>5 %><%= l(:label_class_hour)%> |
<%= l(:label_bids_reward_method) %><%= @contest.budget%>
-