Browse Source

More logging info and more null checking in stats.xls

development
Godwin 9 years ago
parent
commit
2314877f03
  1. 13
      app/controllers/conferences_controller.rb
  2. 4
      config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html
  3. 4
      config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html
  4. 4
      config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html
  5. 4
      config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html
  6. 4
      config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-1.html
  7. 4
      config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-2.html
  8. 4
      config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1.html
  9. 2
      config/locales/data/html_records/Start-registration-from-landing-page--.html
  10. 4
      config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html
  11. 2
      config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html
  12. 4
      config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html
  13. 2
      config/locales/data/html_records/Start-registration-from-landing-page--registration_confirmation.html
  14. 2
      config/locales/data/html_records/View-stats--conferences.MyBikeBike.stats.xls.html

13
app/controllers/conferences_controller.rb

@ -469,13 +469,13 @@ class ConferencesController < ApplicationController
if @excel_data if @excel_data
user = User.find(r.user_id) user = User.find(r.user_id)
@excel_data[:data] << { @excel_data[:data] << {
:name => user.firstname, :name => (user ? user.firstname : nil) || '',
:email => user.email, :email => (user ? user.email : nil) || '',
:date => r.created_at ? r.created_at.strftime("%F %T") : nil, :date => r.created_at ? r.created_at.strftime("%F %T") : '',
:city => r.city, :city => r.city || '',
:languages => ((JSON.parse(r.languages || '[]').map { |x| I18n.t"languages.#{x}" }).join(', ').to_s), :languages => ((JSON.parse(r.languages || '[]').map { |x| I18n.t"languages.#{x}" }).join(', ').to_s),
:arrival => (r.arrival || @this_conference.start_date).strftime("%F %T"), :arrival => r.arrival ? r.arrival.strftime("%F %T") : '',
:departure => (r.departure || @this_conference.end_date).strftime("%F %T"), :departure => r.departure ? r.departure.strftime("%F %T") : '',
:housing => (I18n.t"articles.conference_registration.questions.housing.#{r.housing || 'none'}"), :housing => (I18n.t"articles.conference_registration.questions.housing.#{r.housing || 'none'}"),
:bike => (I18n.t"articles.conference_registration.questions.bike.#{r.bike || 'none'}"), :bike => (I18n.t"articles.conference_registration.questions.bike.#{r.bike || 'none'}"),
:food => (I18n.t"articles.conference_registration.questions.food.#{r.food || 'meat'}"), :food => (I18n.t"articles.conference_registration.questions.food.#{r.food || 'meat'}"),
@ -488,6 +488,7 @@ class ConferencesController < ApplicationController
end end
if ENV["RAILS_ENV"] == 'test' && request.format.xls? if ENV["RAILS_ENV"] == 'test' && request.format.xls?
logger.info "Rendering stats.xls as HTML"
request.format = :html request.format = :html
respond_to do |format| respond_to do |format|
format.html { render :file => 'application/excel.xls.haml', :formats => [:xls] } format.html { render :file => 'application/excel.xls.haml', :formats => [:xls] }

4
config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-1.html

@ -51,7 +51,7 @@
</div></div><div id="content"> </div></div><div id="content">
<article> <article>
<div class="row"><div class="columns medium-12"><h2>Morbi Odio Odio, Elementum Eu, Interdum Eu, Tincidunt In, Leo</h2> <div class="row"><div class="columns medium-12"><h2>Vestibulum Ante Ipsum Primis In Faucibus Orci Luctus Et Ultrices Posuere Cubilia Curae; Donec Pharetra, Magna Vestibulum Aliquet Ultrices, Erat Tortor Sollicitudin Mi, Sit Amet Lobortis Sapien Sapien Non Mi</h2>
<div class="workshop-interest"> <div class="workshop-interest">
<span class="translated-content" data-i18n-key="articles.workshops.info.you_are_interested_count" data-i18n-needs-translation="0">You are interested in this workshop</span> <span class="translated-content" data-i18n-key="articles.workshops.info.you_are_interested_count" data-i18n-needs-translation="0">You are interested in this workshop</span>
<form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓"> <form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓">
@ -59,7 +59,7 @@
</form> </form>
</div> </div>
<p>Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh.</p> <p>Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.</p>
</div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3> </div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3>
<div class="facilitators"> <div class="facilitators">

4
config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1-2.html

@ -51,7 +51,7 @@
</div></div><div id="content"> </div></div><div id="content">
<article> <article>
<div class="row"><div class="columns medium-12"><h2>Morbi Odio Odio, Elementum Eu, Interdum Eu, Tincidunt In, Leo</h2> <div class="row"><div class="columns medium-12"><h2>Vestibulum Ante Ipsum Primis In Faucibus Orci Luctus Et Ultrices Posuere Cubilia Curae; Donec Pharetra, Magna Vestibulum Aliquet Ultrices, Erat Tortor Sollicitudin Mi, Sit Amet Lobortis Sapien Sapien Non Mi</h2>
<div class="workshop-interest"> <div class="workshop-interest">
<span class="translated-content" data-i18n-key="articles.workshops.info.interested_count" data-i18n-needs-translation="0">No one is interested in this workshop yet</span> <span class="translated-content" data-i18n-key="articles.workshops.info.interested_count" data-i18n-needs-translation="0">No one is interested in this workshop yet</span>
<form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓"> <form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓">
@ -59,7 +59,7 @@
</form> </form>
</div> </div>
<p>Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh.</p> <p>Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.</p>
</div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3> </div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3>
<div class="facilitators"> <div class="facilitators">

4
config/locales/data/html_records/Be-the-first-to-like-a-workshop--conferences.MyBikeBike.workshops.1.html

@ -51,7 +51,7 @@
</div></div><div id="content"> </div></div><div id="content">
<article> <article>
<div class="row"><div class="columns medium-12"><h2>Morbi Odio Odio, Elementum Eu, Interdum Eu, Tincidunt In, Leo</h2> <div class="row"><div class="columns medium-12"><h2>Vestibulum Ante Ipsum Primis In Faucibus Orci Luctus Et Ultrices Posuere Cubilia Curae; Donec Pharetra, Magna Vestibulum Aliquet Ultrices, Erat Tortor Sollicitudin Mi, Sit Amet Lobortis Sapien Sapien Non Mi</h2>
<div class="workshop-interest"> <div class="workshop-interest">
<span class="translated-content" data-i18n-key="articles.workshops.info.interested_count" data-i18n-needs-translation="0">No one is interested in this workshop yet</span> <span class="translated-content" data-i18n-key="articles.workshops.info.interested_count" data-i18n-needs-translation="0">No one is interested in this workshop yet</span>
<form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓"> <form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓">
@ -59,7 +59,7 @@
</form> </form>
</div> </div>
<p>Nullam sit amet turpis elementum ligula vehicula consequat. Morbi a ipsum. Integer a nibh.</p> <p>Nulla ut erat id mauris vulputate elementum. Nullam varius. Nulla facilisi.</p>
</div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3> </div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3>
<div class="facilitators"> <div class="facilitators">

4
config/locales/data/html_records/Broadcast-message--conferences.MyBikeBike.broadcast.html

@ -78,7 +78,7 @@
<table align='center' border='0' cellpadding='0' cellspacing='0'> <table align='center' border='0' cellpadding='0' cellspacing='0'>
<tr> <tr>
<td colspan='2' style='text-align: center' valign='top'> <td colspan='2' style='text-align: center' valign='top'>
<img class='image_fix' src='http://127.0.0.1:57606'> <img class='image_fix' src='http://127.0.0.1:57744'>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -94,7 +94,7 @@
<img class='image_fix' src='/assets/bblogo-paypal'> <img class='image_fix' src='/assets/bblogo-paypal'>
</td> </td>
<td style='width: 50%; text-align: left'> <td style='width: 50%; text-align: left'>
<a href='http://127.0.0.1:57606'>&copy; Bike!Bike! 2015</a> <a href='http://127.0.0.1:57744'>&copy; Bike!Bike! 2015</a>
</td> </td>
</tr> </tr>
<tr> <tr>

4
config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-1.html

@ -51,7 +51,7 @@
</div></div><div id="content"> </div></div><div id="content">
<article> <article>
<div class="row"><div class="columns medium-12"><h2>Praesent Id Massa Id Nisl Venenatis Lacinia</h2> <div class="row"><div class="columns medium-12"><h2>Integer Aliquet, Massa Id Lobortis Convallis, Tortor Risus Dapibus Augue, Vel Accumsan Tellus Nisi Eu Orci</h2>
<div class="workshop-interest"> <div class="workshop-interest">
<span class="translated-content" data-i18n-key="articles.workshops.info.you_are_interested_count" data-i18n-needs-translation="0">You and&nbsp;4&nbsp;others are interested in this workshop</span> <span class="translated-content" data-i18n-key="articles.workshops.info.you_are_interested_count" data-i18n-needs-translation="0">You and&nbsp;4&nbsp;others are interested in this workshop</span>
<form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓"> <form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓">
@ -59,7 +59,7 @@
</form> </form>
</div> </div>
<p>In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.</p> <p>Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.</p>
</div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3> </div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3>
<div class="facilitators"> <div class="facilitators">

4
config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1-2.html

@ -51,7 +51,7 @@
</div></div><div id="content"> </div></div><div id="content">
<article> <article>
<div class="row"><div class="columns medium-12"><h2>Praesent Id Massa Id Nisl Venenatis Lacinia</h2> <div class="row"><div class="columns medium-12"><h2>Integer Aliquet, Massa Id Lobortis Convallis, Tortor Risus Dapibus Augue, Vel Accumsan Tellus Nisi Eu Orci</h2>
<div class="workshop-interest"> <div class="workshop-interest">
<span class="translated-content" data-i18n-key="articles.workshops.info.interested_count" data-i18n-needs-translation="0">4&nbsp;people are interested in this workshop</span> <span class="translated-content" data-i18n-key="articles.workshops.info.interested_count" data-i18n-needs-translation="0">4&nbsp;people are interested in this workshop</span>
<form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓"> <form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓">
@ -59,7 +59,7 @@
</form> </form>
</div> </div>
<p>In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.</p> <p>Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.</p>
</div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3> </div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3>
<div class="facilitators"> <div class="facilitators">

4
config/locales/data/html_records/Like-a-workshop--conferences.MyBikeBike.workshops.1.html

@ -51,7 +51,7 @@
</div></div><div id="content"> </div></div><div id="content">
<article> <article>
<div class="row"><div class="columns medium-12"><h2>Praesent Id Massa Id Nisl Venenatis Lacinia</h2> <div class="row"><div class="columns medium-12"><h2>Integer Aliquet, Massa Id Lobortis Convallis, Tortor Risus Dapibus Augue, Vel Accumsan Tellus Nisi Eu Orci</h2>
<div class="workshop-interest"> <div class="workshop-interest">
<span class="translated-content" data-i18n-key="articles.workshops.info.interested_count" data-i18n-needs-translation="0">4&nbsp;people are interested in this workshop</span> <span class="translated-content" data-i18n-key="articles.workshops.info.interested_count" data-i18n-needs-translation="0">4&nbsp;people are interested in this workshop</span>
<form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓"> <form action="/conferences/MyBikeBike/workshops/1/toggle-interest/" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓">
@ -59,7 +59,7 @@
</form> </form>
</div> </div>
<p>In quis justo. Maecenas rhoncus aliquam lacus. Morbi quis tortor id nulla ultrices aliquet.</p> <p>Sed sagittis. Nam congue, risus semper porta volutpat, quam pede lobortis ligula, sit amet eleifend pede libero quis orci. Nullam molestie nibh in lectus.</p>
</div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3> </div><div class="columns medium-6"><h3><span class="translated-content" data-i18n-key="articles.workshops.headings.facilitators" data-i18n-needs-translation="0">Facilitators</span></h3>
<div class="facilitators"> <div class="facilitators">

2
config/locales/data/html_records/Start-registration-from-landing-page--.html

@ -62,7 +62,7 @@ Curabitur non nulla sit amet nisl tempus convallis quis ac lectus.
<h4>My Awesome Workshop</h4> <h4>My Awesome Workshop</h4>
<div class="workshop-interest"> <div class="workshop-interest">
</div> </div>
<div class="workshop-description"><p>Nam ultrices, libero non mattis pulvinar, nulla pede ullamcorper augue, a suscipit nulla elit ac nulla. Sed vel enim sit amet nunc viverra dapibus. Nulla suscipit ligula in lacus.</p> <div class="workshop-description"><p>Curabitur at ipsum ac tellus semper interdum. Mauris ullamcorper purus sit amet nulla. Quisque arcu libero, rutrum ac, lobortis vel, dapibus at, diam.</p>
</div> </div>
</li> </li>
</ul> </ul>

4
config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-1.html

@ -81,7 +81,7 @@
<p> <p>
<h3> <h3>
<b> <b>
<a href='/confirm/138518e77f53cdce4d05bb4837e2feed12aec18c507e5aefdc8594e8f811a9e1'><span class="translated-content" data-i18n-key="email.confirmation.link.please_confirm" data-i18n-needs-translation="0">Confirm now</span></a> <a href='/confirm/d7577d8987a783a5e531d9464dcc41f170fdd8d079460b825d067599cd7cc069'><span class="translated-content" data-i18n-key="email.confirmation.link.please_confirm" data-i18n-needs-translation="0">Confirm now</span></a>
</b> </b>
</h3> </h3>
</p> </p>
@ -95,7 +95,7 @@
<img class='image_fix' src='/assets/bblogo-paypal'> <img class='image_fix' src='/assets/bblogo-paypal'>
</td> </td>
<td style='width: 50%; text-align: left'> <td style='width: 50%; text-align: left'>
<a href='http://127.0.0.1:57606'>&copy; Bike!Bike! 2015</a> <a href='http://127.0.0.1:57744'>&copy; Bike!Bike! 2015</a>
</td> </td>
</tr> </tr>
<tr> <tr>

2
config/locales/data/html_records/Start-registration-from-landing-page--Start-registration-from-landing-page--conferences.MyBikeBike.register-3.html

@ -90,7 +90,7 @@
<img class='image_fix' src='/assets/bblogo-paypal'> <img class='image_fix' src='/assets/bblogo-paypal'>
</td> </td>
<td style='width: 50%; text-align: left'> <td style='width: 50%; text-align: left'>
<a href='http://127.0.0.1:57606'>&copy; Bike!Bike! 2015</a> <a href='http://127.0.0.1:57744'>&copy; Bike!Bike! 2015</a>
</td> </td>
</tr> </tr>
<tr> <tr>

4
config/locales/data/html_records/Start-registration-from-landing-page--email_confirmation.html

@ -81,7 +81,7 @@
<p> <p>
<h3> <h3>
<b> <b>
<a href='/confirm/138518e77f53cdce4d05bb4837e2feed12aec18c507e5aefdc8594e8f811a9e1'><span class="translated-content" data-i18n-key="email.confirmation.link.please_confirm" data-i18n-needs-translation="0">Confirm now</span></a> <a href='/confirm/d7577d8987a783a5e531d9464dcc41f170fdd8d079460b825d067599cd7cc069'><span class="translated-content" data-i18n-key="email.confirmation.link.please_confirm" data-i18n-needs-translation="0">Confirm now</span></a>
</b> </b>
</h3> </h3>
</p> </p>
@ -95,7 +95,7 @@
<img class='image_fix' src='/assets/bblogo-paypal'> <img class='image_fix' src='/assets/bblogo-paypal'>
</td> </td>
<td style='width: 50%; text-align: left'> <td style='width: 50%; text-align: left'>
<a href='http://127.0.0.1:57606'>&copy; Bike!Bike! 2015</a> <a href='http://127.0.0.1:57744'>&copy; Bike!Bike! 2015</a>
</td> </td>
</tr> </tr>
<tr> <tr>

2
config/locales/data/html_records/Start-registration-from-landing-page--registration_confirmation.html

@ -90,7 +90,7 @@
<img class='image_fix' src='/assets/bblogo-paypal'> <img class='image_fix' src='/assets/bblogo-paypal'>
</td> </td>
<td style='width: 50%; text-align: left'> <td style='width: 50%; text-align: left'>
<a href='http://127.0.0.1:57606'>&copy; Bike!Bike! 2015</a> <a href='http://127.0.0.1:57744'>&copy; Bike!Bike! 2015</a>
</td> </td>
</tr> </tr>
<tr> <tr>

2
config/locales/data/html_records/View-stats--conferences.MyBikeBike.stats.xls.html

@ -28,7 +28,7 @@ Excel Spreadsheet
<td>Jeff</td> <td>Jeff</td>
<td>someguy@bikebike.org</td> <td>someguy@bikebike.org</td>
<td>Somewhere</td> <td>Somewhere</td>
<td>2015-09-16 23:53:56</td> <td>2015-09-17 00:08:00</td>
<td>English</td> <td>English</td>
<td>2015-09-28 00:00:00</td> <td>2015-09-28 00:00:00</td>
<td>2015-09-28 00:00:00</td> <td>2015-09-28 00:00:00</td>

Loading…
Cancel
Save