new project/course

This commit is contained in:
yanxd 2014-02-22 11:22:58 +08:00
parent b434f7541b
commit 60e8f93594
1 changed files with 11 additions and 175 deletions

View File

@ -9,7 +9,7 @@
<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><label for="project_name" style="font-size: 13px;" ><%=l(:label_tags_course_name)%><span class="required", > *&nbsp;&nbsp;</span></label><input id="project_name" type="text" value="<%=@project.name%>" 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 %> <!-- <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? %> <% unless @project.identifier_frozen? %>
@ -62,167 +62,8 @@
<!-- added by bai 增加了“年度”和“学期” --> <!-- added by bai 增加了“年度”和“学期” -->
<p><table><tr><td> <p><table><tr><td>
<!--#######-->
<% unless @course.nil? %> <% unless @course.nil? %>
<% if @course.time == 2014 %>
<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">
<%= select_tag 'time', "<option value = '2014' selected='selected'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2015 %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015' selected='selected'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2016 %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016' selected='selected'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2017 %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017' selected='selected'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2018 %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018' selected='selected'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2019 %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019' selected='selected'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2020 %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020' selected='selected'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2021 %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021' selected='selected'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2022 %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022' selected='selected'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% elsif @course.time == 2023 %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023' selected='selected'>2023</option>".html_safe %></td></tr></table></p>
<% else %>
<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">
<%= select_tag 'time', "<option value = '2014'>2014</option>
<option value = '2015'>2015</option>
<option value = '2016'>2016</option>
<option value = '2017'>2017</option>
<option value = '2018'>2018</option>
<option value = '2019'>2019</option>
<option value = '2020'>2020</option>
<option value = '2021'>2021</option>
<option value = '2022'>2022</option>
<option value = '2023'>2023</option>".html_safe %></td></tr></table></p>
<% end %>
<% end %></td>
<td>
<!--#######-->
<!-- <% unless @course.nil? %>
<% if @course.time == 2008 %> <% if @course.time == 2008 %>
<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> <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">
@ -379,47 +220,42 @@
<% end %> <% end %>
<% end %></td> <% end %></td>
<td> --> <td>
<% unless @course.nil? %> <% unless @course.nil? %>
<% if @course.term == l(:label_spring) %> <% if @course.term == l(:label_spring) %>
<p><table><tr> <p><table><tr>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}' selected='selected'>#{l(:label_spring)}</option> <%= select_tag 'term', "<option value = '#{l(:label_spring)}' selected='selected'>#{l(:label_spring)}</option>
<option value = '#{l(:label_summer)}'>#{l(:label_summer)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option> <option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
<option value = '#{l(:label_winter)}'>#{l(:label_winter)}</option>".html_safe %></td></tr></table></p> ".html_safe %></td></tr></table></p>
<% elsif @course.term == l(:label_summer)%> <% elsif @course.term == l(:label_summer)%>
<p><table><tr> <p><table><tr>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option> <%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_summer)}' selected='selected'>#{l(:label_summer)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option> <option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
<option value = '#{l(:label_winter)}'>#{l(:label_winter)}</option>".html_safe %></td></tr></table></p> ".html_safe %></td></tr></table></p>
<% elsif @course.term == l(:label_autumn)%> <% elsif @course.term == l(:label_autumn)%>
<p><table><tr> <p><table><tr>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option> <%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_summer)}'>#{l(:label_summer)}</option>
<option value = '#{l(:label_autumn)}' selected='selected'>#{l(:label_autumn)}</option> <option value = '#{l(:label_autumn)}' selected='selected'>#{l(:label_autumn)}</option>
<option value = '#{l(:label_winter)}'>#{l(:label_winter)}</option>".html_safe %></td></tr></table></p> ".html_safe %></td></tr></table></p>
<% elsif @course.term == l(:label_winter)%> <% elsif @course.term == l(:label_winter)%>
<p><table><tr> <p><table><tr>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option> <%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_summer)}'>#{l(:label_summer)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option> <option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
<option value = '#{l(:label_winter)}' selected='selected'>#{l(:label_winter)}</option>".html_safe %></td></tr></table></p> ".html_safe %></td></tr></table></p>
<% else %> <% else %>
<p><table><tr> <p><table><tr>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option> <%= select_tag 'term', "<option value = '#{l(:label_spring)}'>#{l(:label_spring)}</option>
<option value = '#{l(:label_summer)}'>#{l(:label_summer)}</option>
<option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option> <option value = '#{l(:label_autumn)}'>#{l(:label_autumn)}</option>
<option value = '#{l(:label_winter)}'>#{l(:label_winter)}</option>".html_safe %></td></tr></table></p> ".html_safe %></td></tr></table></p>
<% end %> <% end %>
@ -427,13 +263,13 @@
<!-- 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> -->
<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> <p style="margin-left:-10px;"><label for="project[course]_password" style="font-size: 13px;" ><%=l(:label_new_course_password)%><span class="required"> *</span></label><input id="project_course_password" type="text" style="width:488px;margin-left: 10px;" value="<%=@project.course_extra.password if @project.course_extra %>" size="60" name="project[course][password]"></p>
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em> <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> --> <!-- <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 --> <!--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:-20px;padding-right: 20px;"><label for="project_description" style="font-size: 13px;"><%=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" ><%=@project.description%></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 -->