From 311d90d56520c4f588183c123be35578da1a2841 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 13 Jan 2015 20:13:50 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E7=82=B9=E5=87=BB=E5=8D=95?= =?UTF-8?q?=E9=80=89=E3=80=81=E5=A4=9A=E9=80=89=E3=80=81=E5=8D=95=E8=A1=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E3=80=81=E5=A4=9A=E8=A1=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=9A=84js=202.=E5=88=86=E5=89=B2=E9=97=AE=E5=8D=B7=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=A4=B4=203.=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E7=9A=84=E8=B7=AF=E7=94=B1=E5=8F=8Aaction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 5 ++++ app/views/poll/_edit_MCQ.html.erb | 2 +- app/views/poll/_edit_head.html.erb | 13 +++++++++ app/views/poll/new.html.erb | 44 ++++++++++++++++++------------ config/locales/zh.yml | 5 ++++ config/routes.rb | 1 + 6 files changed, 51 insertions(+), 19 deletions(-) create mode 100644 app/views/poll/_edit_head.html.erb diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index e5b1025a4..9177e044b 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -81,6 +81,11 @@ class PollController < ApplicationController end end + #添加单选题 + def add_mc + + end + private def find_poll_and_course @poll = Poll.find params[:id] diff --git a/app/views/poll/_edit_MCQ.html.erb b/app/views/poll/_edit_MCQ.html.erb index 1d221c144..b97bba776 100644 --- a/app/views/poll/_edit_MCQ.html.erb +++ b/app/views/poll/_edit_MCQ.html.erb @@ -2,7 +2,7 @@
- +
diff --git a/app/views/poll/_edit_head.html.erb b/app/views/poll/_edit_head.html.erb new file mode 100644 index 000000000..6c8294e99 --- /dev/null +++ b/app/views/poll/_edit_head.html.erb @@ -0,0 +1,13 @@ +
+
+ +
+
+ +
+ +
+
\ No newline at end of file diff --git a/app/views/poll/new.html.erb b/app/views/poll/new.html.erb index 8f3cde9da..06ef2fae8 100644 --- a/app/views/poll/new.html.erb +++ b/app/views/poll/new.html.erb @@ -4,6 +4,13 @@ 问卷调查_问卷编辑 <%= stylesheet_link_tag 'polls', :media => 'all' %> + + @@ -12,37 +19,38 @@
-
-
- -
-
- -
- -
-
+<%= render :partial => 'edit_head'%> + +
+
- 提交 + + <%= l(:label_memo_create)%> +
diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 7c93f8e98..d130cc666 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2245,4 +2245,9 @@ zh: label_poll: 问卷调查 label_new_poll: 新建问卷 label_statistical_results: 统计结果 + label_MC: 单选题 + label_MCQ: 多选题 + label_single: 单行文字 + label_mulit: 多行文字 + diff --git a/config/routes.rb b/config/routes.rb index 617a5ade4..af0b75ae7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -61,6 +61,7 @@ RedmineApp::Application.routes.draw do resources :poll do member do get 'statistics_result' + get 'add_mc' end end