From d5100e4808ebf9cc0de3a60ed4793367cc6d568c Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Mon, 19 Jan 2015 11:42:40 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8A=E8=8B=A5?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E6=B2=A1=E6=9C=89=E5=A1=AB=E5=86=99=E5=A7=93?=
=?UTF-8?q?=E5=90=8D=E6=88=96=E8=80=85=E5=AD=A6=E5=8F=B7=EF=BC=8C=E5=9C=A8?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A4=84=E5=A7=93=E5=90=8D=E5=AD=A6=E5=8F=B7?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=90=88=E7=90=86=E3=80=8Bbug=20Sig?=
=?UTF-8?q?ned-off-by:=20alan=20<547533434@qq.com>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/courses/_member_list.html.erb | 40 ++++++++++++-------
.../courses/_member_list_detail.html.erb | 38 ++++++++++++------
2 files changed, 51 insertions(+), 27 deletions(-)
diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb
index 41b4f41e7..dd543ec2c 100644
--- a/app/views/courses/_member_list.html.erb
+++ b/app/views/courses/_member_list.html.erb
@@ -56,24 +56,36 @@
<% if @canShowCode %>
- -
- <%= l(:label_bidding_user_studentname) %> :
- <%= link_to member.user.show_name, user_path(member.user) %>
-
-
+ <% if member.user.show_name == '' && member.user.user_extensions.student_id == '' %>
+ -
+ <%= l(:label_username)%>
+ <%= link_to(member.user.name, user_path(member.user)) %>
+
+ <% else %>
+ <% unless member.user.show_name == ''%>
+ -
+ <%= l(:label_bidding_user_studentname) %> :
+ <%= link_to member.user.show_name, user_path(member.user) %>
+
+
+ <% end %>
+ <% unless member.user.user_extensions.student_id == '' %>
+ -
+ <%= l(:label_bidding_user_studentcode) %> :
+ <%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
+
+ <% end %>
+ <% end %>
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
- <%= content_tag "li", link_to(member.user.name, user_path(member.user)) %>
- <% end %>
+ -
+ <%= l(:label_username)%>
+ <%= link_to(member.user.name, user_path(member.user)) %>
+
+ <% end %>
- <% if @canShowCode %>
- -
- <%= l(:label_bidding_user_studentcode) %> :
- <%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
-
- <%#= content_tag "li", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :style=> "color:#1c9ec7;" %>
- <% end %>
+
<% if @subPage_title == l(:label_student_list) %>
<%= link_to format("%0.2f",member.score.nil? ? 0 : member.score.to_s), {
diff --git a/app/views/courses/_member_list_detail.html.erb b/app/views/courses/_member_list_detail.html.erb
index f37067cb5..bc6cbd242 100644
--- a/app/views/courses/_member_list_detail.html.erb
+++ b/app/views/courses/_member_list_detail.html.erb
@@ -7,24 +7,36 @@
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %>
<% if @canShowCode %>
- -
- <%= l(:label_bidding_user_studentname) %> :
- <%= link_to member.user.show_name, user_path(member.user) %>
-
-
+ <% if member.user.show_name == '' && member.user.user_extensions.student_id == '' %>
+ -
+ <%= l(:label_username)%>
+ <%= link_to(member.user.name, user_path(member.user)) %>
+
+ <% else %>
+ <% unless member.user.show_name == ''%>
+ -
+ <%= l(:label_bidding_user_studentname) %> :
+ <%= link_to member.user.show_name, user_path(member.user) %>
+
+
+ <% end %>
+ <% unless member.user.user_extensions.student_id == '' %>
+ -
+ <%= l(:label_bidding_user_studentcode) %> :
+ <%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
+
+ <% end %>
+ <% end %>
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
<% else %>
- <%= content_tag "li", link_to(member.user.name, user_path(member.user)) %>
+ -
+ <%= l(:label_username)%>
+ <%= link_to(member.user.name, user_path(member.user)) %>
+
<% end %>
- <% if @canShowCode %>
- -
- <%= l(:label_bidding_user_studentcode) %> :
- <%= link_to member.user.user_extensions.student_id, user_path(member.user) %>
-
- <%#= content_tag "li", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :style=> "color:#1c9ec7;" %>
- <% end %>
+
<% if @subPage_title == l(:label_student_list) %>
<%= link_to format("%0.2f",member.score.to_s), {
From 3315116832c5f966eac694af27d4756ffec6455f Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Mon, 19 Jan 2015 14:35:30 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8A=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B--=E7=95=99=E8=A8=80=EF=BC=9A=E7=BB=99=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B=E7=95=99=E8=A8=80=E5=8D=B4=E8=BF=94=E5=9B=9E404?=
=?UTF-8?q?=E3=80=8Bbug=20Signed-off-by:=20alan=20<547533434@qq.com>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/contest.rb | 3 ++-
app/views/layouts/mailer.html.erb | 2 +-
app/views/mailer/issue_add.html.erb | 1 +
app/views/mailer/issue_add.text.erb | 1 +
app/views/mailer/issue_edit.html.erb | 2 ++
app/views/mailer/issue_edit.text.erb | 2 ++
6 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/app/models/contest.rb b/app/models/contest.rb
index ad54e8fb4..650e363a8 100644
--- a/app/models/contest.rb
+++ b/app/models/contest.rb
@@ -15,7 +15,8 @@ class Contest < ActiveRecord::Base
has_many :praise_tread, as: :praise_tread_object, dependent: :destroy
has_many :contestnotifications, :dependent => :destroy, :include => :author
-
+
+
acts_as_attachable
diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb
index aa43b9194..b80206728 100644
--- a/app/views/layouts/mailer.html.erb
+++ b/app/views/layouts/mailer.html.erb
@@ -39,7 +39,7 @@ a:hover.mail_reply{ background:#06a9bc; text-decoration:none;}