diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb
index 239253d82..da0eb8009 100644
--- a/app/controllers/organizations_controller.rb
+++ b/app/controllers/organizations_controller.rb
@@ -225,7 +225,7 @@ class OrganizationsController < ApplicationController
condition = "%#{params[:name].strip}%".gsub(" ","")
end
sql = "select courses.* from courses inner join members on courses.id = members.course_id where members.user_id = #{User.current.id} and courses.name like '#{condition}'"+
- "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id})"
+ "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id}) and courses.is_delete=0"
#user_courses = Course.find_by_sql(sql)
@courses = Course.find_by_sql(sql)
# @added_course_ids = @organization.courses.map(&:id)
@@ -269,7 +269,7 @@ class OrganizationsController < ApplicationController
condition = "%#{params[:name].strip}%".gsub(" ","")
end
sql = "select projects.* from projects inner join members on projects.id = members.project_id where members.user_id = #{User.current.id} and projects.status != 9 and projects.name like '#{condition}'" +
- " and projects.id not in (select org_projects.project_id from org_projects where organization_id = #{@organization.id})"
+ " and projects.id not in (select org_projects.project_id from org_projects where organization_id = #{@organization.id}) and status=1"
#user_projects = Course.find_by_sql(sql)
@projects = Course.find_by_sql(sql)
# @added_course_ids = @organization.projects.map(&:id)
diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb
index f2ece1f35..faf141600 100644
--- a/app/views/layouts/base_org.html.erb
+++ b/app/views/layouts/base_org.html.erb
@@ -90,8 +90,8 @@
<% end%>
-
- <%= link_to @organization.name, organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %>
+
+ <%= link_to truncate(@organization.name,:length => 26), organization_path(@organization.id), :class=>"pr_info_name c_dark fb break_word" %>
<% if User.current.logged? %>
<% if @organization.is_public? %>
<%= l(:label_public)%>
diff --git a/app/views/org_document_comments/new.html.erb b/app/views/org_document_comments/new.html.erb
index fea89459b..679b35e5b 100644
--- a/app/views/org_document_comments/new.html.erb
+++ b/app/views/org_document_comments/new.html.erb
@@ -32,7 +32,10 @@
location.href = document.referrer;
}
-
+
+
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id, :field_id => params[:field_id]), :id => 'new_org_document_form' do |f| %>
diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb
index 53003c85a..7e49d1780 100644
--- a/app/views/organizations/_org_left_subfield_list.html.erb
+++ b/app/views/organizations/_org_left_subfield_list.html.erb
@@ -63,7 +63,7 @@
@@ -77,7 +77,7 @@
diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb
index e3ed492a0..cf68d71f5 100644
--- a/app/views/organizations/_show_org_document.html.erb
+++ b/app/views/organizations/_show_org_document.html.erb
@@ -10,6 +10,9 @@
TO <%= link_to document.organization.name, organization_path(document.organization), :class => "newsBlue" %>
|
<%= document.org_subfield_id.nil? ? "组织文章" :"#{OrgSubfield.find(document.org_subfield_id).name}" %>
+ <% if @organization.home_id == document.id %>
+
已设为首页
+ <% end %>
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %>
diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb
index 3ef5d547c..c5bb96750 100644
--- a/app/views/organizations/setting.html.erb
+++ b/app/views/organizations/setting.html.erb
@@ -19,8 +19,11 @@
'<%= check_uniq_organizations_path%>'+'?org_name='+$("#organization_name").val().trim()+"&config_page=Y" + "&org_id="+id
)
}
- function update_org(id){
- check_uniq(id);
+ function update_org(id, old_value, input_value){
+ if (old_value == input_value)
+ {
+ check_uniq(id);
+ }
if( $checkName){
$("#edit_organization_"+id).submit();
}
@@ -77,7 +80,7 @@
允许游客下载
<%= @organization.is_public? ? "" : "(私有组织不允许游客下载资源)" %>
- 保存
+ 保存
<% end %>
diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb
index b1f2900c9..ccd329852 100644
--- a/app/views/users/_user_message_course.html.erb
+++ b/app/views/users/_user_message_course.html.erb
@@ -370,7 +370,7 @@
">回复了作品评论:
- <%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+ <%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id,:show_work_id => ma.course_message.jour.student_work_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
diff --git a/public/javascripts/des_kindEditor.js b/public/javascripts/des_kindEditor.js
index 3a05c909d..7c2f1c0cf 100644
--- a/public/javascripts/des_kindEditor.js
+++ b/public/javascripts/des_kindEditor.js
@@ -131,7 +131,7 @@ function init_des_data(){
});
params.submit_btn.click(function () {
params.editor.sync();
- params.form[0].submit();
+ params.form.submit();
});
params.textarea.data('init', 1);
$(this).show();