修改了新建课程页面的显示问题

This commit is contained in:
wanglinchun 2014-02-19 20:21:46 +08:00
parent 3d274be77b
commit 9aa903d79c
4 changed files with 80 additions and 70 deletions

View File

@ -138,7 +138,7 @@
<tr> <tr>
<td valign="top" style="padding-left: 8px; width:60px"><%= l(:label_main_teacher) %> :</td><td class="font_lighter_sidebar"><%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %></td> <td valign="top" style="padding-left: 8px; width:60px"><%= l(:label_main_teacher) %> :</td><td class="font_lighter_sidebar"><%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %></td>
</tr> </tr>
<!--
<tr> <tr>
<td valign="top" style="padding-left: 8px;"><%= l(:label_setup_time) %> :</td><td class="font_lighter_sidebar"><%= @course.setup_time %></td> <td valign="top" style="padding-left: 8px;"><%= l(:label_setup_time) %> :</td><td class="font_lighter_sidebar"><%= @course.setup_time %></td>
</tr> </tr>
@ -146,7 +146,7 @@
<tr> <tr>
<td valign="top" style="padding-left: 8px;"><%= l(:label_endup_time) %> :</td><td class="font_lighter_sidebar"><%= @course.endup_time %></td> <td valign="top" style="padding-left: 8px;"><%= l(:label_endup_time) %> :</td><td class="font_lighter_sidebar"><%= @course.endup_time %></td>
</tr> </tr>
-->
<tr> <tr>
<td valign="top" style="padding-left: 8px;"><%= l(:label_class_period) %> :</td><td class="font_lighter_sidebar"><%= @course.class_period %>&nbsp;<%= l(:label_class_hour)%></td> <td valign="top" style="padding-left: 8px;"><%= l(:label_class_period) %> :</td><td class="font_lighter_sidebar"><%= @course.class_period %>&nbsp;<%= l(:label_class_hour)%></td>
</tr> </tr>

View File

@ -2,27 +2,28 @@
<% object << 'project' %> <% object << 'project' %>
<% object << 'course' %> <% object << 'course' %>
<%= error_messages_for object %> <%= error_messages_for object %>
<!--[form:project]-->
<!--[form:project]-->
<% unless @project.new_record? %> <% unless @project.new_record? %>
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %></p> <p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %></p>
<% end %> <% end %>
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p> <!-- <p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p> -->
<p><label for="project_name"><%=l(:label_tags_course_name)%><span class="required", > *&nbsp;&nbsp;</span></label><input id="project_name" type="text" value="" style="width:490px;" size="60" name="project[name]"></p>
<!-- <p><%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
<% unless @project.identifier_frozen? %> <!-- <p><%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em> <% unless @project.identifier_frozen? %>
<% end %></p> --> <em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
<% end %></p> -->
<!-- added by bai 新增开课时间、结课时间、课时 -->
<!-- added by bai 新增开课时间、结课时间、课时 -->
<%= f.fields_for @course do |m| %> <%= f.fields_for @course do |m| %>
<!-- added by bai 新增开课时间、结课时间、课时 --> <!-- added by bai 新增开课时间、结课时间、课时 -->
<!--
<% unless @course.nil?%> <% unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%= l(:label_setup_time) %><span class="required"> *&nbsp;&nbsp;</span></span> <p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%= l(:label_setup_time) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :setup_time, @course.setup_time, :placeholder => "在此选择开课日期" %></span> <span class="info" style="width: 10px"><%= text_field_tag :setup_time, @course.setup_time, :placeholder => "在此选择开课日期" %></span>
@ -46,13 +47,13 @@
<span><%= calendar_for('endup_time')%></span> <span><%= calendar_for('endup_time')%></span>
</td></tr></table></p> </td></tr></table></p>
<% end %> <% end %>
-->
<% unless @course.nil?%> <% unless @course.nil?%>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span> <p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时" %></span> <span>&nbsp;<strong><%= l(:label_class_hour)%></strong></span> <span class="info" style="width: 10px"><%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时" %></span> <span>&nbsp;<strong><%= l(:label_class_hour)%></strong></span>
</td></tr></table></p> </td></tr></table></p>
<% else %> <% else %>
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span> <p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %><span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" style="width: 10px"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时" %></span><strong><%= l(:label_class_hour)%></strong> <span class="info" style="width: 10px"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时" %></span><strong><%= l(:label_class_hour)%></strong>
</td></tr></table></p> </td></tr></table></p>
<% end %> <% end %>
@ -63,7 +64,7 @@
<p><table><tr><td> <p><table><tr><td>
<% unless @course.nil? %> <% unless @course.nil? %>
<% if @course.time == 2008 %> <% if @course.time == 2008 %>
<p><table><tr><td class="info" align="right" style="width: 90px; margin-left:20px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px; margin-left:20px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008' selected='selected'>2008</option> <%= select_tag 'time', "<option value = '2008' selected='selected'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -77,7 +78,7 @@
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2009 %> <% elsif @course.time == 2009 %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009' selected='selected'>2009</option> <option value = '2009' selected='selected'>2009</option>
@ -91,7 +92,7 @@
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2010 %> <% elsif @course.time == 2010 %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -105,7 +106,7 @@
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2011 %> <% elsif @course.time == 2011 %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -120,7 +121,7 @@
<% elsif @course.time == 2012 %> <% elsif @course.time == 2012 %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -134,7 +135,7 @@
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2013 %> <% elsif @course.time == 2013 %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -148,7 +149,7 @@
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2014 %> <% elsif @course.time == 2014 %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -162,7 +163,7 @@
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2015 %> <% elsif @course.time == 2015 %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -176,7 +177,7 @@
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2016 %> <% elsif @course.time == 2016 %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -190,7 +191,7 @@
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2017 %> <% elsif @course.time == 2017 %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -203,7 +204,7 @@
<option value = '2016'>2016</option> <option value = '2016'>2016</option>
<option value = '2017' selected='selected'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017' selected='selected'>2017</option>".html_safe %></td></tr></table></p>
<% else %> <% else %>
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td> <p><table><tr><td class="info" align="right" style="width: 86px"><strong><%= l(:label_term) %><span class="required"> *&nbsp;&nbsp;</span></strong></td>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'time', "<option value = '2008'>2008</option> <%= select_tag 'time', "<option value = '2008'>2008</option>
<option value = '2009'>2009</option> <option value = '2009'>2009</option>
@ -211,7 +212,7 @@
<option value = '2011'>2011</option> <option value = '2011'>2011</option>
<option value = '2012'>2012</option> <option value = '2012'>2012</option>
<option value = '2013'>2013</option> <option value = '2013'>2013</option>
<option value = '2014'>2014</option> <option value = '2014' selected='selected'>2014</option>
<option value = '2015'>2015</option> <option value = '2015'>2015</option>
<option value = '2016'>2016</option> <option value = '2016'>2016</option>
<option value = '2017'>2017</option>".html_safe %></td></tr></table></p> <option value = '2017'>2017</option>".html_safe %></td></tr></table></p>
@ -263,43 +264,49 @@
<% end %> <% end %>
<% end %></td></tr></table></p> <% end %></td></tr></table></p>
<!-- end --> <!-- end -->
<!-- added by huang --> <!-- added by huang -->
<p style="margin-left:-10px;"><%= m.text_field :password, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> <!-- <p style="margin-left:-10px;"><%= m.text_field :password, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> -->
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em> <p style="margin-left:-10px;"><label for="project[course]_password"><%=l(:label_new_course_password)%><span class="required"> *</span></label><input id="project_course_password" type="text" style="width:488px;margin-left: 10px;" size="60" name="project[course][password]"></p>
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em>
<% end %> <% end %>
<p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %></p><!--by young-->
<!-- <p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %></p> -->
<!--new added -->
<p style="margin-left:-20px;padding-right: 20px;"><label for="project_description"><%=l(:label_new_course_description)%></label><span class="jstEditor"><textarea id="project_description" class="wiki-edit" style="font-size:small;width:490px;margin-left:10px;" rows="8" name="project[description]" cols="40"></textarea></span></p>
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_public_info) %></em></p><!-- modified by bai --> <p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_public_info) %></em></p><!-- modified by bai -->
<p style="display:none;"><%= f.text_field :project_type, :value => 1 %></p> <p style="display:none;"><%= f.text_field :project_type, :value => 1 %></p>
<%= wikitoolbar_for 'project_description' %> <%= wikitoolbar_for 'project_description' %>
<% @project.custom_field_values.each do |value| %> <% @project.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :project, value %></p> <p><%= custom_field_tag_with_label :project, value %></p>
<% end %> <% end %>
<%= call_hook(:view_projects_form, :project => @project, :form => f) %> <%= call_hook(:view_projects_form, :project => @project, :form => f) %>
<!--[eoform:project]--> <!--[eoform:project]-->
<% unless @project.identifier_frozen? %> <% unless @project.identifier_frozen? %>
<% content_for :header_tags do %> <% content_for :header_tags do %>
<%= javascript_include_tag 'project_identifier' %> <%= javascript_include_tag 'project_identifier' %>
<% end %> <% end %>
<% end %> <% end %>
<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %> <% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %>
<%= javascript_tag do %> <%= javascript_tag do %>
$(document).ready(function() { $(document).ready(function() {
$("#project_inherit_members").change(function(){ $("#project_inherit_members").change(function(){
if (!$(this).is(':checked')) { if (!$(this).is(':checked')) {
if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) { if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) {
$("#project_inherit_members").attr("checked", true); $("#project_inherit_members").attr("checked", true);
} }
} }
}); });
}); });
<% end %> <% end %>
<% end %> <% end %>

View File

@ -24,7 +24,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding-left: 8px"><a><%= link_to "forge.trustie.net/project/course", :controller => 'projects', :action => 'course', :project_type => 1 %> </a></td> <td style="padding-left: 8px"><a><%= link_to "forge.trustie.net/course", :controller => 'projects', :action => 'course', :project_type => 1 %> </a></td>
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course', :project_type => 1 %></td> <td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course', :project_type => 1 %></td>
</tr> </tr>
</table> </table>
@ -44,7 +44,7 @@
<% if User.current.logged? %> <% if User.current.logged? %>
<p style="text-align:right;"> <p style="text-align:right;">
<span class="my-project"><%= l(:label_my_projects) %></span> <span class="my-project"><%= l(:label_my_course) %></span>
</p> </p>
<% end %> <% end %>

View File

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