surveyor 0.16.0 → 0.16.1

Sign up to get free protection for your applications and to get access to all the features.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008-2009 Brian Chamberlain and Mark Yoon
1
+ Copyright (c) 2008-2010 Brian Chamberlain and Mark Yoon
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -114,6 +114,16 @@ To work on the plugin code (for enhancements, and bug fixes, etc...) fork this g
114
114
 
115
115
  # Changes
116
116
 
117
+ 0.16.1
118
+
119
+ * fixed surveyor.sections translation line
120
+ * changed map resources order to access results survey success
121
+ * add translations for Sections title
122
+ * Add I18n to Sections title
123
+ * updated date on license
124
+ * updating results views and controller for new paths
125
+ * new results routes
126
+
117
127
  0.16.0
118
128
 
119
129
  * minor fixes to unparsing
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.16.0
1
+ 0.16.1
@@ -1,12 +1,13 @@
1
1
  class ResultsController < ApplicationController
2
+ helper 'surveyor'
2
3
  layout 'results'
3
4
  def index
4
5
  @surveys = Survey.all
5
6
  end
6
7
 
7
8
  def show
8
- @survey = Survey.find(params[:id])
9
+ @survey = Survey.find_by_access_code(params[:survey_code])
9
10
  @response_sets = @survey.response_sets
10
- @questions = SurveySection.find_by_survey_id(params[:id]).questions
11
+ @questions = @survey.sections_with_questions.map(&:questions).flatten
11
12
  end
12
13
  end
@@ -11,7 +11,7 @@
11
11
  <tr>
12
12
  <td><%=h survey.id %></td>
13
13
  <td><%=h survey.title %></td>
14
- <td><%= link_to "show results list(#{survey.response_sets.count})", show_one_survey_results_path(survey) %></td>
14
+ <td><%= link_to "show results list(#{survey.response_sets.count})", result_path(survey.access_code) %></td>
15
15
  </tr>
16
16
  <% end %>
17
17
  </table>
@@ -22,4 +22,4 @@
22
22
 
23
23
  <br />
24
24
 
25
- <%= link_to "Back", admin_results_path %>
25
+ <%= link_to "Back", results_path %>
@@ -3,7 +3,7 @@
3
3
  = hidden_field_tag :current_section_id, @section.id
4
4
  - unless @sections.size < 3
5
5
  #menu
6
- Sections:
6
+ = t('surveyor.sections')
7
7
  %ul
8
8
  - @sections.each do |s|
9
9
  %li{:class => ("active" if s == @section)}= menu_button_for(s)
data/config/routes.rb CHANGED
@@ -1,4 +1,8 @@
1
1
  ActionController::Routing::Routes.draw do |map|
2
+ map.with_options :controller => 'results' do |r|
3
+ r.results "results", :conditions => {:method => :get}, :action => "index"
4
+ r.result "results/:survey_code", :conditions => {:method => :get}, :action => "show"
5
+ end
2
6
  map.with_options :controller => 'surveyor' do |s|
3
7
  s.available_surveys "surveys", :conditions => {:method => :get}, :action => "new" # GET survey list
4
8
  s.take_survey "surveys/:survey_code", :conditions => {:method => :post}, :action => "create" # Only POST of survey to create
@@ -6,9 +10,4 @@ ActionController::Routing::Routes.draw do |map|
6
10
  s.edit_my_survey "surveys/:survey_code/:response_set_code/take", :conditions => {:method => :get}, :action => "edit" # GET editable survey
7
11
  s.update_my_survey "surveys/:survey_code/:response_set_code", :conditions => {:method => :put}, :action => "update" # PUT edited survey
8
12
  end
9
-
10
- map.with_options :controller => 'results' do |r|
11
- r.show_surveys_result_lists "surveys/results", :conditions => {:method => :get}, :action => "index"
12
- r.show_one_survey_results "surveys/:id/result", :conditions => {:method => :get}, :action => "show"
13
- end
14
- end
13
+ end
@@ -14,3 +14,4 @@ en:
14
14
  previous_section: "&laquo; Previous section"
15
15
  next_section: "Next section &raquo;"
16
16
  select_one: "Select one ..."
17
+ sections: "Sections"
@@ -0,0 +1,17 @@
1
+ # Sample localization file for Spanish. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ es:
5
+ surveyor:
6
+ take_these_surveys: "Bienvenido, usted puede tomar estas encuestas"
7
+ take_it: "Tomar"
8
+ completed_survey: "Encuesta completada"
9
+ unable_to_find_your_responses: "No se puede encontrar sus respuestas a la encuesta"
10
+ unable_to_update_survey: "No se puede actualizar la encuesta"
11
+ unable_to_find_that_survey: "No se puede encontrar la encuesta"
12
+ survey_started_success: "Encuesta iniciada correctamente"
13
+ click_here_to_finish: "Haga clic aquí para terminar"
14
+ previous_section: "&laquo; Sección anterior"
15
+ next_section: "Sección siguiente &raquo;"
16
+ select_one: "Seleccione una ..."
17
+ sections: "Secciones"
@@ -14,4 +14,4 @@ he:
14
14
  previous_section: "חזרה &raquo;"
15
15
  next_section: "&laquo; המשך"
16
16
  Select_one: "בחר/י"
17
-
17
+ sections: "סעיפים"
data/surveyor.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{surveyor}
8
- s.version = "0.16.0"
8
+ s.version = "0.16.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Chamberlain", "Mark Yoon"]
12
- s.date = %q{2010-09-14}
12
+ s.date = %q{2010-11-02}
13
13
  s.email = %q{yoon@northwestern.edu}
14
14
  s.extra_rdoc_files = [
15
15
  "README.md"
@@ -113,6 +113,7 @@ Gem::Specification.new do |s|
113
113
  "generators/surveyor/templates/assets/stylesheets/sass/surveyor.sass",
114
114
  "generators/surveyor/templates/assets/stylesheets/ui.theme.css",
115
115
  "generators/surveyor/templates/locales/surveyor_en.yml",
116
+ "generators/surveyor/templates/locales/surveyor_es.yml",
116
117
  "generators/surveyor/templates/locales/surveyor_he.yml",
117
118
  "generators/surveyor/templates/migrate/add_correct_answer_id_to_questions.rb",
118
119
  "generators/surveyor/templates/migrate/add_display_order_to_surveys.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surveyor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 95
4
+ hash: 93
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 16
9
- - 0
10
- version: 0.16.0
9
+ - 1
10
+ version: 0.16.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Chamberlain
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-09-14 00:00:00 -05:00
19
+ date: 2010-11-02 00:00:00 -05:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -154,6 +154,7 @@ files:
154
154
  - generators/surveyor/templates/assets/stylesheets/sass/surveyor.sass
155
155
  - generators/surveyor/templates/assets/stylesheets/ui.theme.css
156
156
  - generators/surveyor/templates/locales/surveyor_en.yml
157
+ - generators/surveyor/templates/locales/surveyor_es.yml
157
158
  - generators/surveyor/templates/locales/surveyor_he.yml
158
159
  - generators/surveyor/templates/migrate/add_correct_answer_id_to_questions.rb
159
160
  - generators/surveyor/templates/migrate/add_display_order_to_surveys.rb