Permalink
Browse files

Added CK Editor and many things

  • Loading branch information...
1 parent 06455ed commit 9a43f896d2b5de4042ea2b4c5056f760784ac618 @safarista committed Oct 7, 2012
Showing with 1,217 additions and 381 deletions.
  1. +1 −0 .rvmrc
  2. +2 −1 Gemfile
  3. +64 −56 Gemfile.lock
  4. BIN app/assets/images/Final-Logo-Black.png
  5. BIN app/assets/images/blessafrica-slider.jpg
  6. BIN app/assets/images/joinmoshi.JPG
  7. BIN app/assets/images/spacer.gif
  8. BIN app/assets/images/team.JPG
  9. +9 −2 app/assets/javascripts/application.js
  10. +6 −6 app/assets/javascripts/bootstrap.js.coffee
  11. +3 −0 app/assets/javascripts/newsletters.js.coffee
  12. +2 −2 app/assets/stylesheets/bootstrap_and_overrides.css.scss
  13. +11 −3 app/controllers/application_controller.rb
  14. +2 −1 app/controllers/beaches_controller.rb
  15. +87 −0 app/controllers/bookings_controller.rb
  16. +2 −0 app/controllers/day_trips_controller.rb
  17. +11 −0 app/controllers/destinations_controller.rb
  18. +9 −5 app/controllers/home_controller.rb
  19. +89 −0 app/controllers/newsletters_controller.rb
  20. +106 −0 app/controllers/pages_controller.rb
  21. +4 −2 app/controllers/posts_controller.rb
  22. +4 −2 app/controllers/safaris_controller.rb
  23. +2 −0 app/controllers/sessions_controller.rb
  24. +2 −0 app/controllers/treks_controller.rb
  25. +0 −50 app/controllers/welcome_controller.rb
  26. +5 −5 app/helpers/application_helper.rb
  27. +2 −0 app/helpers/controllers_helper.rb
  28. +2 −0 app/helpers/newsletters_helper.rb
  29. +2 −1 app/models/ability.rb
  30. +7 −7 app/models/album.rb
  31. +3 −0 app/models/booking.rb
  32. +7 −0 app/models/ckeditor/asset.rb
  33. +7 −0 app/models/ckeditor/attachment_file.rb
  34. +7 −0 app/models/ckeditor/picture.rb
  35. +1 −1 app/models/comment.rb
  36. +12 −0 app/models/newsletter.rb
  37. +8 −0 app/models/page.rb
  38. +1 −1 app/models/trek.rb
  39. +10 −1 app/models/user.rb
  40. +42 −0 app/uploaders/ckeditor_attachment_file_uploader.rb
  41. +53 −0 app/uploaders/ckeditor_picture_uploader.rb
  42. +1 −1 app/views/albums/_form.html.erb
  43. +7 −7 app/views/albums/index.html.erb
  44. +1 −1 app/views/beaches/_form.html.erb
  45. +2 −3 app/views/beaches/index.html.erb
  46. +4 −4 app/views/beaches/show.html.erb
  47. +17 −0 app/views/bookings/_form.html.erb
  48. +6 −0 app/views/bookings/edit.html.erb
  49. +23 −0 app/views/bookings/index.html.erb
  50. +5 −0 app/views/bookings/new.html.erb
  51. +10 −0 app/views/bookings/show.html.erb
  52. +1 −1 app/views/comments/_form.html.erb
  53. +11 −13 app/views/comments/show.html.erb
  54. +8 −8 app/views/day_trips/_form.html.erb
  55. +5 −5 app/views/day_trips/index.html.erb
  56. +3 −3 app/views/day_trips/show.html.erb
  57. +4 −4 app/views/destinations/_form.html.erb
  58. +12 −11 app/views/destinations/show.html.erb
  59. +70 −32 app/views/home/index.html.erb
  60. +21 −23 app/views/layouts/_footer.html.erb
  61. +15 −14 app/views/layouts/_header.html.erb
  62. +11 −10 app/views/layouts/application.html.erb
  63. +20 −0 app/views/newsletters/_form.html.erb
  64. +6 −0 app/views/newsletters/edit.html.erb
  65. +23 −0 app/views/newsletters/index.html.erb
  66. +5 −0 app/views/newsletters/new.html.erb
  67. +19 −0 app/views/newsletters/show.html.erb
  68. 0 app/views/{welcome → pages}/about_tanzania.html.erb
  69. +1 −1 app/views/{welcome → pages}/about_us.html.erb
  70. 0 app/views/{welcome → pages}/accommodation.html.erb
  71. +24 −0 app/views/pages/booking.html.erb
  72. 0 app/views/{welcome → pages}/contact_us.html.erb
  73. +22 −0 app/views/pages/edit.html.erb
  74. +1 −0 app/views/pages/faq.html.erb
  75. 0 app/views/{welcome → pages}/guides_and_porters.html.erb
  76. 0 app/views/{welcome → pages}/important_information.html.erb
  77. +22 −0 app/views/pages/index.html.erb
  78. +6 −0 app/views/pages/itineraries.html.erb
  79. 0 app/views/{welcome → pages}/kit_hire.html.erb
  80. +22 −0 app/views/pages/new.html.erb
  81. +12 −0 app/views/pages/show.html.erb
  82. 0 app/views/{welcome → pages}/terms_and_conditions.html.erb
  83. +25 −2 app/views/photos/index.html.erb
  84. +1 −1 app/views/posts/_form.html.erb
  85. +2 −2 app/views/posts/show.html.erb
  86. +1 −1 app/views/safaris/_form.html.erb
  87. +4 −3 app/views/safaris/index.html.erb
  88. +4 −4 app/views/safaris/show.html.erb
  89. +1 −1 app/views/treks/_form.html.erb
  90. +2 −3 app/views/treks/index.html.erb
  91. +15 −9 app/views/treks/show.html.erb
  92. +1 −1 app/views/users/_form.html.erb
  93. +0 −7 app/views/welcome/itineraries.html.erb
  94. +18 −0 config/initializers/ckeditor.rb
  95. +22 −10 config/routes.rb
  96. +26 −0 db/migrate/20120815171824_create_ckeditor_assets.rb
  97. +11 −0 db/migrate/20121006135821_create_pages.rb
  98. +12 −0 db/migrate/20121006170246_create_newsletters.rb
  99. +16 −0 db/migrate/20121006195004_create_bookings.rb
  100. +49 −2 db/schema.rb
  101. +2 −0 public/403.html
  102. +0 −19 public/assets/application-37443f46a07a3f29da45cc093f8b63e7.js
  103. BIN public/assets/application-37443f46a07a3f29da45cc093f8b63e7.js.gz
  104. +0 −1 public/assets/application-dbdfe570109892b102f717e98aca2063.css
  105. BIN public/assets/application-dbdfe570109892b102f717e98aca2063.css.gz
  106. +0 −1 public/assets/application.css
  107. BIN public/assets/application.css.gz
  108. +0 −19 public/assets/application.js
  109. BIN public/assets/application.js.gz
  110. BIN public/assets/bless-africa-tours-logo-03c8e58b29bde30e475e86dd44691411.png
  111. BIN public/assets/bless-africa-tours-logo.png
  112. BIN public/assets/glyphicons-halflings-f6675c325532ec11a984d58e172b8e2a.png
  113. BIN public/assets/glyphicons-halflings-white-13553a5bf21ae3cc374006592488ec64.png
  114. BIN public/assets/glyphicons-halflings-white.png
  115. BIN public/assets/glyphicons-halflings.png
  116. BIN public/assets/godbless_swai-ea99d00b1c92d135ef57d8ef310440fc.JPG
  117. BIN public/assets/godbless_swai.JPG
  118. BIN public/assets/jofringe-c4de602788fe948b7ec8fad0e9071201.jpg
  119. BIN public/assets/jofringe.jpg
  120. +0 −8 public/assets/manifest.yml
View
1 .rvmrc
@@ -0,0 +1 @@
+rvm use 1.9.2@rails32
View
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-gem 'rails', '3.2.6'
+gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
@@ -55,3 +55,4 @@ gem 'mini_magick'
# Pagination and scrolling log articles
gem 'kaminari'
gem 'simple_form'
+gem 'ckeditor', '3.7.1'
View
@@ -1,65 +1,68 @@
GIT
remote: git://github.com/ryanb/cancan.git
- revision: aed9f26e5610026d28504c0ebf76b6e52a843236
+ revision: f1cebde51a87be149b4970a3287826bb63c0ac0b
branch: 2.0
specs:
cancan (2.0.0.alpha)
GEM
remote: https://rubygems.org/
specs:
- actionmailer (3.2.6)
- actionpack (= 3.2.6)
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
mail (~> 2.4.4)
- actionpack (3.2.6)
- activemodel (= 3.2.6)
- activesupport (= 3.2.6)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- journey (~> 1.0.1)
+ journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
- activemodel (3.2.6)
- activesupport (= 3.2.6)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
builder (~> 3.0.0)
- activerecord (3.2.6)
- activemodel (= 3.2.6)
- activesupport (= 3.2.6)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.6)
- activemodel (= 3.2.6)
- activesupport (= 3.2.6)
- activesupport (3.2.6)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
bcrypt-ruby (3.0.1)
- bootstrap-sass (2.0.4.0)
- builder (3.0.0)
+ bootstrap-sass (2.1.0.0)
+ builder (3.0.3)
carrierwave (0.6.2)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
+ ckeditor (3.7.1)
+ mime-types
+ orm_adapter
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.3)
- daemons (1.1.8)
+ daemons (1.1.9)
erubis (2.7.0)
- eventmachine (0.12.10)
- excon (0.14.3)
+ eventmachine (1.0.0)
+ excon (0.16.4)
execjs (1.4.0)
multi_json (~> 1.0)
- faraday (0.8.1)
+ faraday (0.8.4)
multipart-post (~> 1.1)
- fog (1.4.0)
+ fog (1.6.0)
builder
- excon (~> 0.14.0)
+ excon (~> 0.14)
formatador (~> 0.2.0)
mime-types
multi_json (~> 1.0)
@@ -68,18 +71,19 @@ GEM
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.3)
- friendly_id (4.0.7)
+ friendly_id (4.0.8)
hike (1.2.1)
- i18n (0.6.0)
+ httpauth (0.2.0)
+ i18n (0.6.1)
journey (1.0.4)
- jquery-rails (2.0.2)
- railties (>= 3.2.0, < 5.0)
+ jquery-rails (2.1.3)
+ railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
- json (1.7.3)
- kaminari (0.13.0)
+ jruby-pageant (1.1.1)
+ json (1.7.5)
+ kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
- railties (>= 3.0.0)
libv8 (3.3.10.4)
mail (2.4.4)
i18n (>= 0.4.0)
@@ -92,32 +96,35 @@ GEM
multipart-post (1.1.5)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
- net-ssh (2.5.2)
+ net-ssh (2.6.0)
+ jruby-pageant (>= 1.1.1)
nokogiri (1.5.5)
- oauth (0.4.6)
- oauth2 (0.5.2)
+ oauth (0.4.7)
+ oauth2 (0.6.1)
faraday (~> 0.7)
- multi_json (~> 1.0)
- pg (0.14.0)
+ httpauth (~> 0.1)
+ multi_json (~> 1.3)
+ orm_adapter (0.4.0)
+ pg (0.14.1)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
- rack-test (0.6.1)
+ rack-test (0.6.2)
rack (>= 1.0)
- rails (3.2.6)
- actionmailer (= 3.2.6)
- actionpack (= 3.2.6)
- activerecord (= 3.2.6)
- activeresource (= 3.2.6)
- activesupport (= 3.2.6)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
bundler (~> 1.0)
- railties (= 3.2.6)
- railties (3.2.6)
- actionpack (= 3.2.6)
- activesupport (= 3.2.6)
+ railties (= 3.2.8)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -127,38 +134,38 @@ GEM
json (~> 1.4)
redcarpet (2.1.1)
ruby-hmac (0.4.0)
- sass (3.1.20)
+ sass (3.2.1)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
simple_form (2.0.2)
actionpack (~> 3.0)
activemodel (~> 3.0)
- sorcery (0.7.12)
+ sorcery (0.7.13)
bcrypt-ruby (~> 3.0.0)
oauth (~> 0.4.4)
- oauth2 (~> 0.5.1)
+ oauth2 (~> 0.6.0)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
subexec (0.2.2)
- therubyracer (0.10.1)
+ therubyracer (0.10.2)
libv8 (~> 3.3.10)
- thin (1.4.1)
+ thin (1.5.0)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
- thor (0.15.4)
+ thor (0.16.0)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
- uglifier (1.2.6)
+ uglifier (1.3.0)
execjs (>= 0.3.0)
- multi_json (~> 1.3)
+ multi_json (~> 1.0, >= 1.0.2)
PLATFORMS
ruby
@@ -168,14 +175,15 @@ DEPENDENCIES
bootstrap-sass
cancan!
carrierwave
+ ckeditor (= 3.7.1)
coffee-rails (~> 3.2.1)
fog
friendly_id
jquery-rails
kaminari
mini_magick
pg
- rails (= 3.2.6)
+ rails (= 3.2.8)
redcarpet
sass-rails (~> 3.2.3)
simple_form
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,6 +1,6 @@
-jQuery ->
- # $("a[rel=popover]").popover()
- # $(".tooltip").tooltip()
- # $("a[rel=tooltip]").tooltip()
- # $(".carousel").carousel()
- # $('.dropdown-toggle').dropdown()
+#jQuery ->
+# $("a[rel=popover]").popover()
+# $(".tooltip").tooltip()
+# $("a[rel=tooltip]").tooltip()
+# $(".carousel").carousel()
+# $('.dropdown-toggle').dropdown()
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
@@ -8,12 +8,12 @@ $iconWhiteSpritePath: image-path('glyphicons-halflings-white.png');
//$navbarLinkColor: #eee;
@import "bootstrap";
-body { padding-top: 10px; }
+body { padding-top: 10px; font-family:'Open sans', sans-serif;}
@import "bootstrap-responsive";
.navbar .brand {
- color: #fff;
+ //color: #fff;
}
// .span3{margin-left:20px;width:220px;}
// .masthead {
@@ -2,9 +2,17 @@ class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :require_login
- enable_authorization
-
-
+ enable_authorization # for CanCan 2.0
+ # check_authorization #for CanCan 1.6.*
+
+ # rescue_from CanCan::AccessDenied do |exception|
+ # # render :file => "#{Rails.root}/public/403.html", :status => 403, :layout => false
+ # ## to avoid deprecation warnings with Rails 3.2.x (and incidentally using Ruby 1.9.3 hash syntax)
+ # ## this render call should be:
+ # render file: "#{Rails.root}/public/403", formats: [:html], status: 403, layout: true
+ # end
+
+
protected
def not_authenticated
redirect_to root_path, :alert => "Please login first."
@@ -1,5 +1,6 @@
class BeachesController < ApplicationController
- skip_before_filter :require_login, :only => [:index, :show]
+ # skip_authorization_check only: [:index, :show]
+ skip_before_filter :require_login, only: [:index, :show]
# GET /beaches
# GET /beaches.json
def index
Oops, something went wrong.

0 comments on commit 9a43f89

Please sign in to comment.