From 5765dd12428481e4ac4b58a18ba660e3d11b03db Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Tue, 24 May 2016 12:07:41 +0200 Subject: [PATCH 1/5] Limit splash navigation options --- app/views/conference/_social_media.html.haml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/views/conference/_social_media.html.haml b/app/views/conference/_social_media.html.haml index 29eac688..b072423f 100644 --- a/app/views/conference/_social_media.html.haml +++ b/app/views/conference/_social_media.html.haml @@ -1,7 +1,3 @@ -= content_for :splash_nav do - %li - %a.smoothscroll{ href: '#social-media' } Social Media - .container .row .col-md-12.text-center From 3578953b1ebfd7f6f6e235896b545b96524057c8 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Wed, 25 May 2016 14:40:45 +0200 Subject: [PATCH 2/5] Hotfix question display what a mess.... --- app/controllers/admin/questions_controller.rb | 2 +- .../conference_registrations/_questions.html.haml | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/controllers/admin/questions_controller.rb b/app/controllers/admin/questions_controller.rb index 1a805a32..51eefb8a 100644 --- a/app/controllers/admin/questions_controller.rb +++ b/app/controllers/admin/questions_controller.rb @@ -5,7 +5,7 @@ module Admin def index authorize! :index, Question.new(conference_id: @conference.id) - @questions = Question.where(global: true).all | Question.where(conference_id: @conference.id) + @questions = Question.where(global: true) | @conference.questions @questions_conference = @conference.questions @new_question = @conference.questions.new end diff --git a/app/views/conference_registrations/_questions.html.haml b/app/views/conference_registrations/_questions.html.haml index dcb9b308..935adc8c 100644 --- a/app/views/conference_registrations/_questions.html.haml +++ b/app/views/conference_registrations/_questions.html.haml @@ -1,7 +1,8 @@ -= f.inputs 'Additional Info' do - - @conference.questions.each do |q| - - if q.question_type.id == 1 || q.question_type.id == 2 # yes/no or single choice - = f.input :qanswers, :collection => q.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), :as => :select, :input_html => { :multiple => false }, - label: q.title, :include_blank => "Please make your choice" - - if q.question_type.id == 3 # multiple choice - = f.input :qanswers, :collection => q.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), :as => :check_boxes, label: q.title +- if @conference.questions.any? + = f.inputs 'Additional Info' do + - @conference.questions.each do |question| + - if question.question_type.title == 'Yes/No' || question.question_type.title == 'Single Choice' + = f.input :qanswers, :collection => question.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), :as => :select, :input_html => { :multiple => false }, + label: question.title, :include_blank => "Please make your choice" + - if question.question_type.title == 'Multiple Choice' + = f.input :qanswers, :collection => question.qanswers.joins(:answer).pluck("answers.title, qanswers.id"), :as => :check_boxes, label: question.title From 11f6f36f096a0fe212225844f927eda7b1d397d8 Mon Sep 17 00:00:00 2001 From: Nishanth Vijayan Date: Fri, 27 May 2016 01:22:41 +0530 Subject: [PATCH 3/5] Remove routes of Speakers,People and Photos controllers --- config/routes.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 4aeca5e9..b2180a8b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -19,11 +19,9 @@ Osem::Application.routes.draw do namespace :admin do resources :users - resources :people resources :comments, only: [:index] resources :conference do resource :contact, except: [:index, :new, :create, :show, :destroy] - resources :photos, except: [:show] resource :schedule, only: [:show, :update] get 'commercials/render_commercial' => 'commercials#render_commercial' resources :commercials, only: [:index, :create, :update, :destroy] @@ -64,7 +62,6 @@ Osem::Application.routes.draw do patch :restart get :vote end - resource :speaker, only: [:edit, :update] end end From 32ed3b6373de7c621fd0e92af2fae413f9ddc61a Mon Sep 17 00:00:00 2001 From: Ana Date: Fri, 27 May 2016 00:45:42 +0200 Subject: [PATCH 4/5] Wrong test: proposal cannot be rated --- spec/models/program_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/models/program_spec.rb b/spec/models/program_spec.rb index 3adad84e..4d8cc42a 100644 --- a/spec/models/program_spec.rb +++ b/spec/models/program_spec.rb @@ -10,10 +10,10 @@ describe Program do expect(program.rating_enabled?).to be true end - it 'returns false if proposals cannot be rated (program.ratinig == 0) ' do + it 'returns false if proposals cannot be rated (program.rating == 0) ' do program = conference.program - program.rating = 3 - expect(program.rating_enabled?).to be true + program.rating = 0 + expect(program.rating_enabled?).to be false end end From 576dc17100c61fbe69db2756b7582120048bc29c Mon Sep 17 00:00:00 2001 From: Christian Bruckmayer Date: Thu, 2 Jun 2016 15:22:21 +0200 Subject: [PATCH 5/5] Implements csv export of registrations close #1021 --- app/views/admin/registrations/index.csv.haml | 4 ++++ app/views/admin/registrations/index.html.haml | 1 + 2 files changed, 5 insertions(+) create mode 100644 app/views/admin/registrations/index.csv.haml diff --git a/app/views/admin/registrations/index.csv.haml b/app/views/admin/registrations/index.csv.haml new file mode 100644 index 00000000..eace3122 --- /dev/null +++ b/app/views/admin/registrations/index.csv.haml @@ -0,0 +1,4 @@ +- headers = ['Name', 'Email'] += CSV.generate_line headers +- @registrations.each do |registration| + = CSV.generate_line([registration.name, registration.email]) \ No newline at end of file diff --git a/app/views/admin/registrations/index.html.haml b/app/views/admin/registrations/index.html.haml index 11ab9144..3e581914 100644 --- a/app/views/admin/registrations/index.html.haml +++ b/app/views/admin/registrations/index.html.haml @@ -6,6 +6,7 @@ = "(#{@registrations.length})" if @registrations .btn-group.pull-right - if can? :read, Registration + = link_to 'Export CSV', admin_conference_registrations_path(@conference.short_title, format: :csv), class: 'btn btn-success' = link_to 'Export PDF', admin_conference_registrations_path(@conference.short_title, format: :pdf), class: 'btn btn-success' = link_to 'Export XLS', {format: :xlsx}, class: 'btn btn-success' %p.text-muted