Skip to content
Browse files

Another bunch of changes for Cid 2012

  • Loading branch information...
1 parent f656023 commit e3a45583f2c756c7b2329460a372726bd4cf0cfc @vihai committed Mar 22, 2012
View
2 Gemfile.lock
@@ -140,7 +140,7 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.7.1)
- mime-types (1.17.2)
+ mime-types (1.18)
multi_json (1.1.0)
pg (0.13.2)
polyglot (0.3.3)
View
1 app/assets/js/application-development.js
@@ -1 +0,0 @@
-//= require application
View
2 app/assets/js/asgard-production.js
@@ -1,3 +1,3 @@
//= require ext/ext
-//= require application
+//= require asgard
View
14 app/assets/js/asgard/view/Viewport.js
@@ -26,7 +26,7 @@ Ext.define('Asgard.view.Viewport', {
{
text: 'Logout',
name: 'logout',
- icon: 'assets/exit.png',
+ icon: '/assets/exit.png',
},
],
},
@@ -82,22 +82,22 @@ Ext.define('Asgard.view.Viewport', {
},
items: [
{
- text: '',
+ text: 'Voli',
symbol: '',
// icon: '/assets/shop/agreements_button.png',
},
{
- text: '',
+ text: 'Piloti',
symbol: '',
// icon: '',
},
{
- text: '',
+ text: 'Alianti',
symbol: '',
// icon: '',
},
{
- text: '',
+ text: 'Tipi di aliante',
symbol: '',
// icon: '',
},
@@ -117,8 +117,8 @@ Ext.define('Asgard.view.Viewport', {
// icon: '',
},
{
- text: 'DNS tester',
- symbol: 'dns_tester',
+ text: '',
+ symbol: '',
// icon: '',
},
]
View
0 app/assets/js/application-production.js → app/assets/js/flarc-development.js
File renamed without changes.
View
1 app/assets/js/flarc-production.js
@@ -0,0 +1 @@
+//= require flarc
View
0 app/assets/js/application.js.erb → app/assets/js/flarc.js.erb
File renamed without changes.
View
2 app/controllers/flarc/championships_controller.rb
@@ -26,7 +26,7 @@ def subscribe
pilot.save!
- Notifier::Cid.new_pilot_registered(pilot).deliver
+ Notifier::Cid.new_pilot_registered(pilot)
end
respond_to do |format|
View
8 app/controllers/flarc/registration_controller.rb
@@ -53,11 +53,11 @@ def wizard
person.save!
if current_site == :cid
- Notifier::Cid.registration_complete(req[:email], password).deliver
+ Notifier::Cid.registration_complete(req[:email], password)
elsif current_site == :csvva
- Notifier::Csvva.registration_complete(req[:email], password).deliver
+ Notifier::Csvva.registration_complete(req[:email], password)
else
- Notifier.registration_complete(req[:email], password).deliver
+ Notifier.registration_complete(req[:email], password)
end
end
end
@@ -86,7 +86,7 @@ def recover_password
end
password = identity.credentials.first.password
- Cid::RegistrationNotifier.send_password(identity.qualified, password).deliver
+ Cid::RegistrationNotifier.send_password(identity.qualified, password)
respond_to do |format|
format.json { render :json => { :success => true, :error => 'La password è stata inviata per e-mail' } }
View
6 app/mailers/flarc/notifier.rb
@@ -14,7 +14,7 @@ def registration_complete(destination, password)
@password = password
mail(:to => destination,
- :subject => 'Registrazione all\'archivio voli')
+ :subject => 'Registrazione all\'archivio voli').deliver
end
def new_pilot_registered(pilot)
@@ -23,7 +23,7 @@ def new_pilot_registered(pilot)
@pilot = pilot
mail(:to => 'daniele@orlandi.com',
- :subject => 'Nuovo pilota registrato all\'archivio voli')
+ :subject => 'Nuovo pilota registrato all\'archivio voli').deliver
end
def send_password(destination, password)
@@ -33,7 +33,7 @@ def send_password(destination, password)
@password = password
mail(:to => destination,
- :subject => 'Password per l\'archivio voli')
+ :subject => 'Password per l\'archivio voli').deliver
end
end
View
20 app/mailers/flarc/notifier/cid.rb
@@ -15,7 +15,7 @@ def registration_complete(destination, password)
@password = password
mail(:to => destination,
- :subject => 'Registrazione al Campionato Italiano di Distanza')
+ :subject => 'Registrazione al Campionato Italiano di Distanza').deliver
end
def new_pilot_registered(pilot)
@@ -24,7 +24,7 @@ def new_pilot_registered(pilot)
@pilot = pilot
mail(:to => 'daniele@orlandi.com',
- :subject => 'Nuovo pilota registrato al CID')
+ :subject => 'Nuovo pilota registrato al CID').deliver
end
def send_password(destination, password)
@@ -34,7 +34,21 @@ def send_password(destination, password)
@password = password
mail(:to => destination,
- :subject => 'Password per il Campionato Italiano di Distanza')
+ :subject => 'Password per il Campionato Italiano di Distanza').deliver
+ end
+
+ def championship_started(pilot)
+ headers 'Auto-Submitted' => 'auto-generated'
+
+ pilot.person.identities.each do |identity|
+ next if identity.credentials.empty?
+
+ @email = identity.qualified
+ @password = identity.credentials.first.password # FIXME, choose the correct one
+
+ mail(:to => identity.qualified,
+ :subject => 'Campionato Italiano di Distanza 2012').deliver
+ end
end
end
View
6 app/mailers/flarc/notifier/csvva.rb
@@ -14,7 +14,7 @@ def registration_complete(destination, password)
@password = password
mail(:to => destination,
- :subject => 'Registrazione al Campionato CSVVA di Distanza')
+ :subject => 'Registrazione al Campionato CSVVA di Distanza').deliver
end
def new_pilot_registered(pilot)
@@ -23,7 +23,7 @@ def new_pilot_registered(pilot)
@pilot = pilot
mail(:to => 'voli@csvva.it',
- :subject => 'Nuovo pilota registrato al Campionato CSVVA di Distanza')
+ :subject => 'Nuovo pilota registrato al Campionato CSVVA di Distanza').deliver
end
def send_password(destination, password)
@@ -33,7 +33,7 @@ def send_password(destination, password)
@password = password
mail(:to => destination,
- :subject => 'Password per il Campionato CSVVA di Distanza')
+ :subject => 'Password per il Campionato CSVVA di Distanza').deliver
end
end
View
13 app/views/flarc/notifier/cid/championship_started.text.erb
@@ -0,0 +1,13 @@
+
+Ciao,
+
+Con la presente ti ricordiamo le credenziali di accesso al Campionato
+Italiano di Distanza 2012.
+
+Email: <%= @email %>
+Password: <%= @password %>
+
+Per completare l'iscrizione devi entrare nella tua pagina personale,
+cliccare su "Iscriviti!" e inserire i dati richiesti.
+
+Buoni cumuli!
View
5 app/views/layouts/cid.html.erb
@@ -4,9 +4,8 @@
<title>Campionato Italiano di Distanza 2012</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <%= stylesheet_link_tag 'cid.css', :media => 'all' %>
- <%= javascript_include_tag 'application' %>
- <%= csrf_meta_tag %>
+ <%= stylesheet_link_tag 'cid', :media => 'all' %>
+ <%= javascript_include_tag "flarc-#{Rails.env}" %>
</head>
<body>
<div id="header">
View
15 config/application.rb
@@ -11,16 +11,9 @@
LAYOUTS = {
'campionato.csvva.it' => 'csvva',
- 'csvva.orlandi.com' => 'csvva',
- 'csvva-dev.orlandi.com' => 'csvva',
- 'flarc.orlandi.com' => 'cid',
- 'flarc-dev.orlandi.com' => 'cid',
'cidvv.it' => 'cid',
- 'www.cidvv.it' => 'cid',
- 'cid.orlandi.com' => 'cid',
- 'cid-dev.orlandi.com' => 'cid',
- 'sap.orlandi.com' => 'sap',
- 'sap-dev.orlandi.com' => 'sap'
+ 'staging.cidvv.it' => 'cid',
+ 'dev.cidvv.it' => 'cid',
}
require File.expand_path('../../../yggdra/hel/lib/ygg/hel/json_show_exceptions', __FILE__)
@@ -41,7 +34,7 @@ class Application < Rails::Application
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
- config.active_record.observers = 'Ygg/Core/LogCollector'
+# config.active_record.observers = 'Ygg/Core/LogCollector'
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
@@ -77,8 +70,6 @@ class Application < Rails::Application
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
- config.assets.precompile += [ 'csvva.css', 'cid.css' ]
-
config.assets.paths << File.join(Rails.root, 'app', 'assets', 'js')
config.assets.paths << File.join(Rails.root, 'app', 'assets', 'css')
View
10 config/environments/production.rb
@@ -15,7 +15,7 @@
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
- config.assets.compile = false
+ config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
@@ -46,7 +46,13 @@
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
- config.assets.precompile = [ /\w+\.(?!js|css).+/, 'asgard.css', 'asgard-production.js', 'js/ext/resources/css/ext-all.css' ]
+ config.assets.precompile = [
+ /\w+\.(?!js|css).+/,
+ 'flarc-production.js',
+ 'csvva.css', 'cid.css',
+ 'asgard.css', 'asgard-production.js',
+ 'ext/resources/css/ext-all.css',
+ ]
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false

0 comments on commit e3a4558

Please sign in to comment.
Something went wrong with that request. Please try again.