注册页面增加学号提示 #1287
This commit is contained in:
parent
3fef2d8a3c
commit
f1aa0c1570
|
@ -291,7 +291,6 @@
|
|||
|
||||
<%= labelled_form_for @user, :url => register_path do |f| %>
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<div class="box tabular">
|
||||
<p>
|
||||
<table>
|
||||
|
@ -305,73 +304,80 @@
|
|||
<option value="1"><%= l(:label_student) %></option>
|
||||
<option value="2"><%= l(:label_enterprise) %></option>
|
||||
<option value="3"><%= l(:label_account_developer) %></option>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<span id='technical_title' style='display:none'>
|
||||
<select name="technical_title" id="userTechnical_title"></select></span>
|
||||
<span id='no' style='display:none'>
|
||||
|
||||
<% unless User.current.user_extensions.nil? %>
|
||||
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %></span>
|
||||
<% else %>
|
||||
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
|
||||
<% end %>
|
||||
</td>
|
||||
<span id='technical_title' style='display:none'>
|
||||
<select name="technical_title" id="userTechnical_title"></select>
|
||||
</span>
|
||||
<span id='no' style='display:none'>
|
||||
<strong>
|
||||
<%= l(:label_bidding_user_studentcode) %>
|
||||
<span class="required"> *</span>
|
||||
</strong>
|
||||
<% unless User.current.user_extensions.nil? %>
|
||||
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %>
|
||||
<% else %>
|
||||
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
<% if @user.auth_source_id.nil? %>
|
||||
<p><%= f.text_field :login, :size => 25, :required => true %><span id="valid_user_login"></span>
|
||||
<em class="info"><%= l(:label_max_number) %></em></p>
|
||||
|
||||
<em class="info"><%= l(:label_max_number) %></em>
|
||||
</p>
|
||||
<p><%= f.password_field :password, :size => 25, :required => true %>
|
||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
|
||||
|
||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em>
|
||||
</p>
|
||||
<p><%= f.password_field :password_confirmation, :size => 25, :required => true %></p>
|
||||
<% end %>
|
||||
<span id='name' style='display:none'>
|
||||
<p><%= f.text_field :firstname, :required => true %></p>
|
||||
<p><%= f.text_field :lastname, :required => true %></p>
|
||||
</span>
|
||||
<span id='enterprise' style='display:none'>
|
||||
<p><table>
|
||||
<tr>
|
||||
<td class="info" align="right" style="width: 90px"><strong>企业名<span class="required"> *</span></strong></td>
|
||||
<td class="info" style="width: 10px">
|
||||
<%= text_field_tag :enterprise_name %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
<p><%= f.text_field :mail, :required => true %><span id="valid_user_mail"></span></p>
|
||||
|
||||
<p><%= f.text_field :firstname, :required => true %></p>
|
||||
<p><%= f.text_field :lastname, :required => true %></p>
|
||||
</span>
|
||||
<span id='enterprise' style='display:none'>
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info" align="right" style="width: 90px">
|
||||
<strong>企业名
|
||||
<span class="required"> *</span>
|
||||
</strong>
|
||||
</td>
|
||||
<td class="info" style="width: 10px">
|
||||
<%= text_field_tag :enterprise_name %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</span>
|
||||
<p>
|
||||
<em class="info"><%= "#{l(:label_mail_attention)} " %></em></p>
|
||||
|
||||
<%= f.text_field :mail, :required => true %>
|
||||
<span id="valid_user_mail"></span>
|
||||
</p>
|
||||
<p>
|
||||
<em class="info"><%= "#{l(:label_mail_attention)} " %></em>
|
||||
</p>
|
||||
<p><%= f.select :language, lang_options_for_select, :required => true %></p>
|
||||
|
||||
<!-- added by bai 增加了身份、性别和地区-->
|
||||
|
||||
<span id='gender' style='display:none'>
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info" align="right" style="width: 90px">
|
||||
<strong><%= l(:label_gender) %><span class="required"> </span></strong></td>
|
||||
<td class="info" style="width: 10px">
|
||||
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option>
|
||||
<option value = '1'>#{l(:label_gender_female)}</option>".html_safe %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
|
||||
<span id='gender' style='display:none'>
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info" align="right" style="width: 90px">
|
||||
<strong><%= l(:label_gender) %><span class="required"> </span></strong></td>
|
||||
<td class="info" style="width: 10px">
|
||||
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option>
|
||||
<option value = '1'>#{l(:label_gender_female)}</option>".html_safe %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</span>
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -435,19 +441,13 @@
|
|||
</table>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if Setting.openid? %>
|
||||
<p><%= f.text_field :identity_url %></p>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% @user.custom_field_values.select { |v| v.editable? || v.required? }.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :user, value %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
var $login = $('#user_login')
|
||||
|
@ -486,5 +486,4 @@
|
|||
;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
|
@ -56,97 +56,97 @@
|
|||
</td>
|
||||
<td colspan="2">
|
||||
<table width="580px" border="0" style="table-layout: fixed">
|
||||
<tr>
|
||||
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>作品名称:</strong>
|
||||
<% if homework.name == nil || homework.name == "" %>
|
||||
<% homework_filename = homework.user.name + "提交的作业" %>
|
||||
<% else %>
|
||||
<% homework_filename = homework.name %>
|
||||
<% end %>
|
||||
<strong title="<%=homework_filename%>">
|
||||
<%= link_to homework_filename , homework_attach_path(homework)%>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="vertical-align: top;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>合作成员: </strong>
|
||||
<% homework_users = homework_user_of_homework(homework,is_teacher) %>
|
||||
<% if homework.users.count == 0 %>
|
||||
无
|
||||
<% else %>
|
||||
<span title="<%= homework_users%>"><%= homework_users %></span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td rowspan="4" style="text-align: center;vertical-align: middle;width: 30px">
|
||||
<% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %>
|
||||
<span class="required">迟交</span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>作品名称:</strong>
|
||||
<% if homework.name == nil || homework.name == "" %>
|
||||
<% homework_filename = homework.user.name + "提交的作业" %>
|
||||
<% else %>
|
||||
<% homework_filename = homework.name %>
|
||||
<% end %>
|
||||
<strong title="<%=homework_filename%>">
|
||||
<%= link_to homework_filename , homework_attach_path(homework)%>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="vertical-align: top;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>合作成员: </strong>
|
||||
<% homework_users = homework_user_of_homework(homework,is_teacher) %>
|
||||
<% if homework.users.count == 0 %>
|
||||
无
|
||||
<% else %>
|
||||
<span title="<%= homework_users%>"><%= homework_users %></span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td rowspan="4" style="text-align: center;vertical-align: middle;width: 30px">
|
||||
<% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %>
|
||||
<span class="required">迟交</span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>开发项目</strong>:
|
||||
<% if homework.project != nil %>
|
||||
<span title="<%= homework.project.name %>">
|
||||
<%= link_to homework.project.name,project_path(homework.project.id)%>
|
||||
</span>
|
||||
<% else %>
|
||||
暂无
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<strong>项目得分:
|
||||
<span style="color: <%= homework.project.nil? ? "#727272" : "#EC6300"%>;">
|
||||
<%= homework.project.nil? ? "N/A" : project_scores(homework.project) %>
|
||||
</span>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>开发项目</strong>:
|
||||
<% if homework.project != nil %>
|
||||
<span title="<%= homework.project.name %>">
|
||||
<%= link_to homework.project.name,project_path(homework.project.id)%>
|
||||
</span>
|
||||
<% else %>
|
||||
暂无
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<strong>项目得分:
|
||||
<span style="color: <%= homework.project.nil? ? "#727272" : "#EC6300"%>;">
|
||||
<%= homework.project.nil? ? "N/A" : project_scores(homework.project) %>
|
||||
</span>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<strong>提交文件:
|
||||
<% if is_evaluation || is_teacher%>
|
||||
<%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
|
||||
<% else %>
|
||||
<span class="required">未开启互评功能作业不允许下载</span>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<strong>互评得分:
|
||||
<%# student_homework_score = student_score_for_homework(homework) %>
|
||||
<span style="color:<%= homework.s_score.nil? ? "#727272" : "#EC6300"%>;">
|
||||
<% score = homework.s_score.nil? ? "N/A" : format("%.2f",homework.s_score) %>
|
||||
<%= score %>
|
||||
</span>
|
||||
<% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%>
|
||||
<%= link_to "学生互评>>",homework_attach_path(homework) %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;width: 200px;">
|
||||
<% if is_evaluation || is_teacher%>
|
||||
<%= render :partial => 'app_link', :locals => {:attachments => homework.attachments} %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<strong>终评得分:
|
||||
<%# totle_homework_score = score_for_homework(homework) %>
|
||||
<% totle_homework_score = format("%.2f",(homework.t_score.nil? ? 0.00 : homework.t_score) * (@bid.proportion * 1.0 / 100) + (homework.s_score.nil? ? 0.00 : homework.s_score) * (1 - @bid.proportion * 1.0 / 100)) %>
|
||||
<span style="color:<%= totle_homework_score == "0.00"? "#727272" : "#EC6300"%> ;">
|
||||
<% score = totle_homework_score == "0.00"? "N/A" : totle_homework_score %>
|
||||
<%= score %>
|
||||
</span>
|
||||
<% if is_teacher %>
|
||||
<%= link_to "教师评分>>",homework_attach_path(homework) %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>提交文件:
|
||||
<% if is_evaluation || is_teacher%>
|
||||
<%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
|
||||
<% else %>
|
||||
<span class="required">未开启互评功能作业不允许下载</span>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<strong>互评得分:
|
||||
<%# student_homework_score = student_score_for_homework(homework) %>
|
||||
<span style="color:<%= homework.s_score.nil? ? "#727272" : "#EC6300"%>;">
|
||||
<% score = homework.s_score.nil? ? "N/A" : format("%.2f",homework.s_score) %>
|
||||
<%= score %>
|
||||
</span>
|
||||
<% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%>
|
||||
<%= link_to "学生互评>>",homework_attach_path(homework) %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;width: 200px;">
|
||||
<% if is_evaluation || is_teacher%>
|
||||
<%= render :partial => 'app_link', :locals => {:attachments => homework.attachments} %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<strong>终评得分:
|
||||
<%# totle_homework_score = score_for_homework(homework) %>
|
||||
<% totle_homework_score = format("%.2f",(homework.t_score.nil? ? 0.00 : homework.t_score) * (@bid.proportion * 1.0 / 100) + (homework.s_score.nil? ? 0.00 : homework.s_score) * (1 - @bid.proportion * 1.0 / 100)) %>
|
||||
<span style="color:<%= totle_homework_score == "0.00"? "#727272" : "#EC6300"%> ;">
|
||||
<% score = totle_homework_score == "0.00"? "N/A" : totle_homework_score %>
|
||||
<%= score %>
|
||||
</span>
|
||||
<% if is_teacher %>
|
||||
<%= link_to "教师评分>>",homework_attach_path(homework) %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue