Permalink
Browse files

Merge branch 'master' of github.com:elpassion/elranks

  • Loading branch information...
aserafin committed Jan 3, 2014
2 parents 0dccc6e + 9789798 commit 393c1fc1cca800b0d95a070440889d13d4643916
View
@@ -35,6 +35,12 @@ group :test, :development do
gem 'database_cleaner'
end
+gem 'letter_opener', :group => :development
+
+group :production do
+ gem 'postmark-rails', '~> 0.5.2'
+end
+
gem 'angularjs-rails'
gem 'select2-rails'
gem 'inherited_resources'
View
@@ -157,6 +157,12 @@ GEM
mime-types
pg (0.17.1)
polyglot (0.3.3)
+ postmark (1.0.1)
+ json
+ rake
+ postmark-rails (0.5.2)
+ actionmailer (>= 3.0.0)
+ postmark (~> 1.0)
pry (0.9.12.4)
coderay (~> 1.0)
method_source (~> 0.8)
@@ -266,6 +272,7 @@ DEPENDENCIES
omniauth-google-oauth2
paperclip
pg
+ postmark-rails (~> 0.5.2)
pry
rails (= 4.0.1)
rspec-rails
@@ -16,3 +16,4 @@
//= require select2
//= require lib/angular-ui/select2
//= require app
+//= require bootstrap
@@ -17,5 +17,27 @@ table th, table td {
}
+ .logo {
+ float: left;
+ color: #fff;
+ //text-indent: -9999em;
+ width: 200px;
+ height: 50px;
+ //background: transparent image-url('avatar.jpeg') top left no-repeat;
+ }
+
+ .loginbox {
+ float: right;
+ margin-top: 20px;
+
+ .caret {
+ margin-left: 5px;
+ }
+
+ .avatar {
+ margin-right: 3px;
+ }
+ }
+
@@ -0,0 +1,15 @@
+# encoding: utf-8
+class MatchMailer < ActionMailer::Base
+ default from: ENV['ELRANKS_EMAIL']
+
+ #def new_order_email(creator, order)
+ # @player = creator
+ # @order = order
+ # mail(to: , subject: "#{creator.name} chce zamówić paszę w #{order.name} o #{order.ordered_at}")
+ #end
+ #
+ #def executor_email(executor_email, order)
+ # @order = order
+ # mail(to: executor_email, subject: 'Zostałeś egzekutorem - dzwoń po paszę!')
+ #end
+end
@@ -1,24 +1,30 @@
-header
- h1
- = "El Ranks"
- small alpha 0.0.1
-
- - if current_player.present?
- h3
- | logged in as:
- = image_tag current_player.avatar_url
- = current_player.name
- br= link_to :logout, "/sign_out"
-
- - else
- br= link_to :login, "/auth/google"
- br= link_to :logout, "/sign_out"
-
- select(name='home' ui-select2="" ng-model="home" multi)
- = options_for_select( [1,2,3,4,5] )
-
- select(name='away' ui-select2="" ng-model="away" multi)
- = options_for_select( [1,2,3,4,5] )
+
+header.navbar.navbar-inverse.navbar-fixed-top
+ .container
+ h1.logo
+ = "El Ranks"
+
+
+ section.loginbox
+ - if current_player.present?
+ .btn-group
+ button.btn.btn-default.dropdown-toggle(data-toggle='dropdown')
+ = image_tag current_player.avatar_url, class: 'avatar'
+ = current_player.name
+ span.caret
+ ul.dropdown-menu
+ li= link_to "Logout", "/sign_out"
+
+
+ - else
+ = link_to "Login", "/auth/google", class: 'btn btn-primary'
+
+- unless current_player.present?
+ select(name='home' ui-select2="" ng-model="home" multi)
+ = options_for_select( [1,2,3,4,5] )
+
+ select(name='away' ui-select2="" ng-model="away" multi)
+ = options_for_select( [1,2,3,4,5] )
section.table-responsive.standings
@@ -78,6 +78,9 @@
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
+ config.action_mailer.delivery_method = :postmark
+ config.action_mailer.postmark_settings = { :api_key => ENV['POSTMARK_API_KEY'] }
+
config.paperclip_defaults = {
storage: :fog,
fog_credentials: {

0 comments on commit 393c1fc

Please sign in to comment.