From 249758f658c5bb72af9883e18a3bbd70622a8465 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 1 Jun 2017 15:24:45 +0200 Subject: [PATCH 01/11] Update yajl-ruby to 1.3.0 1.2.0 does not compile anymore on tumbleweed... --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 90ae82f0..4f002b4a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -538,7 +538,7 @@ GEM chronic (>= 0.6.3) xpath (2.0.0) nokogiri (~> 1.3) - yajl-ruby (1.2.0) + yajl-ruby (1.3.0) PLATFORMS ruby From 54609cabcf67e8074157f0e3b2b15b8c1d4cf6e1 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 1 Jun 2017 15:39:45 +0200 Subject: [PATCH 02/11] Prepare settings for new deployment --- config/deploy.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/deploy.rb b/config/deploy.rb index 5a9090fb..9b76c176 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -3,7 +3,7 @@ require 'mina/rails' require 'mina/git' set :domain, 'proxy-opensuse.suse.de' -set :port, 2214 +set :port, 2252 set :user, 'osem' set :deploy_to, '/srv/www/vhosts/opensuse.org/events' set :repository, 'https://github.com/openSUSE/osem.git' @@ -42,7 +42,7 @@ task deploy: :environment do #invoke :notify_errbit to :launch do - queue "sudo /etc/init.d/apache2 restart" + queue "sudo /usr/bin/systemctl restart apache2" queue "cd #{deploy_to}/current && RAILS_ENV=production bin/delayed_job start" end From 5a2c87630c1b107cf0174f772f2e75d3411687f8 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 28 Aug 2017 20:02:55 +0200 Subject: [PATCH 03/11] adapt dir permissions for openshift and add dumb-init This commit updates directory permissions to be compatible with OpenShift which starts the container with an arbitrary uid which is member of the root group. For more information please consult https://docs.openshift.org/latest/creating_images/guidelines.html. dumb-init is added to have a proper PID 1. bash should not run as PID 1 as this could lead to improper container shutdown. --- Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index dab432ca..4cc5c04c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,12 @@ RUN cd /usr/bin && \ tar -xf dockerize.tar.gz && \ rm dockerize.tar.gz +# dumb-init for a proper PID 1 +RUN cd /tmp && \ + wget https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \ + dpkg -i dumb-init_1.2.0_amd64.deb && \ + rm dumb-init_1.2.0_amd64.deb + # explicitly add Gemfile and install dependencies using bundler to make use of # Docker's caching WORKDIR /osem/ @@ -25,12 +31,13 @@ RUN bundle install --without test development # add OSEM files and prepare them for use inside a Docker container COPY . /osem/ -RUN chown osem.osem /osem/ -R && \ +RUN chown -R osem.root /osem/ && \ + chmod -R g=u /osem/ && \ mv /osem/config/database.yml.docker /osem/config/database.yml # data directory is used to cache the secret key in a file ENV DATA_DIR /data -RUN install -d -m 0700 -o osem $DATA_DIR +RUN install -d -m 0770 -o osem -g root $DATA_DIR VOLUME ["$DATA_DIR"] USER osem @@ -42,4 +49,7 @@ COPY docker/init.sh /init.sh # from a webserver ENV RAILS_SERVE_STATIC_FILES 1 +# Runs "/usr/bin/dumb-init -- /my/script --with --args" +ENTRYPOINT ["/usr/bin/dumb-init", "--"] + CMD ["bash", "/init.sh"] From 3f3cdef52002884d005ab5749dd1be5e48754f6a Mon Sep 17 00:00:00 2001 From: rahul Date: Mon, 25 Sep 2017 00:34:53 +0530 Subject: [PATCH 04/11] Fix decimal limit of total to 2 Decimal limit is fixed to 2 as earlier at some values the decimal limit were crossing this limit --- app/assets/javascripts/osem-tickets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/osem-tickets.js b/app/assets/javascripts/osem-tickets.js index 51881055..3f559c38 100644 --- a/app/assets/javascripts/osem-tickets.js +++ b/app/assets/javascripts/osem-tickets.js @@ -11,7 +11,7 @@ function update_price($this){ $('.total_row').each(function( index ) { total += parseFloat($(this).text()); }); - $('#total_price').text(total); + $('#total_price').text(total.toFixed(2)); } $( document ).ready(function() { From b761e83b45e51e34f5b676504863fe3db04fc5b2 Mon Sep 17 00:00:00 2001 From: rahul Date: Mon, 25 Sep 2017 00:38:20 +0530 Subject: [PATCH 05/11] Add amount paid Amount paid colum is added to ticket purchase to keep the record of money paid by the user. It is added to physical_ticket#index to show admin, price paid by each user for each ticket. --- app/models/ticket_purchase.rb | 3 ++- .../_physical_ticket.html.haml | 16 ++++++++++++++++ .../admin/physical_tickets/index.html.haml | 18 +++--------------- ...0528_add_amount_paid_to_ticket_purchases.rb | 5 +++++ db/schema.rb | 3 ++- 5 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 app/views/admin/physical_tickets/_physical_ticket.html.haml create mode 100644 db/migrate/20170924190528_add_amount_paid_to_ticket_purchases.rb diff --git a/app/models/ticket_purchase.rb b/app/models/ticket_purchase.rb index 97fa9957..71b44d18 100644 --- a/app/models/ticket_purchase.rb +++ b/app/models/ticket_purchase.rb @@ -52,7 +52,8 @@ class TicketPurchase < ActiveRecord::Base purchase = new(ticket_id: ticket.id, conference_id: conference.id, user_id: user.id, - quantity: quantity) + quantity: quantity, + amount_paid: ticket.price) purchase.pay(nil) if ticket.price_cents.zero? end purchase diff --git a/app/views/admin/physical_tickets/_physical_ticket.html.haml b/app/views/admin/physical_tickets/_physical_ticket.html.haml new file mode 100644 index 00000000..ff4dd185 --- /dev/null +++ b/app/views/admin/physical_tickets/_physical_ticket.html.haml @@ -0,0 +1,16 @@ +%tr + %td= physical_ticket.id + %td= physical_ticket.ticket.title + %td= physical_ticket.user.email + %td= humanized_money_with_symbol physical_ticket.ticket_purchase.amount_paid + %td + .btn-group + = link_to 'Show', + conference_physical_ticket_path(conference.short_title, + physical_ticket.token), + class: 'btn btn-primary' + = link_to 'Generate PDF', + conference_physical_ticket_path(conference.short_title, + physical_ticket.token, + format: :pdf), + class: 'button btn btn-default btn-info' diff --git a/app/views/admin/physical_tickets/index.html.haml b/app/views/admin/physical_tickets/index.html.haml index 96c5911f..8b26a965 100644 --- a/app/views/admin/physical_tickets/index.html.haml +++ b/app/views/admin/physical_tickets/index.html.haml @@ -21,23 +21,11 @@ %th ID %th Type %th User + %th Paid %th Actions %tbody - @physical_tickets.each do |physical_ticket| - %tr - %td= physical_ticket.id - %td= physical_ticket.ticket.title - %td= physical_ticket.user.email - %td - .btn-group - = link_to 'Show', - conference_physical_ticket_path(@conference.short_title, - physical_ticket.token), - class: 'btn btn-primary' - = link_to 'Generate PDF', - conference_physical_ticket_path(@conference.short_title, - physical_ticket.token, - format: :pdf), - class: 'button btn btn-default btn-info' + = render "physical_ticket", physical_ticket: physical_ticket, + conference: @conference - else %h5 No Tickets sold! diff --git a/db/migrate/20170924190528_add_amount_paid_to_ticket_purchases.rb b/db/migrate/20170924190528_add_amount_paid_to_ticket_purchases.rb new file mode 100644 index 00000000..5e732d4c --- /dev/null +++ b/db/migrate/20170924190528_add_amount_paid_to_ticket_purchases.rb @@ -0,0 +1,5 @@ +class AddAmountPaidToTicketPurchases < ActiveRecord::Migration + def change + add_column :ticket_purchases, :amount_paid, :float, default: 0 + end +end diff --git a/db/schema.rb b/db/schema.rb index 82f5923d..6c6531c1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170816203325) do +ActiveRecord::Schema.define(version: 20170924190528) do create_table "ahoy_events", force: :cascade do |t| t.uuid "visit_id", limit: 16 @@ -504,6 +504,7 @@ ActiveRecord::Schema.define(version: 20170816203325) do t.integer "user_id" t.integer "payment_id" t.integer "week" + t.float "amount_paid" end create_table "ticket_scannings", force: :cascade do |t| From 0d70832f5bd6d5c60bf0bd7049c718fe00c17433 Mon Sep 17 00:00:00 2001 From: rahul Date: Mon, 25 Sep 2017 00:52:13 +0530 Subject: [PATCH 06/11] Add total amount spent by user User can see the total amount that he paid for the tickets and total amount spent by him on each ticket --- app/controllers/conference_registrations_controller.rb | 3 ++- app/models/ticket.rb | 5 +++++ app/views/conference_registrations/show.html.haml | 2 +- spec/controllers/conference_registration_controller_spec.rb | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/controllers/conference_registrations_controller.rb b/app/controllers/conference_registrations_controller.rb index c2037318..e8809b28 100644 --- a/app/controllers/conference_registrations_controller.rb +++ b/app/controllers/conference_registrations_controller.rb @@ -27,8 +27,9 @@ class ConferenceRegistrationsController < ApplicationController end def show - @total_price = Ticket.total_price(@conference, current_user, paid: true) + @total_price = Ticket.total_price_user(@conference, current_user, paid: true) @tickets = current_user.ticket_purchases.by_conference(@conference).paid + @total_price_per_ticket = @tickets.group(:ticket_id).sum('amount_paid * quantity') @ticket_payments = @tickets.group_by(&:ticket_id) @total_quantity = @tickets.group(:ticket_id).sum(:quantity) end diff --git a/app/models/ticket.rb b/app/models/ticket.rb index ce527472..ac1d1927 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -55,6 +55,11 @@ class Ticket < ActiveRecord::Base result ? result : Money.new(0, 'USD') end + def self.total_price_user(conference, user, paid: false) + tickets = TicketPurchase.where(conference: conference, user: user, paid: paid) + tickets.inject(0){ |sum, ticket| sum + (ticket.amount_paid * ticket.quantity) } + end + def tickets_sold ticket_purchases.paid.sum(:quantity) end diff --git a/app/views/conference_registrations/show.html.haml b/app/views/conference_registrations/show.html.haml index 83d6d89c..a50cf198 100644 --- a/app/views/conference_registrations/show.html.haml +++ b/app/views/conference_registrations/show.html.haml @@ -101,7 +101,7 @@ = word_pluralize(@total_quantity[ticket_id], 'Ticket') for = tickets.first.price.symbol - = humanized_money tickets.first.price + = humanized_money @total_price_per_ticket[ticket_id] %br - if @tickets.any? = link_to 'Get more tickets', conference_tickets_path(@conference.short_title), class: "btn btn-default" diff --git a/spec/controllers/conference_registration_controller_spec.rb b/spec/controllers/conference_registration_controller_spec.rb index 9afaaed8..a6f1503c 100644 --- a/spec/controllers/conference_registration_controller_spec.rb +++ b/spec/controllers/conference_registration_controller_spec.rb @@ -252,7 +252,7 @@ describe ConferenceRegistrationsController, type: :controller do end it 'does not assign price of purchased tickets to total_price and purchased tickets to tickets without payment' do - expect(assigns(:total_price)).to eq Money.new(0, 'USD') + expect(assigns(:total_price)).to eq 0 end end @@ -262,7 +262,7 @@ describe ConferenceRegistrationsController, type: :controller do end it 'assigns 0 dollars to total_price and empty array to tickets variables' do - expect(assigns(:total_price)).to eq Money.new(0, 'USD') + expect(assigns(:total_price)).to eq 0 expect(assigns(:tickets)).to match_array [] end end From 03c9f7deb116d673ca3cf0662850df2a33b9b409 Mon Sep 17 00:00:00 2001 From: rahul Date: Mon, 25 Sep 2017 00:55:09 +0530 Subject: [PATCH 07/11] Add turnover for admin Admin can see the turnover amount for each ticket type. --- app/models/conference.rb | 2 +- app/models/ticket.rb | 9 +++++---- app/views/admin/tickets/index.html.haml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/models/conference.rb b/app/models/conference.rb index 034e755b..c56161f2 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -496,7 +496,7 @@ class Conference < ActiveRecord::Base if tickets && ticket_purchases tickets.each do |ticket| result[ticket.title] = { - 'value' => ApplicationController.helpers.humanized_money(ticket.tickets_turnover).delete(',').to_i, + 'value' => ApplicationController.helpers.humanized_money(ticket.tickets_turnover_total(ticket.id)).delete(',').to_i, 'color' => "\##{Digest::MD5.hexdigest(ticket.title)[0..5]}" } end diff --git a/app/models/ticket.rb b/app/models/ticket.rb index ac1d1927..13646c9f 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -60,12 +60,13 @@ class Ticket < ActiveRecord::Base tickets.inject(0){ |sum, ticket| sum + (ticket.amount_paid * ticket.quantity) } end - def tickets_sold - ticket_purchases.paid.sum(:quantity) + def tickets_turnover_total(id) + tickets = TicketPurchase.where(ticket_id: id) + tickets.inject(0){ |sum, ticket| sum + (ticket.amount_paid * ticket.quantity) } end - def tickets_turnover - tickets_sold * price + def tickets_sold + ticket_purchases.paid.sum(:quantity) end private diff --git a/app/views/admin/tickets/index.html.haml b/app/views/admin/tickets/index.html.haml index 42154ae7..71698bb2 100644 --- a/app/views/admin/tickets/index.html.haml +++ b/app/views/admin/tickets/index.html.haml @@ -27,7 +27,7 @@ %td = ticket.tickets_sold %td - = humanized_money_with_symbol ticket.tickets_turnover + = humanized_money_with_symbol ticket.tickets_turnover_total(ticket.id) %td = ticket.registration_ticket? ? 'Yes' : 'No' %td From 01abbfecc4cb2d68c47328f4f6d6a6456a971012 Mon Sep 17 00:00:00 2001 From: namangupta01 <01namangupta@gmail.com> Date: Fri, 4 Aug 2017 01:29:30 +0530 Subject: [PATCH 08/11] Speaker is ask to register only when registration_period is set --- app/views/proposals/index.html.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/proposals/index.html.haml b/app/views/proposals/index.html.haml index 5ed332dc..43b17199 100644 --- a/app/views/proposals/index.html.haml +++ b/app/views/proposals/index.html.haml @@ -49,6 +49,7 @@ %br It will also be more likely that visitors find your proposal interesting enough to attend. + - if Conference.where(short_title: params[:conference_id]).first.registration_period %p %strong Why do I need to register to the conference? @@ -73,7 +74,8 @@ = link_to registered_text(event), registrations_conference_program_proposal_path(@conference.short_title, event), class: 'btn btn-xs btn-danger' %td.col-md-2{style: "padding:20px 8px 20px 8px;"} - = link_to 'Complete your proposal', 'javascript: void(0)', "type"=>"button", "data-trigger"=>"focus", "data-toggle"=>"popover", "title"=>"Your todo list", "data-content"=>"#{render partial: 'tooltip', locals: { event: event} }" + - if Conference.where(short_title: params[:conference_id]).first.registration_period + = link_to 'Complete your proposal', 'javascript: void(0)', "type"=>"button", "data-trigger"=>"focus", "data-toggle"=>"popover", "title"=>"Your todo list", "data-content"=>"#{render partial: 'tooltip', locals: { event: event} }" - progress_percentage = event.calculate_progress .progress From b1f32caf7cef65358aff15d70f42f90b9848892c Mon Sep 17 00:00:00 2001 From: namangupta01 <01namangupta@gmail.com> Date: Sun, 6 Aug 2017 01:13:14 +0530 Subject: [PATCH 09/11] speaker is only ask to register when registrations are open and speaker haven't registered yet --- app/views/proposals/_tooltip.html.haml | 13 +++++----- app/views/proposals/index.html.haml | 36 ++++++++++++++------------ 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/app/views/proposals/_tooltip.html.haml b/app/views/proposals/_tooltip.html.haml index 168d2d26..dba9c991 100644 --- a/app/views/proposals/_tooltip.html.haml +++ b/app/views/proposals/_tooltip.html.haml @@ -1,11 +1,12 @@ - progress_status = event.progress_status %ul.list-unstyled - %li{'class'=>class_for_todo(progress_status['registered'])} - %span{'class'=>icon_for_todo(progress_status['registered'])} - - if progress_status['registered'] - Speaker(s) registered to the conference - - else - = link_to 'Speaker(s) not registered to the conference', new_conference_conference_registration_path(event.program.conference.short_title) + - if @conference.registration_open? || (@conference.user_registered? current_user) + %li{'class'=>class_for_todo(progress_status['registered'])} + %span{'class'=>icon_for_todo(progress_status['registered'])} + - if progress_status['registered'] + Speaker(s) registered to the conference + - else + = link_to 'Speaker(s) not registered to the conference', new_conference_conference_registration_path(event.program.conference.short_title) %li{'class'=>class_for_todo(progress_status['biographies'])} %span{'class'=>icon_for_todo(progress_status['biographies'])} - if progress_status['biographies'] diff --git a/app/views/proposals/index.html.haml b/app/views/proposals/index.html.haml index 43b17199..ac833747 100644 --- a/app/views/proposals/index.html.haml +++ b/app/views/proposals/index.html.haml @@ -48,13 +48,12 @@ The more information you add to your proposal, the more likely it is that the conference organizers accept your proposal. %br It will also be more likely that visitors find your proposal interesting enough to attend. - - - if Conference.where(short_title: params[:conference_id]).first.registration_period - %p - %strong - Why do I need to register to the conference? - %p - Knowing the number of visitors for the conference helps the organizers plan better. + - if (@conference.registration_open?) && !(@conference.user_registered? current_user) + %p + %strong + Why do I need to register to the conference? + %p + Knowing the number of visitors for the conference helps the organizers plan better. %table.table.table-striped#events - @events.each do |event| @@ -74,15 +73,20 @@ = link_to registered_text(event), registrations_conference_program_proposal_path(@conference.short_title, event), class: 'btn btn-xs btn-danger' %td.col-md-2{style: "padding:20px 8px 20px 8px;"} - - if Conference.where(short_title: params[:conference_id]).first.registration_period - = link_to 'Complete your proposal', 'javascript: void(0)', "type"=>"button", "data-trigger"=>"focus", "data-toggle"=>"popover", "title"=>"Your todo list", "data-content"=>"#{render partial: 'tooltip', locals: { event: event} }" - - - progress_percentage = event.calculate_progress - .progress - %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} - = event.progress_status.reject{ |_key, value| value || value.nil? }.length - left - + = link_to 'Complete your proposal', 'javascript: void(0)', "type"=>"button", "data-trigger"=>"focus", "data-toggle"=>"popover", "title"=>"Your todo list", "data-content"=>"#{render partial: 'tooltip', locals: { event: event} }" + - if (@conference.registration_open?) || (@conference.user_registered? current_user) + - progress_percentage = event.calculate_progress + .progress + %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} + = event.progress_status.reject{ |_key, value| value || value.nil? }.length + left + - else + - progress_list = event.progress_status + - progress_percentage = (100 * progress_list.values.count(true) / (progress_list.values.compact.count-1)).to_s + .progress + %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} + = event.progress_status.reject{ |_key, value| value || value.nil? }.length-1 + left %td.col-md-3{style: "padding:20px 0px 20px 0px;"} .pull-right - if event.transition_possible? :confirm From e607aca68015b7cd339496311e92b62941df00a9 Mon Sep 17 00:00:00 2001 From: Your Name <01namangupta@gmail.com> Date: Fri, 13 Oct 2017 02:39:36 +0530 Subject: [PATCH 10/11] user ability for registration is used for chcking whether a user can register or not --- app/views/proposals/_tooltip.html.haml | 2 +- app/views/proposals/index.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/proposals/_tooltip.html.haml b/app/views/proposals/_tooltip.html.haml index dba9c991..b10b5a7a 100644 --- a/app/views/proposals/_tooltip.html.haml +++ b/app/views/proposals/_tooltip.html.haml @@ -1,6 +1,6 @@ - progress_status = event.progress_status %ul.list-unstyled - - if @conference.registration_open? || (@conference.user_registered? current_user) + - if can? :create, @conference.registrations.new %li{'class'=>class_for_todo(progress_status['registered'])} %span{'class'=>icon_for_todo(progress_status['registered'])} - if progress_status['registered'] diff --git a/app/views/proposals/index.html.haml b/app/views/proposals/index.html.haml index ac833747..d22c325e 100644 --- a/app/views/proposals/index.html.haml +++ b/app/views/proposals/index.html.haml @@ -48,7 +48,7 @@ The more information you add to your proposal, the more likely it is that the conference organizers accept your proposal. %br It will also be more likely that visitors find your proposal interesting enough to attend. - - if (@conference.registration_open?) && !(@conference.user_registered? current_user) + - if can? :create, @conference.registrations.new %p %strong Why do I need to register to the conference? @@ -74,7 +74,7 @@ %td.col-md-2{style: "padding:20px 8px 20px 8px;"} = link_to 'Complete your proposal', 'javascript: void(0)', "type"=>"button", "data-trigger"=>"focus", "data-toggle"=>"popover", "title"=>"Your todo list", "data-content"=>"#{render partial: 'tooltip', locals: { event: event} }" - - if (@conference.registration_open?) || (@conference.user_registered? current_user) + - if can? :create, @conference.registrations.new - progress_percentage = event.calculate_progress .progress %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} From a0e3ea75ed1958fe93a0f607f729f10825ceee8c Mon Sep 17 00:00:00 2001 From: Naman Gupta <01namangupta@gmail.com> Date: Thu, 2 Nov 2017 21:44:12 +0530 Subject: [PATCH 11/11] consecutive ruby lines are made into the ruby filter --- app/views/proposals/index.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/proposals/index.html.haml b/app/views/proposals/index.html.haml index d22c325e..bc704296 100644 --- a/app/views/proposals/index.html.haml +++ b/app/views/proposals/index.html.haml @@ -67,7 +67,7 @@ %small.text-muted = event.event_type.title = "(#{event.event_type.length} min)" - = "in #{event.track.name}" if event.track + = "in #{event.traistck.name}" if event.track - if event.require_registration %br = link_to registered_text(event), registrations_conference_program_proposal_path(@conference.short_title, event), class: 'btn btn-xs btn-danger' @@ -81,8 +81,9 @@ = event.progress_status.reject{ |_key, value| value || value.nil? }.length left - else - - progress_list = event.progress_status - - progress_percentage = (100 * progress_list.values.count(true) / (progress_list.values.compact.count-1)).to_s + :ruby + progress_list = event.progress_status + progress_percentage = (100 * progress_list.values.count(true) / (progress_list.values.compact.count-1)).to_s .progress %div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"} = event.progress_status.reject{ |_key, value| value || value.nil? }.length-1