<% if has_commit %>
<%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%>
<% else %>
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 1a18ca705..1393431d7 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -1,7 +1,7 @@
/*右侧内容--动态*/
-.project_r_h{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;}
-.project_r_h02{ width:980px; height:40px; background:#eaeaea; margin-bottom:10px;}
+.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;}
+.project_r_h02{ width:920px; height:40px; background:#eaeaea; margin-bottom:10px;}
.project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
.project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;}
.project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;}
@@ -52,7 +52,7 @@ a:hover.problem_new_btn{ background:#ff7143; color:#fff;}
.problem_p span{ color:#ff3e00;}
a.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3;}
a:hover.problem_pic{border:1px solid #64bdd9;}
-.problem_txt{ width:670px; margin-left:10px; color:#777777;word-break: break-all;word-wrap: break-word;}
+.problem_txt{ width:610px; margin-left:10px; color:#777777;word-break: break-all;word-wrap: break-word;}
a.problem_name{ color:#ff5722;max-width:60px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
a:hover.problem_name{ color:#d33503;}
a.problem_tit{ color:#0781b4; max-width:410px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;vertical-align: top;}
@@ -105,14 +105,14 @@ a:hover.grey_btn{ background:#717171; color:#fff;}
.w90{width:90px;}
.ml10{margin-left:10px;}
.resource{ width:670px;}
-.re_top{width:720px; height:40px; background:#eaeaea; padding:5px;}
+.re_top{width:660px; height:40px; background:#eaeaea; padding:5px;}
.re_top input{ float:left;}
.re_search{ margin-top:7px; margin-left:5px;}
.re_schbox{ width:240px; height:24px; border:1px solid #64bdd9; color:#666666;}
.re_schbtn{ width:60px; height:26px; color:#fff; margin-right:5px; border:none; margin-left:0px;padding-left: 0px;}
a.re_fabu { display:block; width:90px; height:30px; font-size:14px; color:#fff; text-align:center; padding-top:10px; }
a:hover.re_fabu{background:#55a1b9;}
-.re_con{ margin:5px; width:720px;}
+.re_con{ margin:5px; width:665px;}
.re_con_top{color:#494949; }
.re_con_top span{ color:#999999; font-weight:bold;}
a.re_select{ display:block; border:1px solid #ff9900; color:#ff9900; margin-left:10px; padding:1px 5px;}
@@ -172,7 +172,7 @@ a:hover.work_edit{color: #fff; background: #64bdd9;}
.wzan a{ display: block;}
a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;}
a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
-.msg_box{ width:728px; border-bottom:1px dashed #CCC; padding-top:10px;}
+.msg_box{ width:670px; border-bottom:1px dashed #CCC; padding-top:10px;}
.msg_box h4{ }
.msg_box textarea{width:658px;height:90px;padding:5px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 0px; color:#666; font-size:12px; }
@@ -212,7 +212,7 @@ a:hover.ping_sub{ background:#14a8b9;}
.ping_C{border-bottom:1px dashed #CCC; padding:10px 0 0px;}
.ping_dispic a{ display:block; height:46px; width:46px; border:1px solid #CCC; padding:1px; float:left;}
.ping_dispic a:hover{border:1px solid #15bccf;}
-.ping_discon{ float:left; width:670px; margin-left:10px; }
+.ping_discon{ float:left; width:610px; margin-left:10px; }
/*.ping_distop span{ float:left;}*/
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
@@ -221,16 +221,16 @@ a:hover.ping_sub{ background:#14a8b9;}
/* 创建作品 work */
.Newwork{ width:668px; height:418px;}
.N_top{ float:right; margin-left:390px; }
-.N_con{ color:#484747; font-weight:bold; width:710px; margin-top:10px; }
+.N_con{ color:#484747; font-weight:bold; width:660px; margin-top:10px; }
.N_con p{ }
.w430{ width:470px;}
.w557{ width:557px;}
.w350{ width:350px;}
.h400{height: 400px !important;}
.w620{ width:480px; height:160px; border:1px solid #CCC;}
-.bo{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:530px; }
+.bo{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:470px; }
.bo02{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:480px; margin-left:2px; color: #999; }
-.hwork_txt{ width:610px; padding-left:5px; background:#fff;}
+.hwork_txt{ width:560px; padding-left:5px; background:#fff;}
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:10px;}
a:hover.tijiao{ background:#0f99a9;}
.members_left{ float:left; width:410px; margin-right:20px; text-align:center;}
@@ -556,7 +556,7 @@ a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #64bdd9; pa
/* 20150423作业评分*/
.ml14{ margin-left:14px;}
-.w548{ width:600px;}
+.w548{ width:552px;}
.w547{ width:544px;}
.w196{ width:182px;}
.w459{ width:459px;}
@@ -572,18 +572,18 @@ a:hover.icon_add{background:url(../stylesheets/images/icons.png) -20px -310px no
.w664{ width:664px;}
.w140{ width:140px;}
.talklist_box{ }
-.talkmain_box{ width:730px; border-bottom:1px dashed #d9d9d9; margin-bottom:20px; margin-top: 10px;}
+.talkmain_box{ width:670px; border-bottom:1px dashed #d9d9d9; margin-bottom:20px; margin-top: 10px;}
.talkmain_pic{}
a.talkmain_pic{ display:block; width:42px; height:42px; padding:2px; border:1px solid #e3e3e3;}
a:hover.talkmain_pic{border:1px solid #64bdd9;}
-.talkmain_txt{ width:670px; margin-left:10px; color:#333;}
+.talkmain_txt{ width:610px; margin-left:10px; color:#333;}
a.talkmain_name{ color:#ff5722;}
a:hover.talkmain_name{ color:#d33503;}
.talkmain_tit{ color:#0781b4; width:450px; display:block; }
.talklist_main{ }
/*.talkWrapArrow{ display:block; float:right; margin-right:10px;background:url(../images/arrow.png) 0 0 no-repeat; height:7px; width:13px;}*/
.talkConIpt{ background:#f2f2f2; }
-.talkWrapBox{ width:660px; margin-left:60px; }
+.talkWrapBox{ width:610px; margin-left:60px; }
.inputFeint{ border:1px solid #d9d9d9; background:#fff; width:583px; height:50px; margin:10px; margin-bottom:5px;color:#666;}
.inputFeint02{ border:1px solid #d9d9d9; background:#fff; width:535px; height:30px; margin:5px 0 5px 50px; color:#666;}
.inputFeint03{ border:1px solid #d9d9d9; background:#fff; width:490px; height:30px; margin:5px 0 5px 0px; color:#666;}
@@ -592,7 +592,7 @@ a.Msg_pic{ display:block; width:34px; height:34px; padding:2px; border:1px solid
a:hover.Msg_pic{border:1px solid #64bdd9;}
a.Reply_pic{ display:block; width:30px; height:30px; padding:2px; border:1px solid #e3e3e3; float:left;}
a:hover.Reply_pic{border:1px solid #64bdd9;}
-.Msg_txt{ float:left; width:630px; margin-left:10px;}
+.Msg_txt{ float:left; width:540px; margin-left:10px;}
.Msg_txt p{ }
.talkWrapMsg ul li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;}
.talkReply{ width:540px; margin-left:50px; border-top:1px dashed #d9d9d9; padding-top:10px; }
@@ -604,7 +604,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
/* 20150423作业评分*/
.ml14{ margin-left:14px;}
-.w548{ width:600px;}
+.w548{ width:552px;}
.w547{ width:544px;}
.w196{ width:196px;}
.w186{ width:186px;}
diff --git a/public/stylesheets/header.css b/public/stylesheets/header.css
index 28caa2639..6b7aa209e 100644
--- a/public/stylesheets/header.css
+++ b/public/stylesheets/header.css
@@ -90,8 +90,8 @@ li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;}
a.topnav_login_box:hover {color:#a1ebff;}
.navRow1 {margin:0; padding:0;}
.navRow2 {margin:0; padding:0;}
-.topnav_login_list{ border:1px solid #269ac9; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2;margin-top: -4px;}
-.topnav_login_list a{color:#269ac9;}
+.topnav_login_list{ border:1px solid #15bccf; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2;margin-top: -5px;}
+.topnav_login_list a{color:#15bccf;}
.topnav_login_list li{ }
/*底部*/
diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css
index 5ab4fab81..9f7b2d021 100644
--- a/public/stylesheets/polls.css
+++ b/public/stylesheets/polls.css
@@ -7,8 +7,8 @@
/*问卷列表*/
.polls_content{ width:609px;}
-.polls_content02{ width:730px;}
-.polls_head{ width:730px; height:48px; background:#eaeaea;}
+.polls_content02{ width:670px;}
+.polls_head{ width:670px; height:48px; background:#eaeaea;}
.polls_head h2{ float:left; font-size:14px; color:#585858; margin:11px 0 0 10px;}
.polls_head span{ font-weight:normal; color:#15bccf;}
a.newbtn{ float:right; display:block; width:80px; height:27px; padding-top:3px; background:#64bdd9; color:#fff; font-size:14px; margin:10px; text-align:center;}
@@ -61,7 +61,7 @@ a:hover.ur_button{ background:#0fa9bb; text-decoration:none;}
/*问卷编辑*/
.polls_edit{ color:#767676;}
a:hover{ text-decoration:none; cursor:pointer;}
-.tabs{ width:718px; height: auto; border:1px solid #cbcbcb; padding:10px 0 0 10px; margin-bottom:10px;}
+.tabs{ width:658px; height: auto; border:1px solid #cbcbcb; padding:10px 0 0 10px; margin-bottom:10px;}
.tab_item { float:left; height:30px; background:#eeeeee; margin-right:4px; padding:0 8px; margin-bottom:10px;}
.icon_delete{ font-size:16px;}
a:hover.icon_delete{ font-weight: bold;}
@@ -69,7 +69,7 @@ a:hover.icon_delete{ font-weight: bold;}
.tab_add{float:left; width:22px; height:22px; border:1px solid #cbcbcb; margin-top:6px; }
.icon_page_add{ background:url(images/icons.png) 4px -314px no-repeat; width:22px; height:27px; display:block;}
a:hover.icon_page_add{ background:url(images/icons.png) -16px -314px no-repeat;}
-.tab_item02{ float:left; width:154px; height:30px;background:#eeeeee; margin-right:10px; padding:0 10px; margin-bottom:10px; padding:10px 0 0 15px;}
+.tab_item02{ float:left; width:139px; height:30px;background:#eeeeee; margin-right:10px; padding:0 10px; margin-bottom:10px; padding:10px 0 0 15px;}
.tab_item02:hover{ background:#c9c9c9;}
.tab_icon{padding-left:25px;}
a:hover.tab_item02{ background:#fff;}
@@ -78,9 +78,9 @@ a:hover.tab_item02{ background:#fff;}
.icon_text{background:url(images/icons.png) 0px -80px no-repeat; }
.icon_textarea{background:url(images/icons.png) 0px -121px no-repeat; }
-.ur_editor {width:708px; border:1px solid #cbcbcb;background:#eeeeee; padding:10px; margin-bottom:10px;}
+.ur_editor {width:648px; border:1px solid #cbcbcb;background:#eeeeee; padding:10px; margin-bottom:10px;}
.ur_title_editor_title{ margin-bottom:10px;}
-.input_title{ width:688px; height:40px; padding:0 10px; text-align:center; font-size:16px; font-weight:bold; background:#fff;border-style:solid; border:1px solid #CBCBCB;}
+.input_title{ width:627px; height:40px; padding:0 10px; text-align:center; font-size:16px; font-weight:bold; background:#fff;border-style:solid; border:1px solid #CBCBCB;}
.textarea_editor{ width:627px; height:120px; padding:10px; margin-bottom:10px; background:#fff; border-style:solid; border:1px solid #CBCBCB;}
.btn_submit{ width:56px; height:24px; padding-top:4px;background:#15bccf; color:#fff; text-align:center; display:block; float:left; margin-right:10px;}
a:hover.btn_submit{background:#0fa9bb;}
@@ -98,7 +98,7 @@ a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
.ur_editor_toolbar{ margin-bottom:10px;}
.ur_editor_toolbar input{ width:40px; height:20px; background:#fff;}
-.ur_editor02{width:708px; border:1px solid #cbcbcb; padding:10px; margin-bottom:10px;}
+.ur_editor02{width:648px; border:1px solid #cbcbcb; padding:10px; margin-bottom:10px;}
a.ur_button_submit{ display:block; width:106px; height:31px; margin:0 auto; background:#15bccf; color:#fff; font-size:16px; text-align:center; padding-top:4px; margin-bottom:10px; }
a:hover.ur_button_submit{ background:#0fa9bb; text-decoration:none;}
@@ -139,7 +139,7 @@ a:hover.btn_pu{ background:#3cb761;}
.polls_n p{ margin-top:-4px;}
/***新增20150123***/
-.ur_buttons{ width:260px; }
+.ur_buttons{ width:275px; }
.ur_button_submit{ float:left;}
.polls_cha{float:left; margin-left:15px; margin-top:10px;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index f2155ca20..4cc859721 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -225,7 +225,7 @@ a:hover.blue_n_btn{ background:#329cbd;}
/*框架主类容*/
-#Container{ width:1000px; margin:0 auto; }
+#Container{ width:940px; margin:0 auto; }
/*头部导航*/
#Header{ margin:10px 0; background:#15bccf; height:40px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; }
@@ -291,7 +291,7 @@ a:hover.search_btn{ background: #0fa9bb;}
.search_text{ border:1px solid #15bccf; background:#fff; width:220px; height:25px; padding-left:5px; }
/*主类容左右分栏*/
#LSide{ width:240px; }
-#RSide{ width:730px; margin-left:10px; background:#fff; padding:10px; margin-bottom:10px;}
+#RSide{ width:670px; margin-left:10px; background:#fff; padding:10px; margin-bottom:10px;}
/*底部*/
From bfd13bf98ae6b88193e976512f89dfcbd349897f Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 29 Aug 2015 17:54:56 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=9B=9E=E5=A4=8D?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/courses/_courses_jours.html.erb | 2 +-
app/views/users/_user_jours.html.erb | 2 +-
app/views/users/user_newfeedback.html.erb | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb
index 12d79fc33..cedc05f4b 100644
--- a/app/views/courses/_courses_jours.html.erb
+++ b/app/views/courses/_courses_jours.html.erb
@@ -8,7 +8,7 @@
div.ke-toolbar .ke-outline{border:none;}
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
- div.recall_con{width:630px;}
+ div.recall_con{width:570px;}
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
diff --git a/app/views/users/_user_jours.html.erb b/app/views/users/_user_jours.html.erb
index 9d7a601d5..75a7d0fda 100644
--- a/app/views/users/_user_jours.html.erb
+++ b/app/views/users/_user_jours.html.erb
@@ -8,7 +8,7 @@
div.ke-toolbar .ke-outline{border:none;}
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
- div.recall_con{width:600px;}
+ div.recall_con{width:570px;}
div.recall_con .reply_btn{margin-left:555px;margin-top:5px;}
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb
index f8ede1093..556069a1f 100644
--- a/app/views/users/user_newfeedback.html.erb
+++ b/app/views/users/user_newfeedback.html.erb
@@ -15,7 +15,7 @@
div.ke-toolbar .ke-outline{border:none;}
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
- div.recall_con{width:630px;}
+ div.recall_con{width:570px;}
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
.fr.cr{ clear: right}
From ca0c7a4fb0d152768a79beef1423d45ad2741e9c Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 29 Aug 2015 18:51:35 +0800
Subject: [PATCH 4/8] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?=
=?UTF-8?q?=E8=81=8C=E7=A7=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/application_helper.rb | 15 +++++++++++++++
app/views/layouts/new_base_user.html.erb | 8 +++++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 7f93345b4..b36a6491e 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -2254,6 +2254,21 @@ module ApplicationHelper
technical_title
end
+ def get_user_roll identity
+ technical_title = ""
+ case identity.to_s
+ when "0"
+ technical_title = l(:label_account_identity_teacher)
+ when "1"
+ technical_title = l(:label_account_identity_student)
+ when "2"
+ technical_title = l(:label_account_identity_enterprise)
+ when "3"
+ technical_title = l(:label_account_identity_developer)
+ end
+ technical_title
+ end
+
def ie8?
request.env["HTTP_USER_AGENT"] =~ /MSIE 8.0/
diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb
index 32813b58d..6fe2a4653 100644
--- a/app/views/layouts/new_base_user.html.erb
+++ b/app/views/layouts/new_base_user.html.erb
@@ -50,9 +50,11 @@
<% end %>
-
- <%= get_technical_title @user %>
-
+ <% if @user.user_extensions && @user.user_extensions.identity %>
+
+ <%= get_user_roll @user.user_extensions.identity %>
+
+ <% end%>
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
From 09a994f76a49d33f4f6b2c97c97b6eca0f38ce5a Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 29 Aug 2015 18:54:34 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E8=81=8C=E7=A7=B0=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E5=89=AF=E6=95=99=E6=8E=88=E7=AD=89=E8=81=8C=E7=A7=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/application_helper.rb | 6 +++---
app/views/layouts/new_base_user.html.erb | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index b36a6491e..7b83bb1c2 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -2254,11 +2254,11 @@ module ApplicationHelper
technical_title
end
- def get_user_roll identity
+ def get_user_roll user
technical_title = ""
- case identity.to_s
+ case user.user_extensions.identity.to_s
when "0"
- technical_title = l(:label_account_identity_teacher)
+ technical_title = get_technical_title user
when "1"
technical_title = l(:label_account_identity_student)
when "2"
diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb
index 6fe2a4653..20a626c12 100644
--- a/app/views/layouts/new_base_user.html.erb
+++ b/app/views/layouts/new_base_user.html.erb
@@ -52,7 +52,7 @@
<% if @user.user_extensions && @user.user_extensions.identity %>
- <%= get_user_roll @user.user_extensions.identity %>
+ <%= get_user_roll @user %>
<% end%>
From c416a312cf87572c953d7e0865aaacbf0f18fa11 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 29 Aug 2015 19:02:47 +0800
Subject: [PATCH 6/8] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=8F=91=E5=B8=83?=
=?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/user_homeworks.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb
index e232579f9..74e4df4f0 100644
--- a/app/views/users/user_homeworks.html.erb
+++ b/app/views/users/user_homeworks.html.erb
@@ -14,7 +14,7 @@
function reset_homework(){
$("#homework_name").val("");
- $("#homework_end_time").val("");
+ $("#homework_end_time").val("<%= (Time.now + 3600 * 24).strftime('%Y-%m-%d')%>");
$("#course_id").val("");
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new })%>");
homework_description_editor.html("");
From 8be7509b33d4056e385438333649be7781e00f68 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 29 Aug 2015 19:03:36 +0800
Subject: [PATCH 7/8] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E3=80=81=E7=AB=9E?=
=?UTF-8?q?=E8=B5=9B=E4=B8=BB=E9=A1=B5=E8=B7=B3=E8=BD=AC=E5=88=B0=E4=B8=AA?=
=?UTF-8?q?=E4=BA=BA=E4=B8=BB=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/welcome_controller.rb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb
index 809f78ddc..24cbecb81 100644
--- a/app/controllers/welcome_controller.rb
+++ b/app/controllers/welcome_controller.rb
@@ -98,6 +98,9 @@ class WelcomeController < ApplicationController
end
def course
+ redirect_to signin_path
+ return
+
@course_page = FirstPage.find_by_page_type('course')
@school_id = params[:school_id] || User.current.user_extensions.school.try(:id) || 117
@logoLink ||= logolink()
@@ -140,6 +143,9 @@ class WelcomeController < ApplicationController
def contest
+ redirect_to signin_path
+ return
+
@contest_page = FirstPage.find_by_page_type('contest')
@contest_notifications = Contestnotification.order("created_at desc").limit(5)
end
From 7a4d5627730a2d7eec233c6bfccad6255e43caa4 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 29 Aug 2015 19:15:06 +0800
Subject: [PATCH 8/8] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=B8=BB=E9=A1=B5?=
=?UTF-8?q?=EF=BC=8C=E9=A1=B9=E7=9B=AE=E4=B8=BB=E9=A1=B5=20500?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/welcome_controller.rb | 58 +++++++++++++--------------
1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb
index 24cbecb81..784066378 100644
--- a/app/controllers/welcome_controller.rb
+++ b/app/controllers/welcome_controller.rb
@@ -96,14 +96,14 @@ class WelcomeController < ApplicationController
@projects = Project.all_public.active
render :layout => false, :content_type => 'text/plain'
end
-
+
def course
redirect_to signin_path
return
-
- @course_page = FirstPage.find_by_page_type('course')
- @school_id = params[:school_id] || User.current.user_extensions.school.try(:id) || 117
- @logoLink ||= logolink()
+ #
+ # @course_page = FirstPage.find_by_page_type('course')
+ # @school_id = params[:school_id] || User.current.user_extensions.school.try(:id) || 117
+ # @logoLink ||= logolink()
end
def logolink()
@@ -146,8 +146,8 @@ class WelcomeController < ApplicationController
redirect_to signin_path
return
- @contest_page = FirstPage.find_by_page_type('contest')
- @contest_notifications = Contestnotification.order("created_at desc").limit(5)
+ # @contest_page = FirstPage.find_by_page_type('contest')
+ # @contest_notifications = Contestnotification.order("created_at desc").limit(5)
end
def search
@@ -187,28 +187,28 @@ class WelcomeController < ApplicationController
private
# 判断网站的入口,是课程 course 则跳过index去渲染 course 方法
def entry_select
- url = request.original_url.gsub('/','')
- if url.include?(Setting.url_course.gsub('/',''))
- if @first_page.show_course == 1
- course
- render :course
- else
- render_404
- end
-
- return 0
- elsif url.include?(Setting.url_contest.gsub('/',''))
- if @first_page.show_contest == 1
- contest
- render :contest
- else
- render_404
- end
-
- return 0
- elsif url.include?(Setting.url_user.gsub('/',''))
- #redirect_to(:controller => "users", :action => "index")
- end
+ # url = request.original_url.gsub('/','')
+ # if url.include?(Setting.url_course.gsub('/',''))
+ # if @first_page.show_course == 1
+ # course
+ # render :course
+ # else
+ # render_404
+ # end
+ #
+ # return 0
+ # elsif url.include?(Setting.url_contest.gsub('/',''))
+ # if @first_page.show_contest == 1
+ # contest
+ # render :contest
+ # else
+ # render_404
+ # end
+ #
+ # return 0
+ # elsif url.include?(Setting.url_user.gsub('/',''))
+ # #redirect_to(:controller => "users", :action => "index")
+ # end
end