sbdevcore 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/images/28DaysLater.ttf +0 -0
- data/app/assets/images/ajax-loader.gif +0 -0
- data/app/assets/javascripts/jquery.tools.min.js +16 -108
- data/app/assets/javascripts/rails.validations.custom.js +5 -0
- data/app/assets/javascripts/sbdev-ajax.js +14 -0
- data/app/assets/javascripts/sbdevcore-tools.js +24 -37
- data/app/assets/javascripts/sbdevcore.js +8 -3
- data/app/assets/javascripts/tiny_mce_config.js +2 -0
- data/app/assets/stylesheets/_bar_nav.scss +6 -4
- data/app/assets/stylesheets/_buttons.scss +16 -10
- data/app/assets/stylesheets/_forms.scss +51 -0
- data/app/assets/stylesheets/_mixins.scss +40 -15
- data/app/assets/stylesheets/_overlay.scss +4 -7
- data/app/assets/stylesheets/_sbdev_core.scss +55 -19
- data/app/assets/stylesheets/_yui_base.scss +142 -0
- data/app/controllers/contacts_controller.rb +2 -36
- data/app/controllers/downloadables_controller.rb +6 -46
- data/app/controllers/galleries_controller.rb +4 -49
- data/app/controllers/indices_controller.rb +2 -45
- data/app/controllers/photos_controller.rb +4 -48
- data/app/controllers/sbdev_core_controller.rb +40 -0
- data/app/controllers/texts_controller.rb +3 -46
- data/app/controllers/videos_controller.rb +4 -45
- data/app/models/contact.rb +5 -1
- data/app/models/downloadable.rb +3 -1
- data/app/models/index.rb +4 -1
- data/app/models/photo.rb +3 -1
- data/app/models/video.rb +2 -0
- data/app/views/admins/mailer/confirmation_instructions.html.haml +4 -0
- data/app/views/admins/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/admins/mailer/unlock_instructions.html.haml +5 -0
- data/app/views/admins/passwords/edit.html.haml +8 -0
- data/app/views/admins/passwords/new.html.haml +6 -0
- data/app/views/admins/sessions/new.html.haml +8 -0
- data/app/views/admins/shared/_links.haml +19 -0
- data/app/views/application/_header.html.haml +1 -0
- data/app/views/application/_secondary_nav.html.haml +3 -0
- data/app/views/contacts/_form.html.haml +5 -0
- data/app/views/contacts/edit.html.haml +6 -0
- data/app/views/contacts/index.html.haml +21 -0
- data/app/views/contacts/new.html.haml +2 -0
- data/app/views/contacts/show.html.haml +24 -0
- data/app/views/downloadables/_form.html.haml +6 -0
- data/app/views/downloadables/_show.html.haml +7 -0
- data/app/views/downloadables/edit.html.haml +3 -0
- data/app/views/downloadables/new.html.haml +4 -0
- data/app/views/galleries/_form.html.haml +22 -0
- data/app/views/galleries/edit.html.haml +10 -0
- data/app/views/galleries/index.html.haml +9 -0
- data/app/views/galleries/new.html.haml +3 -0
- data/app/views/galleries/show.html.haml +9 -0
- data/app/views/indices/_form.html.haml +43 -0
- data/app/views/indices/_show.html.haml +17 -0
- data/app/views/indices/edit.html.haml +3 -0
- data/app/views/indices/index.html.haml +17 -0
- data/app/views/layouts/application.html.haml +16 -1
- data/app/views/layouts/bar_nav.html.haml +7 -14
- data/app/views/layouts/sbdev_core.html.haml +39 -0
- data/app/views/layouts/tab_nav.html.haml +9 -14
- data/app/views/mailer/message.haml +4 -0
- data/app/views/photos/_form.html.haml +10 -0
- data/app/views/photos/_show.html.haml +7 -0
- data/app/views/photos/edit.html.haml +3 -0
- data/app/views/photos/index.html.haml +21 -0
- data/app/views/photos/new.html.haml +4 -0
- data/app/views/photos/show.html.haml +4 -0
- data/app/views/sbdev_core/index.html.haml +1 -0
- data/app/views/sbdev_core/show.html.haml +4 -0
- data/app/views/sbdev_core/show.js.haml +1 -0
- data/app/views/shared/_asset_show.html.haml +1 -0
- data/app/views/shared/_devise_links.haml +15 -0
- data/app/views/shared/_gallery.html.haml +14 -0
- data/app/views/shared/_prioritizable_fields.html.haml +5 -0
- data/app/views/texts/_form.html.haml +3 -0
- data/app/views/texts/_show.html.haml +6 -0
- data/app/views/texts/edit.html.haml +3 -0
- data/app/views/texts/new.html.haml +4 -0
- data/app/views/texts/show.html.haml +8 -0
- data/app/views/videos/_form.html.haml +7 -0
- data/app/views/videos/_show.html.haml +12 -0
- data/app/views/videos/edit.html.haml +3 -0
- data/app/views/videos/index.html.haml +11 -0
- data/app/views/videos/new.html.haml +4 -0
- data/app/views/videos/show.html.haml +9 -0
- data/app/views/videos/show.js.haml +4 -0
- data/config/initializers/client_side_validations.rb +14 -0
- data/config/initializers/custom_validators.rb +15 -0
- data/config/initializers/load_app_config.rb +2 -0
- data/config/initializers/simple_form.rb +93 -0
- data/config/locales/en.yml +4 -1
- data/db/migrate/20110811000613_create_indices.rb +3 -0
- data/db/seeds.rb +23 -57
- data/lib/generators/sbdevcore/install_generator.rb +0 -2
- data/lib/generators/sbdevcore/templates/application.scss +1 -0
- data/lib/generators/sbdevcore/templates/application/_404.html.haml +2 -0
- data/lib/generators/sbdevcore/templates/application/_footer.html.haml +2 -1
- data/lib/generators/sbdevcore/templates/application/_inline_nav.html.haml +3 -0
- data/lib/generators/sbdevcore/templates/application/_nav.html.haml +1 -1
- data/lib/generators/sbdevcore/templates/config/initializers/mailer_setup.rb +2 -2
- data/lib/generators/sbdevcore/templates/config/initializers/simple_form.rb +93 -0
- data/lib/generators/sbdevcore/templates/new_contact.html.haml +4 -0
- data/lib/sbdevcore.rb +25 -2
- data/lib/sbdevcore/engine.rb +13 -34
- data/lib/sbdevcore/version.rb +1 -1
- data/lib/tasks/sbdevcore.rake +1 -1
- data/public/404.html +2 -2
- data/sbdevcore.gemspec +7 -2
- metadata +296 -156
- data/app/assets/stylesheets/_js_errors.scss +0 -26
- data/app/controllers/core_controller.rb +0 -5
- data/app/controllers/sbdevcore/application_controller_extensions.rb +0 -13
- data/app/controllers/statics_controller.rb +0 -6
- data/app/models/asset.rb +0 -27
- data/app/views/admins/confirmations/new.html.erb +0 -12
- data/app/views/admins/mailer/confirmation_instructions.html.erb +0 -5
- data/app/views/admins/mailer/reset_password_instructions.html.erb +0 -8
- data/app/views/admins/mailer/unlock_instructions.html.erb +0 -7
- data/app/views/admins/passwords/edit.html.erb +0 -16
- data/app/views/admins/passwords/new.html.erb +0 -12
- data/app/views/admins/registrations/edit.html.erb +0 -25
- data/app/views/admins/registrations/new.html.erb +0 -18
- data/app/views/admins/sessions/new.html.erb +0 -17
- data/app/views/admins/unlocks/new.html.erb +0 -12
- data/app/views/contacts/_form.html.erb +0 -18
- data/app/views/contacts/edit.html.erb +0 -8
- data/app/views/contacts/index.html.erb +0 -27
- data/app/views/contacts/new.html.erb +0 -4
- data/app/views/contacts/show.html.erb +0 -32
- data/app/views/downloadables/_form.html.erb +0 -17
- data/app/views/downloadables/_show.html.erb +0 -8
- data/app/views/downloadables/edit.html.erb +0 -4
- data/app/views/downloadables/new.html.erb +0 -6
- data/app/views/galleries/_form.html.erb +0 -33
- data/app/views/galleries/edit.html.erb +0 -13
- data/app/views/galleries/index.html.erb +0 -16
- data/app/views/galleries/new.html.erb +0 -8
- data/app/views/galleries/show.html.erb +0 -17
- data/app/views/indices/_form.html.erb +0 -60
- data/app/views/indices/_show.html.erb +0 -22
- data/app/views/indices/edit.html.erb +0 -12
- data/app/views/indices/index.html.erb +0 -23
- data/app/views/indices/new.html.erb +0 -8
- data/app/views/indices/show.html.erb +0 -4
- data/app/views/indices/show.js.erb +0 -1
- data/app/views/photos/_form.html.erb +0 -27
- data/app/views/photos/_show.html.erb +0 -14
- data/app/views/photos/edit.html.erb +0 -4
- data/app/views/photos/index.html.erb +0 -27
- data/app/views/photos/new.html.erb +0 -6
- data/app/views/photos/overlay.html.erb +0 -1
- data/app/views/photos/show.html.erb +0 -5
- data/app/views/shared/_asset_show.html.erb +0 -1
- data/app/views/shared/_gallery.html.erb +0 -21
- data/app/views/shared/_prioritizable_fields.html.erb +0 -10
- data/app/views/shared/course_type_index.html.erb +0 -16
- data/app/views/texts/_form.html.erb +0 -9
- data/app/views/texts/_new.html.erb +0 -6
- data/app/views/texts/_show.html.erb +0 -9
- data/app/views/texts/edit.html.erb +0 -4
- data/app/views/texts/new.html.erb +0 -6
- data/app/views/texts/show.html.erb +0 -9
- data/app/views/videos/_form.html.erb +0 -17
- data/app/views/videos/_show.html.erb +0 -16
- data/app/views/videos/edit.html.erb +0 -4
- data/app/views/videos/index.html.erb +0 -17
- data/app/views/videos/new.html.erb +0 -6
- data/app/views/videos/show.html.erb +0 -12
- data/lib/generators/sbdevcore/templates/application/_404.html.erb +0 -2
- data/lib/generators/sbdevcore/templates/application/_inline_nav.html.erb +0 -7
- data/lib/generators/sbdevcore/templates/config/tiny_mce.yml +0 -46
- data/lib/generators/sbdevcore/templates/new_contact.html.erb +0 -4
- data/vendor/assets/stylesheets/.gitkeep +0 -0
- data/vendor/plugins/.gitkeep +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
- f ||= local_assigns[:locals][:f]
|
|
2
|
+
%div{:id => f.object.id.to_s}
|
|
3
|
+
= f.input :name
|
|
4
|
+
= f.input :description
|
|
5
|
+
= f.hidden_field :remote_type, {:value => "Youtube"}
|
|
6
|
+
= f.input :remote_id, :label => "Youtube ID"
|
|
7
|
+
= render "shared/prioritizable_fields", :locals => {:f => f}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.center.asset{:id => "video#{video.id}"}
|
|
2
|
+
= "<h3>#{video.name}</h3>" unless video.name.blank?
|
|
3
|
+
%object{:align => "c", :height => "390", :width => "520"}
|
|
4
|
+
%param{:name => "movie", :value => video.url}/
|
|
5
|
+
%param{:name => "allowFullScreen", :value => "true"}/
|
|
6
|
+
%param{:name => "allowscriptaccess", :value => "always"}/
|
|
7
|
+
%embed{:allowfullscreen => "true", :allowscriptaccess => "always", :height => "390", :src => video.url, :type => "application/x-shockwave-flash", :width => "520"}
|
|
8
|
+
= "<p>By: #{video.description}</p>" unless video.description.blank?
|
|
9
|
+
- if admin_signed_in?
|
|
10
|
+
%p.asset-admin
|
|
11
|
+
= link_to "Remove Video", video, :confirm => 'Are you sure?', :method => :delete
|
|
12
|
+
= link_to "Edit Video", edit_video_path(video), :rel=>"#overlay", :class => "overlayed"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
- title "Videos"
|
|
2
|
+
%table
|
|
3
|
+
%tr
|
|
4
|
+
%th Name
|
|
5
|
+
- for video in @videos
|
|
6
|
+
%tr
|
|
7
|
+
%td= h video.name
|
|
8
|
+
%td= link_to "Show", video
|
|
9
|
+
%td= link_to "Edit", edit_video_path(video)
|
|
10
|
+
%td= link_to "Destroy", video, :confirm => 'Are you sure?', :method => :delete
|
|
11
|
+
%p= link_to "New Video", new_video_path
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# ClientSideValidations Initializer
|
|
2
|
+
|
|
3
|
+
require 'client_side_validations/simple_form' if defined?(::SimpleForm)
|
|
4
|
+
require 'client_side_validations/formtastic' if defined?(::Formtastic)
|
|
5
|
+
|
|
6
|
+
# Uncomment the following block if you want each input field to have the validation messages attached.
|
|
7
|
+
# ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
|
|
8
|
+
# unless html_tag =~ /^<label/
|
|
9
|
+
# %{<div class="field_with_errors">#{html_tag}<label for="#{instance.send(:tag_id)}" class="message">#{instance.error_message.first}</label></div>}.html_safe
|
|
10
|
+
# else
|
|
11
|
+
# %{<div class="field_with_errors">#{html_tag}</div>}.html_safe
|
|
12
|
+
# end
|
|
13
|
+
# end
|
|
14
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# config/initializers/email_validator.rb
|
|
2
|
+
class EmailValidator < ActiveModel::EachValidator
|
|
3
|
+
def validate_each(record, attr_name, value)
|
|
4
|
+
unless value =~ /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
|
|
5
|
+
record.errors.add(attr_name, :email, options.merge(:value => value))
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
# This allows us to assign the validator in the model
|
|
11
|
+
module ActiveModel::Validations::HelperMethods
|
|
12
|
+
def validates_email(*attr_names)
|
|
13
|
+
validates_with EmailValidator, _merge_attributes(attr_names)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
|
2
|
+
SimpleForm.setup do |config|
|
|
3
|
+
# Components used by the form builder to generate a complete input. You can remove
|
|
4
|
+
# any of them, change the order, or even add your own components to the stack.
|
|
5
|
+
config.components = [ :placeholder, :label_input, :hint, :error ]
|
|
6
|
+
|
|
7
|
+
# Default tag used on hints.
|
|
8
|
+
# config.hint_tag = :span
|
|
9
|
+
|
|
10
|
+
# CSS class to add to all hint tags.
|
|
11
|
+
# config.hint_class = :hint
|
|
12
|
+
|
|
13
|
+
# CSS class used on errors.
|
|
14
|
+
# config.error_class = :error
|
|
15
|
+
|
|
16
|
+
# Default tag used on errors.
|
|
17
|
+
# config.error_tag = :span
|
|
18
|
+
|
|
19
|
+
# Method used to tidy up errors.
|
|
20
|
+
# config.error_method = :first
|
|
21
|
+
|
|
22
|
+
# Default tag used for error notification helper.
|
|
23
|
+
# config.error_notification_tag = :p
|
|
24
|
+
|
|
25
|
+
# CSS class to add for error notification helper.
|
|
26
|
+
# config.error_notification_class = :error_notification
|
|
27
|
+
|
|
28
|
+
# ID to add for error notification helper.
|
|
29
|
+
# config.error_notification_id = nil
|
|
30
|
+
|
|
31
|
+
# You can wrap all inputs in a pre-defined tag.
|
|
32
|
+
# config.wrapper_tag = :div
|
|
33
|
+
|
|
34
|
+
# CSS class to add to all wrapper tags.
|
|
35
|
+
# config.wrapper_class = :input
|
|
36
|
+
|
|
37
|
+
# CSS class to add to the wrapper if the field has errors.
|
|
38
|
+
# config.wrapper_error_class = :field_with_errors
|
|
39
|
+
|
|
40
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
|
41
|
+
# config.collection_wrapper_tag = nil
|
|
42
|
+
|
|
43
|
+
# You can wrap each item in a collection of radio/check boxes with a tag, defaulting to span.
|
|
44
|
+
# config.item_wrapper_tag = :span
|
|
45
|
+
|
|
46
|
+
# Series of attempts to detect a default label method for collection.
|
|
47
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
|
48
|
+
|
|
49
|
+
# Series of attempts to detect a default value method for collection.
|
|
50
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
|
51
|
+
|
|
52
|
+
# How the label text should be generated altogether with the required text.
|
|
53
|
+
config.label_text = lambda { |label, required| "#{label} #{required}" }
|
|
54
|
+
|
|
55
|
+
# You can define the class to use on all labels. Default is nil.
|
|
56
|
+
# config.label_class = nil
|
|
57
|
+
|
|
58
|
+
# You can define the class to use on all forms. Default is simple_form.
|
|
59
|
+
config.form_class = "simple_form"
|
|
60
|
+
|
|
61
|
+
# Whether attributes are required by default (or not). Default is true.
|
|
62
|
+
config.required_by_default = false
|
|
63
|
+
|
|
64
|
+
# Tell browsers whether to use default HTML5 validations (novalidate option).
|
|
65
|
+
# Default is enabled.
|
|
66
|
+
config.browser_validations = false
|
|
67
|
+
|
|
68
|
+
# Determines whether HTML5 types (:email, :url, :search, :tel) and attributes
|
|
69
|
+
# (e.g. required) are used or not. True by default.
|
|
70
|
+
# Having this on in non-HTML5 compliant sites can cause odd behavior in
|
|
71
|
+
# HTML5-aware browsers such as Chrome.
|
|
72
|
+
# config.html5 = true
|
|
73
|
+
|
|
74
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
|
75
|
+
# to match as key, and the input type that will be used when the field name
|
|
76
|
+
# matches the regexp as value.
|
|
77
|
+
# config.input_mappings = { /count/ => :integer }
|
|
78
|
+
|
|
79
|
+
# Collection of methods to detect if a file type was given.
|
|
80
|
+
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
|
81
|
+
|
|
82
|
+
# Default priority for time_zone inputs.
|
|
83
|
+
# config.time_zone_priority = nil
|
|
84
|
+
|
|
85
|
+
# Default priority for country inputs.
|
|
86
|
+
# config.country_priority = nil
|
|
87
|
+
|
|
88
|
+
# Default size for text inputs.
|
|
89
|
+
config.default_input_size = 50
|
|
90
|
+
|
|
91
|
+
# When false, do not use translations for labels, hints or placeholders.
|
|
92
|
+
config.translate = true
|
|
93
|
+
end
|
data/config/locales/en.yml
CHANGED
|
@@ -2,6 +2,8 @@ class CreateIndices < ActiveRecord::Migration
|
|
|
2
2
|
def change
|
|
3
3
|
create_table :indices do |t|
|
|
4
4
|
t.string :name
|
|
5
|
+
t.string :title
|
|
6
|
+
t.string :slug
|
|
5
7
|
t.string :page_title
|
|
6
8
|
t.text :keywords
|
|
7
9
|
t.text :page_description
|
|
@@ -10,5 +12,6 @@ class CreateIndices < ActiveRecord::Migration
|
|
|
10
12
|
|
|
11
13
|
t.timestamps
|
|
12
14
|
end
|
|
15
|
+
add_index :indices, :slug, :unique => true
|
|
13
16
|
end
|
|
14
17
|
end
|
data/db/seeds.rb
CHANGED
|
@@ -29,77 +29,43 @@ LOREM_SANS_HTML = <<-END_LOREM
|
|
|
29
29
|
|
|
30
30
|
id = 0
|
|
31
31
|
#
|
|
32
|
+
Admin.all.each(&:destroy)
|
|
32
33
|
Admin.create({:username => 'admin', :password => 'secret', :password_confirmation => 'secret', :email => APP_CONFIG[:contact_email].first})
|
|
33
34
|
#
|
|
34
|
-
|
|
35
|
+
Index.all.each(&:destroy)
|
|
36
|
+
[statics + dynamics].flatten.each do |index|
|
|
35
37
|
attr = {
|
|
36
38
|
:name => index,
|
|
37
|
-
:title => index
|
|
39
|
+
:title => index,
|
|
38
40
|
:page_title => APP_CONFIG[:app_name] + " - " + index.capitalize,
|
|
39
41
|
:page_description => APP_CONFIG[:app_name] + " - " + index.capitalize,
|
|
40
42
|
:keywords => index,
|
|
41
43
|
:texts_attributes => {
|
|
42
44
|
(id += 1).to_s =>{
|
|
43
|
-
:content => "
|
|
45
|
+
:content => "#{LOREM_LONG}",
|
|
44
46
|
:priority => "1"
|
|
45
|
-
# :photos_attributes => {
|
|
46
|
-
# (id += 1).to_s => {
|
|
47
|
-
# :asset => File.open("#{RAILS_ROOT}/db/seeds/sunset-1.jpg", 'rb'),
|
|
48
|
-
# :klass => "right",
|
|
49
|
-
# :title => "sunset",
|
|
50
|
-
# :priority => "1",
|
|
51
|
-
# :description => LOREM_SANS_HTML
|
|
52
|
-
# }
|
|
53
|
-
# }
|
|
54
47
|
}
|
|
55
|
-
# (id += 1).to_s =>{
|
|
56
|
-
# :priority => "2",
|
|
57
|
-
# "videos_attributes" => {
|
|
58
|
-
# (id += 1).to_s =>{
|
|
59
|
-
# :remote_type => "Youtube",
|
|
60
|
-
# :remote_id => "lbROjOciOZA",
|
|
61
|
-
# :priority => 1,
|
|
62
|
-
# :title => "Roatan Diving"
|
|
63
|
-
# }
|
|
64
|
-
# }
|
|
65
|
-
# }
|
|
66
48
|
}
|
|
67
49
|
}
|
|
68
50
|
Index.create(attr)
|
|
69
51
|
end
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
# :title => "sunset",
|
|
86
|
-
# :priority => "1",
|
|
87
|
-
# :description => LOREM_SANS_HTML
|
|
88
|
-
# }
|
|
89
|
-
# }
|
|
52
|
+
|
|
53
|
+
statics.each do |index|
|
|
54
|
+
3.times do |i|
|
|
55
|
+
sub_index = index + "_#{i.to_s}"
|
|
56
|
+
attr = {
|
|
57
|
+
:name => sub_index,
|
|
58
|
+
:title => sub_index,
|
|
59
|
+
:page_title => APP_CONFIG[:app_name] + " - " + sub_index.capitalize,
|
|
60
|
+
:page_description => APP_CONFIG[:app_name] + " - " + sub_index.capitalize,
|
|
61
|
+
:keywords => sub_index,
|
|
62
|
+
:texts_attributes => {
|
|
63
|
+
(id += 1).to_s =>{
|
|
64
|
+
:content => "#{LOREM_LONG}",
|
|
65
|
+
:priority => "1"
|
|
66
|
+
}
|
|
90
67
|
}
|
|
91
|
-
# (id += 1).to_s =>{
|
|
92
|
-
# :priority => "2",
|
|
93
|
-
# "videos_attributes" => {
|
|
94
|
-
# (id += 1).to_s =>{
|
|
95
|
-
# :remote_type => "Youtube",
|
|
96
|
-
# :remote_id => "lbROjOciOZA",
|
|
97
|
-
# :priority => 1,
|
|
98
|
-
# :title => "Roatan Diving"
|
|
99
|
-
# }
|
|
100
|
-
# }
|
|
101
|
-
# }
|
|
102
68
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
end
|
|
69
|
+
Index.find(index).indices.create!(attr)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -38,8 +38,6 @@ Index.find_all_by_name(APP_CONFIG[:static_pages]).each do |page|
|
|
|
38
38
|
copy_file "application.scss", "app/assets/stylesheets/application.scss", :force => true
|
|
39
39
|
copy_file "sass.scss", "app/assets/stylesheets/sass.scss", :force => true
|
|
40
40
|
directory "application", "app/views/application"
|
|
41
|
-
|
|
42
|
-
copy_file "new_contact.html.erb", "app/views/contacts/new.html.erb", :force => true
|
|
43
41
|
inject_into_file "app/assets/javascripts/application.js", "//= require tinymce.jquery\n//= require sbdevcore\n", :before => "//= require_tree ."
|
|
44
42
|
|
|
45
43
|
dev_mailer = <<-OPTS
|
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
=link_to "Admin Sign out", destroy_admin_session_path, :method => :delete
|
|
4
4
|
-else
|
|
5
5
|
=link_to "Admin Sign in", new_admin_session_path
|
|
6
|
-
| Site By: Adam Olsen
|
|
6
|
+
| Site By: Adam Olsen
|
|
7
|
+
=mail_to "aosalias@gmail.com", "aosalias@gmail.com"
|
|
@@ -2,8 +2,8 @@ ActionMailer::Base.smtp_settings = {
|
|
|
2
2
|
:address => "smtp.gmail.com",
|
|
3
3
|
:port => 587,
|
|
4
4
|
:domain => "sbdev.heroku.com",
|
|
5
|
-
:user_name => "
|
|
6
|
-
:password => "
|
|
5
|
+
:user_name => "sbdevmailer",
|
|
6
|
+
:password => "sbd3vftw",
|
|
7
7
|
:authentication => "plain",
|
|
8
8
|
:enable_starttls_auto => true
|
|
9
9
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
|
2
|
+
SimpleForm.setup do |config|
|
|
3
|
+
# Components used by the form builder to generate a complete input. You can remove
|
|
4
|
+
# any of them, change the order, or even add your own components to the stack.
|
|
5
|
+
config.components = [ :placeholder, :label_input, :hint, :error ]
|
|
6
|
+
|
|
7
|
+
# Default tag used on hints.
|
|
8
|
+
# config.hint_tag = :span
|
|
9
|
+
|
|
10
|
+
# CSS class to add to all hint tags.
|
|
11
|
+
# config.hint_class = :hint
|
|
12
|
+
|
|
13
|
+
# CSS class used on errors.
|
|
14
|
+
# config.error_class = :error
|
|
15
|
+
|
|
16
|
+
# Default tag used on errors.
|
|
17
|
+
# config.error_tag = :span
|
|
18
|
+
|
|
19
|
+
# Method used to tidy up errors.
|
|
20
|
+
# config.error_method = :first
|
|
21
|
+
|
|
22
|
+
# Default tag used for error notification helper.
|
|
23
|
+
# config.error_notification_tag = :p
|
|
24
|
+
|
|
25
|
+
# CSS class to add for error notification helper.
|
|
26
|
+
# config.error_notification_class = :error_notification
|
|
27
|
+
|
|
28
|
+
# ID to add for error notification helper.
|
|
29
|
+
# config.error_notification_id = nil
|
|
30
|
+
|
|
31
|
+
# You can wrap all inputs in a pre-defined tag.
|
|
32
|
+
# config.wrapper_tag = :div
|
|
33
|
+
|
|
34
|
+
# CSS class to add to all wrapper tags.
|
|
35
|
+
# config.wrapper_class = :input
|
|
36
|
+
|
|
37
|
+
# CSS class to add to the wrapper if the field has errors.
|
|
38
|
+
# config.wrapper_error_class = :field_with_errors
|
|
39
|
+
|
|
40
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
|
41
|
+
# config.collection_wrapper_tag = nil
|
|
42
|
+
|
|
43
|
+
# You can wrap each item in a collection of radio/check boxes with a tag, defaulting to span.
|
|
44
|
+
# config.item_wrapper_tag = :span
|
|
45
|
+
|
|
46
|
+
# Series of attempts to detect a default label method for collection.
|
|
47
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
|
48
|
+
|
|
49
|
+
# Series of attempts to detect a default value method for collection.
|
|
50
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
|
51
|
+
|
|
52
|
+
# How the label text should be generated altogether with the required text.
|
|
53
|
+
config.label_text = lambda { |label, required| "#{label} #{required}" }
|
|
54
|
+
|
|
55
|
+
# You can define the class to use on all labels. Default is nil.
|
|
56
|
+
# config.label_class = nil
|
|
57
|
+
|
|
58
|
+
# You can define the class to use on all forms. Default is simple_form.
|
|
59
|
+
config.form_class = "simple_form validate"
|
|
60
|
+
|
|
61
|
+
# Whether attributes are required by default (or not). Default is true.
|
|
62
|
+
config.required_by_default = true
|
|
63
|
+
|
|
64
|
+
# Tell browsers whether to use default HTML5 validations (novalidate option).
|
|
65
|
+
# Default is enabled.
|
|
66
|
+
config.browser_validations = true
|
|
67
|
+
|
|
68
|
+
# Determines whether HTML5 types (:email, :url, :search, :tel) and attributes
|
|
69
|
+
# (e.g. required) are used or not. True by default.
|
|
70
|
+
# Having this on in non-HTML5 compliant sites can cause odd behavior in
|
|
71
|
+
# HTML5-aware browsers such as Chrome.
|
|
72
|
+
# config.html5 = true
|
|
73
|
+
|
|
74
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
|
75
|
+
# to match as key, and the input type that will be used when the field name
|
|
76
|
+
# matches the regexp as value.
|
|
77
|
+
# config.input_mappings = { /count/ => :integer }
|
|
78
|
+
|
|
79
|
+
# Collection of methods to detect if a file type was given.
|
|
80
|
+
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
|
81
|
+
|
|
82
|
+
# Default priority for time_zone inputs.
|
|
83
|
+
# config.time_zone_priority = nil
|
|
84
|
+
|
|
85
|
+
# Default priority for country inputs.
|
|
86
|
+
# config.country_priority = nil
|
|
87
|
+
|
|
88
|
+
# Default size for text inputs.
|
|
89
|
+
config.default_input_size = 50
|
|
90
|
+
|
|
91
|
+
# When false, do not use translations for labels, hints or placeholders.
|
|
92
|
+
config.translate = true
|
|
93
|
+
end
|