From 402dfc788fbd5840a34984eb7f942f013de2d08d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 21 Jan 2015 09:55:40 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E6=97=B6=E9=97=AE=E5=8D=B7=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 2 +- app/views/poll/_show_head.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 6890b8dd7..2fc586711 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -40,7 +40,7 @@ class PollController < ApplicationController def new if @course option = { - :polls_name => l(:label_poll_new), + :polls_name => "", :polls_type => @course.class.to_s, :polls_group_id => @course.id, :polls_status => 1, diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index ce74dc10a..7ab16b24d 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,7 +1,7 @@

- <%= poll.polls_name%> + <%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%>

<%= @poll.polls_description%> From 3bdaeb20c217bac98a682aa3b88ecb1dbd7536c3 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 21 Jan 2015 11:14:01 +0800 Subject: [PATCH 02/10] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=202=E3=80=81=E9=97=AE=E5=8D=B7=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8F=91=E5=B8=83=E9=97=AE=E5=8D=B7=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=203=E3=80=81=E5=A2=9E=E5=8A=A0js=E8=BF=94=E5=9B=9E=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=204=E3=80=81=E5=8E=BB=E6=8E=89=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84js=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 8 +++- app/views/poll/_poll.html.erb | 64 +++++++++++++++++-------- app/views/poll/_poll_form.html.erb | 2 +- app/views/poll/_poll_republish.html.erb | 12 ----- app/views/poll/_poll_submit.html.erb | 16 +------ app/views/poll/index.html.erb | 24 ++++++++++ app/views/poll/publish_poll.js.erb | 2 + app/views/poll/republish_poll.js.erb | 3 +- public/stylesheets/polls.css | 15 +++++- 9 files changed, 94 insertions(+), 52 deletions(-) create mode 100644 app/views/poll/publish_poll.js.erb diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 2fc586711..42ab98e10 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -187,7 +187,13 @@ class PollController < ApplicationController @poll.polls_status = 2 @poll.published_at = Time.now if @poll.save - redirect_to poll_index_url(:polls_type => "Course", :polls_group_id => @course.id) + if params[:is_remote] + redirect_to poll_index_url(:polls_type => "Course", :polls_group_id => @course.id) + else + respond_to do |format| + format.js + end + end end end diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index dea4e175b..cc7e88547 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -1,23 +1,44 @@ +<% has_commit = has_commit_poll?(poll.id ,User.current)%>

  • <% if @is_teacher %> - <% if has_commit_poll?(poll.id ,User.current) %> - <%= poll.polls_name %> + <% if has_commit %> + + <%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%> + <% else %> - <%= link_to poll.polls_name, poll_path(poll.id), :class => "polls_title fl" %> + <%= link_to (poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name), poll_path(poll.id), :class => "polls_title polls_title_w fl" %> <% end %> <% else %> - <% if has_commit_poll?(poll.id ,User.current) && poll.polls_status == 2 %> + <% if has_commit && poll.polls_status == 2 %> - <%= poll.polls_name %> + <%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name %> - <% elsif (!has_commit_poll?(poll.id ,User.current)) && poll.polls_status == 2 %> - <%= link_to poll.polls_name, poll_path(poll.id), :class => "polls_title fl" %> + <% elsif !has_commit && poll.polls_status == 2 %> + <%= link_to (poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name), poll_path(poll.id), :class => "polls_title polls_title_w fl" %> <% end %> <% end %>
  • +<% if !@is_teacher && has_commit && poll.polls_status == 2%> +
  • 已答
  • +<% end %> + +<%if @is_teacher%> + <% if poll.polls_status == 1 %> +
  • 统计结果
  • + <% elsif poll.polls_status == 2%> +
  • + <%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%> +
  • + <% end%> +<% end%> +
  • - <%if @is_teacher && poll.polls_status == 2%> - <%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%> + <%if @is_teacher %> + <% if poll.polls_status == 1 %> + 发布问卷 + <% elsif poll.polls_status == 2%> + 取消发布 + <% end%> <% end%>
  • @@ -28,18 +49,21 @@ <% end%>
  • - <% if @is_teacher && poll.polls_status == 1%> - - <%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml20"%> + <% if @is_teacher%> + <% if poll.polls_status == 1 %> + <%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml20"%> + <% elsif poll.polls_status == 2%> +
  • 编辑
  • + <% end%> <% end%> -
  • - <% if @is_teacher && poll.polls_status == 2%> - - 取消发布 - - <% end %> -
  • -
  • + + + + + + + +
  • <%= format_time poll.created_at%>
  • \ No newline at end of file diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index bbf71e0ce..6ce4137a3 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -57,7 +57,7 @@ function poll_submit() { - $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { poll: @poll}) %>'); + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll},:is_remote => false) %>'); showModal('ajax-modal', '310px'); $('#ajax-modal').css('height','110px'); $('#ajax-modal').siblings().remove(); diff --git a/app/views/poll/_poll_republish.html.erb b/app/views/poll/_poll_republish.html.erb index 3688ba883..3f93b6b3d 100644 --- a/app/views/poll/_poll_republish.html.erb +++ b/app/views/poll/_poll_republish.html.erb @@ -2,18 +2,6 @@ diff --git a/app/views/poll/_poll_submit.html.erb b/app/views/poll/_poll_submit.html.erb index cdc41dd9d..af3ca2d42 100644 --- a/app/views/poll/_poll_submit.html.erb +++ b/app/views/poll/_poll_submit.html.erb @@ -2,18 +2,6 @@ @@ -27,16 +15,14 @@ 是否确定发布该问卷?

    - <%= link_to "确 定",publish_poll_poll_path(poll.id), :class => "upload_btn", :onclick => "clickCanel();" %> + <%= link_to "确 定",publish_poll_poll_path(poll.id,:is_remote => is_remote), :class => "upload_btn", :onclick => "clickCanel();" %> 取  消
    - - diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index 043e6898b..de30b5deb 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -25,6 +25,30 @@ } function clickCanel(){hideModal("#popbox02");} + + function poll_submit(poll_id) + { + $('#ajax-modal').html("
    " + + "
    " + + "
    " + + "

    问卷发布后将不能对问卷进行修改,
    是否确定发布该问卷?

    " + + "
    " + + "确  定" + + "取  消" + + "
    " + + "
    " + + "
    " + + "
    " + + "
    "); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','110px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + }
    diff --git a/app/views/poll/publish_poll.js.erb b/app/views/poll/publish_poll.js.erb new file mode 100644 index 000000000..ad052f8f2 --- /dev/null +++ b/app/views/poll/publish_poll.js.erb @@ -0,0 +1,2 @@ +$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>"); +alert("发布成功"); \ No newline at end of file diff --git a/app/views/poll/republish_poll.js.erb b/app/views/poll/republish_poll.js.erb index a7399af5b..a2d8e28fa 100644 --- a/app/views/poll/republish_poll.js.erb +++ b/app/views/poll/republish_poll.js.erb @@ -1 +1,2 @@ -$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>"); \ No newline at end of file +$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>"); +alert("取消成功"); \ No newline at end of file diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css index 4141164c4..e46aa5124 100644 --- a/public/stylesheets/polls.css +++ b/public/stylesheets/polls.css @@ -26,8 +26,8 @@ div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margi a.newbtn{ float:right; display:block; width:80px; height:30px; background:#64bdd9; color:#fff; font-size:14px; margin:10px; text-align:center;} a:hover.newbtn{ background:#55a1b9; text-decoration:none;} .polls_list ul{ padding-left:10px; border-bottom:1px dashed #c9c9c9; height:32px; padding-top:8px;} -a.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 350px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} -.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 350px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} +a.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} +.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} a.pollsbtn{ display:block; width:66px; height:22px; text-align:center; border:1px solid #64bdd9; color:#64bdd9;} a:hover.pollsbtn{ background:#64bdd9; color:#fff; text-decoration:none;} .polls_date{ color:#666666;} @@ -134,3 +134,14 @@ a:hover.upload_btn_grey{background:#8a8a8a;} .upload_con a:hover{ text-decoration:none;} .polls_btn_box{ width:145px; margin:0 auto; padding-left:10px;} .polls_btn_box02{ width:80px; margin:0 auto; padding-left:10px;} + +/***新增20150120***/ +.pollsbtn_tip{ width:30px; height:17px; display:block;background:url(images/icons.png) 0 -417px no-repeat;padding-left:7px; color:#fff;} +a.btn_de{ border:1px solid #ff5d31; color:#ff5d31; } +a:hover.btn_de{ background:#ff5d31;} +a.btn_pu{ border:1px solid #3cb761; color:#3cb761; } +a:hover.btn_pu{ background:#3cb761;} +.pollsbtn_grey{ border:1px solid #b1b1b1; color:#b1b1b1; padding:0px 9px; } +.polls_title_w { width:330px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} +.polls_de_grey{ color:#b1b1b1;} +.ml5{ margin-left:5px;} From 95dcdd71251982a69348d19f79b4c2ec1d3da8d1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 21 Jan 2015 11:18:47 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E7=BC=96=E8=BE=91=E7=95=8C=E9=9D=A2=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index 6ce4137a3..b3fae8b4a 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -57,7 +57,7 @@ function poll_submit() { - $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll},:is_remote => false) %>'); + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>'); showModal('ajax-modal', '310px'); $('#ajax-modal').css('height','110px'); $('#ajax-modal').siblings().remove(); From 2f8a183168b265bf9814a41cbc10577eba641bdb Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 21 Jan 2015 11:34:53 +0800 Subject: [PATCH 04/10] =?UTF-8?q?1=E3=80=81=E6=9B=BF=E6=8D=A2=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E5=9B=BE=E7=89=87=202=E3=80=81=E5=B7=B2=E7=AD=94?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=90=8E=E9=97=AE=E5=8D=B7=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=B7=B2=E7=AD=94=E6=A0=87=E5=BF=97=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/images/icons.png | Bin 2382 -> 2479 bytes public/stylesheets/polls.css | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/images/icons.png b/public/stylesheets/images/icons.png index 2d2b33fe1a24f741e781b935549f8172180870ad..e0ba4f4e6525285ce88227c93c3fa01348628857 100644 GIT binary patch literal 2479 zcmZ`*2~d;Q7XGskG^`2|g|H}#f}mJHksU=uF@YCamKXwxP}$NTvI`_Yw3J;)Y>-VM zQI;rM2*fBstJFwTtg;6Eu~dWr22t4pzI5Kqo6dXf%y;KIbLM{Mo_p_^Gbh&k!oq`gwU>Df>-w>_=WuqEAlrkDr}HS3oZ^_zxmlVz8eT?q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heets/polls.css @@ -136,7 +136,7 @@ a:hover.upload_btn_grey{background:#8a8a8a;} .polls_btn_box02{ width:80px; margin:0 auto; padding-left:10px;} /***新增20150120***/ -.pollsbtn_tip{ width:30px; height:17px; display:block;background:url(images/icons.png) 0 -417px no-repeat;padding-left:7px; color:#fff;} +.pollsbtn_tip{ width:30px; height:17px; display:block;background:url(images/icons.png) 0 -372px no-repeat;padding-left:7px; color:#fff;} a.btn_de{ border:1px solid #ff5d31; color:#ff5d31; } a:hover.btn_de{ background:#ff5d31;} a.btn_pu{ border:1px solid #3cb761; color:#3cb761; } From a53831a6b5f35f107bd4087b020ef6a984bda3f9 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 21 Jan 2015 11:44:49 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BD=93=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E6=A0=87=E9=A2=98=E8=BF=87=E9=95=BF=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=9F=A5=E7=9C=8B=E9=97=AE=E5=8D=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=9C=81=E7=95=A5=E5=8F=B7=E8=BF=87=E6=97=A9=E5=87=BA?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index cc7e88547..3290ff2dc 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -10,11 +10,11 @@ <% end %> <% else %> <% if has_commit && poll.polls_status == 2 %> - + <%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name %> <% elsif !has_commit && poll.polls_status == 2 %> - <%= link_to (poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name), poll_path(poll.id), :class => "polls_title polls_title_w fl" %> + <%= link_to (poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name), poll_path(poll.id), :class => "polls_title polls_title_w fl", :style => "max-width: 550px;width: 550px;" %> <% end %> <% end %> From 77b8bf18c8f042c02f783e85c23246ef18c6929e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 21 Jan 2015 11:50:33 +0800 Subject: [PATCH 06/10] =?UTF-8?q?#1842=20=E4=BF=AE=E6=94=B9=E9=83=A8?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=9D=A2=E6=8F=8F=E8=BF=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_edit_MCQ.html.erb | 2 +- app/views/poll/_new_MCQ.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/poll/_edit_MCQ.html.erb b/app/views/poll/_edit_MCQ.html.erb index 613fed371..129f50e94 100644 --- a/app/views/poll/_edit_MCQ.html.erb +++ b/app/views/poll/_edit_MCQ.html.erb @@ -18,7 +18,7 @@
    - + />
    diff --git a/app/views/poll/_new_MCQ.html.erb b/app/views/poll/_new_MCQ.html.erb index de9dc9f08..027a1c1f6 100644 --- a/app/views/poll/_new_MCQ.html.erb +++ b/app/views/poll/_new_MCQ.html.erb @@ -3,7 +3,7 @@
    - +
    From 520e9c73aa34be5f9983f9bf1820f35311c91102 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 21 Jan 2015 14:30:19 +0800 Subject: [PATCH 07/10] =?UTF-8?q?#1836=20=E6=9C=AA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=88=96=E8=80=85=E6=B2=A1=E6=9C=89=E6=9D=83=E9=99=90=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E7=A7=81=E6=9C=89=E9=A1=B9=E7=9B=AE=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0403=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index d3df57982..24a3ff19f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -558,6 +558,11 @@ class ProjectsController < ApplicationController # Show @project def show + if(@project && !@project.is_public && !User.current.member_of?(@project)) + render_403 + return + end + @project_type = params[:project_type] # try to redirect to the requested menu item From 7ee17b6d7ceb038ee5d24f8045868237daefc275 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 21 Jan 2015 15:43:15 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=B7=A6=E8=BE=B9=E8=BE=B9=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/polls.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css index 06802285d..e601d231d 100644 --- a/public/stylesheets/polls.css +++ b/public/stylesheets/polls.css @@ -19,7 +19,7 @@ div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margi .polls_btn span{ color:#15bed1; font-size:12px; font-weight:normal;} /*问卷列表*/ -.polls_content{ width:615px;} +.polls_content{ width:615px;padding-left: 6px;} .polls_head{ width:677px; 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;} From d68486669e5712e268769fde68fceac04392d985 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 21 Jan 2015 16:07:44 +0800 Subject: [PATCH 09/10] =?UTF-8?q?#1830=E8=AF=BE=E7=A8=8B--=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=AD=97=E4=BD=93=E5=8E=8B=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/member.html.erb | 2 +- public/stylesheets/course_group.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/courses/member.html.erb b/app/views/courses/member.html.erb index 2599760ad..803be3731 100644 --- a/app/views/courses/member.html.erb +++ b/app/views/courses/member.html.erb @@ -56,7 +56,7 @@ <%= stylesheet_link_tag 'course_group', :media => 'all' %> -
    +