From 9452254b62823ef4c416857f2ccfdf2ec5d9ab86 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Tue, 29 Mar 2016 17:39:20 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_activities.html.erb | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index dea8be552..69d209df9 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -64,36 +64,36 @@ <% when 'Course' %> <% case user_activity.act_type.to_s %> <% when 'HomeworkCommon' %> - <% cache (act) do %> + <%# cache (act) do %> <%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id,:course_activity => 0} %> - <% end %> + <%# end %> <% when 'News' %> - <% cache [act, act.comments.count] do %> + <%# cache [act, act.comments.count] do %> <%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> - <% end %> + <%# end %> <% when 'Message'%> <%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %> <% when 'Poll' %> <%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %> <% when 'Course'%> - <% cache (act) do %> + <%# cache (act) do %> <%= render :partial => 'users/course_create', :locals => {:activity => act, :user_activity_id => act.id} %> - <%end%> + <%# end%> <% when 'JournalsForMessage'%> <%= render :partial => 'users/course_journalsformessage', :locals => {:activity => act, :user_activity_id => user_activity.id} %> <% end %> <% when 'Project' %> <% case user_activity.act_type.to_s %> <% when 'Issue' %> - <% cache [act, act.journals.count, act.attachments.count] do%> + <%# cache [act, act.journals.count, act.attachments.count] do%> <%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id, :user_id => user_id} %> - <% end %> + <%# end %> <% when 'Message' %> <%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %> <% when 'ProjectCreateInfo'%> - <% cache (act) do %> + <%# cache (act) do %> <%= render :partial => 'project_create', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> - <% end %> + <%# end %> <% end %> <% when 'Principal' %> <% case user_activity.act_type.to_s %> @@ -103,12 +103,12 @@ <% end %> <% end %> <% when 'Blog'%> - <% cache (act) do %> + <%# cache (act) do %> <% case user_activity.act_type.to_s %> <% when 'BlogComment' %> <%= render :partial => 'user_blog', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> <% end %> - <% end %> + <%# end %> <% end %> <% end %> From 69373468ae13b614391a0f1b30245de604169c62 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Mar 2016 18:22:41 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E4=BD=9C=E5=93=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=89=93=E4=B8=8D=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_programing_work_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb index cf5866bc6..997d28f6d 100644 --- a/app/views/student_work/_programing_work_show.html.erb +++ b/app/views/student_work/_programing_work_show.html.erb @@ -65,7 +65,7 @@ 测试错误! <% end %> 您的输出: -
<%=x["result"]%> 
+
<%=x["result"].force_encoding("UTF-8")%> 
正确输出:
<%=x["output"]%>
From d98eb8748ec3214e0ca0f70d3828d7881b30151a Mon Sep 17 00:00:00 2001 From: linchun Date: Wed, 30 Mar 2016 14:17:12 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E7=95=8C=E9=9D=A2=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4=E4=B8=BA=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=8F=91=E5=B8=83=E6=97=B6=E9=97=B4=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=B8=94=E6=8C=89=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F=E6=8E=92?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 3 ++- app/views/admin/homework.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index c7aa42b9e..e1e99447d 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -548,7 +548,8 @@ class AdminController < ApplicationController #作业 def homework - @homework = HomeworkCommon.order('end_time desc') + #@homework = HomeworkCommon.order('end_time desc') + @homework = HomeworkCommon.order( 'created_at desc ') @homework = paginateHelper @homework,30 @page = (params['page'] || 1).to_i - 1 respond_to do |format| diff --git a/app/views/admin/homework.html.erb b/app/views/admin/homework.html.erb index 7260d68ff..4188fecea 100644 --- a/app/views/admin/homework.html.erb +++ b/app/views/admin/homework.html.erb @@ -22,7 +22,7 @@ 提交作品数 - 提交截止日期 + 作业发布日期 @@ -51,7 +51,7 @@ <%=link_to(StudentWork.where('homework_common_id=?',homework.id).count, student_work_index_path(:homework => homework.id))%> - <%=format_date(homework.end_time) %> + <%=format_date( homework.created_at ) %> <% end %> From 1f0f7708c684c58ce85362777bdfcd4a3a0bbacf Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Wed, 30 Mar 2016 15:09:06 +0800 Subject: [PATCH 04/18] fix pagination bug --- lib/redmine/pagination.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/pagination.rb b/lib/redmine/pagination.rb index 79855b966..9132f973c 100644 --- a/lib/redmine/pagination.rb +++ b/lib/redmine/pagination.rb @@ -168,7 +168,7 @@ module Redmine if block_given? yield text, parameters, options else - if args[2][:path].nil? + if args[2].nil? || args[2][:path].nil? link_to text, params.merge(parameters), options else page = "&page=" + parameters[:page].to_s unless parameters[:page].nil? From 45343a44b8d3980c9c08b11d0f4fb497c0fc261d Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 17:13:40 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 4 ++-- public/stylesheets/org_new_style.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 442bb7b60..aeeba55e3 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -65,7 +65,7 @@
- + <%# 登录 %> <%= render :partial => 'organizations/org_logined_header' %>
@@ -236,7 +236,7 @@
<% else %>
-

<%= field.name %>

+

<%= field.name %>

<% if message_ats.blank? %> <% else %> diff --git a/public/stylesheets/org_new_style.css b/public/stylesheets/org_new_style.css index 0562bc088..ad0170ec1 100644 --- a/public/stylesheets/org_new_style.css +++ b/public/stylesheets/org_new_style.css @@ -154,7 +154,7 @@ a:hover.read-more{ text-decoration:underline;} overflow: hidden; text-indent: 100%; white-space: nowrap; - background: rgba(232, 98, 86, 0.8) url(../images/org_new_style/cd-top-arrow.svg) no-repeat center 50%; + background: rgba(108, 108, 108, 0.8) url(../images/org_new_style/cd-top-arrow.svg) no-repeat center 50%; visibility: hidden; opacity: 0; -webkit-transition: all 0.3s; From 7490c7f90d3391b9cd0fe9c1bb4fb737bc140fef Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 17:51:23 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=92=8C=E7=94=A8=E6=88=B7=E5=90=8D=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_org_new_course_homework.html.erb | 8 +++++--- .../_org_new_course_message.html.erb | 6 +++--- .../_org_new_course_news.html.erb | 7 ++++--- .../organizations/_org_new_forum_pic.html.erb | 8 ++++---- .../_org_new_project_pic.html.erb | 18 +++++++++--------- 5 files changed, 25 insertions(+), 22 deletions(-) diff --git a/app/views/organizations/_org_new_course_homework.html.erb b/app/views/organizations/_org_new_course_homework.html.erb index 3de4c0293..7d6a4ac5e 100644 --- a/app/views/organizations/_org_new_course_homework.html.erb +++ b/app/views/organizations/_org_new_course_homework.html.erb @@ -2,16 +2,18 @@
<% iamge_path = get_image_path_from_content(activity.description) %> <% if iamge_path.nil? %> - # + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %> + <% else %> - + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %> + <% end %>
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank' %>
- <%= activity.user.realname.nil? ? activity.user : activity.user.realname %> + <%=link_to activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname), user_path(activity.user), :class=>"publisher-name fl", :target => "_blank" %>

<%= format_date activity.updated_at %>

<%= activity.journals_for_messages.count %>
diff --git a/app/views/organizations/_org_new_course_message.html.erb b/app/views/organizations/_org_new_course_message.html.erb index 3877276ce..5e586bb28 100644 --- a/app/views/organizations/_org_new_course_message.html.erb +++ b/app/views/organizations/_org_new_course_message.html.erb @@ -2,9 +2,9 @@
<% iamge_path = get_image_path_from_content(activity.content) %> <% if iamge_path.nil? %> - # + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %> <% else %> - + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %> <% end %>
@@ -15,7 +15,7 @@ <% end %>
- <%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %> + <%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %>

<%= format_date activity.updated_on %>

<%= activity.children.count %>
diff --git a/app/views/organizations/_org_new_course_news.html.erb b/app/views/organizations/_org_new_course_news.html.erb index ae2d03cbf..72b147ac3 100644 --- a/app/views/organizations/_org_new_course_news.html.erb +++ b/app/views/organizations/_org_new_course_news.html.erb @@ -2,16 +2,17 @@
<% iamge_path = get_image_path_from_content(activity.description) %> <% if iamge_path.nil? %> - # + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %> + <% else %> - + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %> <% end %>
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %>
- <%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %> + <%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %>

<%= format_date activity.created_on %>

<%= activity.comments.count %>
diff --git a/app/views/organizations/_org_new_forum_pic.html.erb b/app/views/organizations/_org_new_forum_pic.html.erb index c4fd061a5..b42c7e865 100644 --- a/app/views/organizations/_org_new_forum_pic.html.erb +++ b/app/views/organizations/_org_new_forum_pic.html.erb @@ -3,16 +3,16 @@
<% iamge_path = get_image_path_from_content(activity.content) %> <% if iamge_path.nil? %> - # + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), organization_path(@organization, :org_subfield_id => field.id), :target => "_blank" %> <% else %> - + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), organization_path(@organization, :org_subfield_id => field.id), :target => "_blank" %> <% end %>
- <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %> + <%= link_to activity.title.to_s, organization_path(@organization, :org_subfield_id => field.id), :target => '_blank' %>
- <%= activity.try(:creator).try(:realname).nil? ? activity.try(:creator).try(:login) : activity.try(:creator).try(:realname) %> + <%=link_to activity.try(:creator).try(:realname).nil? ? activity.try(:creator).try(:login) : activity.try(:creator).try(:realname), user_path(activity.creator), :class=>"publisher-name fl", :target => "_blank" %>

<%= format_date activity.created_at %>

<%= activity.children.count %>
diff --git a/app/views/organizations/_org_new_project_pic.html.erb b/app/views/organizations/_org_new_project_pic.html.erb index aa91659ce..3adc77433 100644 --- a/app/views/organizations/_org_new_project_pic.html.erb +++ b/app/views/organizations/_org_new_project_pic.html.erb @@ -7,16 +7,16 @@
<% iamge_path = get_image_path_from_content(activity.description) %> <% if iamge_path.nil? %> - # + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), issue_url_in_org(activity.id), :target => "_blank" %> <% else %> - + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), issue_url_in_org(activity.id), :target => "_blank" %> <% end %>
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank' %>
- <%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %> + <%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %>

<%= format_date activity.updated_on %>

<%= activity.journals.count %>
@@ -29,9 +29,9 @@
<% iamge_path = get_image_path_from_content(activity.content) %> <% if iamge_path.nil? %> - # + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %> <% else %> - + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %> <% end %>
@@ -42,7 +42,7 @@ <% end %>
- <%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %> + <%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %>

<%= format_date activity.updated_on %>

<%= activity.children.count %>
@@ -55,16 +55,16 @@
<% iamge_path = get_image_path_from_content(activity.description) %> <% if iamge_path.nil? %> - # + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %> <% else %> - + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %> <% end %>
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %>
- <%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %> + <%=link_to activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname), user_path(activity.author), :class=>"publisher-name fl", :target => "_blank" %>

<%= format_date activity.created_on %>

<%= activity.comments.count %>
From 67d179816300d9192fa497d89509e84173e66e04 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 18:11:29 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9news500=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/_org_new_course_act_list.html.erb | 8 ++++---- .../organizations/_org_new_project_act_list.html.erb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/organizations/_org_new_course_act_list.html.erb b/app/views/organizations/_org_new_course_act_list.html.erb index 18a1e6662..56202ee86 100644 --- a/app/views/organizations/_org_new_course_act_list.html.erb +++ b/app/views/organizations/_org_new_course_act_list.html.erb @@ -34,13 +34,13 @@ <% elsif act.org_act_type == "News" %> <% activity = News.find(act.org_act_id) %>
- <%= link_to image_tag(url_to_avatar(activity.creator),:width => "40", :height => "40"), user_path(activity.creator), :class => "fl user-img" %> + <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %> -

发布时间:<%= format_date activity.updated_at %> - 作者:<%= activity.try(:creator).try(:realname).nil? ? activity.try(:creator).try(:login) : activity.try(:creator).try(:realname) %> - <%= activity.children.count %>

+

发布时间:<%= format_date activity.created_on %> + 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %> + <%= activity.comments.count %>

<% end %> diff --git a/app/views/organizations/_org_new_project_act_list.html.erb b/app/views/organizations/_org_new_project_act_list.html.erb index b3754024f..407c8fa97 100644 --- a/app/views/organizations/_org_new_project_act_list.html.erb +++ b/app/views/organizations/_org_new_project_act_list.html.erb @@ -35,13 +35,13 @@ <% elsif act.org_act_type == "News" %> <% activity = News.find(act.org_act_id) %>
- <%= link_to image_tag(url_to_avatar(activity.creator),:width => "40", :height => "40"), user_path(activity.creator), :class => "fl user-img" %> + <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %>
<%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %> -

发布时间:<%= format_date activity.updated_at %> - 作者:<%= activity.try(:creator).try(:realname).nil? ? activity.try(:creator).try(:login) : activity.try(:creator).try(:realname) %> - <%= activity.children.count %>

+

发布时间:<%= format_date activity.created_on %> + 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %> + <%= activity.comments.count %>

<% end %> From 756a2db4aafec6e7890585ed238d7a952dbc1943 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 19:04:31 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98=20=E9=93=BE=E6=8E=A5more?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 4 ++-- app/views/layouts/base_org_newstyle.html.erb | 11 +++++------ app/views/organizations/_subfield_list.html.erb | 8 ++++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 1ea109ff1..f84da0e56 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -71,7 +71,7 @@ class OrganizationsController < ApplicationController def show # 组织新类型 show_mode:判断标准 1为新类型,0为旧 - if @organization.show_mode == 1 && params[:org_subfield_id].nil? && params[:type] .nil? + if @organization.show_mode == 1 && params[:org_subfield_id].nil? && params[:list] .nil? if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) @subfield_content = @organization.org_subfields.order("priority") # 项目两种动态 @@ -108,7 +108,7 @@ class OrganizationsController < ApplicationController @org_activities = OrgActivity.where("(container_id =? and container_type =?) " + "or (container_type ='Project' and org_act_type in ('Issue','Message','ProjectCreateInfo') and container_id in (#{project_ids.join(',')})) "+ "or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))", - @organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) + @organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) when 'project_issue' @org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Issue' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) when 'project_message' diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index aeeba55e3..36e404a42 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -87,7 +87,7 @@ <% else %> <% if field.field_type == "Post" && field.hide == 0 %> <%= field.name %> - <% elsif field.field_type == "Resource" && field.hide == 0%> + <% elsif field.field_type == "Resource" && field.hide == 0 %> <%= field.name %> <% end %> <% end %> @@ -100,7 +100,6 @@
@@ -144,7 +143,7 @@
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %> @@ -161,7 +160,7 @@
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %> @@ -183,7 +182,7 @@ <%= render :partial => 'organizations/org_new_project_pic', :locals => {:activities => @project_acts.first(3)} %> <% end %>
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
@@ -201,7 +200,7 @@
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
<% end %> diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb index e16e91486..13c73c755 100644 --- a/app/views/organizations/_subfield_list.html.erb +++ b/app/views/organizations/_subfield_list.html.erb @@ -24,12 +24,12 @@
  • 默认
  • <%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %> -
    +
    <%= select( :name,:group_id, subfield_status_option, { :include_blank => false,:selected => field.status}, - {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:30px;"}) %> + {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:52px;"}) %> <% end %>
  • 默认
  • @@ -58,12 +58,12 @@ 列表 <% else %> <%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %> -
    +
    <%= select( :name,:group_id, subfield_status_option, { :include_blank => false,:selected => field.status}, - {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:40px;"}) %> + {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:52px;"}) %> <% end %> <% end %> From 4797cbe65d35b93df8ed0be4f72809a0edb57c7c Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 19:09:11 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index f84da0e56..67666a1ef 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -58,7 +58,7 @@ class OrganizationsController < ApplicationController @organization.description = params[:organization][:description] @organization.is_public = params[:organization][:is_public] @organization.allow_guest_download = params[:organization][:allow_guest_download] == '1' ? 1 : 0 - @organization.show_mode = params[:show_mode] + @organization.show_mode = 0 @organization.creator_id = User.current.id member = OrgMember.new(:user_id => User.current.id) From ebb2f30f3b97b971d501b4e43c3a0500c3f4e805 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 19:14:58 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=AE=8C=E7=82=B9?= =?UTF-8?q?=E7=A1=AE=E5=AE=9A=EF=BC=8C=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 67666a1ef..280957449 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -220,7 +220,11 @@ class OrganizationsController < ApplicationController #@organization.name = params[:organization][:name] @organization.save respond_to do |format| - format.html { redirect_to setting_organization_path(@organization)} + if @organization.show_mode == 1 + format.html { redirect_to organization_path(@organization)} + else + format.html { redirect_to setting_organization_path(@organization)} + end end end From 1fdd562bd312a1c0e8eba8adc2793abab2f9100c Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 19:33:43 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E5=8A=9F=E8=83=BDjibug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 55 ++++--------- .../_org_new_course_pic.html.erb | 78 +++++++++++++++++++ 2 files changed, 95 insertions(+), 38 deletions(-) create mode 100644 app/views/organizations/_org_new_course_pic.html.erb diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 36e404a42..489f014b3 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -111,44 +111,23 @@ <% when 'course' %>
    <% if field.status == 0 %> -
    -

    课程动态

    - <% if @course_acts.nil? %> - - <% else %> -
    -
      - <% unless @course_acts_homework.nil? %> -
    • - <% @course_acts_homework.each do |act| %> - <%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id, :course_activity => 0} %> - <% end %> -
    • - <% end %> - <% unless @course_acts_message.nil? %> -
    • - <% @course_acts_message.each do |act| %> - <%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id), :user_activity_id =>act.id} %> - <% end %> -
    • - <% end %> - <% unless @course_acts_news.nil? %> -
    • - <% @course_acts_news.each do |act| %> - <%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id), :user_activity_id =>act.id} %> - <% end %> -
    • - <% end %> -
      -
    -
    -
    - <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> -
    - <% end %> - - -
    +
    +

    课程动态

    + <% if @course_acts.nil? %> + + <% else %> +
    +
      + <% unless @course_acts.nil? %> + <%= render :partial => 'organizations/org_new_course_pic', :locals => {:activities => @course_acts.first(3)} %> + <% end %> +
      + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
      +
    +
    + <% end %> +
    <% else %>

    课程动态

    diff --git a/app/views/organizations/_org_new_course_pic.html.erb b/app/views/organizations/_org_new_course_pic.html.erb new file mode 100644 index 000000000..26a5762bb --- /dev/null +++ b/app/views/organizations/_org_new_course_pic.html.erb @@ -0,0 +1,78 @@ +<% activities.each do |act| %> + <% if act.org_act_type == "HomeworkCommon" %> + <% activity = HomeworkCommon.find(act.org_act_id) %> +
  • + +
    + <% iamge_path = get_image_path_from_content(activity.description) %> + <% if iamge_path.nil? %> + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %> + + <% else %> + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), student_work_index_url_in_org(activity.id), :target => "_blank" %> + + <% end %> +
    +
    + <%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank' %> +
    +
    + +
  • + <% elsif act.org_act_type == "Message" %> + <% activity = Message.find(act.org_act_id) %> +
  • + +
    + <% iamge_path = get_image_path_from_content(activity.content) %> + <% if iamge_path.nil? %> + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %> + <% else %> + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank" %> + <% end %> +
    +
    + <% if activity.parent_id.nil? %> + <%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %> + <% else %> + <%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank' %> + <% end %> +
    +
    + +
  • + <% elsif act.org_act_type == "News" %> + <% activity = News.find(act.org_act_id) %> +
  • + +
    + <% iamge_path = get_image_path_from_content(activity.description) %> + <% if iamge_path.nil? %> + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %> + <% else %> + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %> + <% end %> +
    +
    + <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank' %> +
    +
    + +
  • + + <% end %> + +<% end %> + From 230dab6d9d33040ca5255aad553f082a9f5e7a82 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 19:42:05 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E6=A0=8F=E7=9B=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/_subfield_list.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb index 13c73c755..410edac51 100644 --- a/app/views/organizations/_subfield_list.html.erb +++ b/app/views/organizations/_subfield_list.html.erb @@ -29,7 +29,7 @@
    <%= select( :name,:group_id, subfield_status_option, { :include_blank => false,:selected => field.status}, - {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:52px;"}) %> + {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:58px;"}) %> <% end %>
  • 默认
  • @@ -63,7 +63,7 @@
    <%= select( :name,:group_id, subfield_status_option, { :include_blank => false,:selected => field.status}, - {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:52px;"}) %> + {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:58px;"}) %> <% end %> <% end %> From 865f274c61b71df90dc79c58551a4b916e8c9d11 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 19:56:29 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/_org_logined_header.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/organizations/_org_logined_header.html.erb b/app/views/organizations/_org_logined_header.html.erb index fa4c228a1..75ec7106a 100644 --- a/app/views/organizations/_org_logined_header.html.erb +++ b/app/views/organizations/_org_logined_header.html.erb @@ -24,7 +24,7 @@
    <% else %> <% end %> From 5866dfb7ffb561ae2258f59c4bde2b222e9147cd Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 20:12:20 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E7=99=BB=E5=BD=95=20=E6=B2=A1=E5=86=85?= =?UTF-8?q?=E5=AE=B9more=20logo=E4=B8=8D=E5=8A=A0=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 23 ++++++++++++++++++- .../organizations/_subfield_list.html.erb | 4 ++-- public/stylesheets/org.css | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 489f014b3..2a86f62b9 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -65,7 +65,7 @@
    - + <%# 登录 %> <%= render :partial => 'organizations/org_logined_header' %>
    @@ -115,6 +115,9 @@

    课程动态

    <% if @course_acts.nil? %> +
    + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
    <% else %>
      @@ -133,6 +136,9 @@

      课程动态

      <% if @course_acts.nil? %> +
      + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
      <% else %>
      <%= render :partial => 'organizations/org_new_course_act_list', :locals =>{:activities => @course_acts, :field => field, :organization => @organization} %> @@ -154,6 +160,9 @@

      项目动态

      <% if @project_acts.nil? %> +
      + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
      <% else %>
        @@ -173,6 +182,9 @@

        项目动态

        <% if @project_acts.nil? %> +
        + <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> +
        <% else %>
        <%= render :partial => 'organizations/org_new_project_act_list', :locals =>{:activities => @project_acts, :field => field, :organization => @organization} %> @@ -197,6 +209,9 @@

        <%= field.name %>

        <% if message_ats.blank? %> +
        + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> +
        <% else %>
          @@ -217,6 +232,9 @@

          <%= field.name %>

          <% if message_ats.blank? %> +
          + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> +
          <% else %>
          <% message_ats.each do |act| %> @@ -240,6 +258,9 @@

          <%= field.name %>

          <% if org_attachs.blank? %> +
          + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> +
          <% else %>
          <%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %> diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb index 410edac51..4fbeb971f 100644 --- a/app/views/organizations/_subfield_list.html.erb +++ b/app/views/organizations/_subfield_list.html.erb @@ -29,7 +29,7 @@
          <%= select( :name,:group_id, subfield_status_option, { :include_blank => false,:selected => field.status}, - {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:58px;"}) %> + {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %> <% end %>
        • 默认
        • @@ -63,7 +63,7 @@
          <%= select( :name,:group_id, subfield_status_option, { :include_blank => false,:selected => field.status}, - {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:58px;"}) %> + {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %> <% end %> <% end %> diff --git a/public/stylesheets/org.css b/public/stylesheets/org.css index 9dad153a3..3a203c10d 100644 --- a/public/stylesheets/org.css +++ b/public/stylesheets/org.css @@ -76,7 +76,7 @@ a.linkGrey8:hover {color:#585858;} .org_login_list a {color:#269ac9;} .orgListStatus {width:40px; float:left;} -.orgListStatusList {width:55px; float:left;} +.orgListStatusList {width:58px; float:left;} .personalUrl {border:1px solid #dddddd; width:75px; outline:none; white-space:nowrap; padding-left:2px;} .reCon{ margin:5px; width:710px;} .retop{width:710px; height:40px; background:#eaeaea; padding:5px;} From ba658e44c015532385be505865f785c49206f19d Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 20:46:55 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E7=BB=84=E7=BB=87more=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 22 ++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 2a86f62b9..b5dfe71ea 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -259,7 +259,16 @@ <% if org_attachs.blank? %>
          - <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %> + <% end %> + <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
          <% else %>
          @@ -268,7 +277,16 @@
          - <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %> + <% end %> + <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
          <% end %> From d71035159a2f3e11233724427f6722f0aaa7abcc Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 20:54:01 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9more=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 47 +++++++++++++++++--- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index b5dfe71ea..d8ba49f31 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -210,7 +210,17 @@ <% if message_ats.blank? %>
          - <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + + <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
          <% else %>
          @@ -221,7 +231,16 @@ <% end %>
        - <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
        <% end %> @@ -233,7 +252,15 @@ <% if message_ats.blank? %>
        - <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %>
        <% else %>
        @@ -243,7 +270,15 @@
        - <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% if !field.subfield_subdomain_dir.nil? %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> + <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% else %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %> + <% else %> + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> + <% end %>
        <% end %> @@ -260,10 +295,10 @@
        <% if !field.subfield_subdomain_dir.nil? %> - <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> <% else %> - <%= link_to "More", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> <% end %> <% else %> <%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %> From 12c3de6dc98a81e63c97078b2b43917c88b5c8b8 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 21:14:07 +0800 Subject: [PATCH 17/18] =?UTF-8?q?500=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index d8ba49f31..b1656cf37 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -313,10 +313,10 @@
        <% if !field.subfield_subdomain_dir.nil? %> - <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", organization.id).map(&:subname).include?(request.subdomain) %> + <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %> <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> <% else %> - <%= link_to "More", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> + <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %> <% end %> <% else %> <%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %> From 5ce14991cf18422f968fe7eb3baa6e30ec90e2b9 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 21:32:19 +0800 Subject: [PATCH 18/18] =?UTF-8?q?=E6=96=B0=E9=97=BB=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/_org_new_forum_list.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/organizations/_org_new_forum_list.html.erb b/app/views/organizations/_org_new_forum_list.html.erb index a8e531b50..b0346b9f7 100644 --- a/app/views/organizations/_org_new_forum_list.html.erb +++ b/app/views/organizations/_org_new_forum_list.html.erb @@ -3,7 +3,8 @@ <%= link_to image_tag(url_to_avatar(activity.creator),:width => "40", :height => "40"), user_path(activity.creator), :class => "fl user-img" %>
        - <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %> + <%= link_to activity.title.to_s, organization_path(@organization, :org_subfield_id => field.id), :target => '_blank', :class => "fl ziyuan-title" %> + <%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>

        发布时间:<%= format_date activity.updated_at %> 作者:<%= activity.try(:creator).try(:realname).nil? ? activity.try(:creator).try(:login) : activity.try(:creator).try(:realname) %> <%= activity.children.count %>