Browse files

debug and translations

  • Loading branch information...
1 parent 2115e5b commit 5ac00c7f9d46187a820f1b8e46ac8582def2dbc7 progressbarsk committed Jul 29, 2011
View
4 app/controllers/registrations_controller.rb
@@ -23,7 +23,7 @@ def create
end
end
- redirect_to '/join-us'
+ redirect_to url_for(@page)
else
flash[:error] = t('.problems_on_registration')
render 'pages/join'
@@ -33,7 +33,7 @@ def create
protected
def find_page
- @page = Page.find_by_title('Pridaj sa')
+ @page = @join_us_page
end
def set_form
View
8 app/mailers/registration_mailer.rb
@@ -1,15 +1,15 @@
class RegistrationMailer < ActionMailer::Base
def confirmation(registration, request)
- subject 'Progressbar Hackerspace - Thank You for registration'
+ subject "#{RefinerySetting.find_or_set(:site_name, 'Progressbar Hackerspace')} - #{t('.thank_you_for_registration')}"
recipients registration.email
from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
sent_on Time.now
@registration = registration
end
def approved_confirmation(registration, user, request)
- subject 'Progressbar Hackerspace - Your registration was approved! :-)'
+ subject "#{RefinerySetting.find_or_set(:site_name, 'Progressbar Hackerspace')} - #{t('.registration_approved')}"
recipients registration.email
from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
sent_on Time.now
@@ -20,15 +20,15 @@ def approved_confirmation(registration, user, request)
end
def rejected_confirmation(registration, request)
- subject 'Progressbar Hackerspace - Your registration was rejected.'
+ subject "#{RefinerySetting.find_or_set(:site_name, 'Progressbar Hackerspace')} - #{t('.registration_rejected')}"
recipients registration.email
from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
sent_on Time.now
@registration = registration
end
def notification(registration, request)
- subject 'New registration'
+ subject "#{RefinerySetting.find_or_set(:site_name, 'Progressbar Hackerspace')} - #{t('.new_registration')}"
recipients RefinerySetting.find_or_set(:registration_notification_recipients, 'keraml@gmail.com')
from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
sent_on Time.now
View
2 app/views/registration_mailer/notification.html.erb
@@ -4,7 +4,7 @@
<%= t('.registration_starts') %>
-<%= t('.from') %>: <%= @registration.name %>
+<%= t('.from') %>: <%= @registration.username %>
<%= t('.email') %>: <%= @registration.email %>
<%= t('.personal_info') %>:
<%= @registration.personal_info %>
View
11 app/views/registrations/index.html.erb
@@ -1,11 +0,0 @@
-<% content_for :body_content_left do %>
- <ul id="registrations">
- <% @registrations.each do |registration| %>
- <li>
- <%= link_to registration.username, registration_path(registration) %>
- </li>
- <% end %>
- </ul>
-<% end %>
-
-<%= render :partial => "/shared/content_page" %>
View
2 config/routes.rb
@@ -1,6 +1,6 @@
::Refinery::Application.routes.draw do
- resources :registrations
+ resources :registrations, :only => [:index, :create]
scope(:path => 'refinery', :as => 'admin', :module => 'admin') do
resources :registrations, :only => [:index, :show, :destroy, :accept, :reject] do

0 comments on commit 5ac00c7

Please sign in to comment.