├── .gitignore ├── .jsbeautifyrc ├── .rubocop.yml ├── .scss-lint.yml ├── Capfile ├── Gemfile ├── Gemfile.lock ├── README.md ├── Rakefile ├── app ├── assets │ ├── config │ │ └── manifest.js │ ├── images │ │ ├── .keep │ │ ├── favicon.png │ │ └── logo-og.jpg │ ├── javascripts │ │ ├── application.js │ │ ├── cable.js │ │ ├── channels │ │ │ └── .keep │ │ ├── ie.js │ │ └── rails_admin │ │ │ ├── custom │ │ │ └── ui.js │ │ │ └── ra.widgets.coffee │ └── stylesheets │ │ ├── application.scss │ │ ├── devise.scss │ │ ├── flash_messages.scss │ │ └── rails_admin │ │ └── custom │ │ └── theming.scss ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── controllers │ ├── application_controller.rb │ ├── concerns │ │ └── .keep │ ├── froala_controller.rb │ └── site_controller.rb ├── helpers │ └── application_helper.rb ├── jobs │ └── application_job.rb ├── mailers │ └── application_mailer.rb ├── models │ ├── admin.rb │ ├── application_record.rb │ ├── concerns │ │ ├── .keep │ │ ├── rails_admin │ │ │ ├── admin_admin.rb │ │ │ ├── content_admin.rb │ │ │ ├── parameter_admin.rb │ │ │ ├── seo_admin.rb │ │ │ ├── seo_tool_admin.rb │ │ │ └── user_admin.rb │ │ └── utils.rb │ ├── content.rb │ ├── parameter.rb │ ├── seo.rb │ ├── seo_tool.rb │ └── user.rb ├── uploaders │ ├── attachment_uploader.rb │ ├── froala_uploader.rb │ └── image_uploader.rb └── views │ ├── admins │ ├── confirmations │ │ └── new.html.erb │ ├── mailer │ │ ├── confirmation_instructions.html.erb │ │ ├── password_change.html.erb │ │ ├── reset_password_instructions.html.erb │ │ └── unlock_instructions.html.erb │ ├── passwords │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── registrations │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── sessions │ │ └── new.html.erb │ ├── shared │ │ └── _links.html.erb │ └── unlocks │ │ └── new.html.erb │ ├── kaminari │ ├── _first_page.html.erb │ ├── _gap.html.erb │ ├── _last_page.html.erb │ ├── _next_page.html.erb │ ├── _page.html.erb │ ├── _paginator.html.erb │ └── _prev_page.html.erb │ ├── layouts │ ├── application.html.erb │ ├── devise.html.erb │ ├── mailer.html.erb │ └── mailer.text.erb │ ├── rails_admin │ └── main │ │ └── dashboard.html.haml │ ├── shared │ └── _flash_messages.html.erb │ └── site │ └── index.html.erb ├── bin ├── bundle ├── rails ├── rake ├── setup ├── spring └── update ├── config.ru ├── config ├── application.rb ├── boot.rb ├── cable.yml ├── database.yml ├── deploy.rb ├── deploy │ ├── production.rb │ └── staging.rb ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── initializers │ ├── application_controller_renderer.rb │ ├── assets.rb │ ├── backtrace_silencers.rb │ ├── cookies_serializer.rb │ ├── devise.rb │ ├── filter_parameter_logging.rb │ ├── friendly_id.rb │ ├── inflections.rb │ ├── kaminari_config.rb │ ├── mime_types.rb │ ├── new_framework_defaults.rb │ ├── rails_admin.rb │ ├── session_store.rb │ └── wrap_parameters.rb ├── locales │ ├── devise.en.yml │ ├── devise.fr.yml │ ├── en.yml │ ├── fr.yml │ ├── rails_admin.fr.yml │ ├── rollincode.fr.yml │ ├── simple_form.en.yml │ └── simple_form.fr.yml ├── puma.rb ├── recaptcha.rb ├── routes.rb ├── schedule.rb ├── secrets.yml ├── sitemap.rb └── spring.rb ├── db ├── migrate │ ├── 20161209084231_create_contents.rb │ ├── 20161209084433_create_parameters.rb │ ├── 20161209093430_devise_create_admins.rb │ ├── 20161209093436_devise_create_users.rb │ ├── 20161209094716_create_friendly_id_slugs.rb │ ├── 20161209095051_create_seos.rb │ └── 20170524131642_create_seo_tools.rb ├── schema.rb └── seeds.rb ├── lib ├── assets │ └── .keep ├── tasks │ ├── .keep │ └── auto_annotate_models.rake └── templates │ └── erb │ └── scaffold │ └── _form.html.erb ├── log └── .keep ├── public ├── 404.html ├── 422.html ├── 500.html ├── apple-touch-icon-precomposed.png ├── apple-touch-icon.png ├── favicon.ico └── robots.txt ├── test ├── controllers │ └── .keep ├── fixtures │ ├── .keep │ ├── admins.yml │ ├── contents.yml │ ├── files │ │ └── .keep │ ├── parameters.yml │ ├── seos.yml │ └── users.yml ├── helpers │ └── .keep ├── integration │ └── .keep ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── admin_test.rb │ ├── content_test.rb │ ├── parameter_test.rb │ ├── seo_test.rb │ └── user_test.rb └── test_helper.rb ├── tmp └── .keep └── vendor └── assets ├── javascripts └── .keep └── stylesheets ├── .keep └── animate.css /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/* 16 | /tmp/* 17 | !/log/.keep 18 | !/tmp/.keep 19 | 20 | .idea/ 21 | .vscode/ 22 | .rbenv-gemsets 23 | .DS_Store 24 | public/system 25 | public/uploads 26 | public/assets/** 27 | public/sitemap.xml.gz 28 | 29 | # Ignore Byebug command history file. 30 | .byebug_history 31 | -------------------------------------------------------------------------------- /.jsbeautifyrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent_size": 2, 3 | "indent_char": " ", 4 | "other": " ", 5 | "indent_level": 0, 6 | "indent_with_tabs": false, 7 | "preserve_newlines": true, 8 | "max_preserve_newlines": 2, 9 | "jslint_happy": true, 10 | "indent_handlebars": true 11 | } 12 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | AllCops: 2 | Exclude: 3 | - 'bin/**/*' 4 | - 'db/schema.rb' 5 | - 'tmp/**/*' 6 | - 'vendor/bundle/**/*' 7 | 8 | Metrics/AbcSize: 9 | Max: 15 10 | 11 | Metrics/BlockNesting: 12 | Max: 3 13 | 14 | Metrics/ClassLength: 15 | CountComments: false 16 | Max: 100 17 | 18 | Metrics/CyclomaticComplexity: 19 | Max: 6 20 | 21 | Metrics/LineLength: 22 | AllowURI: true 23 | Enabled: false 24 | 25 | Metrics/MethodLength: 26 | CountComments: false 27 | Max: 15 28 | 29 | Metrics/ModuleLength: 30 | Max: 100 31 | 32 | Metrics/ParameterLists: 33 | Max: 4 34 | CountKeywordArgs: true 35 | 36 | Metrics/PerceivedComplexity: 37 | Max: 7 38 | 39 | Style/AccessModifierIndentation: 40 | EnforcedStyle: outdent 41 | 42 | Style/CollectionMethods: 43 | PreferredMethods: 44 | map: 'collect' 45 | reduce: 'inject' 46 | find: 'detect' 47 | find_all: 'select' 48 | 49 | Style/Documentation: 50 | Enabled: false 51 | 52 | Style/DotPosition: 53 | EnforcedStyle: trailing 54 | 55 | Style/DoubleNegation: 56 | Enabled: false 57 | 58 | Style/EachWithObject: 59 | Enabled: false 60 | 61 | Style/Encoding: 62 | Enabled: false 63 | 64 | Style/FileName: 65 | Exclude: 66 | - 'lib/rails_admin/bootstrap-sass.rb' 67 | 68 | Style/Lambda: 69 | Enabled: false 70 | 71 | Style/RaiseArgs: 72 | EnforcedStyle: compact 73 | 74 | Style/SpaceInsideHashLiteralBraces: 75 | EnforcedStyle: no_space 76 | 77 | Style/TrailingCommaInLiteral: 78 | EnforcedStyleForMultiline: 'comma' 79 | -------------------------------------------------------------------------------- /.scss-lint.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - '*.min.scss' 3 | - '*.min.sass' 4 | 5 | linters: 6 | PropertySortOrder: 7 | enabled: false 8 | ColorVariable: 9 | enabled: false 10 | Comment: 11 | enabled: false 12 | VendorPrefix: 13 | enabled: false 14 | IdSelector: 15 | enabled: false 16 | NestingDepth: 17 | enabled: false 18 | SelectorDepth: 19 | enabled: false 20 | QualifyingElement: 21 | enabled: false 22 | -------------------------------------------------------------------------------- /Capfile: -------------------------------------------------------------------------------- 1 | # Load DSL and set up stages 2 | require "capistrano/setup" 3 | 4 | # Include default deployment tasks 5 | require "capistrano/deploy" 6 | 7 | # Include tasks from other gems included in your Gemfile 8 | # 9 | # For documentation on these, see for example: 10 | # 11 | # https://github.com/capistrano/rvm 12 | # https://github.com/capistrano/rbenv 13 | # https://github.com/capistrano/chruby 14 | # https://github.com/capistrano/bundler 15 | # https://github.com/capistrano/rails 16 | # https://github.com/capistrano/passenger 17 | # 18 | # require 'capistrano/rvm' 19 | require 'capistrano/rbenv' 20 | # require 'capistrano/chruby' 21 | require 'capistrano/bundler' 22 | require 'capistrano/rails/assets' 23 | require 'capistrano/rails/migrations' 24 | require 'capistrano/passenger' 25 | require "capistrano/scm/git" 26 | install_plugin Capistrano::SCM::Git 27 | 28 | # Load custom tasks from `lib/capistrano/tasks` if you have any defined 29 | Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } 30 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | git_source(:github) do |repo_name| 4 | repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") 5 | "https://github.com/#{repo_name}.git" 6 | end 7 | 8 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 9 | gem 'rails', '~> 5.1.5' 10 | # Use sqlite3 as the database for Active Record 11 | gem 'sqlite3' 12 | # Use Puma as the app server 13 | gem 'puma', '~> 3.7' 14 | # Use SCSS for stylesheets 15 | gem 'sass-rails', '~> 5.0' 16 | # Use Uglifier as compressor for JavaScript assets 17 | gem 'uglifier', '>= 1.3.0' 18 | # Use CoffeeScript for .coffee assets and views 19 | gem 'coffee-rails', '~> 4.2' 20 | # See https://github.com/rails/execjs#readme for more supported runtimes 21 | # gem 'therubyracer', platforms: :ruby 22 | 23 | # Use jquery as the JavaScript library 24 | gem 'jquery-rails' 25 | # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 26 | gem 'turbolinks', '~> 5' 27 | # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 28 | gem 'jbuilder', '~> 2.5' 29 | # Use Redis adapter to run Action Cable in production 30 | # gem 'redis', '~> 3.0' 31 | # Use ActiveModel has_secure_password 32 | # gem 'bcrypt', '~> 3.1.7' 33 | 34 | # gem 'pg' 35 | 36 | # Front 37 | gem 'font-awesome-rails' 38 | gem 'bootstrap-sass', '~> 3.3.6' 39 | gem 'autoprefixer-rails' 40 | gem 'recaptcha', require: 'recaptcha/rails' 41 | gem 'sitemap_generator' 42 | #gem 'webpacker', github: 'rails/webpacker' 43 | 44 | # Backend / Utils 45 | gem 'wysiwyg-rails' 46 | gem 'devise', github: 'plataformatec/devise' 47 | gem 'annotate' 48 | gem 'carrierwave' 49 | gem 'mini_magick' 50 | gem 'friendly_id' 51 | gem 'ancestry' 52 | gem 'whenever' 53 | gem 'kaminari' 54 | gem 'breadcrumbs_on_rails' 55 | gem 'simple_form' 56 | 57 | # ADMIN 58 | gem 'rails_admin_nestable', '~> 0.3.2' 59 | gem 'rails_admin_rollincode', '~> 1.1' 60 | gem 'rails_admin', '~> 1.3' 61 | 62 | group :development, :test do 63 | # Call 'byebug' anywhere in the code to stop execution and get a debugger console 64 | gem 'byebug', platform: :mri 65 | end 66 | 67 | group :development do 68 | # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. 69 | gem 'web-console', '>= 3.3.0' 70 | gem 'listen', '>= 3.0.5', '< 3.2' 71 | # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 72 | gem 'spring' 73 | gem 'spring-watcher-listen', '~> 2.0.0' 74 | 75 | gem 'better_errors' 76 | gem 'pry-byebug' 77 | gem 'faker' 78 | 79 | # Capistrano 80 | gem 'capistrano', '~> 3.6' 81 | gem 'capistrano-rails', '~> 1.2' 82 | gem 'capistrano-bundler', '~> 1.2' 83 | gem 'capistrano-rbenv', '~> 2.0' 84 | end 85 | 86 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 87 | gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 88 | 89 | gem 'rails_12factor', group: :production 90 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/plataformatec/devise.git 3 | revision: d545fe3e3f85938683cbe41b03af1d5cbea2151c 4 | specs: 5 | devise (4.4.1) 6 | bcrypt (~> 3.0) 7 | orm_adapter (~> 0.1) 8 | railties (>= 4.1.0, < 6.0) 9 | responders 10 | warden (~> 1.2.3) 11 | 12 | GEM 13 | remote: https://rubygems.org/ 14 | specs: 15 | actioncable (5.1.5) 16 | actionpack (= 5.1.5) 17 | nio4r (~> 2.0) 18 | websocket-driver (~> 0.6.1) 19 | actionmailer (5.1.5) 20 | actionpack (= 5.1.5) 21 | actionview (= 5.1.5) 22 | activejob (= 5.1.5) 23 | mail (~> 2.5, >= 2.5.4) 24 | rails-dom-testing (~> 2.0) 25 | actionpack (5.1.5) 26 | actionview (= 5.1.5) 27 | activesupport (= 5.1.5) 28 | rack (~> 2.0) 29 | rack-test (>= 0.6.3) 30 | rails-dom-testing (~> 2.0) 31 | rails-html-sanitizer (~> 1.0, >= 1.0.2) 32 | actionview (5.1.5) 33 | activesupport (= 5.1.5) 34 | builder (~> 3.1) 35 | erubi (~> 1.4) 36 | rails-dom-testing (~> 2.0) 37 | rails-html-sanitizer (~> 1.0, >= 1.0.3) 38 | activejob (5.1.5) 39 | activesupport (= 5.1.5) 40 | globalid (>= 0.3.6) 41 | activemodel (5.1.5) 42 | activesupport (= 5.1.5) 43 | activerecord (5.1.5) 44 | activemodel (= 5.1.5) 45 | activesupport (= 5.1.5) 46 | arel (~> 8.0) 47 | activesupport (5.1.5) 48 | concurrent-ruby (~> 1.0, >= 1.0.2) 49 | i18n (~> 0.7) 50 | minitest (~> 5.1) 51 | tzinfo (~> 1.1) 52 | airbrussh (1.3.0) 53 | sshkit (>= 1.6.1, != 1.7.0) 54 | ancestry (3.0.1) 55 | activerecord (>= 3.2.0) 56 | annotate (2.7.2) 57 | activerecord (>= 3.2, < 6.0) 58 | rake (>= 10.4, < 13.0) 59 | arel (8.0.0) 60 | autoprefixer-rails (8.1.0) 61 | execjs 62 | bcrypt (3.1.11) 63 | better_errors (2.4.0) 64 | coderay (>= 1.0.0) 65 | erubi (>= 1.0.0) 66 | rack (>= 0.9.0) 67 | bindex (0.5.0) 68 | bootstrap-sass (3.3.7) 69 | autoprefixer-rails (>= 5.2.1) 70 | sass (>= 3.3.4) 71 | breadcrumbs_on_rails (3.0.1) 72 | builder (3.2.3) 73 | byebug (10.0.0) 74 | capistrano (3.10.1) 75 | airbrussh (>= 1.0.0) 76 | i18n 77 | rake (>= 10.0.0) 78 | sshkit (>= 1.9.0) 79 | capistrano-bundler (1.3.0) 80 | capistrano (~> 3.1) 81 | sshkit (~> 1.2) 82 | capistrano-rails (1.3.1) 83 | capistrano (~> 3.1) 84 | capistrano-bundler (~> 1.1) 85 | capistrano-rbenv (2.1.3) 86 | capistrano (~> 3.1) 87 | sshkit (~> 1.3) 88 | carrierwave (1.2.2) 89 | activemodel (>= 4.0.0) 90 | activesupport (>= 4.0.0) 91 | mime-types (>= 1.16) 92 | chronic (0.10.2) 93 | coderay (1.1.2) 94 | coffee-rails (4.2.2) 95 | coffee-script (>= 2.2.0) 96 | railties (>= 4.0.0) 97 | coffee-script (2.4.1) 98 | coffee-script-source 99 | execjs 100 | coffee-script-source (1.12.2) 101 | concurrent-ruby (1.0.5) 102 | crass (1.0.3) 103 | erubi (1.7.1) 104 | erubis (2.7.0) 105 | execjs (2.7.0) 106 | faker (1.8.7) 107 | i18n (>= 0.7) 108 | ffi (1.9.23) 109 | font-awesome-rails (4.7.0.3) 110 | railties (>= 3.2, < 5.2) 111 | font-awesome-sass (4.7.0) 112 | sass (>= 3.2) 113 | friendly_id (5.2.3) 114 | activerecord (>= 4.0.0) 115 | globalid (0.4.1) 116 | activesupport (>= 4.2.0) 117 | haml (5.0.4) 118 | temple (>= 0.8.0) 119 | tilt 120 | haml-rails (1.0.0) 121 | actionpack (>= 4.0.1) 122 | activesupport (>= 4.0.1) 123 | haml (>= 4.0.6, < 6.0) 124 | html2haml (>= 1.0.1) 125 | railties (>= 4.0.1) 126 | html2haml (2.2.0) 127 | erubis (~> 2.7.0) 128 | haml (>= 4.0, < 6) 129 | nokogiri (>= 1.6.0) 130 | ruby_parser (~> 3.5) 131 | i18n (0.9.5) 132 | concurrent-ruby (~> 1.0) 133 | jbuilder (2.7.0) 134 | activesupport (>= 4.2.0) 135 | multi_json (>= 1.2) 136 | jquery-rails (4.3.1) 137 | rails-dom-testing (>= 1, < 3) 138 | railties (>= 4.2.0) 139 | thor (>= 0.14, < 2.0) 140 | jquery-ui-rails (5.0.5) 141 | railties (>= 3.2.16) 142 | json (2.1.0) 143 | kaminari (1.1.1) 144 | activesupport (>= 4.1.0) 145 | kaminari-actionview (= 1.1.1) 146 | kaminari-activerecord (= 1.1.1) 147 | kaminari-core (= 1.1.1) 148 | kaminari-actionview (1.1.1) 149 | actionview 150 | kaminari-core (= 1.1.1) 151 | kaminari-activerecord (1.1.1) 152 | activerecord 153 | kaminari-core (= 1.1.1) 154 | kaminari-core (1.1.1) 155 | listen (3.1.5) 156 | rb-fsevent (~> 0.9, >= 0.9.4) 157 | rb-inotify (~> 0.9, >= 0.9.7) 158 | ruby_dep (~> 1.2) 159 | loofah (2.2.0) 160 | crass (~> 1.0.2) 161 | nokogiri (>= 1.5.9) 162 | mail (2.7.0) 163 | mini_mime (>= 0.1.1) 164 | method_source (0.9.0) 165 | mime-types (3.1) 166 | mime-types-data (~> 3.2015) 167 | mime-types-data (3.2016.0521) 168 | mini_magick (4.8.0) 169 | mini_mime (1.0.0) 170 | mini_portile2 (2.3.0) 171 | minitest (5.11.3) 172 | multi_json (1.13.1) 173 | nested_form (0.3.2) 174 | net-scp (1.2.1) 175 | net-ssh (>= 2.6.5) 176 | net-ssh (4.2.0) 177 | nio4r (2.2.0) 178 | nokogiri (1.8.2) 179 | mini_portile2 (~> 2.3.0) 180 | orm_adapter (0.5.0) 181 | pry (0.11.3) 182 | coderay (~> 1.1.0) 183 | method_source (~> 0.9.0) 184 | pry-byebug (3.6.0) 185 | byebug (~> 10.0) 186 | pry (~> 0.10) 187 | puma (3.11.3) 188 | rack (2.0.4) 189 | rack-pjax (1.0.0) 190 | nokogiri (~> 1.5) 191 | rack (>= 1.1) 192 | rack-test (0.8.3) 193 | rack (>= 1.0, < 3) 194 | rails (5.1.5) 195 | actioncable (= 5.1.5) 196 | actionmailer (= 5.1.5) 197 | actionpack (= 5.1.5) 198 | actionview (= 5.1.5) 199 | activejob (= 5.1.5) 200 | activemodel (= 5.1.5) 201 | activerecord (= 5.1.5) 202 | activesupport (= 5.1.5) 203 | bundler (>= 1.3.0) 204 | railties (= 5.1.5) 205 | sprockets-rails (>= 2.0.0) 206 | rails-dom-testing (2.0.3) 207 | activesupport (>= 4.2.0) 208 | nokogiri (>= 1.6) 209 | rails-html-sanitizer (1.0.3) 210 | loofah (~> 2.0) 211 | rails_12factor (0.0.3) 212 | rails_serve_static_assets 213 | rails_stdout_logging 214 | rails_admin (1.3.0) 215 | builder (~> 3.1) 216 | coffee-rails (~> 4.0) 217 | font-awesome-rails (>= 3.0, < 5) 218 | haml (>= 4.0, < 6) 219 | jquery-rails (>= 3.0, < 5) 220 | jquery-ui-rails (~> 5.0) 221 | kaminari (>= 0.14, < 2.0) 222 | nested_form (~> 0.3) 223 | rack-pjax (>= 0.7) 224 | rails (>= 4.0, < 6) 225 | remotipart (~> 1.3) 226 | sass-rails (>= 4.0, < 6) 227 | rails_admin_nestable (0.3.2) 228 | coffee-rails 229 | haml-rails 230 | rails_admin (>= 0.6.6) 231 | sass-rails 232 | rails_admin_rollincode (1.2.1) 233 | rails (>= 4.0, < 6) 234 | rails_serve_static_assets (0.0.5) 235 | rails_stdout_logging (0.0.5) 236 | railties (5.1.5) 237 | actionpack (= 5.1.5) 238 | activesupport (= 5.1.5) 239 | method_source 240 | rake (>= 0.8.7) 241 | thor (>= 0.18.1, < 2.0) 242 | rake (12.3.0) 243 | rb-fsevent (0.10.3) 244 | rb-inotify (0.9.10) 245 | ffi (>= 0.5.0, < 2) 246 | recaptcha (4.6.6) 247 | json 248 | remotipart (1.3.1) 249 | responders (2.4.0) 250 | actionpack (>= 4.2.0, < 5.3) 251 | railties (>= 4.2.0, < 5.3) 252 | ruby_dep (1.5.0) 253 | ruby_parser (3.11.0) 254 | sexp_processor (~> 4.9) 255 | sass (3.5.5) 256 | sass-listen (~> 4.0.0) 257 | sass-listen (4.0.0) 258 | rb-fsevent (~> 0.9, >= 0.9.4) 259 | rb-inotify (~> 0.9, >= 0.9.7) 260 | sass-rails (5.0.7) 261 | railties (>= 4.0.0, < 6) 262 | sass (~> 3.1) 263 | sprockets (>= 2.8, < 4.0) 264 | sprockets-rails (>= 2.0, < 4.0) 265 | tilt (>= 1.1, < 3) 266 | sexp_processor (4.10.1) 267 | simple_form (3.5.1) 268 | actionpack (> 4, < 5.2) 269 | activemodel (> 4, < 5.2) 270 | sitemap_generator (6.0.1) 271 | builder (~> 3.0) 272 | spring (2.0.2) 273 | activesupport (>= 4.2) 274 | spring-watcher-listen (2.0.1) 275 | listen (>= 2.7, < 4.0) 276 | spring (>= 1.2, < 3.0) 277 | sprockets (3.7.1) 278 | concurrent-ruby (~> 1.0) 279 | rack (> 1, < 3) 280 | sprockets-rails (3.2.1) 281 | actionpack (>= 4.0) 282 | activesupport (>= 4.0) 283 | sprockets (>= 3.0.0) 284 | sqlite3 (1.3.13) 285 | sshkit (1.16.0) 286 | net-scp (>= 1.1.2) 287 | net-ssh (>= 2.8.0) 288 | temple (0.8.0) 289 | thor (0.20.0) 290 | thread_safe (0.3.6) 291 | tilt (2.0.8) 292 | turbolinks (5.1.0) 293 | turbolinks-source (~> 5.1) 294 | turbolinks-source (5.1.0) 295 | tzinfo (1.2.5) 296 | thread_safe (~> 0.1) 297 | uglifier (4.1.6) 298 | execjs (>= 0.3.0, < 3) 299 | warden (1.2.7) 300 | rack (>= 1.0) 301 | web-console (3.5.1) 302 | actionview (>= 5.0) 303 | activemodel (>= 5.0) 304 | bindex (>= 0.4.0) 305 | railties (>= 5.0) 306 | websocket-driver (0.6.5) 307 | websocket-extensions (>= 0.1.0) 308 | websocket-extensions (0.1.3) 309 | whenever (0.10.0) 310 | chronic (>= 0.6.3) 311 | wysiwyg-rails (2.7.5) 312 | font-awesome-sass (~> 4.4, >= 4.4.0) 313 | railties (>= 3.2, < 6.0) 314 | 315 | PLATFORMS 316 | ruby 317 | 318 | DEPENDENCIES 319 | ancestry 320 | annotate 321 | autoprefixer-rails 322 | better_errors 323 | bootstrap-sass (~> 3.3.6) 324 | breadcrumbs_on_rails 325 | byebug 326 | capistrano (~> 3.6) 327 | capistrano-bundler (~> 1.2) 328 | capistrano-rails (~> 1.2) 329 | capistrano-rbenv (~> 2.0) 330 | carrierwave 331 | coffee-rails (~> 4.2) 332 | devise! 333 | faker 334 | font-awesome-rails 335 | friendly_id 336 | jbuilder (~> 2.5) 337 | jquery-rails 338 | kaminari 339 | listen (>= 3.0.5, < 3.2) 340 | mini_magick 341 | pry-byebug 342 | puma (~> 3.7) 343 | rails (~> 5.1.5) 344 | rails_12factor 345 | rails_admin (~> 1.3) 346 | rails_admin_nestable (~> 0.3.2) 347 | rails_admin_rollincode (~> 1.1) 348 | recaptcha 349 | sass-rails (~> 5.0) 350 | simple_form 351 | sitemap_generator 352 | spring 353 | spring-watcher-listen (~> 2.0.0) 354 | sqlite3 355 | turbolinks (~> 5) 356 | tzinfo-data 357 | uglifier (>= 1.3.0) 358 | web-console (>= 3.3.0) 359 | whenever 360 | wysiwyg-rails 361 | 362 | BUNDLED WITH 363 | 1.16.1 364 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Rails 5 Sandbox 2 | ============= 3 | 4 | Ready to use sandbox, back-end/front-end architecture provided. 5 | 6 | - Rollincode rails admin theme (new modern bootstrap 3) 7 | - Nested sortable models 8 | - Image and attachment uploaders 9 | - Admin and User accounts configured 10 | - Seo optimization (friendly_id) 11 | - Froala v2 + file and images manager WYSIWYG 12 | - Block system on dashboard 13 | - ... many others 14 | 15 | Model link example with slug see friendly_id 16 | 17 | ```erb 18 | <%= model_path(@model.slug) %> 19 | ``` 20 | 21 | Notifications 22 | ```ruby 23 | redirect_to root_path, flash: {success: 'My message'} 24 | ``` 25 | 26 | Block on dashboard 27 | integration example in model: 28 | ```ruby 29 | included do 30 | rails_admin do 31 | navigation_label 'Page' 32 | navigation_icon 'fa fa-book' 33 | label_plural 'Pages' 34 | ``` 35 | navigation_icon and label_plural are optional 36 | 37 | ![DASHBOARD](http://i.imgur.com/iWnBkEu.png, "block system") 38 | 39 | ![DASHBOARD](http://i.imgur.com/GJGfXVO.png, "view") 40 | 41 | ### TODO ### 42 | 43 | - [X] Rails 5 migration 44 | - [ ] Capistrano instructions 45 | - [X] Capistrano initialization 46 | - [X] Clean up 47 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require_relative 'config/application' 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../javascripts .js 3 | //= link_directory ../stylesheets .css 4 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollincode/rollinbox/154c435d07dc5576867bc7daf46f547b66b12384/app/assets/images/.keep -------------------------------------------------------------------------------- /app/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollincode/rollinbox/154c435d07dc5576867bc7daf46f547b66b12384/app/assets/images/favicon.png -------------------------------------------------------------------------------- /app/assets/images/logo-og.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollincode/rollinbox/154c435d07dc5576867bc7daf46f547b66b12384/app/assets/images/logo-og.jpg -------------------------------------------------------------------------------- /app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. JavaScript code in this file should be added after the last require_* statement. 9 | // 10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery 14 | //= require jquery_ujs 15 | //= require bootstrap 16 | //= require turbolinks 17 | //= require_tree . 18 | //= stub rails_admin/custom/ui.js 19 | //= stub 'ie' 20 | 21 | $(document).on('turbolinks:load', init); 22 | 23 | function init() { 24 | console.log('Code ready to rocks !'); 25 | } 26 | -------------------------------------------------------------------------------- /app/assets/javascripts/cable.js: -------------------------------------------------------------------------------- 1 | // Action Cable provides the framework to deal with WebSockets in Rails. 2 | // You can generate new channels where WebSocket features live using the rails generate channel command. 3 | // 4 | //= require action_cable 5 | //= require_self 6 | //= require_tree ./channels 7 | 8 | (function() { 9 | this.App || (this.App = {}); 10 | 11 | App.cable = ActionCable.createConsumer(); 12 | 13 | }).call(this); 14 | -------------------------------------------------------------------------------- /app/assets/javascripts/channels/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rollincode/rollinbox/154c435d07dc5576867bc7daf46f547b66b12384/app/assets/javascripts/channels/.keep -------------------------------------------------------------------------------- /app/assets/javascripts/rails_admin/custom/ui.js: -------------------------------------------------------------------------------- 1 | //= require froala_editor.min.js 2 | //= require plugins/align.min.js 3 | //= require plugins/char_counter.min.js 4 | //= require plugins/code_beautifier.min.js 5 | //= require plugins/code_view.min.js 6 | //= require plugins/colors.min.js 7 | //= require plugins/draggable.min.js 8 | //= require plugins/emoticons.min.js 9 | //= require plugins/entities.min.js 10 | //= require plugins/file.min.js 11 | //= require plugins/font_family.min.js 12 | //= require plugins/font_size.min.js 13 | //= require plugins/fullscreen.min.js 14 | //= require plugins/image.min.js 15 | //= require plugins/image_manager.min.js 16 | //= require plugins/inline_style.min.js 17 | //= require plugins/line_breaker.min.js 18 | //= require plugins/link.min.js 19 | //= require plugins/lists.min.js 20 | //= require plugins/paragraph_format.min.js 21 | //= require plugins/paragraph_style.min.js 22 | //= require plugins/quick_insert.min.js 23 | //= require plugins/quote.min.js 24 | //= require plugins/save.min.js 25 | //= require plugins/table.min.js 26 | //= require plugins/url.min.js 27 | //= require plugins/video.min.js 28 | //= require languages/fr.js 29 | 30 | $(document).on('ready pjax:success', function(e) { 31 | handleActiveBase(); 32 | function handleActiveBase() { 33 | $('.sub-menu').each(function () { 34 | if ($(this).hasClass('active')) { 35 | $(this).parent().prev().addClass('active'); 36 | $(this).parent().prev().addClass('open'); 37 | $(this).parent().slideDown(); 38 | } 39 | }); 40 | } 41 | // home dashboard dark theme 42 | if((new RegExp('admin/$').test(e.currentTarget.URL) 43 | || new RegExp('admin$').test(e.currentTarget.URL)) 44 | && !new RegExp('admin/admin').test(e.currentTarget.URL)){ 45 | $('.page-header, .content').addClass('dashboard'); 46 | } 47 | else { 48 | $('.page-header, .content').removeClass('dashboard'); 49 | } 50 | }); 51 | 52 | $(function () { 53 | var width = $('.nav-stacked').width(); 54 | $('.navbar-header').width(width); 55 | 56 | var array_menu = []; 57 | var lvl_1 = null; 58 | var count = 0; 59 | 60 | $('.sidebar-nav li').each(function (index, item) { 61 | if ($(item).hasClass('dropdown-header')) { 62 | lvl_1 = count++; 63 | array_menu[lvl_1] = [] 64 | } else { 65 | $(item).addClass('sub-menu sub-menu-' + lvl_1); 66 | } 67 | }); 68 | 69 | for (var i = 0; i <= array_menu.length; i++) { 70 | $('.sub-menu-' + i).wrapAll("