jc_cms 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +40 -0
- data/app/assets/images/jc_cms/ok.png +0 -0
- data/app/assets/javascripts/jc_cms/application.js +16 -0
- data/app/assets/javascripts/jc_cms/bootstrap.js.coffee +4 -0
- data/app/assets/javascripts/jc_cms/dashboard/dashboard.js +2 -0
- data/app/assets/javascripts/jc_cms/dashboard/pages.js.coffee +3 -0
- data/app/assets/javascripts/jc_cms/home.js.coffee +3 -0
- data/app/assets/stylesheets/jc_cms/application.css +18 -0
- data/app/assets/stylesheets/jc_cms/bootstrap_and_overrides.css.less +34 -0
- data/app/assets/stylesheets/jc_cms/bootswatch.css.less +181 -0
- data/app/assets/stylesheets/jc_cms/dashboard/dashboard.css +4 -0
- data/app/assets/stylesheets/jc_cms/dashboard/pages.css.scss +3 -0
- data/app/assets/stylesheets/jc_cms/home.css.scss +3 -0
- data/app/assets/stylesheets/jc_cms/variables.css.less +301 -0
- data/app/cells/page/show.html.haml +4 -0
- data/app/cells/page_cell.rb +7 -0
- data/app/cells/pages_menu/show.html.haml +7 -0
- data/app/cells/pages_menu_cell.rb +8 -0
- data/app/controllers/jc_cms/application_controller.rb +17 -0
- data/app/controllers/jc_cms/dashboard/dashboard_controller.rb +10 -0
- data/app/controllers/jc_cms/dashboard/pages_controller.rb +42 -0
- data/app/controllers/jc_cms/home_controller.rb +6 -0
- data/app/helpers/jc_cms/application_helper.rb +4 -0
- data/app/helpers/jc_cms/dashboard/dashboard_helper.rb +4 -0
- data/app/models/ckeditor/asset.rb +7 -0
- data/app/models/ckeditor/attachment_file.rb +7 -0
- data/app/models/ckeditor/picture.rb +7 -0
- data/app/models/jc_cms/page.rb +11 -0
- data/app/models/jc_cms/user.rb +13 -0
- data/app/uploaders/ckeditor_attachment_file_uploader.rb +44 -0
- data/app/uploaders/ckeditor_picture_uploader.rb +55 -0
- data/app/views/jc_cms/dashboard/dashboard/index.html.erb +1 -0
- data/app/views/jc_cms/dashboard/pages/_form.html.haml +14 -0
- data/app/views/jc_cms/dashboard/pages/edit.html.haml +2 -0
- data/app/views/jc_cms/dashboard/pages/index.html.haml +25 -0
- data/app/views/jc_cms/dashboard/pages/new.html.haml +2 -0
- data/app/views/jc_cms/dashboard/pages/show.html.haml +2 -0
- data/app/views/jc_cms/home/index.html.haml +1 -0
- data/app/views/jc_cms/users/confirmations/new.html.erb +15 -0
- data/app/views/jc_cms/users/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/jc_cms/users/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/jc_cms/users/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/jc_cms/users/passwords/edit.html.erb +19 -0
- data/app/views/jc_cms/users/passwords/new.html.erb +15 -0
- data/app/views/jc_cms/users/registrations/edit.html.erb +22 -0
- data/app/views/jc_cms/users/registrations/new.html.erb +17 -0
- data/app/views/jc_cms/users/sessions/new.html.erb +13 -0
- data/app/views/jc_cms/users/shared/_links.erb +25 -0
- data/app/views/jc_cms/users/unlocks/new.html.erb +15 -0
- data/app/views/layouts/jc_cms/application.html.erb +90 -0
- data/app/views/layouts/jc_cms/jc_cms.html.erb +86 -0
- data/config/application.rb +63 -0
- data/config/boot.rb +6 -0
- data/config/environment.rb +5 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/ckeditor.rb +18 -0
- data/config/initializers/devise.rb +233 -0
- data/config/initializers/inflections.rb +15 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/simple_form.rb +142 -0
- data/config/initializers/simple_form_bootstrap.rb +45 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/devise.en.yml +58 -0
- data/config/locales/devise.pl.yml +62 -0
- data/config/locales/en.yml +5 -0
- data/config/locales/pl.yml +246 -0
- data/config/locales/simple_form.en.yml +26 -0
- data/config/locales/simple_form.pl.yml +36 -0
- data/config/routes.rb +14 -0
- data/db/migrate/20121107230840_create_pages.rb +20 -0
- data/db/migrate/20121112234336_create_ckeditor_assets.rb +26 -0
- data/db/migrate/20121118205852_devise_create_cms_users.rb +46 -0
- data/lib/jc_cms/engine.rb +5 -0
- data/lib/jc_cms/version.rb +3 -0
- data/lib/jc_cms.rb +4 -0
- data/lib/tasks/jc_cms_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/ckeditor/asset.rb +7 -0
- data/test/dummy/app/models/ckeditor/attachment_file.rb +7 -0
- data/test/dummy/app/models/ckeditor/picture.rb +7 -0
- data/test/dummy/app/uploaders/ckeditor_attachment_file_uploader.rb +42 -0
- data/test/dummy/app/uploaders/ckeditor_picture_uploader.rb +53 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +60 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/ckeditor.rb +18 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +6 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20121216213708_create_locations.jc_cms.rb +15 -0
- data/test/dummy/db/migrate/20121216213709_create_pages.jc_cms.rb +22 -0
- data/test/dummy/db/migrate/20121216213710_create_ckeditor_assets.jc_cms.rb +27 -0
- data/test/dummy/db/migrate/20121216213711_devise_create_cms_users.jc_cms.rb +47 -0
- data/test/dummy/db/migrate/20121216224201_create_ckeditor_assets.rb +26 -0
- data/test/dummy/db/schema.rb +70 -0
- data/test/dummy/log/development.log +21503 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/uploads/ckeditor/pictures/1/Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
- data/test/dummy/public/uploads/ckeditor/pictures/1/content_Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
- data/test/dummy/public/uploads/ckeditor/pictures/1/thumb_Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
- data/test/dummy/public/uploads/ckeditor/pictures/2/Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
- data/test/dummy/public/uploads/ckeditor/pictures/2/content_Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
- data/test/dummy/public/uploads/ckeditor/pictures/2/thumb_Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/C07/8C0/sprockets%2F64646b098528c9808ce15815c4496607 +0 -0
- data/test/dummy/tmp/cache/assets/C09/B90/sprockets%2F72126398325c80c78fd6678718473a84 +0 -0
- data/test/dummy/tmp/cache/assets/C46/520/sprockets%2Fee0865a4980d56313339e053a1218f20 +0 -0
- data/test/dummy/tmp/cache/assets/C59/490/sprockets%2F9600e95c2208a04b71582af3e8688854 +0 -0
- data/test/dummy/tmp/cache/assets/C5A/E90/sprockets%2F6d94f48b07e6690559f54061152154fa +0 -0
- data/test/dummy/tmp/cache/assets/C5D/6E0/sprockets%2F27494740406c86656742cf4e3128b9ce +0 -0
- data/test/dummy/tmp/cache/assets/C5E/310/sprockets%2Ff149155a6c5a09834cf158617963676a +0 -0
- data/test/dummy/tmp/cache/assets/C64/7E0/sprockets%2F4347701f6cd7118799d285377f38a5d2 +0 -0
- data/test/dummy/tmp/cache/assets/C66/760/sprockets%2Fc335e045119111f98632e9f62f6888f8 +0 -0
- data/test/dummy/tmp/cache/assets/C67/FE0/sprockets%2F67f52995585deb28a55c25394d601757 +0 -0
- data/test/dummy/tmp/cache/assets/C79/540/sprockets%2Fd40ecc5f0532937936b7c83101e43614 +0 -0
- data/test/dummy/tmp/cache/assets/C87/890/sprockets%2F6093c36edd443ed062379a9966c55023 +0 -0
- data/test/dummy/tmp/cache/assets/C8B/D60/sprockets%2Fa42a3175cd067427e36648605ee69f84 +0 -0
- data/test/dummy/tmp/cache/assets/C8E/6E0/sprockets%2Fa8b21b14c23c038a2473c2b58304530c +0 -0
- data/test/dummy/tmp/cache/assets/C92/500/sprockets%2F1058b7805167e75c2b97121d78e97de7 +0 -0
- data/test/dummy/tmp/cache/assets/CA3/130/sprockets%2F469beac37850c6141bf41882018b601b +0 -0
- data/test/dummy/tmp/cache/assets/CA7/3B0/sprockets%2Ffd1e83a3755907b8a606f30a41307a19 +0 -0
- data/test/dummy/tmp/cache/assets/CB0/F70/sprockets%2Fd9043423e669960cf03ae665c5b427a3 +0 -0
- data/test/dummy/tmp/cache/assets/CB4/4B0/sprockets%2F5847a771ed4b27500f51e73a91e6b934 +0 -0
- data/test/dummy/tmp/cache/assets/CB9/650/sprockets%2Fec2d52e0987701dd208d18c8996e3351 +0 -0
- data/test/dummy/tmp/cache/assets/CBB/D10/sprockets%2F1b2c89754d436451d980455e8fca09a7 +0 -0
- data/test/dummy/tmp/cache/assets/CBB/F10/sprockets%2F5ebb0567b58c43c0773b686546b295c8 +0 -0
- data/test/dummy/tmp/cache/assets/CC7/A50/sprockets%2F81f095124c73bdb22433c6a65a3d10c3 +0 -0
- data/test/dummy/tmp/cache/assets/CC9/B70/sprockets%2Ff9856126986468185e48fbc6b2da155e +0 -0
- data/test/dummy/tmp/cache/assets/CCD/E70/sprockets%2Fb6162d50af74a01c7cd2565082d3e181 +0 -0
- data/test/dummy/tmp/cache/assets/CD0/070/sprockets%2F5412439eb13284f0a3b08c28273febd1 +0 -0
- data/test/dummy/tmp/cache/assets/CD0/5B0/sprockets%2F681bb88d099369e235d531892e9d9a8f +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CD9/D10/sprockets%2F33ba9401ac4819f676d06ea642e614d3 +0 -0
- data/test/dummy/tmp/cache/assets/CDE/F50/sprockets%2Fa7e186ae00816cf344cae8394246a087 +0 -0
- data/test/dummy/tmp/cache/assets/CDF/0D0/sprockets%2Fe45b3bd832715a12e9c1f6cc91470838 +0 -0
- data/test/dummy/tmp/cache/assets/CE2/8E0/sprockets%2F9b322b80baee847d191297c1be634863 +0 -0
- data/test/dummy/tmp/cache/assets/CE4/0B0/sprockets%2F58e822726dd1560cff2cd626542c5c74 +0 -0
- data/test/dummy/tmp/cache/assets/CE9/8E0/sprockets%2Fd2c16c246539568db289da6c98fc1026 +0 -0
- data/test/dummy/tmp/cache/assets/CEB/010/sprockets%2F84229e36d60efb34c64354c4c9eb3938 +0 -0
- data/test/dummy/tmp/cache/assets/CEC/D50/sprockets%2F92c13f7d07456dad81dd5246bd859349 +0 -0
- data/test/dummy/tmp/cache/assets/CEE/CA0/sprockets%2Feda89fff0c47312925a8918192e178c2 +0 -0
- data/test/dummy/tmp/cache/assets/CEF/E90/sprockets%2F92f31af9445568181cf8068a5a5a9f4e +0 -0
- data/test/dummy/tmp/cache/assets/CF4/520/sprockets%2F1114f42d76e827c6a9758966bf9dbb45 +0 -0
- data/test/dummy/tmp/cache/assets/D00/DB0/sprockets%2F88e2ffc1c52a23d43921baf530d71315 +0 -0
- data/test/dummy/tmp/cache/assets/D01/170/sprockets%2F0b5555cc3795f64eaaab40272c9a0443 +0 -0
- data/test/dummy/tmp/cache/assets/D03/780/sprockets%2F397bfee3e1000d0581f8c375bb0245a7 +0 -0
- data/test/dummy/tmp/cache/assets/D03/C60/sprockets%2F97f47db90e6fc62c4d7c6387828397d5 +0 -0
- data/test/dummy/tmp/cache/assets/D08/060/sprockets%2F69dde8caa562064090b325ae8045bc92 +0 -0
- data/test/dummy/tmp/cache/assets/D09/2C0/sprockets%2F360a0f84dbf6b2a3106df55d0d881469 +0 -0
- data/test/dummy/tmp/cache/assets/D0D/560/sprockets%2Fae539b122faaf679d9e32247e050682a +0 -0
- data/test/dummy/tmp/cache/assets/D0F/C80/sprockets%2F5780677e72a94f1af9da0e24a30e84c0 +0 -0
- data/test/dummy/tmp/cache/assets/D11/0A0/sprockets%2Ff05fb4198cd543304f9cd14a412be969 +0 -0
- data/test/dummy/tmp/cache/assets/D11/DA0/sprockets%2F601da0adf47d60282972e473b64eeb97 +0 -0
- data/test/dummy/tmp/cache/assets/D15/2C0/sprockets%2Fdeb34df73f715b491c843655606b06ee +0 -0
- data/test/dummy/tmp/cache/assets/D17/690/sprockets%2Fa75ae0c2703ef284758d27620f84ef6d +0 -0
- data/test/dummy/tmp/cache/assets/D1E/950/sprockets%2F91d9e2e8575267cea4a2cb342669d67c +0 -0
- data/test/dummy/tmp/cache/assets/D20/670/sprockets%2F5f24e9ae131b4909f779ead84d4474a7 +0 -0
- data/test/dummy/tmp/cache/assets/D28/AA0/sprockets%2Fe9f5960dc9465591182cd6c1ff1a98c8 +0 -0
- data/test/dummy/tmp/cache/assets/D2A/1B0/sprockets%2F042e74be6a1c2862c1fbdd433a1127d6 +0 -0
- data/test/dummy/tmp/cache/assets/D2A/5F0/sprockets%2Ff4dcb9ce765ea4667a6925613c68289f +0 -0
- data/test/dummy/tmp/cache/assets/D2C/CB0/sprockets%2F12d3089b5b4aed1055b9413ee05cfd04 +0 -0
- data/test/dummy/tmp/cache/assets/D2F/6A0/sprockets%2Fbe0da0721240eba9ec280c3f65595d42 +0 -0
- data/test/dummy/tmp/cache/assets/D30/BA0/sprockets%2F7434264acdbb0a912f2325a92dd625ee +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D36/A00/sprockets%2F794a48f8e74df2f775ab5e289f385a87 +0 -0
- data/test/dummy/tmp/cache/assets/D36/C00/sprockets%2F31d5b05a9ef64c11c99038b8f3ea024c +0 -0
- data/test/dummy/tmp/cache/assets/D39/370/sprockets%2F8617aa36e80a726daf01548abecf7514 +0 -0
- data/test/dummy/tmp/cache/assets/D3B/D80/sprockets%2Fb54b6d7431d3fa350fd4860ec48376ba +0 -0
- data/test/dummy/tmp/cache/assets/D3C/2F0/sprockets%2F51cdd57d7fb8dd62a0c62c76b3185621 +0 -0
- data/test/dummy/tmp/cache/assets/D44/880/sprockets%2F4a4c96693e3a1a39c3f8b91228eeb54c +0 -0
- data/test/dummy/tmp/cache/assets/D44/BF0/sprockets%2Fa595dfd60f55332e66ed0e2a536883ad +0 -0
- data/test/dummy/tmp/cache/assets/D45/960/sprockets%2F36d2078b56c85b2e7e83bb1ebc3509f8 +0 -0
- data/test/dummy/tmp/cache/assets/D45/B00/sprockets%2Fc738c84515abd254264ebce779ed63d0 +0 -0
- data/test/dummy/tmp/cache/assets/D45/F80/sprockets%2Fe43ea8a1ded751a980c53a850889de33 +0 -0
- data/test/dummy/tmp/cache/assets/D48/7D0/sprockets%2F36f7c25f24e292b18fde7638f08aa9c0 +0 -0
- data/test/dummy/tmp/cache/assets/D48/C10/sprockets%2F6fcf9db784da5ae76551831162eb76c1 +0 -0
- data/test/dummy/tmp/cache/assets/D4C/860/sprockets%2F7e45fa7bc38e7fe824e248f2a496f300 +0 -0
- data/test/dummy/tmp/cache/assets/D4C/E70/sprockets%2Fd925ba6277eb18ccee7826175149d5ce +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D52/550/sprockets%2F0e729ff182c56eac9cb66f61885ac746 +0 -0
- data/test/dummy/tmp/cache/assets/D53/720/sprockets%2F06e82479780b08ef39ee251d5ff1ecf8 +0 -0
- data/test/dummy/tmp/cache/assets/D54/A00/sprockets%2F3df92468167df36c8fe4985fca50cd16 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D5E/CC0/sprockets%2F11ff861f4f3307eb12da5333f34a9aba +0 -0
- data/test/dummy/tmp/cache/assets/D5F/F70/sprockets%2F4b083a83b2d19280ecf82d80cb0ec35a +0 -0
- data/test/dummy/tmp/cache/assets/D60/D30/sprockets%2Ff42c2090b3b42edbb29b14b8ca8c9381 +0 -0
- data/test/dummy/tmp/cache/assets/D63/FE0/sprockets%2F7c06e0b1e3f36943b4b6ac29ea2f03b8 +0 -0
- data/test/dummy/tmp/cache/assets/D70/260/sprockets%2Fec4232a583d51ebb6f61f3733dfe773d +0 -0
- data/test/dummy/tmp/cache/assets/D70/E40/sprockets%2F9be15c072df1cf29447f13c75fcea462 +0 -0
- data/test/dummy/tmp/cache/assets/D72/8B0/sprockets%2Fa6a44539fe3bd2f93df1d758acc81640 +0 -0
- data/test/dummy/tmp/cache/assets/D72/E50/sprockets%2F9fb77b92c0d85bef0e58e52d1c4202b9 +0 -0
- data/test/dummy/tmp/cache/assets/D73/5A0/sprockets%2F7c6389b8bb1dd2a68aa4c36734cb98e0 +0 -0
- data/test/dummy/tmp/cache/assets/D75/360/sprockets%2F293ef946e8f2bd1c0302fd97cc43ea39 +0 -0
- data/test/dummy/tmp/cache/assets/D7A/B20/sprockets%2F4fae9bff57ef326bc3263b7864730b5f +0 -0
- data/test/dummy/tmp/cache/assets/D7B/9A0/sprockets%2F769e91c33d9359c2dc9a1aa64ebf89b0 +0 -0
- data/test/dummy/tmp/cache/assets/D7D/C10/sprockets%2Fb0b77d34568b99bf0e1bf912ec8cf378 +0 -0
- data/test/dummy/tmp/cache/assets/D7E/DD0/sprockets%2F971cab035c4a28fc46bb20ab01a8c14c +0 -0
- data/test/dummy/tmp/cache/assets/D84/9E0/sprockets%2F57ec681758c9ce6c50bad69b835bf9c3 +0 -0
- data/test/dummy/tmp/cache/assets/D8D/E00/sprockets%2Ff08e1adc2ab7550fabf4210b7cf21587 +0 -0
- data/test/dummy/tmp/cache/assets/D8E/E50/sprockets%2F3a83cb2dd3c1df4c4e45037bef17a244 +0 -0
- data/test/dummy/tmp/cache/assets/D94/C30/sprockets%2Fec42b5f7ac9042dd6d3ce26f002de616 +0 -0
- data/test/dummy/tmp/cache/assets/D98/380/sprockets%2Fcf1c474c0bb8c73996ac31a5db5465ac +0 -0
- data/test/dummy/tmp/cache/assets/D99/BE0/sprockets%2Fd7a16c2e0d6d3b4265bb4d6eb5be7484 +0 -0
- data/test/dummy/tmp/cache/assets/D9F/7A0/sprockets%2F419e4ca288cce5faa35ec702cce63674 +0 -0
- data/test/dummy/tmp/cache/assets/DA0/CE0/sprockets%2F9f2b2767dfb1bbfd32ed538278a0f72a +0 -0
- data/test/dummy/tmp/cache/assets/DA1/480/sprockets%2F4c7b27d4ebedd93a0da0628e36f6809c +0 -0
- data/test/dummy/tmp/cache/assets/DA2/CD0/sprockets%2Fa99c7b02f4a462d48f68ac7a1d24dbf7 +0 -0
- data/test/dummy/tmp/cache/assets/DA3/F20/sprockets%2Fc05a73e30703be304fd9fe8db4cf598e +0 -0
- data/test/dummy/tmp/cache/assets/DB9/3D0/sprockets%2F02571f86c7cfe0fc11bfc3d1bbb1c208 +0 -0
- data/test/dummy/tmp/cache/assets/DC4/540/sprockets%2Fadee232b4e5d1dc4537d796d64ac2ac1 +0 -0
- data/test/dummy/tmp/cache/assets/DC4/590/sprockets%2F2dc05e1dc0a167e4735ac1dd76dafa97 +0 -0
- data/test/dummy/tmp/cache/assets/DC5/FE0/sprockets%2Fe41e0b207ecd4cd2e8284cfbb30e557e +0 -0
- data/test/dummy/tmp/cache/assets/DC7/100/sprockets%2F11ac5c4013dd9e91fde638af50c3f1ff +0 -0
- data/test/dummy/tmp/cache/assets/DC7/990/sprockets%2F5c956d26ecca1dfe4fb9eaa394301f01 +0 -0
- data/test/dummy/tmp/cache/assets/DCA/190/sprockets%2F18a3206d6ecdd1eb90afb684ae9ec345 +0 -0
- data/test/dummy/tmp/cache/assets/DCE/380/sprockets%2Fb8f50d4e2dedd941e46a4bc23dd7e391 +0 -0
- data/test/dummy/tmp/cache/assets/DDA/D50/sprockets%2F61e799bee7414e75bafc34fae4bd049f +0 -0
- data/test/dummy/tmp/cache/assets/DDB/B60/sprockets%2Fb9f5599ad317c420899cebe81bbefa3d +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DDD/EA0/sprockets%2Ff7ece9144ddb7c4e33667f76caa8d3b6 +0 -0
- data/test/dummy/tmp/cache/assets/DFF/1B0/sprockets%2Fc12c9bb21df8b6797b49adc1c7aaf8e2 +0 -0
- data/test/dummy/tmp/cache/assets/E04/5E0/sprockets%2F38bfd5bbb49de4a45f5a51971cdf6be5 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E05/CD0/sprockets%2Fc8ea7dcae5c0f1974e75cbf110d9ca99 +0 -0
- data/test/dummy/tmp/cache/assets/E06/F80/sprockets%2Fc89d2b450fccd9e2efcdcb0446b4679d +0 -0
- data/test/dummy/tmp/cache/assets/E08/BA0/sprockets%2Fbe24d2682f98eea5a7fa60fa62fded56 +0 -0
- data/test/dummy/tmp/cache/assets/E1F/2A0/sprockets%2F0cf165eccecfa19ad5dc2944403a1cfd +0 -0
- data/test/dummy/tmp/cache/assets/E26/430/sprockets%2Fc2823ee45c2582bcec34a905fcacbdef +0 -0
- data/test/dummy/tmp/cache/assets/E2B/A30/sprockets%2Fdccc7eaad9b961b83f453b65b4b5cc0f +0 -0
- data/test/dummy/tmp/cache/assets/E39/4E0/sprockets%2Fee2fd1f87ee7cd516ea52e8c1ebc9e16 +0 -0
- data/test/dummy/tmp/cache/assets/E3B/EB0/sprockets%2Fa8e36f0a9d6869490d5da55cbcfccfec +0 -0
- data/test/dummy/tmp/cache/assets/E58/840/sprockets%2Fadeedcbe177fa92bf217db08f504d5bd +0 -0
- data/test/dummy/tmp/cache/assets/E7B/380/sprockets%2F1bccb9b3a0bf0b9d92f3fad21fafca56 +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/fixtures/jc_cms/cms_users.yml +11 -0
- data/test/functional/jc_cms/dashboard/dashboard_controller_test.rb +11 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/jc_cms_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/helpers/jc_cms/dashboard/dashboard_helper_test.rb +6 -0
- data/test/unit/jc_cms/cms_user_test.rb +9 -0
- metadata +525 -0
@@ -0,0 +1,86 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<title><%= content_for?(:title) ? yield(:title) : "JcCms" %></title>
|
8
|
+
<%= csrf_meta_tags %>
|
9
|
+
<%= yield(:head) %>
|
10
|
+
|
11
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
12
|
+
<!--[if lt IE 9]>
|
13
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
14
|
+
<![endif]-->
|
15
|
+
|
16
|
+
<%= stylesheet_link_tag "jc_cms/application", :media => "all" %>
|
17
|
+
|
18
|
+
<!-- For third-generation iPad with high-resolution Retina display: -->
|
19
|
+
<!-- Size should be 144 x 144 pixels -->
|
20
|
+
<%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
|
21
|
+
|
22
|
+
<!-- For iPhone with high-resolution Retina display: -->
|
23
|
+
<!-- Size should be 114 x 114 pixels -->
|
24
|
+
<%= favicon_link_tag 'images/apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>
|
25
|
+
|
26
|
+
<!-- For first- and second-generation iPad: -->
|
27
|
+
<!-- Size should be 72 x 72 pixels -->
|
28
|
+
<%= favicon_link_tag 'images/apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>
|
29
|
+
|
30
|
+
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
|
31
|
+
<!-- Size should be 57 x 57 pixels -->
|
32
|
+
<%= favicon_link_tag 'images/apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>
|
33
|
+
|
34
|
+
<!-- For all other devices -->
|
35
|
+
<!-- Size should be 32 x 32 pixels -->
|
36
|
+
<%= favicon_link_tag 'images/favicon.ico', :rel => 'shortcut icon' %>
|
37
|
+
</head>
|
38
|
+
<body>
|
39
|
+
|
40
|
+
<div class="navbar navbar-fixed-top">
|
41
|
+
<div class="navbar-inner">
|
42
|
+
<div class="container-fluid">
|
43
|
+
<a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
|
44
|
+
<span class="icon-bar"></span>
|
45
|
+
<span class="icon-bar"></span>
|
46
|
+
<span class="icon-bar"></span>
|
47
|
+
</a>
|
48
|
+
<%= link_to "JcCms", dashboard_root_path, :class => "brand" %>
|
49
|
+
<div class="container-fluid nav-collapse">
|
50
|
+
<ul class="nav">
|
51
|
+
<li><%= link_to "Strony", dashboard_pages_path %></li>
|
52
|
+
</ul>
|
53
|
+
</div><!--/.nav-collapse -->
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="container-fluid">
|
59
|
+
<div class="row-fluid">
|
60
|
+
<div class="span3">
|
61
|
+
<div class="well sidebar-nav">
|
62
|
+
<ul class="nav nav-list">
|
63
|
+
<li class="nav-header"><%= t("actions.sidebar") %></li>
|
64
|
+
<li><%= link_to t("controllers.dashboard.pages.add_new"), new_dashboard_page_path %></li>
|
65
|
+
</ul>
|
66
|
+
</div><!--/.well -->
|
67
|
+
</div><!--/span-->
|
68
|
+
<div class="span9">
|
69
|
+
<%#= bootstrap_flash %>
|
70
|
+
<%= yield %>
|
71
|
+
</div>
|
72
|
+
</div><!--/row-->
|
73
|
+
|
74
|
+
<footer>
|
75
|
+
<p>© JC Cms 2012</p>
|
76
|
+
</footer>
|
77
|
+
|
78
|
+
</div> <!-- /container -->
|
79
|
+
|
80
|
+
<!-- Javascripts
|
81
|
+
================================================== -->
|
82
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
83
|
+
<%= javascript_include_tag "jc_cms/application" %>
|
84
|
+
|
85
|
+
</body>
|
86
|
+
</html>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
if defined?(Bundler)
|
6
|
+
# If you precompile assets before deploying to production, use this line
|
7
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
8
|
+
# If you want your assets lazily compiled in production, use this line
|
9
|
+
# Bundler.require(:default, :assets, Rails.env)
|
10
|
+
end
|
11
|
+
|
12
|
+
module JcCms
|
13
|
+
class Application < Rails::Application
|
14
|
+
# Settings in config/environments/* take precedence over those specified here.
|
15
|
+
# Application configuration should go into files in config/initializers
|
16
|
+
# -- all .rb files in that directory are automatically loaded.
|
17
|
+
|
18
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
19
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
20
|
+
|
21
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
22
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
23
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
24
|
+
|
25
|
+
# Activate observers that should always be running.
|
26
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
27
|
+
|
28
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
29
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
30
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
31
|
+
|
32
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
33
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
|
+
config.i18n.default_locale = :pl
|
35
|
+
|
36
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
+
config.encoding = "utf-8"
|
38
|
+
|
39
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
+
config.filter_parameters += [:password]
|
41
|
+
|
42
|
+
# Enable escaping HTML in JSON.
|
43
|
+
config.active_support.escape_html_entities_in_json = true
|
44
|
+
|
45
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
46
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
47
|
+
# like if you have constraints or database-specific column types
|
48
|
+
# config.active_record.schema_format = :sql
|
49
|
+
|
50
|
+
# Enforce whitelist mode for mass assignment.
|
51
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
52
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
53
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
54
|
+
config.active_record.whitelist_attributes = true
|
55
|
+
|
56
|
+
# Enable the asset pipeline
|
57
|
+
config.assets.enabled = true
|
58
|
+
|
59
|
+
# Version of your assets, change this if you want to expire all your assets
|
60
|
+
config.assets.version = '1.0'
|
61
|
+
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
|
62
|
+
end
|
63
|
+
end
|
data/config/boot.rb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Use this hook to configure ckeditor
|
2
|
+
if Object.const_defined?("Ckeditor")
|
3
|
+
Ckeditor.setup do |config|
|
4
|
+
# ==> ORM configuration
|
5
|
+
# Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
|
6
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
7
|
+
# available as additional gems.
|
8
|
+
require "ckeditor/orm/active_record"
|
9
|
+
|
10
|
+
# Allowed image file types for upload.
|
11
|
+
# Set to nil or [] (empty array) for all file types
|
12
|
+
# config.image_file_types = ["jpg", "jpeg", "png", "gif", "tiff"]
|
13
|
+
|
14
|
+
# Allowed attachment file types for upload.
|
15
|
+
# Set to nil or [] (empty array) for all file types
|
16
|
+
# config.attachment_file_types = ["doc", "docx", "xls", "odt", "ods", "pdf", "rar", "zip", "tar", "swf"]
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,233 @@
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
|
+
# Many of these configuration options can be set straight in your model.
|
3
|
+
Devise.setup do |config|
|
4
|
+
# ==> Mailer Configuration
|
5
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
6
|
+
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
7
|
+
config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
|
8
|
+
|
9
|
+
# Configure the class responsible to send e-mails.
|
10
|
+
# config.mailer = "Devise::Mailer"
|
11
|
+
|
12
|
+
config.router_name = :jc_cms
|
13
|
+
# ==> ORM configuration
|
14
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
15
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
16
|
+
# available as additional gems.
|
17
|
+
require 'devise/orm/active_record'
|
18
|
+
|
19
|
+
# ==> Configuration for any authentication mechanism
|
20
|
+
# Configure which keys are used when authenticating a user. The default is
|
21
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
22
|
+
# authenticating a user, both parameters are required. Remember that those
|
23
|
+
# parameters are used only when authenticating and not when retrieving from
|
24
|
+
# session. If you need permissions, you should implement that in a before filter.
|
25
|
+
# You can also supply a hash where the value is a boolean determining whether
|
26
|
+
# or not authentication should be aborted when the value is not present.
|
27
|
+
# config.authentication_keys = [ :email ]
|
28
|
+
|
29
|
+
# Configure parameters from the request object used for authentication. Each entry
|
30
|
+
# given should be a request method and it will automatically be passed to the
|
31
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
32
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
33
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
34
|
+
# config.request_keys = []
|
35
|
+
|
36
|
+
# Configure which authentication keys should be case-insensitive.
|
37
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
38
|
+
# to authenticate or find a user. Default is :email.
|
39
|
+
config.case_insensitive_keys = [ :email ]
|
40
|
+
|
41
|
+
# Configure which authentication keys should have whitespace stripped.
|
42
|
+
# These keys will have whitespace before and after removed upon creating or
|
43
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
44
|
+
config.strip_whitespace_keys = [ :email ]
|
45
|
+
|
46
|
+
# Tell if authentication through request.params is enabled. True by default.
|
47
|
+
# It can be set to an array that will enable params authentication only for the
|
48
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
49
|
+
# enable it only for database (email + password) authentication.
|
50
|
+
# config.params_authenticatable = true
|
51
|
+
|
52
|
+
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
53
|
+
# It can be set to an array that will enable http authentication only for the
|
54
|
+
# given strategies, for example, `config.http_authenticatable = [:token]` will
|
55
|
+
# enable it only for token authentication.
|
56
|
+
# config.http_authenticatable = false
|
57
|
+
|
58
|
+
# If http headers should be returned for AJAX requests. True by default.
|
59
|
+
# config.http_authenticatable_on_xhr = true
|
60
|
+
|
61
|
+
# The realm used in Http Basic Authentication. "Application" by default.
|
62
|
+
# config.http_authentication_realm = "Application"
|
63
|
+
|
64
|
+
# It will change confirmation, password recovery and other workflows
|
65
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
66
|
+
# Does not affect registerable.
|
67
|
+
# config.paranoid = true
|
68
|
+
|
69
|
+
# By default Devise will store the user in session. You can skip storage for
|
70
|
+
# :http_auth and :token_auth by adding those symbols to the array below.
|
71
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
72
|
+
# may want to disable generating routes to Devise's sessions controller by
|
73
|
+
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
74
|
+
config.skip_session_storage = [:http_auth]
|
75
|
+
|
76
|
+
# ==> Configuration for :database_authenticatable
|
77
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
78
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
79
|
+
#
|
80
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
81
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
82
|
+
# a value less than 10 in other environments.
|
83
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
84
|
+
|
85
|
+
# Setup a pepper to generate the encrypted password.
|
86
|
+
# config.pepper = "8cfc7e0e91da1aa9471a8fb588d253513d642100579d22fd805d5a332191f13df5175c1d214e768cfa66c5fe5eb32b758321a34dd508fd153cc8032200bb64c3"
|
87
|
+
|
88
|
+
# ==> Configuration for :confirmable
|
89
|
+
# A period that the user is allowed to access the website even without
|
90
|
+
# confirming his account. For instance, if set to 2.days, the user will be
|
91
|
+
# able to access the website for two days without confirming his account,
|
92
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
93
|
+
# the user cannot access the website without confirming his account.
|
94
|
+
# config.allow_unconfirmed_access_for = 2.days
|
95
|
+
|
96
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
97
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
98
|
+
# db field (see migrations). Until confirmed new email is stored in
|
99
|
+
# unconfirmed email column, and copied to email column on successful confirmation.
|
100
|
+
config.reconfirmable = true
|
101
|
+
|
102
|
+
# Defines which key will be used when confirming an account
|
103
|
+
# config.confirmation_keys = [ :email ]
|
104
|
+
|
105
|
+
# ==> Configuration for :rememberable
|
106
|
+
# The time the user will be remembered without asking for credentials again.
|
107
|
+
# config.remember_for = 2.weeks
|
108
|
+
|
109
|
+
# If true, extends the user's remember period when remembered via cookie.
|
110
|
+
# config.extend_remember_period = false
|
111
|
+
|
112
|
+
# Options to be passed to the created cookie. For instance, you can set
|
113
|
+
# :secure => true in order to force SSL only cookies.
|
114
|
+
# config.rememberable_options = {}
|
115
|
+
|
116
|
+
# ==> Configuration for :validatable
|
117
|
+
# Range for password length. Default is 6..128.
|
118
|
+
# config.password_length = 6..128
|
119
|
+
|
120
|
+
# Email regex used to validate email formats. It simply asserts that
|
121
|
+
# an one (and only one) @ exists in the given string. This is mainly
|
122
|
+
# to give user feedback and not to assert the e-mail validity.
|
123
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
124
|
+
|
125
|
+
# ==> Configuration for :timeoutable
|
126
|
+
# The time you want to timeout the user session without activity. After this
|
127
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
128
|
+
# config.timeout_in = 30.minutes
|
129
|
+
|
130
|
+
# If true, expires auth token on session timeout.
|
131
|
+
# config.expire_auth_token_on_timeout = false
|
132
|
+
|
133
|
+
# ==> Configuration for :lockable
|
134
|
+
# Defines which strategy will be used to lock an account.
|
135
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
136
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
137
|
+
# config.lock_strategy = :failed_attempts
|
138
|
+
|
139
|
+
# Defines which key will be used when locking and unlocking an account
|
140
|
+
# config.unlock_keys = [ :email ]
|
141
|
+
|
142
|
+
# Defines which strategy will be used to unlock an account.
|
143
|
+
# :email = Sends an unlock link to the user email
|
144
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
145
|
+
# :both = Enables both strategies
|
146
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
147
|
+
# config.unlock_strategy = :both
|
148
|
+
|
149
|
+
# Number of authentication tries before locking an account if lock_strategy
|
150
|
+
# is failed attempts.
|
151
|
+
# config.maximum_attempts = 20
|
152
|
+
|
153
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
154
|
+
# config.unlock_in = 1.hour
|
155
|
+
|
156
|
+
# ==> Configuration for :recoverable
|
157
|
+
#
|
158
|
+
# Defines which key will be used when recovering the password for an account
|
159
|
+
# config.reset_password_keys = [ :email ]
|
160
|
+
|
161
|
+
# Time interval you can reset your password with a reset password key.
|
162
|
+
# Don't put a too small interval or your users won't have the time to
|
163
|
+
# change their passwords.
|
164
|
+
config.reset_password_within = 6.hours
|
165
|
+
|
166
|
+
# ==> Configuration for :encryptable
|
167
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
168
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
169
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
170
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
171
|
+
# REST_AUTH_SITE_KEY to pepper)
|
172
|
+
# config.encryptor = :sha512
|
173
|
+
|
174
|
+
# ==> Configuration for :token_authenticatable
|
175
|
+
# Defines name of the authentication token params key
|
176
|
+
# config.token_authentication_key = :auth_token
|
177
|
+
|
178
|
+
# ==> Scopes configuration
|
179
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
180
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
181
|
+
# are using only default views.
|
182
|
+
# config.scoped_views = false
|
183
|
+
|
184
|
+
# Configure the default scope given to Warden. By default it's the first
|
185
|
+
# devise role declared in your routes (usually :user).
|
186
|
+
# config.default_scope = :user
|
187
|
+
|
188
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
189
|
+
# only the current scope. By default, Devise signs out all scopes.
|
190
|
+
# config.sign_out_all_scopes = true
|
191
|
+
|
192
|
+
# ==> Navigation configuration
|
193
|
+
# Lists the formats that should be treated as navigational. Formats like
|
194
|
+
# :html, should redirect to the sign in page when the user does not have
|
195
|
+
# access, but formats like :xml or :json, should return 401.
|
196
|
+
#
|
197
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
198
|
+
# should add them to the navigational formats lists.
|
199
|
+
#
|
200
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
201
|
+
# config.navigational_formats = ["*/*", :html]
|
202
|
+
|
203
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
204
|
+
config.sign_out_via = :delete
|
205
|
+
|
206
|
+
# ==> OmniAuth
|
207
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
208
|
+
# up on your models and hooks.
|
209
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
210
|
+
|
211
|
+
# ==> Warden configuration
|
212
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
213
|
+
# change the failure app, you can configure them inside the config.warden block.
|
214
|
+
#
|
215
|
+
# config.warden do |manager|
|
216
|
+
# manager.intercept_401 = false
|
217
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
218
|
+
# end
|
219
|
+
|
220
|
+
# ==> Mountable engine configurations
|
221
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
222
|
+
# is mountable, there are some extra configurations to be taken into account.
|
223
|
+
# The following options are available, assuming the engine is mounted as:
|
224
|
+
#
|
225
|
+
# mount MyEngine, at: "/my_engine"
|
226
|
+
#
|
227
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
228
|
+
# config.router_name = :my_engine
|
229
|
+
#
|
230
|
+
# When using omniauth, Devise cannot automatically set Omniauth path,
|
231
|
+
# so you need to do it manually. For the users scope, it would be:
|
232
|
+
# config.omniauth_path_prefix = "/my_engine/users/auth"
|
233
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
2
|
+
SimpleForm.setup do |config|
|
3
|
+
# Wrappers are used by the form builder to generate a
|
4
|
+
# complete input. You can remove any component from the
|
5
|
+
# wrapper, change the order or even add your own to the
|
6
|
+
# stack. The options given below are used to wrap the
|
7
|
+
# whole input.
|
8
|
+
config.wrappers :default, :class => :input,
|
9
|
+
:hint_class => :field_with_hint, :error_class => :field_with_errors do |b|
|
10
|
+
## Extensions enabled by default
|
11
|
+
# Any of these extensions can be disabled for a
|
12
|
+
# given input by passing: `f.input EXTENSION_NAME => false`.
|
13
|
+
# You can make any of these extensions optional by
|
14
|
+
# renaming `b.use` to `b.optional`.
|
15
|
+
|
16
|
+
# Determines whether to use HTML5 (:email, :url, ...)
|
17
|
+
# and required attributes
|
18
|
+
b.use :html5
|
19
|
+
|
20
|
+
# Calculates placeholders automatically from I18n
|
21
|
+
# You can also pass a string as f.input :placeholder => "Placeholder"
|
22
|
+
b.use :placeholder
|
23
|
+
|
24
|
+
## Optional extensions
|
25
|
+
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
|
26
|
+
# to the input. If so, they will retrieve the values from the model
|
27
|
+
# if any exists. If you want to enable the lookup for any of those
|
28
|
+
# extensions by default, you can change `b.optional` to `b.use`.
|
29
|
+
|
30
|
+
# Calculates maxlength from length validations for string inputs
|
31
|
+
b.optional :maxlength
|
32
|
+
|
33
|
+
# Calculates pattern from format validations for string inputs
|
34
|
+
b.optional :pattern
|
35
|
+
|
36
|
+
# Calculates min and max from length validations for numeric inputs
|
37
|
+
b.optional :min_max
|
38
|
+
|
39
|
+
# Calculates readonly automatically from readonly attributes
|
40
|
+
b.optional :readonly
|
41
|
+
|
42
|
+
## Inputs
|
43
|
+
b.use :label_input
|
44
|
+
b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
|
45
|
+
b.use :error, :wrap_with => { :tag => :span, :class => :error }
|
46
|
+
end
|
47
|
+
|
48
|
+
# The default wrapper to be used by the FormBuilder.
|
49
|
+
config.default_wrapper = :default
|
50
|
+
|
51
|
+
# Define the way to render check boxes / radio buttons with labels.
|
52
|
+
# Defaults to :nested for bootstrap config.
|
53
|
+
# :inline => input + label
|
54
|
+
# :nested => label > input
|
55
|
+
config.boolean_style = :nested
|
56
|
+
|
57
|
+
# Default class for buttons
|
58
|
+
config.button_class = 'btn'
|
59
|
+
|
60
|
+
# Method used to tidy up errors. Specify any Rails Array method.
|
61
|
+
# :first lists the first message for each field.
|
62
|
+
# Use :to_sentence to list all errors for each field.
|
63
|
+
# config.error_method = :first
|
64
|
+
|
65
|
+
# Default tag used for error notification helper.
|
66
|
+
config.error_notification_tag = :div
|
67
|
+
|
68
|
+
# CSS class to add for error notification helper.
|
69
|
+
config.error_notification_class = 'alert alert-error'
|
70
|
+
|
71
|
+
# ID to add for error notification helper.
|
72
|
+
# config.error_notification_id = nil
|
73
|
+
|
74
|
+
# Series of attempts to detect a default label method for collection.
|
75
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
76
|
+
|
77
|
+
# Series of attempts to detect a default value method for collection.
|
78
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
79
|
+
|
80
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
81
|
+
# config.collection_wrapper_tag = nil
|
82
|
+
|
83
|
+
# You can define the class to use on all collection wrappers. Defaulting to none.
|
84
|
+
# config.collection_wrapper_class = nil
|
85
|
+
|
86
|
+
# You can wrap each item in a collection of radio/check boxes with a tag,
|
87
|
+
# defaulting to :span. Please note that when using :boolean_style = :nested,
|
88
|
+
# SimpleForm will force this option to be a label.
|
89
|
+
# config.item_wrapper_tag = :span
|
90
|
+
|
91
|
+
# You can define a class to use in all item wrappers. Defaulting to none.
|
92
|
+
# config.item_wrapper_class = nil
|
93
|
+
|
94
|
+
# How the label text should be generated altogether with the required text.
|
95
|
+
# config.label_text = lambda { |label, required| "#{required} #{label}" }
|
96
|
+
|
97
|
+
# You can define the class to use on all labels. Default is nil.
|
98
|
+
config.label_class = 'control-label'
|
99
|
+
|
100
|
+
# You can define the class to use on all forms. Default is simple_form.
|
101
|
+
# config.form_class = :simple_form
|
102
|
+
|
103
|
+
# You can define which elements should obtain additional classes
|
104
|
+
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
105
|
+
|
106
|
+
# Whether attributes are required by default (or not). Default is true.
|
107
|
+
# config.required_by_default = true
|
108
|
+
|
109
|
+
# Tell browsers whether to use default HTML5 validations (novalidate option).
|
110
|
+
# Default is enabled.
|
111
|
+
config.browser_validations = false
|
112
|
+
|
113
|
+
# Collection of methods to detect if a file type was given.
|
114
|
+
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
115
|
+
|
116
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
117
|
+
# to match as key, and the input type that will be used when the field name
|
118
|
+
# matches the regexp as value.
|
119
|
+
# config.input_mappings = { /count/ => :integer }
|
120
|
+
|
121
|
+
# Custom wrappers for input types. This should be a hash containing an input
|
122
|
+
# type as key and the wrapper that will be used for all inputs with specified type.
|
123
|
+
# config.wrapper_mappings = { :string => :prepend }
|
124
|
+
|
125
|
+
# Default priority for time_zone inputs.
|
126
|
+
# config.time_zone_priority = nil
|
127
|
+
|
128
|
+
# Default priority for country inputs.
|
129
|
+
# config.country_priority = nil
|
130
|
+
|
131
|
+
# Default size for text inputs.
|
132
|
+
# config.default_input_size = 50
|
133
|
+
|
134
|
+
# When false, do not use translations for labels.
|
135
|
+
# config.translate_labels = true
|
136
|
+
|
137
|
+
# Automatically discover new inputs in Rails' autoload path.
|
138
|
+
# config.inputs_discovery = true
|
139
|
+
|
140
|
+
# Cache SimpleForm inputs discovery
|
141
|
+
# config.cache_discovery = !Rails.env.development?
|
142
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
2
|
+
SimpleForm.setup do |config|
|
3
|
+
config.wrappers :bootstrap, :tag => 'div', :class => 'control-group', :error_class => 'error' do |b|
|
4
|
+
b.use :html5
|
5
|
+
b.use :placeholder
|
6
|
+
b.use :label
|
7
|
+
b.wrapper :tag => 'div', :class => 'controls' do |ba|
|
8
|
+
ba.use :input
|
9
|
+
ba.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
|
10
|
+
ba.use :hint, :wrap_with => { :tag => 'p', :class => 'help-block' }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
config.wrappers :prepend, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
|
15
|
+
b.use :html5
|
16
|
+
b.use :placeholder
|
17
|
+
b.use :label
|
18
|
+
b.wrapper :tag => 'div', :class => 'controls' do |input|
|
19
|
+
input.wrapper :tag => 'div', :class => 'input-prepend' do |prepend|
|
20
|
+
prepend.use :input
|
21
|
+
end
|
22
|
+
input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' }
|
23
|
+
input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
config.wrappers :append, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
|
28
|
+
b.use :html5
|
29
|
+
b.use :placeholder
|
30
|
+
b.use :label
|
31
|
+
b.wrapper :tag => 'div', :class => 'controls' do |input|
|
32
|
+
input.wrapper :tag => 'div', :class => 'input-append' do |append|
|
33
|
+
append.use :input
|
34
|
+
end
|
35
|
+
input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' }
|
36
|
+
input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
|
41
|
+
# Check the Bootstrap docs (http://twitter.github.com/bootstrap)
|
42
|
+
# to learn about the different styles for forms and inputs,
|
43
|
+
# buttons and other elements.
|
44
|
+
config.default_wrapper = :bootstrap
|
45
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|