Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #10

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Test #10

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--require spec_helper
10 changes: 9 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,13 @@ gem 'bootstrap-will_paginate'
gem 'roo'
gem 'axlsx', '~> 2.0', git: "https://github.com/randym/axlsx.git"
gem 'axlsx_rails', '~> 0.2.0'

gem 'paperclip', ">= 4.1.1"


group :test do

gem 'rspec-rails', '~> 3.5'
gem 'factory_girl_rails'
gem 'database_cleaner'

end
181 changes: 106 additions & 75 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
GIT
remote: https://github.com/randym/axlsx.git
revision: b52661c707c5ee812d71a9fc569fdf8f8c8ecfa5
revision: d41258edda220620226c20fb75ee25f36abe3636
specs:
axlsx (2.1.0.pre)
htmlentities (~> 4.3.4)
mimemagic (~> 0.3)
nokogiri (>= 1.6.6)
rubyzip (~> 1.1.7)
rubyzip (~> 1.2)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -47,113 +47,120 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
autoprefixer-rails (6.3.3.1)
autoprefixer-rails (6.5.4)
execjs
axlsx_rails (0.2.1)
axlsx (>= 2.0.1)
rails (>= 3.1)
bcrypt (3.1.10)
bcrypt (3.1.11)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.6)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
bootstrap-will_paginate (0.0.10)
will_paginate
builder (3.2.2)
byebug (8.2.2)
byebug (9.0.6)
capistrano (3.2.1)
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
capistrano-bundler (1.1.4)
capistrano-bundler (1.2.0)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-rails (1.1.6)
capistrano-rails (1.2.0)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.7)
cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
concurrent-ruby (1.0.0)
daemons (1.2.3)
coffee-script-source (1.12.1)
concurrent-ruby (1.0.2)
daemons (1.2.4)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
devise (3.5.6)
devise (4.2.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
railties (>= 4.1.0, < 5.1)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
devise_invitable (1.5.5)
actionmailer (>= 3.2.6, < 5)
devise (>= 3.2.0)
devise_invitable (1.7.0)
actionmailer (>= 4.0.0)
devise (>= 4.0.0)
diff-lcs (1.2.5)
erubis (2.7.0)
eventmachine (1.0.9.1)
execjs (2.6.0)
eventmachine (1.2.1)
execjs (2.7.0)
factory_girl (4.7.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.7.0)
factory_girl (~> 4.7.0)
railties (>= 3.0.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
globalid (0.3.6)
globalid (0.3.7)
activesupport (>= 4.1.0)
haml (4.0.7)
tilt
hashie (3.4.3)
hashie (3.4.6)
htmlentities (4.3.4)
httparty (0.13.7)
json (~> 1.8)
httparty (0.14.0)
multi_xml (>= 0.5.2)
i18n (0.7.0)
jbuilder (2.4.1)
jbuilder (2.6.1)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.1.0)
rails-dom-testing (~> 1.0)
jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
jwt (1.5.1)
jwt (1.5.6)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.99.1)
mimemagic (0.3.1)
mini_portile2 (2.0.0)
minitest (5.8.4)
multi_json (1.11.2)
multi_xml (0.5.5)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mini_portile2 (2.1.0)
minitest (5.10.1)
multi_json (1.12.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
mysql2 (0.3.20)
mysql2 (0.3.21)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.0.2)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
oauth (0.5.0)
oauth2 (1.1.0)
net-ssh (3.2.0)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
oauth (0.5.1)
oauth2 (1.2.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0, < 1.5.2)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
omniauth (1.3.1)
hashie (>= 1.2, < 4)
rack (>= 1.0, < 3)
omniauth-facebook (3.0.0)
omniauth-facebook (4.0.0)
omniauth-oauth2 (~> 1.2)
omniauth-google-oauth2 (0.3.1)
jwt (~> 1.0)
omniauth-google-oauth2 (0.4.1)
jwt (~> 1.5.2)
multi_json (~> 1.3)
omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.3.1)
Expand All @@ -170,14 +177,15 @@ GEM
json (~> 1.3)
omniauth-oauth (~> 1.1)
orm_adapter (0.5.0)
paperclip (4.2.2)
activemodel (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (~> 0.5.3)
paperclip (5.1.0)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
cocaine (~> 0.5.5)
mime-types
mimemagic (~> 0.3.0)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.6.4)
rack (1.6.5)
rack-openid (1.3.1)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
Expand Down Expand Up @@ -207,59 +215,76 @@ GEM
activesupport (= 4.2.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.5.0)
rdoc (4.2.2)
json (~> 1.4)
responders (2.1.1)
rake (12.0.0)
rdoc (4.3.0)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
roo (2.3.2)
roo (2.5.1)
nokogiri (~> 1)
rubyzip (~> 1.1, < 2.0.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
ruby-openid (2.7.0)
rubyzip (1.1.7)
sass (3.4.21)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
rubyzip (1.2.0)
sass (3.4.22)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.4.1)
sdoc (0.4.2)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
spring (1.6.4)
sprockets (3.5.2)
spring (2.0.0)
activesupport (>= 4.2)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.0.3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkit (1.8.1)
sshkit (1.11.4)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
thin (1.6.4)
thin (1.7.0)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (~> 1.0)
thor (0.19.1)
rack (>= 1, < 3)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.2)
turbolinks (2.5.3)
coffee-rails
tilt (2.0.5)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
uglifier (3.0.4)
execjs (>= 0.3.0, < 3)
warden (1.2.6)
rack (>= 1.0)
web-console (2.3.0)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
will_paginate (3.1.0)
will_paginate (3.1.5)

PLATFORMS
ruby
Expand All @@ -275,8 +300,10 @@ DEPENDENCIES
capistrano-rails
capistrano-rvm
coffee-rails (~> 4.1.0)
database_cleaner
devise
devise_invitable
factory_girl_rails
haml
httparty
jbuilder (~> 2.0)
Expand All @@ -290,6 +317,7 @@ DEPENDENCIES
quiet_assets
rails (= 4.2.4)
roo
rspec-rails (~> 3.5)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spring
Expand All @@ -298,3 +326,6 @@ DEPENDENCIES
uglifier (>= 1.3.0)
web-console (~> 2.0)
will_paginate

BUNDLED WITH
1.13.6
4 changes: 3 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@
.calendar .fc-content .fc-event-container a.Colecta {background-color: #C8FDC8; }
.calendar .fc-content .fc-event-container a.Inducción {background-color: #E7CDFF; }


.center {
text-align: center;
}
7 changes: 6 additions & 1 deletion app/controllers/admin/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Admin::AdminController < ApplicationController
before_filter :authenticate_user!
before_filter :require_admin

before_filter :page_id, :events_count, :volunteers_count, :brigades_count, :children_count, :polls_count
before_filter :page_id, :events_count, :volunteers_count, :brigades_count, :children_count, :polls_count, :hospital_count

layout 'admin'

Expand Down Expand Up @@ -36,7 +36,12 @@ def children_count
@childrenCount = Child.count('name', :distinct => true)
end

def hospital_count
@hospitalsCount = Hospital.count('name', :distinct => true)
end

def polls_count
@pollsCount = Poll.count('code', :distinct => true)
end

end