mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 12:45:46 +08:00
Merge branch 'pre_trustie_server' into trustie_server
# Conflicts: # app/helpers/repositories_helper.rb
This commit is contained in:
58
app/views/admins/glcc_pr_check/_examine_material.html.erb
Normal file
58
app/views/admins/glcc_pr_check/_examine_material.html.erb
Normal file
@@ -0,0 +1,58 @@
|
||||
<table class="table table-hover glcc_pr_check-list-table">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th width="3%">序号</th>
|
||||
<th width="4%" class="text-left">学生姓名</th>
|
||||
<th width="3%" class="text-left">课题ID</th>
|
||||
<th width="10%" class="text-left">课题名称</th>
|
||||
<th width="10%">邮件地址</th>
|
||||
<th width="15%">视频地址</th>
|
||||
<th width="15%">PR地址</th>
|
||||
60
|
||||
<th width="5%">考核阶段</th>
|
||||
<th width="4%">白名单</th>
|
||||
<th width="15%">检测状态</th>
|
||||
<th width="6%">提交时间</th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if examine_materials.present? %>
|
||||
<% examine_materials.each_with_index do |material, index| %>
|
||||
<tr class="user-item-<%= material.id %>">
|
||||
<td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
|
||||
<td><%= material.glcc_student.student_name %></td>
|
||||
<td><%= material.task_id %></td>
|
||||
<td><%= material.task.task_name %></td>
|
||||
<td>
|
||||
<span class="d-inline-block" tabindex="0" data-toggle="tooltip" data-placement="left" title="<%= material.glcc_student.mail%>">
|
||||
<%=material.glcc_student.mail.truncate(20) %>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="d-inline-block" tabindex="0" data-toggle="tooltip" data-placement="left" title="<%= material.defence_video_url%>">
|
||||
<a href="javascript:">
|
||||
<%= material.defence_video_url.nil? ? "" : material.defence_video_url.truncate(30) %>
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="d-inline-block" tabindex="0" data-toggle="tooltip" data-placement="left" title="<%= material.code_or_pr_url%>">
|
||||
<a href="javascript:">
|
||||
<%= material.code_or_pr_url.nil? ? "" : material.code_or_pr_url.truncate(30) %>
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
<td><%= material.term == 1 ? "中期考核" : "结项考核"%></td>
|
||||
<td><%= material.white_list ? "是":"否" %></td>
|
||||
<td><%= material.state_to_html.blank?&&!material.white_list ? "通过" : material.state_to_html.html_safe %></td>
|
||||
<td><%= material.created_on.strftime("%Y-%m-%d %H:%M")%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render 'admins/shared/no_data_for_table' %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render partial: 'admins/shared/paginate', locals: { objects: examine_materials } %>
|
||||
44
app/views/admins/glcc_pr_check/index.html.erb
Normal file
44
app/views/admins/glcc_pr_check/index.html.erb
Normal file
@@ -0,0 +1,44 @@
|
||||
<div class="box search-form-container glcc_pr_check-list-form">
|
||||
<%= form_tag(admins_glcc_pr_check_index_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
|
||||
<div class="form-group mr-2">
|
||||
<label for="status">考核选项:</label>
|
||||
<% status_options = [['中期考核',1], ['结项考核', 2]] %>
|
||||
<%= select_tag(:term, options_for_select(status_options), class: 'form-control') %>
|
||||
</div>
|
||||
|
||||
<div class="form-group mr-2">
|
||||
<label for="status">第 </label>
|
||||
<%= select_year(Date.today, {field_name:"year"}, {class:"form-control"})%>
|
||||
<label for="status"> 期</label>
|
||||
</div>
|
||||
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
|
||||
<% end %>
|
||||
<button onclick="$('.send-email-list-form').show();$('.glcc_pr_check-list-form').hide();$('.glcc-examine-list-container').hide()" > 前去发送邮件</button>
|
||||
</div>
|
||||
|
||||
<div class="box search-form-container send-email-list-form" style ="display:none">
|
||||
<h5> 请重新选择参数,谨慎操作</h5>
|
||||
|
||||
<%= form_tag(send_mail_admins_glcc_pr_check_index_path, method: :post, class: 'form-inline search-form flex-1', remote: true) do %>
|
||||
<div class="form-group mr-2">
|
||||
<label for="status"> 请选择考核选项:</label>
|
||||
<% status_options = [['中期考核',1], ['结项考核', 2]] %>
|
||||
<%= select_tag(:term, options_for_select(status_options), class: 'form-control') %>
|
||||
</div>
|
||||
|
||||
<div class="form-group mr-2">
|
||||
<label for="status">第 </label>
|
||||
<%= select_year((Date.today + 1.years), {field_name:"year"}, {class:"form-control"})%>
|
||||
<label for="status"> 期(注:此处为一年中的数据)</label>
|
||||
</div>
|
||||
|
||||
<%= submit_tag('发送邮件', class: 'btn btn-primary ml-3',data: { confirm: '您是否真的需要进行邮件发送操作?请确认 考核选项 和 期数' }) %>
|
||||
<% end %>
|
||||
<button onclick="$('.glcc_pr_check-list-form').show();$('.send-email-list-form').hide();$('.glcc-examine-list-container').show()" > 取消发送邮件</button>
|
||||
</div>
|
||||
|
||||
<div class="box admin-list-container glcc-examine-list-container">
|
||||
<%= render partial: 'examine_material', locals: { examine_materials: @examine_materials } %>
|
||||
</div>
|
||||
|
||||
|
||||
1
app/views/admins/glcc_pr_check/index.js.erb
Normal file
1
app/views/admins/glcc_pr_check/index.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$('.glcc-examine-list-container').html("<%= j( render partial: 'examine_material', locals: { examine_materials: @examine_materials } ) %>");
|
||||
@@ -57,6 +57,7 @@
|
||||
<%= sidebar_item(EduSetting.get("glcc_apply_informations_admin_url"), '报名列表', icon: 'user', controller: 'root') %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li><%= sidebar_item(admins_glcc_pr_check_index_path, '考核PR检测', icon: 'edit', controller: 'admins-glcc_pr_check') %></li>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
json.user do
|
||||
json.id @user.id
|
||||
json.type @user.type
|
||||
json.name @user.real_name
|
||||
json.login @user.login
|
||||
json.image_url url_to_avatar(@user)
|
||||
json.forked Project.exists?(user_id: @user.id, forked_from_project_id: @project.id)
|
||||
end
|
||||
json.organizations @organizations do |organization|
|
||||
json.forked Project.exists?(user_id: organization.id, forked_from_project_id: @project.id)
|
||||
json.id organization.id
|
||||
json.name organization.login
|
||||
json.nickname organization.nickname.blank? ? organization.name : organization.nickname
|
||||
json.avatar_url url_to_avatar(organization)
|
||||
json.created_at organization.created_on.strftime("%Y-%m-%d")
|
||||
end
|
||||
71
app/views/user_mailer/glcc_pr_check_email.html.erb
Normal file
71
app/views/user_mailer/glcc_pr_check_email.html.erb
Normal file
@@ -0,0 +1,71 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>验证码发送</title>
|
||||
<style type="text/css">
|
||||
/* 验证链接页面 */
|
||||
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
|
||||
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5; background:#eaebec;}
|
||||
div,img,tr,td,table{ border:0;}
|
||||
table,tr,td{border:0;}
|
||||
ol,ul,li{ list-style-type:none}
|
||||
.new_content{ background:#fff; width: 100%;}
|
||||
.email-page-link{ }
|
||||
.email-link-top{ }
|
||||
.c_white{ color:#fff;}
|
||||
.email-link-con{ }
|
||||
.email-link-line{ }
|
||||
.email-link-footer{ padding:15px; color:#333; line-height: 1.9; }
|
||||
.c_grey02{ color: #888;}
|
||||
.fb{ font-weight: normal;}
|
||||
.f14{ }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body style="background:#fff;">
|
||||
<div class="new_content">
|
||||
<div style="width: 598px; background:#fff; margin:20px auto; font-size:14px; ">
|
||||
<div style="height:50px; width: 578px; background:#46484c; padding:9px 10px 6px;border:1px solid #ddd; border-bottom:none;">
|
||||
<a href="https://www.gitlink.org.cn">
|
||||
<img src="https:///www.gitlink.org.cn/images/email_logo.png" width="100" style="float:left; margin-top: 8px;" >
|
||||
</a>
|
||||
<div style="clear:both; overflow:hidden;"></div>
|
||||
</div>
|
||||
<div style="width: 558px; border-left:1px solid #ddd;border-right:1px solid #ddd; background:#fff; padding:30px 20px; color:#333; line-height: 1.9;">
|
||||
|
||||
<p style="color:#333; font-size:16px; margin: 15px 0; font-weight: bold">
|
||||
<b>尊敬的<%=@name%>同学:</b>
|
||||
</p>
|
||||
|
||||
<p style="font-size: 15px; font-family: 微软雅黑, 宋体; color: rgb(51, 51, 51); text-decoration: none; background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;">
|
||||
您好!经过一个多月的开发,GLCC开源编程夏令营终于迎来中期考核。为了确保您能够顺利通过考核,现对您提交的PR链接进行检测,发现存在以下问题:
|
||||
</p>
|
||||
|
||||
<div style="text-align: center; margin: 15px 0; font-size: 15px; font-family: 微软雅黑, 宋体; color: rgb(51, 51, 51); text-decoration: none; background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;text-align: center;">
|
||||
<%=@content.html_safe%>
|
||||
</div>
|
||||
|
||||
<p style="font-size: 15px; margin: 15px 0; font-family: 微软雅黑, 宋体; color: rgb(51, 51, 51); text-decoration: none; background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;">
|
||||
您提交的PR链接的真实有效性对于后期的开发和奖金的发放至关重要,请您务必予以重视。请您尽快核查链接的有效性,并按照组委会要求提交中期考核材料。若确认链接无误,请忽略本邮件。
|
||||
</p>
|
||||
|
||||
<p style="margin: 15px 0;font-size: 15px; font-family: 微软雅黑, 宋体; color: rgb(51, 51, 51); text-decoration: none; background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;">
|
||||
如有其他问题,请联系:glcc@ccf.org.cn
|
||||
</p>
|
||||
|
||||
<p style="font-size: 15px; font-family: 微软雅黑, 宋体; color: rgb(51, 51, 51); text-decoration: none; background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-align: right;">
|
||||
GLCC组委会
|
||||
</p>
|
||||
<p style="font-size: 15px; font-family: 微软雅黑, 宋体; color: rgb(51, 51, 51); text-decoration: none; background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-align: right;">
|
||||
<%=Time.now.strftime('%Y年%m月%d日')%>
|
||||
</p>
|
||||
</div>
|
||||
<div style="padding:20px; color:#333; line-height: 1.9;background:#46484c;border:1px solid #ddd; border-top:none; width: 558px;">
|
||||
<a href="https:///www.gitlink.org.cn/" style="font-weight: normal; color:#fff;">www.gitlink.org.cn</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user