redde 0.1.18 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +19 -0
- data/.travis.yml +5 -4
- data/Gemfile +8 -5
- data/MIT-LICENSE +20 -0
- data/README.md +96 -105
- data/Rakefile +20 -1
- data/app/assets/fonts/redde-admin.eot +0 -0
- data/app/assets/fonts/redde-admin.svg +12 -0
- data/app/assets/fonts/redde-admin.ttf +0 -0
- data/app/assets/fonts/redde-admin.woff +0 -0
- data/app/assets/images/redde/close-hover.svg +4 -0
- data/app/assets/images/redde/close.svg +6 -0
- data/app/assets/images/redde/enter.svg +4 -0
- data/app/assets/images/redde/eye.svg +5 -0
- data/app/assets/images/redde/eye_disactive.svg +5 -0
- data/app/assets/images/redde/main-menu/cog.svg +8 -0
- data/app/assets/images/redde/main-menu/cog_active.svg +8 -0
- data/app/assets/images/redde/main-menu/folder.svg +4 -0
- data/app/assets/images/redde/main-menu/folder_active.svg +4 -0
- data/app/assets/images/redde/main-menu/home.svg +4 -0
- data/app/assets/images/redde/main-menu/home_active.svg +4 -0
- data/app/assets/images/redde/main-menu/list.svg +4 -0
- data/app/assets/images/redde/main-menu/list_active.svg +4 -0
- data/app/assets/images/redde/next.svg +7 -0
- data/app/assets/images/redde/plus.svg +3 -0
- data/app/assets/images/redde/sel.svg +6 -0
- data/app/assets/images/redde/user.svg +12 -0
- data/app/assets/javascripts/redde/fileapi.js.coffee +17 -0
- data/app/assets/javascripts/redde/index.js.coffee +12 -0
- data/app/assets/javascripts/redde/redactor/index.coffee +8 -0
- data/{lib/generators/redde/layout/templates/assets/redactor/javascripts/jquery-migrate-1.2.1.js → app/assets/javascripts/redde/redactor/jquery-migrate-1.3.0.js} +215 -34
- data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/redactor.js.erb +250 -250
- data/app/assets/javascripts/redde/sortTree/index.js.coffee +47 -0
- data/app/assets/javascripts/redde/sortable.coffee +47 -0
- data/{spec/dummy/app/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/error-msg.sass +4 -2
- data/app/assets/stylesheets/redde/blocks/flash-msg.sass +22 -0
- data/app/assets/stylesheets/redde/blocks/list-v2.sass +96 -0
- data/app/assets/stylesheets/redde/blocks/photos-uploader.sass +21 -0
- data/app/assets/stylesheets/redde/blocks/photos.sass +56 -0
- data/app/assets/stylesheets/redde/blocks/redde-form.sass +55 -0
- data/app/assets/stylesheets/redde/blocks/sort-tree.sass +46 -0
- data/app/assets/stylesheets/redde/defaults/btn.sass +30 -0
- data/app/assets/stylesheets/redde/defaults/del.sass +23 -0
- data/app/assets/stylesheets/redde/defaults/index.sass +87 -0
- data/app/assets/stylesheets/redde/defaults/inp.sass +20 -0
- data/app/assets/stylesheets/redde/defaults/reset.sass +25 -0
- data/app/assets/stylesheets/redde/defaults/sbm.sass +32 -0
- data/app/assets/stylesheets/redde/defaults/sel.sass +29 -0
- data/app/assets/stylesheets/redde/fonts.sass +42 -0
- data/app/assets/stylesheets/redde/index.scss +5 -0
- data/app/assets/stylesheets/redde/layouts/header.sass +63 -0
- data/app/assets/stylesheets/redde/layouts/main-menu.sass +63 -0
- data/app/assets/stylesheets/redde/layouts/main.sass +48 -0
- data/app/assets/stylesheets/redde/layouts/page-header.sass +34 -0
- data/app/assets/stylesheets/redde/layouts/page-sidebar.sass +9 -0
- data/app/assets/stylesheets/redde/mixins.sass +10 -0
- data/{spec/dummy/app/assets/stylesheets → app/assets/stylesheets/redde}/redactor/index.scss +46 -49
- data/app/assets/stylesheets/redde-admin/blocks/list-v2.sass +96 -0
- data/app/assets/stylesheets/redde-admin/defaults/del.sass +23 -0
- data/app/controllers/admin/base_controller.rb +81 -0
- data/{lib/generators/redde/layout/templates/controllers → app/controllers/admin}/managers_controller.rb +10 -6
- data/app/controllers/admin/redde_photos_controller.rb +31 -0
- data/app/controllers/admin/system_commands_controller.rb +11 -0
- data/app/form_builders/redde_form_builder.rb +106 -0
- data/app/helpers/redde/admin_helper.rb +33 -0
- data/app/helpers/redde/form_helper.rb +59 -0
- data/app/helpers/redde/index_helper.rb +61 -0
- data/{lib/redde/concerns/layout.rb → app/models/concerns/redde/layouts.rb} +1 -1
- data/app/models/concerns/redde/photoable.rb +5 -0
- data/{lib/redde/concerns → app/models/concerns/redde}/sluggable.rb +6 -3
- data/app/models/concerns/redde/tree_sortable.rb +40 -0
- data/{lib/redde/concerns → app/models/concerns/redde}/with_photo.rb +5 -5
- data/app/models/redde/photo.rb +16 -0
- data/app/models/redde/system_command.rb +43 -0
- data/{lib → app/models}/redde/url_generator.rb +7 -3
- data/{lib/generators/redde/photo/templates/uploader.rb → app/uploaders/photo_uploader.rb} +4 -4
- data/app/views/admin/base/_tree_item.html.haml +10 -0
- data/app/views/admin/base/edit.html.haml +21 -0
- data/app/views/admin/base/index.html.haml +68 -0
- data/app/views/admin/base/tree.html.haml +14 -0
- data/app/views/admin/managers/edit.html.haml +11 -0
- data/app/views/admin/managers/index.html.haml +17 -0
- data/{lib/generators/redde/layout/templates/base → app/views/admin/redde}/_header.html.haml +5 -6
- data/app/views/admin/redde/_main_menu.html.haml +12 -0
- data/app/views/admin/redde/_page_header.html.haml +3 -0
- data/app/views/admin/redde/_sidebar.html.haml +16 -0
- data/{lib/generators/redde/layout/templates/base → app/views/admin/redde}/_validate.haml +2 -2
- data/app/views/admin/redde_photos/_photo.haml +11 -0
- data/app/views/admin/redde_photos/_photos.haml +28 -0
- data/app/views/admin/system_commands/index.html.haml +25 -0
- data/app/views/kaminari/redde/_first_page.html.haml +9 -0
- data/app/views/kaminari/redde/_gap.html.haml +8 -0
- data/app/views/kaminari/redde/_last_page.html.haml +9 -0
- data/app/views/kaminari/redde/_next_page.html.haml +9 -0
- data/app/views/kaminari/redde/_page.html.haml +10 -0
- data/app/views/kaminari/redde/_paginator.html.haml +18 -0
- data/app/views/kaminari/redde/_prev_page.html.haml +9 -0
- data/{lib/generators/redde/layout/templates → app/views}/layouts/admin.html.haml +28 -29
- data/{lib/generators/redde/layout/templates → app/views}/layouts/login.html.haml +32 -32
- data/bin/rails +12 -0
- data/config/locales/paginate.ru.yml +9 -0
- data/config/routes.rb +8 -0
- data/db/migrate/20160121152706_create_redde_photos.rb +16 -0
- data/lib/generators/redde/layout/layout_generator.rb +3 -26
- data/lib/generators/redde/layout/templates/assets/javascripts/admin.js +1 -0
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin.css +15 -0
- data/lib/generators/redde/scaffold/scaffold_generator.rb +45 -8
- data/lib/generators/redde/scaffold/templates/controllers/controller.rb +2 -45
- data/lib/generators/redde/scaffold/templates/edit.html.haml +4 -9
- data/lib/generators/redde/scaffold/templates/index.html.haml +2 -6
- data/lib/generators/redde/scaffold/templates/ru.yml +14 -0
- data/lib/redde/engine.rb +16 -0
- data/lib/redde/version.rb +1 -1
- data/lib/redde.rb +20 -4
- data/lib/tasks/redde_tasks.rake +4 -0
- data/redde.gemspec +44 -22
- metadata +482 -455
- data/Guardfile +0 -24
- data/LICIENSE.md +0 -21
- data/lib/generators/redde/layout/templates/assets/images/admin/del.png +0 -0
- data/lib/generators/redde/layout/templates/assets/images/admin/folder_.png +0 -0
- data/lib/generators/redde/layout/templates/assets/javascripts/admin/index.js +0 -20
- data/lib/generators/redde/layout/templates/assets/redactor/javascripts/redactor/index.coffee +0 -4
- data/lib/generators/redde/layout/templates/assets/redactor/stylesheets/redactor/index.scss +0 -369
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/error-msg.sass +0 -47
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/notice.scss +0 -39
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/photos.scss +0 -31
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/sortable.sass +0 -44
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/custom/index.scss +0 -1
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/index.scss +0 -131
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/input.sass +0 -35
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/reset.sass +0 -33
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/table.scss +0 -24
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/index.scss +0 -6
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/header.sass +0 -50
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/launchbar.sass +0 -23
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/main.sass +0 -38
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-header.sass +0 -22
- data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-sidebar.sass +0 -24
- data/lib/generators/redde/layout/templates/base/_launchbar.html.haml +0 -11
- data/lib/generators/redde/layout/templates/base/_sidebar.html.haml +0 -14
- data/lib/generators/redde/layout/templates/controllers/base_controller.rb +0 -28
- data/lib/generators/redde/layout/templates/form_builders/redde_form_builder.rb +0 -63
- data/lib/generators/redde/layout/templates/helpers/admin_helper.rb +0 -94
- data/lib/generators/redde/photo/photo_generator.rb +0 -35
- data/lib/generators/redde/photo/templates/controller.rb +0 -20
- data/lib/generators/redde/photo/templates/create_photos.rb +0 -16
- data/lib/generators/redde/photo/templates/photo.rb +0 -4
- data/lib/generators/redde/photo/templates/photos/_photo.haml +0 -5
- data/lib/generators/redde/photo/templates/photos/_photos.haml +0 -19
- data/lib/generators/redde/photo/templates/photos/create.js.erb +0 -1
- data/lib/redde/concerns/photoable.rb +0 -17
- data/spec/dummy/.rspec +0 -1
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/images/admin/addphoto.png +0 -0
- data/spec/dummy/app/assets/images/admin/ajaxloader2.gif +0 -0
- data/spec/dummy/app/assets/images/admin/arrow_down.png +0 -0
- data/spec/dummy/app/assets/images/admin/arrow_enter.png +0 -0
- data/spec/dummy/app/assets/images/admin/arrow_right.png +0 -0
- data/spec/dummy/app/assets/images/admin/coins.png +0 -0
- data/spec/dummy/app/assets/images/admin/confirm.png +0 -0
- data/spec/dummy/app/assets/images/admin/del.png +0 -0
- data/spec/dummy/app/assets/images/admin/delete.png +0 -0
- data/spec/dummy/app/assets/images/admin/email.png +0 -0
- data/spec/dummy/app/assets/images/admin/error-label-triangle.png +0 -0
- data/spec/dummy/app/assets/images/admin/error.png +0 -0
- data/spec/dummy/app/assets/images/admin/favicon.png +0 -0
- data/spec/dummy/app/assets/images/admin/fio.png +0 -0
- data/spec/dummy/app/assets/images/admin/folder.png +0 -0
- data/spec/dummy/app/assets/images/admin/folder_.png +0 -0
- data/spec/dummy/app/assets/images/admin/icon_eye.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/css/jquery.lightbox-0.5.css +0 -101
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-blank.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-btn-close.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-btn-next.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-btn-prev.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-ico-loading.gif +0 -0
- data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.js +0 -32
- data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.lightbox-0.5.js +0 -477
- data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.lightbox-0.5.min.js +0 -42
- data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.lightbox-0.5.pack.js +0 -14
- data/spec/dummy/app/assets/images/admin/logo.png +0 -0
- data/spec/dummy/app/assets/images/admin/logo_reddeshop.png +0 -0
- data/spec/dummy/app/assets/images/admin/move_handler.png +0 -0
- data/spec/dummy/app/assets/images/admin/phone.png +0 -0
- data/spec/dummy/app/assets/images/admin/photo_ico.png +0 -0
- data/spec/dummy/app/assets/images/admin/print.png +0 -0
- data/spec/dummy/app/assets/images/admin/refresh.png +0 -0
- data/spec/dummy/app/assets/images/admin/submit.png +0 -0
- data/spec/dummy/app/assets/images/admin/submit_hover.png +0 -0
- data/spec/dummy/app/assets/images/admin/view.png +0 -0
- data/spec/dummy/app/assets/images/admin/view_mk.png +0 -0
- data/spec/dummy/app/assets/images/redactor/icons.png +0 -0
- data/spec/dummy/app/assets/images/redactor/plugins/file.html +0 -3
- data/spec/dummy/app/assets/images/redactor/plugins/image.html +0 -39
- data/spec/dummy/app/assets/images/redactor/plugins/image_edit.html +0 -35
- data/spec/dummy/app/assets/images/redactor/plugins/link.html +0 -74
- data/spec/dummy/app/assets/images/redactor/plugins/table.html +0 -25
- data/spec/dummy/app/assets/images/redactor/plugins/video.html +0 -15
- data/spec/dummy/app/assets/javascripts/admin/jquery.mjs.nestedSortable.js +0 -429
- data/spec/dummy/app/assets/javascripts/admin.js +0 -21
- data/spec/dummy/app/assets/javascripts/application.js +0 -14
- data/spec/dummy/app/assets/javascripts/jquery-migrate-1.2.1.js +0 -521
- data/spec/dummy/app/assets/javascripts/redactor/langs/en.js +0 -76
- data/spec/dummy/app/assets/javascripts/redactor/langs/ru.js +0 -75
- data/spec/dummy/app/assets/javascripts/redactor/redactor.js.erb +0 -2248
- data/spec/dummy/app/assets/javascripts/redactor/toolbars/default.js +0 -219
- data/spec/dummy/app/assets/stylesheets/admin/blocks/list.scss +0 -22
- data/spec/dummy/app/assets/stylesheets/admin/blocks/notice.scss +0 -39
- data/spec/dummy/app/assets/stylesheets/admin/blocks/orders.scss +0 -22
- data/spec/dummy/app/assets/stylesheets/admin/blocks/paginate.sass +0 -28
- data/spec/dummy/app/assets/stylesheets/admin/blocks/pagination.scss +0 -28
- data/spec/dummy/app/assets/stylesheets/admin/blocks/partners.scss +0 -15
- data/spec/dummy/app/assets/stylesheets/admin/blocks/phead-tabs.sass +0 -27
- data/spec/dummy/app/assets/stylesheets/admin/blocks/photos.scss +0 -31
- data/spec/dummy/app/assets/stylesheets/admin/blocks/sortable.sass +0 -44
- data/spec/dummy/app/assets/stylesheets/admin/custom/index.scss +0 -1
- data/spec/dummy/app/assets/stylesheets/admin/defaults/index.scss +0 -131
- data/spec/dummy/app/assets/stylesheets/admin/defaults/input.sass +0 -35
- data/spec/dummy/app/assets/stylesheets/admin/defaults/reset.sass +0 -33
- data/spec/dummy/app/assets/stylesheets/admin/defaults/table.scss +0 -24
- data/spec/dummy/app/assets/stylesheets/admin/index.scss +0 -6
- data/spec/dummy/app/assets/stylesheets/admin/layouts/header.sass +0 -50
- data/spec/dummy/app/assets/stylesheets/admin/layouts/launchbar.sass +0 -23
- data/spec/dummy/app/assets/stylesheets/admin/layouts/login.sass +0 -25
- data/spec/dummy/app/assets/stylesheets/admin/layouts/main.sass +0 -38
- data/spec/dummy/app/assets/stylesheets/admin/layouts/page-header.sass +0 -22
- data/spec/dummy/app/assets/stylesheets/admin/layouts/page-sidebar.sass +0 -24
- data/spec/dummy/app/assets/stylesheets/admin/layouts/sidebar.sass +0 -30
- data/spec/dummy/app/assets/stylesheets/admin/shop/_filter.scss +0 -16
- data/spec/dummy/app/assets/stylesheets/admin/shop/_order-sh.scss +0 -59
- data/spec/dummy/app/assets/stylesheets/admin/shop/_pe.scss +0 -43
- data/spec/dummy/app/assets/stylesheets/redactor/wym.css +0 -136
- data/spec/dummy/app/controllers/admin/base_controller.rb +0 -28
- data/spec/dummy/app/controllers/admin/managers_controller.rb +0 -36
- data/spec/dummy/app/controllers/application_controller.rb +0 -6
- data/spec/dummy/app/controllers/articles_controller.rb +0 -8
- data/spec/dummy/app/controllers/managers/registrations_controller.rb +0 -21
- data/spec/dummy/app/helpers/admin_helper.rb +0 -94
- data/spec/dummy/app/models/article.rb +0 -4
- data/spec/dummy/app/models/article_category.rb +0 -2
- data/spec/dummy/app/models/photo.rb +0 -3
- data/spec/dummy/app/views/admin/base/_header.html.haml +0 -12
- data/spec/dummy/app/views/admin/base/_launchbar.html.haml +0 -11
- data/spec/dummy/app/views/admin/base/_sidebar.html.haml +0 -14
- data/spec/dummy/app/views/admin/base/_validate.haml +0 -8
- data/spec/dummy/app/views/admin/base/welcome.haml +0 -2
- data/spec/dummy/app/views/admin/photos/_photo.haml +0 -5
- data/spec/dummy/app/views/admin/photos/_photos.haml +0 -19
- data/spec/dummy/app/views/admin/photos/create.js.erb +0 -1
- data/spec/dummy/app/views/admin/photos/destroy.js.erb +0 -1
- data/spec/dummy/app/views/articles/show.html.haml +0 -2
- data/spec/dummy/app/views/layouts/admin.html.haml +0 -29
- data/spec/dummy/app/views/layouts/application.html.erb +0 -15
- data/spec/dummy/app/views/layouts/login.html.haml +0 -32
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config/application.rb +0 -33
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -29
- data/spec/dummy/config/environments/production.rb +0 -80
- data/spec/dummy/config/environments/test.rb +0 -36
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -12
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -36
- data/spec/dummy/config/routes.rb +0 -4
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/migrate/20130908123351_create_articles.rb +0 -9
- data/spec/dummy/db/migrate/20140128152208_create_article_categories.rb +0 -11
- data/spec/dummy/db/migrate/20140607122532_create_photos.rb +0 -16
- data/spec/dummy/db/schema.rb +0 -98
- data/spec/dummy/public/404.html +0 -58
- data/spec/dummy/public/422.html +0 -58
- data/spec/dummy/public/500.html +0 -57
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/generators/layout_generator_spec.rb +0 -42
- data/spec/generators/photo_generator_spec.rb +0 -32
- data/spec/generators/scaffold_generator_spec.rb +0 -58
- data/spec/models/sluggable_spec.rb +0 -42
- data/spec/models/url_generator_spec.rb +0 -18
- data/spec/models/with_photo_spec.rb +0 -25
- data/spec/spec_helper.rb +0 -52
- /data/{lib/generators/redde/layout/templates/assets/redactor → app/assets}/images/.keep +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/addphoto.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/ajaxloader2.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/arrow_down.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/arrow_enter.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/arrow_right.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/coins.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/confirm.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/delete.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/email.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/error.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/favicon.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/fio.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/icon_eye.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/css/jquery.lightbox-0.5.css +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-blank.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-btn-close.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-btn-next.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-btn-prev.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-ico-loading.gif +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.js +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.lightbox-0.5.js +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.lightbox-0.5.min.js +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.lightbox-0.5.pack.js +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/logo_reddeshop.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/phone.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/photo_ico.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/print.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/refresh.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/submit.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/submit_hover.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/view.png +0 -0
- /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/view_mk.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/images/admin → app/assets/images/redde}/error-label-triangle.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/images/admin → app/assets/images/redde}/folder.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/images/admin → app/assets/images/redde}/logo.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/images/admin/move_handler.png → app/assets/images/redde/move-handler.png} +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/icons.png +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/file.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/image.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/image_edit.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/link.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/table.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/video.html +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/langs/en.js +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/langs/ru.js +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/toolbars/default.js +0 -0
- /data/{lib/generators/redde/layout/templates/assets/javascripts/admin → app/assets/javascripts/redde/sortTree}/jquery.mjs.nestedSortable.js +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/list.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/orders.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/paginate.sass +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/pagination.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/partners.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/phead-tabs.sass +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/layouts/login.sass +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/layouts/sidebar.sass +0 -0
- /data/{lib/generators/redde/layout/templates/assets/redactor/stylesheets → app/assets/stylesheets/redde}/redactor/wym.css +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/shop/_filter.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/shop/_order-sh.scss +0 -0
- /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/shop/_pe.scss +0 -0
- /data/{spec/dummy/app/assets/images → app/controllers}/.keep +0 -0
- /data/{lib/generators/redde/layout/templates → app}/controllers/managers/registrations_controller.rb +0 -0
- /data/{spec/dummy/app/models → app/helpers}/.keep +0 -0
- /data/{spec/dummy/lib/assets → app/mailers}/.keep +0 -0
- /data/{spec/dummy/log → app/models}/.keep +0 -0
- /data/{spec/dummy/app/assets/stylesheets/application.css.scss → app/views/.keep} +0 -0
- /data/{lib/generators/redde/layout/templates → app/views/admin}/base/welcome.haml +0 -0
- /data/{lib/generators/redde/photo/templates/photos → app/views/admin/redde_photos}/destroy.js.erb +0 -0
@@ -0,0 +1,68 @@
|
|
1
|
+
= render 'admin/redde/page_header'
|
2
|
+
|
3
|
+
- res_collection = instance_variable_get("@#{collection}")
|
4
|
+
- if res_collection.any?
|
5
|
+
%table.list-v2{list_table_options}
|
6
|
+
%colgroup
|
7
|
+
%col.list-v2__col
|
8
|
+
- column_names.each do |column|
|
9
|
+
%col.list-v2__col
|
10
|
+
%col.list-v2__col._del
|
11
|
+
%col.list-v2__col
|
12
|
+
%thead
|
13
|
+
%tr
|
14
|
+
%th.list-v2__head
|
15
|
+
- column_names.each_with_index do |column, index|
|
16
|
+
%th.list-v2__head{ class: 'list-v2__head_first' }= model_name.human_attribute_name(column) unless ['position', 'visible'].include? column
|
17
|
+
%th.list-v2__head._del
|
18
|
+
%th.list-v2__head
|
19
|
+
- res_collection.each do |item|
|
20
|
+
%tr{sort_table_options(item), 'data-href' => url_for([:edit, :admin, item])}
|
21
|
+
%td.list-v2__cell
|
22
|
+
- column_names.each do |column|
|
23
|
+
- case column
|
24
|
+
- when 'position'
|
25
|
+
%td.list-v2__cell._handle{ class: 'list-v2__cell_first' }
|
26
|
+
- when 'visible'
|
27
|
+
%td.list-v2__cell._eye{ class: 'list-v2__cell_first' }
|
28
|
+
= link_to '', send("admin_#{record}_path", item, record => { visible: !item.visible} ), class: ['list-v2__eye', ('_disactive' if !item.visible)], data: { method: 'put' }
|
29
|
+
- else
|
30
|
+
%td.list-v2__cell{ class: 'list-v2__cell_first' }= link_to item.send(column), url_for([:edit, :admin, item])
|
31
|
+
%td.list-v2__cell= link_to '', [:admin, item], method: :delete, data: { confirm: 'Точно Удалить?' }, class: 'list-v2__del'
|
32
|
+
%td.list-v2__cell
|
33
|
+
|
34
|
+
= paginate res_collection, theme: 'redde'
|
35
|
+
|
36
|
+
- else
|
37
|
+
%h3
|
38
|
+
Ни одной #{tplural(model_name)} не найдено
|
39
|
+
|
40
|
+
-# unless @<%= controller_name %>.empty?
|
41
|
+
%table.list<%= ".sortable{ 'data-sortable' => true }" if column_names.include?('position') %>
|
42
|
+
%colgroup
|
43
|
+
<%- columns.each do |column| -%>
|
44
|
+
%col<%= '.w1' if ['position', 'visible'].include? column.name %>
|
45
|
+
<%- end -%>
|
46
|
+
%col.w1
|
47
|
+
%thead
|
48
|
+
%tr
|
49
|
+
<%- columns.each do |column| -%>
|
50
|
+
%th<%- unless ['position', 'visible'].include? column.name %>= <%= model_name.demodulize %>.human_attribute_name('<%= column.name %>')<% end %>
|
51
|
+
<%- end -%>
|
52
|
+
%th
|
53
|
+
- @<%= plural_resource_name %>.each do |<%= resource_name %>|
|
54
|
+
<%- if column_names.include?('position') -%>
|
55
|
+
%tr{ id: "pos_#{<%= resource_name %>.id}" }
|
56
|
+
<%- else -%>
|
57
|
+
%tr
|
58
|
+
<%- end -%>
|
59
|
+
<%- columns.each do |column| -%>
|
60
|
+
<%- if column.name == 'position' -%>
|
61
|
+
%td.handle= image_tag 'admin/move_handler.png'
|
62
|
+
<%- elsif column.name == 'visible' -%>
|
63
|
+
%td.show= link_to '', admin_<%= singular_controller_routing_path %>_path(<%= resource_name %>, <%= resource_name %>: { visible: !<%= resource_name %>.visible} ), class: <%= resource_name %>.visible ? nil : 'not-show', data: { method: 'put' }
|
64
|
+
<%- else -%>
|
65
|
+
%td= link_to <%= resource_name %>.<%= column.name %>, [:edit, :admin, <%= resource_name %>]
|
66
|
+
<%- end -%>
|
67
|
+
<%- end -%>
|
68
|
+
%td= link_to 'Удалить', [:admin, <%= resource_name %>], method: :delete, data: { confirm: 'Точно Удалить?' }, class: :del
|
@@ -0,0 +1,14 @@
|
|
1
|
+
= render 'admin/redde/page_header'
|
2
|
+
|
3
|
+
- res_collection = instance_variable_get("@#{collection}")
|
4
|
+
- if res_collection.any?
|
5
|
+
- cache [model_name.maximum(:updated_at).to_i] do
|
6
|
+
%ol.sort-tree{ 'data-sort-tree' => '' }= render partial: 'tree_item', collection: res_collection, as: :item
|
7
|
+
|
8
|
+
=# sort_tree sort_admin_categories_path, 2
|
9
|
+
|
10
|
+
- else
|
11
|
+
%h3
|
12
|
+
Ни одной
|
13
|
+
#{tplural(model_name)}
|
14
|
+
не найдено
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- content_for :page_header do
|
2
|
+
%h1
|
3
|
+
- if @manager.new_record?
|
4
|
+
Добавить #{taccusative(:manager)}
|
5
|
+
- else
|
6
|
+
Редактировать #{taccusative(:manager)}
|
7
|
+
%p= link_to 'Назад', [:admin, :managers]
|
8
|
+
|
9
|
+
= redde_form_for [:admin, @manager] do |f|
|
10
|
+
= f.redde_text_field :email
|
11
|
+
= f.redde_text_field :password
|
@@ -0,0 +1,17 @@
|
|
1
|
+
- content_for(:page_header) do
|
2
|
+
%h1= tplural Manager
|
3
|
+
%p= link_to "Добавить #{taccusative('manager')}", [:new, :admin, :manager]
|
4
|
+
|
5
|
+
- unless @managers.empty?
|
6
|
+
%table.list
|
7
|
+
%colgroup
|
8
|
+
%col
|
9
|
+
%col.w1
|
10
|
+
%thead
|
11
|
+
%tr
|
12
|
+
%th= Manager.human_attribute_name('email')
|
13
|
+
%th
|
14
|
+
- @managers.each do |manager|
|
15
|
+
%tr
|
16
|
+
%td= link_to manager.email, [:edit, :admin, manager]
|
17
|
+
%td= link_to 'Удалить', [:admin, manager], method: :delete, data: { confirm: 'Точно Удалить?' }, class: :del
|
@@ -2,11 +2,10 @@
|
|
2
2
|
.header__init
|
3
3
|
= link_to admin_root_path || '/admin', class: 'header__logo' do
|
4
4
|
ReddeCMS
|
5
|
-
%
|
6
|
-
|
5
|
+
%span.header__logo-text custom system
|
6
|
+
= render 'admin/redde/main_menu'
|
7
7
|
.header__links
|
8
|
+
= link_to Rails.application.class.parent_name, root_path || '/', target: :_blank, class: 'header__link _name'
|
8
9
|
- if current_manager
|
9
|
-
= mail_to current_manager.email
|
10
|
-
= link_to 'Выход', destroy_manager_session_path, method: :delete
|
11
|
-
.header__center
|
12
|
-
= link_to Rails.application.class.parent_name, root_path || '/', target: :_blank
|
10
|
+
= mail_to current_manager.email, current_manager.email, class: 'header__link _user'
|
11
|
+
= link_to 'Выход', destroy_manager_session_path, method: :delete, class: 'header__link _exit'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- case controller_name
|
2
|
+
- when 'products' then @active = :shop
|
3
|
+
- when 'articles', 'article_categories', 'categories' then @active = :materials
|
4
|
+
- when 'users', 'managers' then @active = :system
|
5
|
+
|
6
|
+
.main-menu
|
7
|
+
= link_to 'Материалы', nil, class: ['main-menu__link b_folder', ('_active' if @active == :shop)]
|
8
|
+
= link_to 'Обратная связь', nil, class: ['main-menu__link b_home', ('_active' if @active == :materials)]
|
9
|
+
= link_to 'Система', [:admin, :managers], class: ['main-menu__link b_cog', ('_active' if @active == :system)]
|
10
|
+
-# and b_list icon
|
11
|
+
-#
|
12
|
+
%span.main-menu__time= Russian.strftime(Time.now, '%d %b, %Y %H:%M ')
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%nav.sidebar
|
2
|
+
- case @active
|
3
|
+
- when :shop
|
4
|
+
= sidebar_link 'Товары', [:admin, :products]
|
5
|
+
- when :materials
|
6
|
+
= sidebar_link 'Статьи', [:admin, :articles]
|
7
|
+
= sidebar_link 'Категории статей', [:admin, :article_categories]
|
8
|
+
= sidebar_link 'Категории', [:admin, :categories]
|
9
|
+
- when :system
|
10
|
+
= sidebar_link 'Администраторы', [:admin, :managers]
|
11
|
+
= sidebar_link 'Системные команды', [:admin, :system_commands]
|
12
|
+
- else
|
13
|
+
= sidebar_link 'Демо active', nil
|
14
|
+
= link_to nil, class: ['sidebar__link'] do
|
15
|
+
Демо
|
16
|
+
%span.sidebar__badge 2
|
@@ -0,0 +1,11 @@
|
|
1
|
+
%li.photos__item{ :id => "photo_#{photo.id}" }
|
2
|
+
= link_to photo.src_url, class: 'photos__link' do
|
3
|
+
= image_tag photo.src.admin, class: 'photos__img'
|
4
|
+
%span.photos__title= photo.src.file.filename
|
5
|
+
= link_to("",
|
6
|
+
url_for([:admin, photo]),
|
7
|
+
method: :delete,
|
8
|
+
"data-confirm" => "Точно удалить?",
|
9
|
+
remote: true,
|
10
|
+
title: "Удалить",
|
11
|
+
class: "del photos__del")
|
@@ -0,0 +1,28 @@
|
|
1
|
+
- unless parent.new_record?
|
2
|
+
= content_for(:page_sidebar) do
|
3
|
+
.page-sidebar__title
|
4
|
+
Фотографии
|
5
|
+
- if editable ||= false
|
6
|
+
= link_to "ред.", [:admin, parent]
|
7
|
+
|
8
|
+
%ul.photos.js-photos{ "data-sortable" => { items: :li, handle: nil, axis: nil, url: url_for([:sort, :admin, :redde_photos])}.to_json }
|
9
|
+
= render partial: 'admin/redde_photos/photo', collection: parent.photos
|
10
|
+
|
11
|
+
-#
|
12
|
+
#preview
|
13
|
+
#drag-n-drop{:style => "display: none; margin-top: 5px;"}
|
14
|
+
#drop-zone.b-dropzone{style: 'height: 100px;', data: {"upload-url" => url_for([:admin, parent, :photos])}}
|
15
|
+
.b-dropzone__bg
|
16
|
+
.b-dropzone__txt Перетащите файлы сюда
|
17
|
+
|
18
|
+
#buttons-panel{style: 'margin-bottom: 10px;'}
|
19
|
+
.b-button.js-fileapi-wrapper
|
20
|
+
.b-button__text Загрузить файлы
|
21
|
+
%input.b-button__input.js-fileapi{:name => "files", :type => "file", :multiple => true, data: {"upload-url" => url_for([:admin, parent, :photos])}}
|
22
|
+
|
23
|
+
= form_for [:admin, parent.photos.build], html: { class: 'photos-uploader js-photos-uploader' } do |f|
|
24
|
+
= f.hidden_field :imageable_type
|
25
|
+
= f.hidden_field :imageable_id
|
26
|
+
%span.sbm.photos-uploader__btn.icon-upload
|
27
|
+
Загрузить
|
28
|
+
= f.file_field :src, class: 'photos-uploader__inp'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
= content_for :page_header do
|
2
|
+
%h1 Системные команды
|
3
|
+
|
4
|
+
%h2 Сброс кэша
|
5
|
+
%p
|
6
|
+
Иногда, при обновлении данных в административной панели, данные на сайте не меняются. Скорее всего, это происходит из-за кеширования. Кеширование - процесс сохранения дорогих операция для исключения их повторного выполнения. Сбро кэша это безопасная операция. Доступность сайта никак не будет затронута. Следующий запрос к сайту может выполняться немного дольше, чем обычно.
|
7
|
+
= command_link('Сбросить кэш', :cache, 'Вы уверены, что хотите сбросить кэш?')
|
8
|
+
%br
|
9
|
+
|
10
|
+
%h2 Перезапуск веб-сервера
|
11
|
+
%p
|
12
|
+
Иногда, при выкатке новой версии сайта, веб-сервер не перезапускается. Вы можете сделать это самостоятельно. Перезапуск веб-сервера это безопасная операция. Во время перезагрузки веб-сервера ваш сайт будет доступен.
|
13
|
+
= command_link 'Перезапустить веб-сервер', :unicorn, 'Вы уверены, что хотите перезапустить веб-сервер?'
|
14
|
+
%br
|
15
|
+
|
16
|
+
%h2 Перезпуск обработчика фоновых задач
|
17
|
+
%p
|
18
|
+
Обработчик фоновых задач занимается отправкой емейлов и прочими задачами, которые можно отложить в фон. Если у вас перестали отправляться емейлы, попробуйте перезапустить обработчик фоновых задач
|
19
|
+
= command_link 'Перезапустить обработчик фоновых задач', :sidekiq, 'Вы уверены, что хотите перезапустить обработчик фоновых задач?'
|
20
|
+
%br
|
21
|
+
|
22
|
+
%h2 Перезапуск сервера
|
23
|
+
%p
|
24
|
+
В крайнем случае может пригодиться перезагрузка сервера. Перезагрузка может занять длительное время (до 30 минут) в случае выполнения проверки целоствности жесткого диска. Во время проверки диска ваш сайт будет недоступен.
|
25
|
+
= command_link 'Перезапустить сервер', :reboot, 'Вы уверены, что хотите перезагрузить сервер?'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
-# Link to the "First" page
|
2
|
+
-# available local variables
|
3
|
+
-# url: url to the first page
|
4
|
+
-# current_page: a page object for the currently displayed page
|
5
|
+
-# total_pages: total number of pages
|
6
|
+
-# per_page: number of items to fetch per page
|
7
|
+
-# remote: data-remote
|
8
|
+
%span.first
|
9
|
+
= link_to_unless current_page.first?, raw(t 'views.pagination.redde.first'), url, :remote => remote
|
@@ -0,0 +1,8 @@
|
|
1
|
+
-# Non-link tag that stands for skipped pages...
|
2
|
+
-# available local variables
|
3
|
+
-# current_page: a page object for the currently displayed page
|
4
|
+
-# total_pages: total number of pages
|
5
|
+
-# per_page: number of items to fetch per page
|
6
|
+
-# remote: data-remote
|
7
|
+
%span.page.gap
|
8
|
+
= raw(t 'views.pagination.redde.truncate')
|
@@ -0,0 +1,9 @@
|
|
1
|
+
-# Link to the "Last" page
|
2
|
+
-# available local variables
|
3
|
+
-# url: url to the last page
|
4
|
+
-# current_page: a page object for the currently displayed page
|
5
|
+
-# total_pages: total number of pages
|
6
|
+
-# per_page: number of items to fetch per page
|
7
|
+
-# remote: data-remote
|
8
|
+
%span.last
|
9
|
+
= link_to_unless current_page.last?, raw(t 'views.pagination.redde.last'), url, {:remote => remote}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
-# Link to the "Next" page
|
2
|
+
-# available local variables
|
3
|
+
-# url: url to the next page
|
4
|
+
-# current_page: a page object for the currently displayed page
|
5
|
+
-# total_pages: total number of pages
|
6
|
+
-# per_page: number of items to fetch per page
|
7
|
+
-# remote: data-remote
|
8
|
+
%span.next
|
9
|
+
= link_to_unless current_page.last?, raw(t 'views.pagination.redde.next'), url, :rel => 'next', :remote => remote
|
@@ -0,0 +1,10 @@
|
|
1
|
+
-# Link showing page number
|
2
|
+
-# available local variables
|
3
|
+
-# page: a page object for "this" page
|
4
|
+
-# url: url to this page
|
5
|
+
-# current_page: a page object for the currently displayed page
|
6
|
+
-# total_pages: total number of pages
|
7
|
+
-# per_page: number of items to fetch per page
|
8
|
+
-# remote: data-remote
|
9
|
+
%span{:class => "page#{' current' if page.current?}"}
|
10
|
+
= link_to_unless page.current?, page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
-# The container tag
|
2
|
+
-# available local variables
|
3
|
+
-# current_page: a page object for the currently displayed page
|
4
|
+
-# total_pages: total number of pages
|
5
|
+
-# per_page: number of items to fetch per page
|
6
|
+
-# remote: data-remote
|
7
|
+
-# paginator: the paginator that renders the pagination tags inside
|
8
|
+
= paginator.render do
|
9
|
+
%nav.pagination
|
10
|
+
= first_page_tag unless current_page.first?
|
11
|
+
= prev_page_tag unless current_page.first?
|
12
|
+
- each_page do |page|
|
13
|
+
- if page.left_outer? || page.right_outer? || page.inside_window?
|
14
|
+
= page_tag page
|
15
|
+
- elsif !page.was_truncated?
|
16
|
+
= gap_tag
|
17
|
+
= next_page_tag unless current_page.last?
|
18
|
+
= last_page_tag unless current_page.last?
|
@@ -0,0 +1,9 @@
|
|
1
|
+
-# Link to the "Previous" page
|
2
|
+
-# available local variables
|
3
|
+
-# url: url to the previous page
|
4
|
+
-# current_page: a page object for the currently displayed page
|
5
|
+
-# total_pages: total number of pages
|
6
|
+
-# per_page: number of items to fetch per page
|
7
|
+
-# remote: data-remote
|
8
|
+
%span.prev
|
9
|
+
= link_to_unless current_page.first?, raw(t 'views.pagination.redde.previous'), url, :rel => 'prev', :remote => remote
|
@@ -1,29 +1,28 @@
|
|
1
|
-
!!!
|
2
|
-
%html{ lang: 'en' }
|
3
|
-
%head
|
4
|
-
%meta{ charset: 'UTF-8'}
|
5
|
-
%title= @page_title || 'ReddeCMS'
|
6
|
-
= favicon_link_tag 'admin/favicon.png'
|
7
|
-
= stylesheet_link_tag 'admin'
|
8
|
-
= javascript_include_tag 'admin'
|
9
|
-
= yield :js
|
10
|
-
= csrf_meta_tag
|
11
|
-
%body
|
12
|
-
= render '
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
= yield
|
1
|
+
!!!
|
2
|
+
%html{ lang: 'en' }
|
3
|
+
%head
|
4
|
+
%meta{ charset: 'UTF-8'}
|
5
|
+
%title= @page_title || 'ReddeCMS'
|
6
|
+
= favicon_link_tag 'admin/favicon.png'
|
7
|
+
= stylesheet_link_tag 'admin'
|
8
|
+
= javascript_include_tag 'admin'
|
9
|
+
= yield :js
|
10
|
+
= csrf_meta_tag
|
11
|
+
%body
|
12
|
+
= render 'admin/redde/header'
|
13
|
+
.wrapper
|
14
|
+
= render 'admin/redde/sidebar'
|
15
|
+
.main
|
16
|
+
.page-header
|
17
|
+
= yield(:page_header)
|
18
|
+
- if notice
|
19
|
+
.flash-msg._notice= notice
|
20
|
+
- if alert
|
21
|
+
.flash-msg._alert= alert
|
22
|
+
.main__page
|
23
|
+
#filter
|
24
|
+
= yield(:filter)
|
25
|
+
- if yield(:page_sidebar).present?
|
26
|
+
.main__sidebar.page-sidebar= yield(:page_sidebar)
|
27
|
+
.main__content
|
28
|
+
= yield
|
@@ -1,32 +1,32 @@
|
|
1
|
-
!!!
|
2
|
-
%html.login{
|
3
|
-
%head
|
4
|
-
%meta{
|
5
|
-
%title Вход на сайт | Административная панель
|
6
|
-
= stylesheet_link_tag 'admin'
|
7
|
-
= javascript_include_tag "admin"
|
8
|
-
= csrf_meta_tag
|
9
|
-
%body
|
10
|
-
%table.login__table
|
11
|
-
%tr
|
12
|
-
%td.login__cell
|
13
|
-
.main._login
|
14
|
-
.page-header
|
15
|
-
%h1 Административная панель
|
16
|
-
.page
|
17
|
-
.content
|
18
|
-
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
19
|
-
.login__fields
|
20
|
-
= f.label :email, 'E-mail'
|
21
|
-
%br
|
22
|
-
= f.
|
23
|
-
.login__fields
|
24
|
-
= f.label :password, 'Пароль'
|
25
|
-
%br
|
26
|
-
= f.password_field :password, size: 35, class: 'login__inp'
|
27
|
-
- if devise_mapping.rememberable?
|
28
|
-
.login__fields
|
29
|
-
= f.check_box :remember_me
|
30
|
-
= f.label :remember_me, 'Оставаться в системе'
|
31
|
-
.login__actions
|
32
|
-
= f.submit 'Войти'
|
1
|
+
!!!
|
2
|
+
%html.login{ lang: 'en' }
|
3
|
+
%head
|
4
|
+
%meta{ charset: 'UTF-8'}
|
5
|
+
%title Вход на сайт | Административная панель
|
6
|
+
= stylesheet_link_tag 'admin'
|
7
|
+
= javascript_include_tag "admin"
|
8
|
+
= csrf_meta_tag
|
9
|
+
%body
|
10
|
+
%table.login__table
|
11
|
+
%tr
|
12
|
+
%td.login__cell
|
13
|
+
.main._login
|
14
|
+
.page-header
|
15
|
+
%h1 Административная панель
|
16
|
+
.page
|
17
|
+
.content
|
18
|
+
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
19
|
+
.login__fields
|
20
|
+
= f.label :email, 'E-mail'
|
21
|
+
%br
|
22
|
+
= f.email_field :email, class: 'login__inp'
|
23
|
+
.login__fields
|
24
|
+
= f.label :password, 'Пароль'
|
25
|
+
%br
|
26
|
+
= f.password_field :password, size: 35, class: 'login__inp'
|
27
|
+
- if devise_mapping.rememberable?
|
28
|
+
.login__fields
|
29
|
+
= f.check_box :remember_me
|
30
|
+
= f.label :remember_me, 'Оставаться в системе'
|
31
|
+
.login__actions
|
32
|
+
= f.submit 'Войти', class: 'sbm'
|
data/bin/rails
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
3
|
+
|
4
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
+
ENGINE_PATH = File.expand_path('../../lib/redde/engine', __FILE__)
|
6
|
+
|
7
|
+
# Set up gems listed in the Gemfile.
|
8
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
9
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
10
|
+
|
11
|
+
require 'rails/all'
|
12
|
+
require 'rails/engine/commands'
|
data/config/routes.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateReddePhotos < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :redde_photos do |t|
|
4
|
+
t.integer :imageable_id
|
5
|
+
t.string :imageable_type
|
6
|
+
t.integer :position
|
7
|
+
t.string :src
|
8
|
+
t.string :token
|
9
|
+
|
10
|
+
t.timestamps null: false
|
11
|
+
end
|
12
|
+
add_index :redde_photos, :imageable_id
|
13
|
+
add_index :redde_photos, :imageable_type
|
14
|
+
add_index :redde_photos, :token
|
15
|
+
end
|
16
|
+
end
|
@@ -9,44 +9,21 @@ module Redde
|
|
9
9
|
attr_reader :app_name
|
10
10
|
|
11
11
|
def make_views
|
12
|
-
|
13
|
-
template "layouts/#{layout}#{ext}", "app/views/layouts/#{layout}#{ext}"
|
14
|
-
end
|
15
|
-
directory 'base', 'app/views/admin/base'
|
12
|
+
directory '../../../../../app/views/admin/redde', 'app/views/admin/redde'
|
16
13
|
end
|
17
14
|
|
18
15
|
def make_js
|
19
|
-
|
16
|
+
template 'assets/javascripts/admin.js', 'app/assets/javascripts/admin.js'
|
20
17
|
end
|
21
18
|
|
22
19
|
def make_css
|
23
|
-
|
24
|
-
directory 'assets/redactor', 'app/assets'
|
25
|
-
end
|
26
|
-
|
27
|
-
def make_helpers
|
28
|
-
template 'helpers/admin_helper.rb', 'app/helpers/admin_helper.rb'
|
29
|
-
end
|
30
|
-
|
31
|
-
def make_images
|
32
|
-
directory 'assets/images/admin', 'app/assets/images/admin'
|
33
|
-
end
|
34
|
-
|
35
|
-
def make_controllers
|
36
|
-
template 'controllers/base_controller.rb', 'app/controllers/admin/base_controller.rb'
|
37
|
-
template 'controllers/managers_controller.rb', 'app/controllers/admin/managers_controller.rb'
|
38
|
-
directory 'controllers/managers', 'app/controllers/managers'
|
20
|
+
template 'assets/stylesheets/admin.css', 'app/assets/stylesheets/admin.css'
|
39
21
|
end
|
40
22
|
|
41
23
|
def fix_routes
|
42
24
|
route("devise_for :managers, controllers: { registrations: 'managers/registrations' }")
|
43
25
|
end
|
44
26
|
|
45
|
-
def make_form_builders
|
46
|
-
directory 'form_builders', 'app/form_builders'
|
47
|
-
end
|
48
|
-
|
49
|
-
|
50
27
|
private
|
51
28
|
|
52
29
|
def ext
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require redde
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require redde
|
14
|
+
*= require_self
|
15
|
+
*/
|