lines-engine 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +3 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +49 -52
- data/app/controllers/lines/admin/articles_controller.rb +3 -3
- data/app/controllers/lines/application_controller.rb +1 -1
- data/app/controllers/lines/sessions_controller.rb +1 -1
- data/app/helpers/lines/application_helper.rb +13 -14
- data/app/views/kaminari/lines/_next_page.html.erb +1 -1
- data/app/views/kaminari/lines/_prev_page.html.erb +1 -1
- data/app/views/layouts/lines/application.html.erb +2 -2
- data/app/views/lines/admin/articles/_form.html.erb +29 -17
- data/app/views/lines/admin/articles/_picture_box.html.erb +2 -30
- data/app/views/lines/admin/articles/edit.html.erb +0 -13
- data/app/views/lines/admin/articles/index.html.erb +10 -10
- data/app/views/lines/admin/articles/new.html.erb +1 -15
- data/app/views/lines/admin/authors/_form.html.erb +11 -11
- data/app/views/lines/admin/authors/index.html.erb +4 -4
- data/app/views/lines/admin/authors/show.html.erb +1 -1
- data/app/views/lines/sessions/new.html.erb +4 -4
- data/app/views/lines/shared/_footer.html.erb +1 -1
- data/app/views/lines/shared/_navigation.html.erb +1 -1
- data/config/locales/de.yml +210 -0
- data/config/locales/kaminari.de.yml +8 -0
- data/config/locales/lines.de.yml +66 -0
- data/config/locales/lines.en.yml +66 -0
- data/lib/generators/lines/install_generator.rb +4 -0
- data/lib/lines/engine.rb +17 -0
- data/lib/lines/version.rb +1 -1
- data/lines.gemspec +2 -2
- data/spec/dummy/config/application.rb +1 -1
- data/spec/features/article_spec.rb +2 -2
- data/spec/spec_helper.rb +8 -3
- metadata +26 -47
- metadata.gz.sig +0 -0
- data/config/initializers/simple_form.rb +0 -144
- data/spec/dummy/db/migrate/20140505122014_base_migration.rb +0 -84
- data/spec/dummy/db/migrate/20140702160602_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +0 -31
- data/spec/dummy/db/migrate/20140702160603_add_missing_unique_indices.acts_as_taggable_on_engine.rb +0 -20
- data/spec/dummy/db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +0 -15
- data/spec/dummy/db/migrate/20141027143656_add_teaser_to_article.rb +0 -5
- data/spec/dummy/db/migrate/20150421093311_add_reset_password_fields_to_users.rb +0 -6
@@ -0,0 +1,66 @@
|
|
1
|
+
de:
|
2
|
+
lines:
|
3
|
+
buttons:
|
4
|
+
new_article: 'Neuer Artikel'
|
5
|
+
all_articles: 'Alle Artikel'
|
6
|
+
dashboard: 'Dashboard'
|
7
|
+
visit_blog: 'Zum Blog'
|
8
|
+
edit_article: 'Artikel bearbeiten'
|
9
|
+
preview: 'Vorschau'
|
10
|
+
save_article: 'Artikel speichern'
|
11
|
+
cancel: 'Abbrechen'
|
12
|
+
edit: 'Ändern'
|
13
|
+
all_authors: 'Alle Autoren'
|
14
|
+
new_author: 'Neuer Autor'
|
15
|
+
edit_author: 'Autor bearbeiten'
|
16
|
+
save_author: 'Autor speichern'
|
17
|
+
author: 'Autor'
|
18
|
+
publish: 'Veröffentlichen'
|
19
|
+
unpublish: 'Veröffentlichung rückgängig machen'
|
20
|
+
change_attachment: 'Anhang ändern'
|
21
|
+
remove_attachment: 'Anhang löschen'
|
22
|
+
attach_document: 'Dokument anhängen'
|
23
|
+
upload_image: 'Bild hochladen'
|
24
|
+
remove_hero_image: 'Artikel-Bild entfernen'
|
25
|
+
select_hero_image: 'Artikel-Bild wählen'
|
26
|
+
change: 'Ändern'
|
27
|
+
insert_image: 'Bild einfügen'
|
28
|
+
login: 'Anmelden'
|
29
|
+
logout: 'Abmelden'
|
30
|
+
formating_help: 'Formatierungshilfe'
|
31
|
+
about: 'Über Lines'
|
32
|
+
|
33
|
+
published_articles: 'Veröffentlichte Artikel'
|
34
|
+
unpublished_articles: 'Unveröffentlichte Artikel'
|
35
|
+
confirm: 'Wirklich löschen?'
|
36
|
+
additional_info: 'Weitere Informationen'
|
37
|
+
forgot_password: 'Passwort vergessen?'
|
38
|
+
or: 'oder'
|
39
|
+
go_back_to_blog: 'zurück zum Blog.'
|
40
|
+
please_login: 'Bitte melde dich an, wenn du den Administrationsbereich betreten willst.'
|
41
|
+
login_error: 'E-Mail oder Passwort ist ungültig.'
|
42
|
+
logged_in_as: 'Angemeldet als'
|
43
|
+
|
44
|
+
activerecord:
|
45
|
+
models:
|
46
|
+
lines/author:
|
47
|
+
one: 'Autor'
|
48
|
+
other: 'Autoren'
|
49
|
+
linens/article: 'Artikel'
|
50
|
+
attributes:
|
51
|
+
lines/author:
|
52
|
+
description: 'Beschreibung'
|
53
|
+
email: 'E-Mail'
|
54
|
+
gplus_profile: 'Webseite'
|
55
|
+
lines/article:
|
56
|
+
title: 'Titel'
|
57
|
+
sub_title: 'Untertitel'
|
58
|
+
teaser: 'Teaser'
|
59
|
+
content: 'Artikel Inhalt'
|
60
|
+
gplus_url: 'Website'
|
61
|
+
author_ids: 'Autoren'
|
62
|
+
lines/user:
|
63
|
+
email: 'E-Mail'
|
64
|
+
password: 'Passwort'
|
65
|
+
errors:
|
66
|
+
models:
|
@@ -0,0 +1,66 @@
|
|
1
|
+
en:
|
2
|
+
lines:
|
3
|
+
buttons:
|
4
|
+
new_article: 'New Article'
|
5
|
+
all_articles: 'All Articles'
|
6
|
+
dashboard: 'Dashboard'
|
7
|
+
visit_blog: 'Visit Blog'
|
8
|
+
edit_article: 'Edit Article'
|
9
|
+
save_article: 'Save Article'
|
10
|
+
cancel: 'Cancel'
|
11
|
+
edit: 'Edit'
|
12
|
+
preview: 'Preview'
|
13
|
+
all_authors: 'All authors'
|
14
|
+
new_author: 'New author'
|
15
|
+
edit_author: 'Edit author'
|
16
|
+
save_author: 'Save Author'
|
17
|
+
author: 'Author'
|
18
|
+
publish: 'Publish'
|
19
|
+
unpublish: 'Unpublish'
|
20
|
+
change_attachment: 'Change attachment'
|
21
|
+
remove_attachment: 'Remove attachment'
|
22
|
+
attach_document: 'Attach document'
|
23
|
+
upload_image: 'Upload an image'
|
24
|
+
remove_hero_image: 'Remove hero image'
|
25
|
+
select_hero_image: 'Select hero image'
|
26
|
+
change: 'Change'
|
27
|
+
insert_image: 'Insert image'
|
28
|
+
login: 'Login'
|
29
|
+
logout: 'Logout'
|
30
|
+
formating_help: 'Formatting Help'
|
31
|
+
about: 'About Lines'
|
32
|
+
|
33
|
+
published_articles: 'Published articles'
|
34
|
+
unpublished_articles: 'Unpublished articles'
|
35
|
+
confirm: 'Are you sure?'
|
36
|
+
additional_info: 'Additional Info'
|
37
|
+
forgot_password: 'Forgot password?'
|
38
|
+
or: 'or'
|
39
|
+
go_back_to_blog: 'go back to your blog.'
|
40
|
+
please_login: 'Please log in to access the administration area.'
|
41
|
+
login_error: 'Email or password is invalid'
|
42
|
+
logged_in_as: 'Logged in as'
|
43
|
+
|
44
|
+
activerecord:
|
45
|
+
models:
|
46
|
+
lines/author:
|
47
|
+
one: 'Author'
|
48
|
+
other: 'Authors'
|
49
|
+
linens/article: 'Article'
|
50
|
+
attributes:
|
51
|
+
lines/author:
|
52
|
+
description: 'Description'
|
53
|
+
email: 'E-Mail'
|
54
|
+
gplus_profile: 'Website'
|
55
|
+
lines/article:
|
56
|
+
title: 'Title'
|
57
|
+
sub_title: 'Subtitle'
|
58
|
+
teaser: 'Teaser'
|
59
|
+
content: 'Body copy'
|
60
|
+
gplus_url: 'Website'
|
61
|
+
author_ids: 'Authors'
|
62
|
+
lines/user:
|
63
|
+
email: 'E-Mail'
|
64
|
+
password: 'Password'
|
65
|
+
errors:
|
66
|
+
models:
|
data/lib/lines/engine.rb
CHANGED
@@ -34,6 +34,23 @@ module Lines
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
# Disable error wrapper around form fields
|
38
|
+
config.action_view.field_error_proc = Proc.new { |html_tag, instance|
|
39
|
+
class_attr_index = html_tag.index 'class="'
|
40
|
+
|
41
|
+
if class_attr_index
|
42
|
+
html_tag.insert class_attr_index+7, 'error '
|
43
|
+
else
|
44
|
+
html_tag.insert html_tag.index('>'), ' class="error"'
|
45
|
+
end
|
46
|
+
}
|
47
|
+
|
48
|
+
# Load locale files for I18n module
|
49
|
+
config.before_initialize do
|
50
|
+
I18n.enforce_available_locales = false
|
51
|
+
config.i18n.load_path += Dir["#{config.root}/config/locales/**/*.yml"]
|
52
|
+
end
|
53
|
+
|
37
54
|
# RSpec configuration for generators
|
38
55
|
config.generators do |g|
|
39
56
|
g.test_framework :rspec,
|
data/lib/lines/version.rb
CHANGED
data/lines.gemspec
CHANGED
@@ -31,7 +31,6 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_dependency 'jquery-rails', '< 5', '>= 3.1.0'
|
32
32
|
s.add_dependency 'acts-as-taggable-on', '~> 3.5', '>= 3.5'
|
33
33
|
s.add_dependency 'bcrypt', '~> 3.1.0', '>= 3.1.0'
|
34
|
-
s.add_dependency 'simple_form', '~> 3', '>= 3.0.0', '< 4'
|
35
34
|
s.add_dependency 'sitemap_generator', '~> 5.0.0', '>= 5.0.5'
|
36
35
|
s.add_dependency 'jquery-fileupload-rails', '~> 0.4.1', '>= 0.4.1'
|
37
36
|
s.add_dependency 'jquery-ui-rails', '~> 5', '>= 5.0.0'
|
@@ -43,9 +42,10 @@ Gem::Specification.new do |s|
|
|
43
42
|
s.add_dependency 'rails3-jquery-autocomplete', '~> 1.0.11', '>= 1.0.11'
|
44
43
|
s.add_dependency 'meta-tags', '~> 2.0.0', '>= 2.0.0'
|
45
44
|
s.add_dependency 'bcrypt-ruby', '>= 3.0.0', '<= 4'
|
45
|
+
s.add_dependency 'i18n', '~> 0.7.0'
|
46
46
|
s.add_runtime_dependency 'rails', ['>= 3', '< 5']
|
47
47
|
|
48
|
-
s.add_development_dependency 'mysql2', '~>
|
48
|
+
s.add_development_dependency 'mysql2', '~> 0.3.20', '< 0.3.4'
|
49
49
|
s.add_development_dependency 'rspec-rails', '~> 2.14.2', '< 3'
|
50
50
|
s.add_development_dependency 'rspec', '~> 2.14.1', '< 3'
|
51
51
|
|
@@ -23,7 +23,7 @@ module Dummy
|
|
23
23
|
|
24
24
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
25
25
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
26
|
-
|
26
|
+
config.i18n.default_locale = :en
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -46,8 +46,8 @@ feature 'user creates article' do
|
|
46
46
|
scenario 'with invalid attributes' do
|
47
47
|
click_on "Save"
|
48
48
|
expect(page).to have_content "Title can't be blank"
|
49
|
-
expect(page).to have_content "
|
50
|
-
expect(page).to have_content "
|
49
|
+
expect(page).to have_content "Body copy can't be blank"
|
50
|
+
expect(page).to have_content "Authors can't be blank"
|
51
51
|
#expect(page).to have_content "You have to either select an image or upload one."
|
52
52
|
end
|
53
53
|
|
data/spec/spec_helper.rb
CHANGED
@@ -43,9 +43,14 @@ RSpec.configure do |config|
|
|
43
43
|
config.order = "random"
|
44
44
|
|
45
45
|
config.before(:each, type: :routing) do
|
46
|
-
|
47
|
-
|
48
|
-
end
|
46
|
+
@routes = Utilizer::Engine.routes
|
47
|
+
assertion_instance.instance_variable_set(:@routes, Utilizer::Engine.routes)
|
48
|
+
end
|
49
|
+
|
50
|
+
config.before do
|
51
|
+
I18n.default_locale = :en
|
52
|
+
end
|
49
53
|
|
50
54
|
config.include AuthMacros
|
55
|
+
|
51
56
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lines-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Opoloo GbR
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
5BNWA8E1pTLFIGuj2vWGF3LmLHATeyBGXNDBRf6XZUG124zSK5pxkJ5zm2uBhu00
|
31
31
|
+pn0Gw==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-
|
33
|
+
date: 2015-09-17 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: orm_adapter
|
@@ -266,32 +266,6 @@ dependencies:
|
|
266
266
|
- - ">="
|
267
267
|
- !ruby/object:Gem::Version
|
268
268
|
version: 3.1.0
|
269
|
-
- !ruby/object:Gem::Dependency
|
270
|
-
name: simple_form
|
271
|
-
requirement: !ruby/object:Gem::Requirement
|
272
|
-
requirements:
|
273
|
-
- - "~>"
|
274
|
-
- !ruby/object:Gem::Version
|
275
|
-
version: '3'
|
276
|
-
- - ">="
|
277
|
-
- !ruby/object:Gem::Version
|
278
|
-
version: 3.0.0
|
279
|
-
- - "<"
|
280
|
-
- !ruby/object:Gem::Version
|
281
|
-
version: '4'
|
282
|
-
type: :runtime
|
283
|
-
prerelease: false
|
284
|
-
version_requirements: !ruby/object:Gem::Requirement
|
285
|
-
requirements:
|
286
|
-
- - "~>"
|
287
|
-
- !ruby/object:Gem::Version
|
288
|
-
version: '3'
|
289
|
-
- - ">="
|
290
|
-
- !ruby/object:Gem::Version
|
291
|
-
version: 3.0.0
|
292
|
-
- - "<"
|
293
|
-
- !ruby/object:Gem::Version
|
294
|
-
version: '4'
|
295
269
|
- !ruby/object:Gem::Dependency
|
296
270
|
name: sitemap_generator
|
297
271
|
requirement: !ruby/object:Gem::Requirement
|
@@ -506,6 +480,20 @@ dependencies:
|
|
506
480
|
- - "<="
|
507
481
|
- !ruby/object:Gem::Version
|
508
482
|
version: '4'
|
483
|
+
- !ruby/object:Gem::Dependency
|
484
|
+
name: i18n
|
485
|
+
requirement: !ruby/object:Gem::Requirement
|
486
|
+
requirements:
|
487
|
+
- - "~>"
|
488
|
+
- !ruby/object:Gem::Version
|
489
|
+
version: 0.7.0
|
490
|
+
type: :runtime
|
491
|
+
prerelease: false
|
492
|
+
version_requirements: !ruby/object:Gem::Requirement
|
493
|
+
requirements:
|
494
|
+
- - "~>"
|
495
|
+
- !ruby/object:Gem::Version
|
496
|
+
version: 0.7.0
|
509
497
|
- !ruby/object:Gem::Dependency
|
510
498
|
name: rails
|
511
499
|
requirement: !ruby/object:Gem::Requirement
|
@@ -532,20 +520,20 @@ dependencies:
|
|
532
520
|
requirements:
|
533
521
|
- - "~>"
|
534
522
|
- !ruby/object:Gem::Version
|
535
|
-
version:
|
536
|
-
- - "
|
523
|
+
version: 0.3.20
|
524
|
+
- - "<"
|
537
525
|
- !ruby/object:Gem::Version
|
538
|
-
version:
|
526
|
+
version: 0.3.4
|
539
527
|
type: :development
|
540
528
|
prerelease: false
|
541
529
|
version_requirements: !ruby/object:Gem::Requirement
|
542
530
|
requirements:
|
543
531
|
- - "~>"
|
544
532
|
- !ruby/object:Gem::Version
|
545
|
-
version:
|
546
|
-
- - "
|
533
|
+
version: 0.3.20
|
534
|
+
- - "<"
|
547
535
|
- !ruby/object:Gem::Version
|
548
|
-
version:
|
536
|
+
version: 0.3.4
|
549
537
|
- !ruby/object:Gem::Dependency
|
550
538
|
name: rspec-rails
|
551
539
|
requirement: !ruby/object:Gem::Requirement
|
@@ -747,9 +735,12 @@ files:
|
|
747
735
|
- config/initializers/carrierwave_test.rb
|
748
736
|
- config/initializers/kaminari_config.rb
|
749
737
|
- config/initializers/load_config.rb
|
750
|
-
- config/initializers/simple_form.rb
|
751
738
|
- config/lines_config.yml
|
739
|
+
- config/locales/de.yml
|
740
|
+
- config/locales/kaminari.de.yml
|
752
741
|
- config/locales/kaminari.en.yml
|
742
|
+
- config/locales/lines.de.yml
|
743
|
+
- config/locales/lines.en.yml
|
753
744
|
- config/routes.rb
|
754
745
|
- db/migrate/20140505122014_base_migration.rb
|
755
746
|
- db/migrate/20140702160602_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb
|
@@ -1264,12 +1255,6 @@ files:
|
|
1264
1255
|
- spec/dummy/config/locales/en.yml
|
1265
1256
|
- spec/dummy/config/routes.rb
|
1266
1257
|
- spec/dummy/config/secrets.yml
|
1267
|
-
- spec/dummy/db/migrate/20140505122014_base_migration.rb
|
1268
|
-
- spec/dummy/db/migrate/20140702160602_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb
|
1269
|
-
- spec/dummy/db/migrate/20140702160603_add_missing_unique_indices.acts_as_taggable_on_engine.rb
|
1270
|
-
- spec/dummy/db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
|
1271
|
-
- spec/dummy/db/migrate/20141027143656_add_teaser_to_article.rb
|
1272
|
-
- spec/dummy/db/migrate/20150421093311_add_reset_password_fields_to_users.rb
|
1273
1258
|
- spec/dummy/db/schema.rb
|
1274
1259
|
- spec/dummy/db/seeds.rb
|
1275
1260
|
- spec/dummy/lib/assets/.keep
|
@@ -1353,12 +1338,6 @@ test_files:
|
|
1353
1338
|
- spec/dummy/config/locales/en.yml
|
1354
1339
|
- spec/dummy/config/routes.rb
|
1355
1340
|
- spec/dummy/config/secrets.yml
|
1356
|
-
- spec/dummy/db/migrate/20140505122014_base_migration.rb
|
1357
|
-
- spec/dummy/db/migrate/20140702160602_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb
|
1358
|
-
- spec/dummy/db/migrate/20140702160603_add_missing_unique_indices.acts_as_taggable_on_engine.rb
|
1359
|
-
- spec/dummy/db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
|
1360
|
-
- spec/dummy/db/migrate/20141027143656_add_teaser_to_article.rb
|
1361
|
-
- spec/dummy/db/migrate/20150421093311_add_reset_password_fields_to_users.rb
|
1362
1341
|
- spec/dummy/db/schema.rb
|
1363
1342
|
- spec/dummy/db/seeds.rb
|
1364
1343
|
- spec/dummy/lib/assets/.keep
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,144 +0,0 @@
|
|
1
|
-
require 'simple_form'
|
2
|
-
|
3
|
-
# Use this setup block to configure all options available in SimpleForm.
|
4
|
-
SimpleForm.setup do |config|
|
5
|
-
# Wrappers are used by the form builder to generate a
|
6
|
-
# complete input. You can remove any component from the
|
7
|
-
# wrapper, change the order or even add your own to the
|
8
|
-
# stack. The options given below are used to wrap the
|
9
|
-
# whole input.
|
10
|
-
config.wrappers :default, :class => :input,
|
11
|
-
:hint_class => :field_with_hint, :error_class => :field_with_errors do |b|
|
12
|
-
## Extensions enabled by default
|
13
|
-
# Any of these extensions can be disabled for a
|
14
|
-
# given input by passing: `f.input EXTENSION_NAME => false`.
|
15
|
-
# You can make any of these extensions optional by
|
16
|
-
# renaming `b.use` to `b.optional`.
|
17
|
-
|
18
|
-
# Determines whether to use HTML5 (:email, :url, ...)
|
19
|
-
# and required attributes
|
20
|
-
b.use :html5
|
21
|
-
|
22
|
-
# Calculates placeholders automatically from I18n
|
23
|
-
# You can also pass a string as f.input :placeholder => "Placeholder"
|
24
|
-
b.use :placeholder
|
25
|
-
|
26
|
-
## Optional extensions
|
27
|
-
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
|
28
|
-
# to the input. If so, they will retrieve the values from the model
|
29
|
-
# if any exists. If you want to enable the lookup for any of those
|
30
|
-
# extensions by default, you can change `b.optional` to `b.use`.
|
31
|
-
|
32
|
-
# Calculates maxlength from length validations for string inputs
|
33
|
-
b.optional :maxlength
|
34
|
-
|
35
|
-
# Calculates pattern from format validations for string inputs
|
36
|
-
b.optional :pattern
|
37
|
-
|
38
|
-
# Calculates min and max from length validations for numeric inputs
|
39
|
-
b.optional :min_max
|
40
|
-
|
41
|
-
# Calculates readonly automatically from readonly attributes
|
42
|
-
b.optional :readonly
|
43
|
-
|
44
|
-
## Inputs
|
45
|
-
b.use :label_input
|
46
|
-
b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
|
47
|
-
b.use :error, :wrap_with => { :tag => :span, :class => :error }
|
48
|
-
end
|
49
|
-
|
50
|
-
# The default wrapper to be used by the FormBuilder.
|
51
|
-
config.default_wrapper = :default
|
52
|
-
|
53
|
-
# Define the way to render check boxes / radio buttons with labels.
|
54
|
-
# Defaults to :nested for bootstrap config.
|
55
|
-
# :inline => input + label
|
56
|
-
# :nested => label > input
|
57
|
-
config.boolean_style = :nested
|
58
|
-
|
59
|
-
# Default class for buttons
|
60
|
-
config.button_class = 'btn'
|
61
|
-
|
62
|
-
# Method used to tidy up errors. Specify any Rails Array method.
|
63
|
-
# :first lists the first message for each field.
|
64
|
-
# Use :to_sentence to list all errors for each field.
|
65
|
-
# config.error_method = :first
|
66
|
-
|
67
|
-
# Default tag used for error notification helper.
|
68
|
-
config.error_notification_tag = :div
|
69
|
-
|
70
|
-
# CSS class to add for error notification helper.
|
71
|
-
config.error_notification_class = 'alert alert-error'
|
72
|
-
|
73
|
-
# ID to add for error notification helper.
|
74
|
-
# config.error_notification_id = nil
|
75
|
-
|
76
|
-
# Series of attempts to detect a default label method for collection.
|
77
|
-
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
78
|
-
|
79
|
-
# Series of attempts to detect a default value method for collection.
|
80
|
-
# config.collection_value_methods = [ :id, :to_s ]
|
81
|
-
|
82
|
-
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
83
|
-
# config.collection_wrapper_tag = nil
|
84
|
-
|
85
|
-
# You can define the class to use on all collection wrappers. Defaulting to none.
|
86
|
-
# config.collection_wrapper_class = nil
|
87
|
-
|
88
|
-
# You can wrap each item in a collection of radio/check boxes with a tag,
|
89
|
-
# defaulting to :span. Please note that when using :boolean_style = :nested,
|
90
|
-
# SimpleForm will force this option to be a label.
|
91
|
-
# config.item_wrapper_tag = :span
|
92
|
-
|
93
|
-
# You can define a class to use in all item wrappers. Defaulting to none.
|
94
|
-
# config.item_wrapper_class = nil
|
95
|
-
|
96
|
-
# How the label text should be generated altogether with the required text.
|
97
|
-
# config.label_text = lambda { |label, required| "#{required} #{label}" }
|
98
|
-
|
99
|
-
# You can define the class to use on all labels. Default is nil.
|
100
|
-
config.label_class = 'control-label'
|
101
|
-
|
102
|
-
# You can define the class to use on all forms. Default is simple_form.
|
103
|
-
# config.form_class = :simple_form
|
104
|
-
|
105
|
-
# You can define which elements should obtain additional classes
|
106
|
-
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
107
|
-
|
108
|
-
# Whether attributes are required by default (or not). Default is true.
|
109
|
-
# config.required_by_default = true
|
110
|
-
|
111
|
-
# Tell browsers whether to use default HTML5 validations (novalidate option).
|
112
|
-
# Default is enabled.
|
113
|
-
config.browser_validations = false
|
114
|
-
|
115
|
-
# Collection of methods to detect if a file type was given.
|
116
|
-
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
117
|
-
|
118
|
-
# Custom mappings for input types. This should be a hash containing a regexp
|
119
|
-
# to match as key, and the input type that will be used when the field name
|
120
|
-
# matches the regexp as value.
|
121
|
-
# config.input_mappings = { /count/ => :integer }
|
122
|
-
|
123
|
-
# Custom wrappers for input types. This should be a hash containing an input
|
124
|
-
# type as key and the wrapper that will be used for all inputs with specified type.
|
125
|
-
# config.wrapper_mappings = { :string => :prepend }
|
126
|
-
|
127
|
-
# Default priority for time_zone inputs.
|
128
|
-
# config.time_zone_priority = nil
|
129
|
-
|
130
|
-
# Default priority for country inputs.
|
131
|
-
# config.country_priority = nil
|
132
|
-
|
133
|
-
# Default size for text inputs.
|
134
|
-
# config.default_input_size = 50
|
135
|
-
|
136
|
-
# When false, do not use translations for labels.
|
137
|
-
# config.translate_labels = true
|
138
|
-
|
139
|
-
# Automatically discover new inputs in Rails' autoload path.
|
140
|
-
# config.inputs_discovery = true
|
141
|
-
|
142
|
-
# Cache SimpleForm inputs discovery
|
143
|
-
# config.cache_discovery = !Rails.env.development?
|
144
|
-
end
|