diff --git a/app/assets/stylesheets/questionnaire.css b/app/assets/stylesheets/questionnaire.css
new file mode 100644
index 00000000..eab2710b
--- /dev/null
+++ b/app/assets/stylesheets/questionnaire.css
@@ -0,0 +1,112 @@
+.o-question {
+ font-size: 15px;
+}
+.o-question input[type=checkbox], .o-question input[type=radio] {
+ margin: 0;
+}
+.o-question textarea {
+ resize: vertical;
+}
+.o-question-topic {
+ font-size: 2em;
+ line-height: normal;
+ margin: 0;
+ padding: 0.5em 0;
+}
+.o-question-description {
+ font-size: 0.9em;
+ line-height: 1.5em;
+}
+.o-question-list {
+ clear: both;
+ margin: 40px 0;
+ padding: 0;
+ font-weight: bold;
+}
+.o-question-list > li {
+ margin: 0 0 0 40px;
+ padding: 16px 0;
+ border-top: solid 1px #eee;
+}
+.o-question-list > li:first-child {
+ border: 0;
+}
+.o-question-title {
+ font-weight: bold;
+}
+.o-question-title + input[type=text], .o-question-title + textarea, .o-question-title + select {
+ display: block;
+}
+.o-question-title + input[type=text], .o-question-title + textarea {
+ border: solid 1px #ccc;
+ padding: 6px;
+ margin: 20px 0;
+ line-height: 24px;
+}
+.o-question-title + input[type=text] {
+ width: 40%;
+}
+.o-question-title + textarea {
+ width: 70%;
+}
+.o-question-group {
+ margin: 20px 0;
+ padding: 0;
+}
+.o-question-option {
+ font-weight: normal;
+}
+.o-question-group.view-list {
+ list-style: none;
+}
+.o-question-group.view-list .o-question-option {}
+.o-question-group.view-list > li {
+ margin-top: 8px;
+}
+.o-question-group.view-list > li:first-child {
+ margin: 0;
+}
+.o-question-group.view-list > li > * {
+ display: inline-block;
+ margin: 0;
+ padding: 0;
+ vertical-align: middle;
+}
+.o-question-group.view-list > li input + .o-question-option {
+ margin: 0 0 0 12px;
+}
+.o-question-group.view-dropdown {
+ height: 24px;
+ line-height: 24px;
+}
+.o-question-group.view-grid {
+ border-collapse: collapse;
+ max-width: 90%;
+ min-width: 50%;
+}
+.o-question-group.view-grid th, .o-question-group.view-grid td {
+ padding: 6px;
+}
+.o-question-group.view-grid thead th {}
+.o-question-group.view-grid tbody th {}
+.o-question-group.view-grid tbody .odd .o-question-title, .o-question-group.view-grid tbody .odd td {
+ background-color: #f6f6f6;
+}
+.o-question-group.view-grid tbody .odd .o-question-title {
+ background-color: transparent;
+}
+.o-question-group.view-grid tbody .odd td {}
+.o-question-group.view-grid tbody tr:hover td {
+ background-color: #aaa;
+}
+.o-question-group.view-grid tbody td {
+ vertical-align: middle;
+ text-align: center;
+}
+.o-question-group.view-grid tbody td input {
+ vertical-align: baseline;
+}
+.o-question-action {
+ padding: 20px;
+ background-color: #f6f6f6;
+}
\ No newline at end of file
diff --git a/app/assets/stylesheets/standalone.css b/app/assets/stylesheets/standalone.css
new file mode 100644
index 00000000..c35ff4e9
--- /dev/null
+++ b/app/assets/stylesheets/standalone.css
@@ -0,0 +1,52 @@
+@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700);
+body {
+ margin: 0;
+ padding: 50px 0;
+ background-color: #eee;
+ font-family: 'Open Sans', sans-serif;
+}
+
+.wrapper {
+ background-color: #FFFFFF;
+ box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
+ margin: 0 auto;
+ overflow: hidden;
+ width: 980px;
+}
+
+.wrapper > h1 {
+ margin: 0;
+ padding: 20px;
+ font-family: 'Open Sans', sans-serif;
+ font-weight: bold;
+}
+section {
+ border-top: dashed 3px #eee;
+ padding: 40px;
+ overflow: hidden;
+}
+section:first-child {
+ border: 0;
+ padding-top: 0;
+}
+section > h2 {
+ font-size: 13px;
+ font-weight: bold;
+ border: solid 1px #ddd;
+ background-color: #2676C0;
+ color: #fff;
+ display: inline-block;
+ padding: 0 16px;
+ box-shadow: 0 1px 1px #fff, 0 2px 6px rgba(0,0,0,0.1);
+}
+.side {
+ float: right;
+ width: 189px;
+ padding-left: 20px;
+ border-left: solid 1px #eee;
+}
+.main {
+ float: left;
+ width: 710px;
+ padding-right: 20px;
+}
\ No newline at end of file
diff --git a/app/views/layouts/standalone.html.erb b/app/views/layouts/standalone.html.erb
new file mode 100644
index 00000000..faa592d9
--- /dev/null
+++ b/app/views/layouts/standalone.html.erb
@@ -0,0 +1,31 @@
+
+
+
+
+
<%= f.label :custom_option, t('survey_question.custom_option')%>
<%= f.check_box :custom_option %>
diff --git a/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/_survey.html.erb b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/_survey.html.erb
index eeaa50ea..09dde95a 100644
--- a/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/_survey.html.erb
+++ b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/_survey.html.erb
@@ -10,7 +10,12 @@
<%if at_least_module_manager %>
- <%= link_to t('edit'), edit_panel_survey_back_end_survey_path(survey, :page => params[:page]) %>
- - <%= link_to t('survey.answers'), panel_survey_back_end_survey_answers_path(survey, :page => params[:page]) %>
+ - <%= link_to t('survey.duplicate_it'), duplicate_it_panel_survey_back_end_survey_path(survey, :page => params[:page]) %>
+ - <%= link_to t('survey.jump'), jump_panel_survey_back_end_survey_path(survey, :page => params[:page]) %>
+ - <%= link_to t('survey.set_answers'), set_answers_panel_survey_back_end_survey_path(survey, :page => params[:page]) %>
+ - <%= link_to t('survey.answers_list'), panel_survey_back_end_survey_answers_path(survey, :page => params[:page]) %>
+ - <%= link_to t('survey.export_csv'), export_panel_survey_back_end_survey_path(survey, :format => :csv), :target => '_blank' %>
+ - <%= link_to t('survey.chart'), chart_panel_survey_back_end_survey_path(survey, :page => params[:page]) %>
- <%= link_to t(:delete_), panel_survey_back_end_survey_path(survey), :confirm => t('sure?'), :method => :delete, :remote => true %>
<% end -%>
diff --git a/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/chart.html.erb b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/chart.html.erb
new file mode 100644
index 00000000..6356b183
--- /dev/null
+++ b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/chart.html.erb
@@ -0,0 +1,40 @@
+
<%= @survey.title %> <%= t('survey.chart') %>
+
+<% @survey_questions.each do |question| %>
+
+
<%= question.title %>
+ <% case question.type %>
+ <% when ::SurveyQuestion::Radio, ::SurveyQuestion::Check, ::SurveyQuestion::Select %>
+
+ <% else %>
+
<%= t('survey_question.have_not_chart') %>
+ <% end %>
+
+<% end %>
+
+
+ <%= link_to t('back'), get_go_back, :class=>"btn" %>
+
+
+<% content_for :page_specific_javascript do %>
+
+
+<% end %>
\ No newline at end of file
diff --git a/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/jump.html.erb b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/jump.html.erb
new file mode 100644
index 00000000..a56c4c1e
--- /dev/null
+++ b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/jump.html.erb
@@ -0,0 +1,56 @@
+
<%= @survey.title %> <%= t('survey.jump') %>
+
+<%= form_for @survey, :url => panel_survey_back_end_survey_path(@survey), :html => {:class => 'clear'} do |f| %>
+
+
+
+ <%= f.label :jump_mode, t('survey.jump_mode')%>
+ <%= f.check_box :jump_mode %>
+
+
+ <% @questions.each_with_index do |question, i| %>
+
+ <%= f.fields_for :survey_questions, question do |f| %>
+
+
" class="survey_question_item clear">
+
+
+
+ <% end %>
+
+ <% end %>
+
+
+ <%= hidden_field_tag 'page', params[:page] if !params[:page].blank? %>
+ <%= f.submit t('submit'), :class=>'btn btn-primary' %>
+ <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
+
+
+
+<% end %>
\ No newline at end of file
diff --git a/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/set_answers.html.erb b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/set_answers.html.erb
new file mode 100644
index 00000000..99c45fde
--- /dev/null
+++ b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/set_answers.html.erb
@@ -0,0 +1,34 @@
+
<%= @survey.title %> <%= t('survey.set_answers') %>
+
+<%= form_for @survey, :url => panel_survey_back_end_survey_path(@survey), :html => {:class => 'clear'} do |f| %>
+
+
+
+ <%= f.label :result_type, t('survey.result_type')%>
+ <%= f.select :result_type, {
+ t('survey.chart') => Survey::ResultChart,
+ t('survey.extern_link') => Survey::ResultExtern,
+ t('survey.upload_file') => Survey::ResultFile
+ }, {}, :class => "tinput-medium" %>
+
+
+ <%= f.label :extern_link, t('survey.extern_link') %>
+ <%= f.text_field :extern_link, :style=>"width:98%;", :class=>'post-extern_link' %>
+
+
+ <%= f.label :upload_file, t('survey.upload_file') %>
+ <%= f.file_field :upload_file %>
+ <% if @survey.upload_file? %>
+ <%= link_to t(:view), @survey.upload_file.url, {:class => 'for_preview btn', :target => '_blank', :title => t(:view), "data-trigger" => :hover} %>
+ <%= f.label :remove_upload_file, t('survey.remove_upload_file')%>
+ <%= f.check_box :remove_upload_file %>
+ <% end %>
+
+
+ <%= hidden_field_tag 'page', params[:page] if !params[:page].blank? %>
+ <%= f.submit t('submit'), :class=>'btn btn-primary' %>
+ <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
+
+
+
+<% end %>
\ No newline at end of file
diff --git a/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/answer_error.html.erb b/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/answer_error.html.erb
index 67e73a44..0e5cff46 100644
--- a/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/answer_error.html.erb
+++ b/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/answer_error.html.erb
@@ -1,4 +1,4 @@
\ No newline at end of file
diff --git a/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/redirect_standalone.html.erb b/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/redirect_standalone.html.erb
new file mode 100644
index 00000000..de9b2f49
--- /dev/null
+++ b/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/redirect_standalone.html.erb
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/result.html.erb b/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/result.html.erb
new file mode 100644
index 00000000..b0aefc2f
--- /dev/null
+++ b/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/result.html.erb
@@ -0,0 +1,49 @@
+<% case @survey.result_type %>
+<% when ::Survey::ResultChart %>
+
+
<%= @survey.title %> <%= t('survey.chart') %>
+
+ <% @survey_questions.each do |question| %>
+
+ <% case question.type %>
+ <% when ::SurveyQuestion::Radio, ::SurveyQuestion::Check, ::SurveyQuestion::Select %>
+
+ <% end %>
+
+ <% end %>
+
+
+
+
+<% when ::Survey::ResultExtern %>
+
+<% when ::Survey::ResultFile %>
+
<%= @survey.title %> <%= t('survey.upload_file') %>
+
+ <%= link_to t(:view), @survey.upload_file.url, {:class => 'for_preview btn', :target => '_blank', :title => t(:view), "data-trigger" => :hover} %>
+
+<% end %>
\ No newline at end of file
diff --git a/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/show.html.erb b/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/show.html.erb
index 2e4cca6c..e2126998 100644
--- a/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/show.html.erb
+++ b/vendor/built_in_modules/survey/app/views/panel/survey/front_end/surveys/show.html.erb
@@ -1,87 +1,157 @@
<% # encoding: utf-8 %>
-
<%= @survey.title %>
-<%= form_for :answer, :method => :put, :url => panel_survey_front_end_survey_path(@survey, :inner => true), :html => {:class => 'clear'} do |f| %>
- <% @survey.survey_questions.each do |question| %>
- <% label = question.title %>
- <% label += ' (' + t('survey_question.required') + ')' if question.is_required %>
- <%= f.label question.id, label %>
-
<%= question.description %>
- <% case question.type %>
- <% when ::SurveyQuestion::Oneline %>
- <%= f.text_field question.id, :required => question.is_required %>
- <% when ::SurveyQuestion::Multiline %>
- <%= f.text_area question.id, :rows => 5, :required => question.is_required %>
- <% when ::SurveyQuestion::Radio %>
- <% question.survey_question_options.each do |option| %>
-
- <%= f.radio_button question.id, option.id %>
- <%= f.label "#{question.id}_#{option.id}", option.name, :style => "display:inline" %>
-
- <% end %>
- <% if question.custom_option %>
-
- <%= f.radio_button question.id, 'custom_option' %>
- <%= f.label "#{question.id}_custom_option", t('survey_question.use_custom_option') + ': ', :style => "display:inline" %>
- <%= f.text_field "#{question.id}_custom_option" %>
-
- <% end %>
- <% when ::SurveyQuestion::Check %>
- <%= f.fields_for "#{question.id}" do |cf| %>
- <% question.survey_question_options.each do |option| %>
-
- <%= cf.check_box option.id %>
- <%= cf.label option.id, option.name, :style => "display:inline" %>
-
- <% end %>
- <% if question.custom_option %>
-
- <%= cf.check_box 'custom_option' %>
- <%= f.label "#{question.id}_custom_option", t('survey_question.use_custom_option') + ': ', :style => "display:inline" %>
- <%= f.text_field "#{question.id}_custom_option" %>
-
- <% end %>
- <% end %>
- <% when ::SurveyQuestion::Select %>
- <% options = question.survey_question_options.collect {|o| [ o.name, o.id ] } %>
- <% if question.custom_option %>
- <% options.push [t('survey_question.use_custom_option'), 'custom_option'] %>
- <% end %>
- <%= f.select question.id, options %>
- <% if question.custom_option %>
- <%= f.text_field "#{question.id}_custom_option" %>
- <% end %>
- <% when ::SurveyQuestion::Radiogroup %>
- <%= f.fields_for "#{question.id}" do |rgf| %>
-
-
-
- |
- <% question.survey_question_radiogroups.each do |radiogroup| %>
-
- <%= rgf.label radiogroup.id, radiogroup.name %>
- |
- <% end %>
-
-
-
- <% question.survey_question_options.each do |option| %>
-
-
- <%= rgf.label option.id, option.name %>
- |
- <% question.survey_question_radiogroups.each do |radiogroup| %>
-
- <%= rgf.radio_button option.id, radiogroup.id %>
- |
+<%= @survey.title %>
+
+
+
+ <%= form_for :answer, :method => :put, :url => panel_survey_front_end_survey_path(@survey, :inner => true), :html => {:class => 'clear'} do |f| %>
+
+ <%= @survey.description %>
+
+
+ <% @questions.each_with_index do |question, i| %>
+ -
+ <% label = question.title %>
+ <% label += ' (' + t('survey_question.required') + ')' if question.is_required %>
+ <%= f.label question.id, label, :class => "o-question-title" %>
+
+ <%= question.description %>
+
+ <% case question.type %>
+ <% when ::SurveyQuestion::Oneline %>
+ <%= f.text_field question.id, :required => question.is_required %>
+ <% when ::SurveyQuestion::Multiline %>
+ <%= f.text_area question.id, :rows => 5, :required => question.is_required %>
+ <% when ::SurveyQuestion::Radio %>
+ <% question.survey_question_options.each do |option| %>
+
+ <%= f.radio_button question.id, option.id %>
+ <%= f.label "#{question.id}_#{option.id}", option.name, :style => "display:inline" %>
+
<% end %>
-
- <% end %>
-
-
+ <% if question.custom_option %>
+
+ <%= f.radio_button question.id, 'custom_option' %>
+ <%= f.label "#{question.id}_custom_option", t('survey_question.use_custom_option') + ': ', :style => "display:inline" %>
+ <%= f.text_field "#{question.id}_custom_option" %>
+
+ <% end %>
+ <% when ::SurveyQuestion::Check %>
+ <%= f.fields_for "#{question.id}" do |cf| %>
+ <% question.survey_question_options.each do |option| %>
+
+ <%= cf.check_box option.id %>
+ <%= cf.label option.id, option.name, :style => "display:inline" %>
+
+ <% end %>
+ <% if question.custom_option %>
+
+ <%= cf.check_box 'custom_option' %>
+ <%= f.label "#{question.id}_custom_option", t('survey_question.use_custom_option') + ': ', :style => "display:inline" %>
+ <%= f.text_field "#{question.id}_custom_option" %>
+
+ <% end %>
+ <% end %>
+ <% when ::SurveyQuestion::Select %>
+ <% options = question.survey_question_options.collect {|o| [ o.name, o.id ] } %>
+ <% if question.custom_option %>
+ <% options.push [t('survey_question.use_custom_option'), 'custom_option'] %>
+ <% end %>
+ <%= f.select question.id, options %>
+ <% if question.custom_option %>
+ <%= f.text_field "#{question.id}_custom_option", :class => 'custom_option' %>
+ <% end %>
+ <% when ::SurveyQuestion::Radiogroup %>
+ <%= f.fields_for "#{question.id}" do |rgf| %>
+
+
+
+ |
+ <% question.survey_question_radiogroups.each do |radiogroup| %>
+
+ <%= radiogroup.name %>
+ |
+ <% end %>
+
+
+
+ <% question.survey_question_options.each_with_index do |option, j| %>
+ >
+
+ <%= option.name %>
+ |
+ <% question.survey_question_radiogroups.each do |radiogroup| %>
+
+ <%= rgf.radio_button option.id, radiogroup.id %>
+ |
+ <% end %>
+
+ <% end %>
+
+
+ <% end %>
+ <% end %>
+
+ <% end %>
+
+
+ <%= f.submit t('submit'), :class => 'survey-submit' %>
+
<% end %>
- <% end %>
- <% end %>
-
- <%= f.submit t('submit') %>
-
-<% end %>
\ No newline at end of file
+
+
+
+<% content_for :page_stylesheets do %>
+