diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index 7b7bcbcf4..fb7214fce 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -547,7 +547,7 @@ module CoursesHelper
type = []
month = Time.now.month
now_year = year.nil? ? Time.now.year : (Time.now.year <= year ? Time.now.year : year)
- year = month < 3 ? now_year - 1 : now_year
+ year = month < 3 && now_year >=Time.now.year ? now_year - 1 : now_year
for i in (year..year + 10)
option = []
option << i
diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb
index 6f2819f53..ef0c2eb16 100644
--- a/app/services/courses_service.rb
+++ b/app/services/courses_service.rb
@@ -254,6 +254,8 @@ class CoursesService
#course.safe_attributes = params[:course]
course.time = params[:time]
course.term = params[:term]
+ course.end_time = params[:end_time]
+ course.end_term = params[:end_term]
course.class_period = params[:class_period].to_i
params[:course][:is_public] ? course.is_public = 1 : course.is_public = 0
params[:course][:open_student] ? course.open_student = 1 : course.open_student = 0
diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb
index 3b76689f5..0f7e8a012 100644
--- a/app/views/attachments/_project_file_links.html.erb
+++ b/app/views/attachments/_project_file_links.html.erb
@@ -37,7 +37,7 @@
<% if options[:length] %>
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
<% else %>
- <%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true -%>
+ <%= link_to_short_attachment attachment, :length=> 58,:class => 'hidden link_file_a fl newsBlue mw400', :download => true -%>
<% end %>
<%if is_float%>
diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb
index 32db48def..617cefc93 100644
--- a/app/views/courses/settings.html.erb
+++ b/app/views/courses/settings.html.erb
@@ -46,14 +46,15 @@
- <%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"time_selected"} %>
- <%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"term_selected"} %>
+ <%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"time"} %>
+ <%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"term"} %>
- <%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {:id=>"end_time_selected"} %>
- <%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"end_term_selected"} %>
+ <%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {:id=>"end_time"} %>
+ <%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"end_term"} %>
+
@@ -138,8 +139,6 @@
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
}
- $("#time_selected").click(select);
- $("#term_selected").click(select);
- $("#end_time_selected").click(select);
- $("#end_term_selected").click(select);
+ $("#time").click(select);
+ $("#term").click(select);
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index c3278a209..c760e686d 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -84,8 +84,8 @@
<%= @topic.content.html_safe%>
-
- <%= link_to_attachments_course @topic, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
diff --git a/app/views/messages/_org_subfield_show.html.erb b/app/views/messages/_org_subfield_show.html.erb
index 304694b39..6d12fe960 100644
--- a/app/views/messages/_org_subfield_show.html.erb
+++ b/app/views/messages/_org_subfield_show.html.erb
@@ -113,8 +113,8 @@
<%= @topic.content.html_safe%>
-
- <%= link_to_attachments_course @topic, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb
index e5aba7c02..c98f2983e 100644
--- a/app/views/messages/_project_show.html.erb
+++ b/app/views/messages/_project_show.html.erb
@@ -139,8 +139,8 @@
<%= @topic.content.html_safe%>
-
- <%= link_to_attachments_course @topic, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb
index 07aaef26d..767c11553 100644
--- a/app/views/news/_course_show.html.erb
+++ b/app/views/news/_course_show.html.erb
@@ -89,8 +89,8 @@
<%= @news.description.html_safe%>
-
- <%= link_to_attachments_course @news, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>
diff --git a/app/views/news/_organization_show.html.erb b/app/views/news/_organization_show.html.erb
index 98d14c3ab..3e608c177 100644
--- a/app/views/news/_organization_show.html.erb
+++ b/app/views/news/_organization_show.html.erb
@@ -79,8 +79,8 @@
<%= @news.description.html_safe%>
-
- <%= link_to_attachments_course @news, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>
diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb
index 26ff807db..880bd0885 100644
--- a/app/views/news/_project_show.html.erb
+++ b/app/views/news/_project_show.html.erb
@@ -89,8 +89,8 @@
<%= @news.description.html_safe%>
-
- <%= link_to_attachments_course @news, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>
diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb
index 26d04924a..405631369 100644
--- a/app/views/org_document_comments/show.html.erb
+++ b/app/views/org_document_comments/show.html.erb
@@ -29,8 +29,9 @@
<%= @document.content.html_safe %>
<% end %>
-
- <%= link_to_attachments_course @document, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @document} %>
+ <%#= link_to_attachments_course @document, :author => false %>