diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index a4384ea8..d339d12a 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -138,7 +138,7 @@ <%= l(:label_main_teacher) %> :<%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %> - + <%= l(:label_class_period) %> :<%= @course.class_period %> <%= l(:label_class_hour)%> diff --git a/app/views/projects/_course_form.html.erb b/app/views/projects/_course_form.html.erb index 0303e8aa..08b7b073 100644 --- a/app/views/projects/_course_form.html.erb +++ b/app/views/projects/_course_form.html.erb @@ -2,27 +2,28 @@ <% object << 'project' %> <% object << 'course' %> <%= error_messages_for object %> - - + + <% unless @project.new_record? %>

<%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %>

<% end %> -

<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %>

- - - - + +

+ + + + <%= f.fields_for @course do |m| %> - + <% unless @course.nil?%> -

<%= l(:label_class_period) %> *   +

<%= l(:label_class_period) %> *   <%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时" %>  <%= l(:label_class_hour)%>

<% else %> -

<%= l(:label_class_period) %> *   +

<%= l(:label_class_period) %> *   <%= text_field_tag :class_period, nil, :placeholder => "在此输入课时" %><%= l(:label_class_hour)%>

<% end %> @@ -63,7 +64,7 @@

- +
<% unless @course.nil? %> <% if @course.time == 2008 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -77,7 +78,7 @@ ".html_safe %>

<% elsif @course.time == 2009 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -91,7 +92,7 @@ ".html_safe %>

<% elsif @course.time == 2010 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -105,7 +106,7 @@ ".html_safe %>

<% elsif @course.time == 2011 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -120,7 +121,7 @@ <% elsif @course.time == 2012 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -134,7 +135,7 @@ ".html_safe %>

<% elsif @course.time == 2013 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -148,7 +149,7 @@ ".html_safe %>

<% elsif @course.time == 2014 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -162,7 +163,7 @@ ".html_safe %>

<% elsif @course.time == 2015 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -176,7 +177,7 @@ ".html_safe %>

<% elsif @course.time == 2016 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -190,7 +191,7 @@ ".html_safe %>

<% elsif @course.time == 2017 %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -203,7 +204,7 @@ ".html_safe %>

<% else %> -

+

<%= l(:label_term) %> *  
<%= l(:label_term) %> *   <%= select_tag 'time', " @@ -211,7 +212,7 @@ - + ".html_safe %>

@@ -263,43 +264,49 @@ <% end %> <% end %>

- - -

<%= m.text_field :password, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %>

- <%= l(:text_command) %> + + + +

+ <%= l(:text_command) %> <% end %> -

<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>

+ + + +

+ +

<%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_public_info) %>

-

<%= f.text_field :project_type, :value => 1 %>

- - -<%= wikitoolbar_for 'project_description' %> - -<% @project.custom_field_values.each do |value| %> -

<%= custom_field_tag_with_label :project, value %>

-<% end %> -<%= call_hook(:view_projects_form, :project => @project, :form => f) %> - - - - - -<% unless @project.identifier_frozen? %> - <% content_for :header_tags do %> - <%= javascript_include_tag 'project_identifier' %> - <% end %> -<% end %> - -<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %> - <%= javascript_tag do %> - $(document).ready(function() { - $("#project_inherit_members").change(function(){ - if (!$(this).is(':checked')) { - if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) { - $("#project_inherit_members").attr("checked", true); - } - } - }); - }); - <% end %> -<% end %> +

<%= f.text_field :project_type, :value => 1 %>

+ + +<%= wikitoolbar_for 'project_description' %> + +<% @project.custom_field_values.each do |value| %> +

<%= custom_field_tag_with_label :project, value %>

+<% end %> +<%= call_hook(:view_projects_form, :project => @project, :form => f) %> + + + + + +<% unless @project.identifier_frozen? %> + <% content_for :header_tags do %> + <%= javascript_include_tag 'project_identifier' %> + <% end %> +<% end %> + +<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %> + <%= javascript_tag do %> + $(document).ready(function() { + $("#project_inherit_members").change(function(){ + if (!$(this).is(':checked')) { + if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) { + $("#project_inherit_members").attr("checked", true); + } + } + }); + }); + <% end %> +<% end %> diff --git a/app/views/projects/course.html.erb b/app/views/projects/course.html.erb index fd23cab2..1ef0197d 100644 --- a/app/views/projects/course.html.erb +++ b/app/views/projects/course.html.erb @@ -24,7 +24,7 @@
<%= link_to "forge.trustie.net/project/course", :controller => 'projects', :action => 'course', :project_type => 1 %> <%= link_to "forge.trustie.net/course", :controller => 'projects', :action => 'course', :project_type => 1 %> <%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course', :project_type => 1 %>
@@ -44,7 +44,7 @@ <% if User.current.logged? %>

- <%= l(:label_my_projects) %> + <%= l(:label_my_course) %>

<% end %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 3b643cca..310e3864 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -227,7 +227,7 @@ zh: field_couurse_time: 学时 field_course_code: 学分 field_state: 加入课程口令 - field_term: 学期 + field_term: 课程学期 field_course_un: 暂未填写 #end field_description: 描述 @@ -551,7 +551,7 @@ zh: label_enter_college: 进入高校 label_enterprise: 企业进入 lable_enter_enterprise: 进入企业 - label_term: 学期 + label_term: 开课学期 label_spring: 春季学期 label_summer: 夏季学期 label_autumn: 秋季学期 @@ -1306,6 +1306,7 @@ zh: label_delete_confirm: 确认删除? label_more_tags: 更多 label_tags_bid: 需求名称 + label_tags_course_name: 课程名称 label_tags_bid_description: 需求描述 label_tags_issue_description: 问题描述 label_tags_all_objects: 所有 @@ -1734,6 +1735,8 @@ zh: label_join_course: 加入课程 label_exit_course: 退出课程 label_new_join: 加入 + label_new_course_password: 课程密码 + label_new_course_description: 课程描述 label_new_join_order: 请输入课程密码 label_task_submit_form_accessory: 作业最终以附件形式提交 label_task_submit_form_project: 作业最终以项目形式提交