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
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: aff8f56400af753e3a0920dd703951ed530ebee8
|
4
|
+
data.tar.gz: d1c115a92042bbe4448447bdfcc2b8715b9364bd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4cc07ec6f8bf3ca41af2a05c1a8b6fa96fa34c032046a47576a23893d496ad31b8cd5738b8ec5395aea54e3bde7229e2fea065e15e4883abd750347b08cf0db3
|
7
|
+
data.tar.gz: 654b4ae1a306f8e7b5c47f779500ebc5112b6c5361a5c9d9154776e57a2f6ab9405b7c2eee43cf496ac81adba8fb5ca32af4d53e2162b8ee6633ace2a3c77a31
|
data/.gitignore
CHANGED
data/.hound.yml
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
AllCops:
|
2
|
+
Include:
|
3
|
+
- Rakefile
|
4
|
+
Exclude:
|
5
|
+
- spec/dummy/db/**/*
|
6
|
+
- spec/dummy/bin/**/*
|
7
|
+
- tmp/**/*
|
8
|
+
- spec/dummy/config/initializers/devise.rb
|
9
|
+
- lib/generators/redde/scaffold/templates/controllers/controller.rb
|
10
|
+
Rails:
|
11
|
+
Enabled: true
|
12
|
+
Documentation:
|
13
|
+
Enabled: false
|
14
|
+
LineLength:
|
15
|
+
Max: 150
|
16
|
+
Style/AlignHash:
|
17
|
+
Enabled: false
|
18
|
+
Style/ClassAndModuleChildren:
|
19
|
+
Enabled: false
|
data/.travis.yml
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
script: rspec
|
1
|
+
script: bundle exec rspec
|
2
2
|
language: ruby
|
3
3
|
notifications:
|
4
4
|
email: false
|
5
5
|
rvm:
|
6
|
-
- 2.
|
7
|
-
|
6
|
+
- 2.2
|
7
|
+
before_install:
|
8
|
+
- gem install bundler
|
8
9
|
before_script:
|
9
|
-
- '
|
10
|
+
- 'bundle exec rake db:setup RAILS_ENV=test'
|
data/Gemfile
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
#
|
4
|
-
|
5
|
-
|
6
|
-
gem 'compass-rails'
|
7
|
-
|
3
|
+
# Declare your gem's dependencies in redde.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
8
6
|
gemspec
|
7
|
+
|
8
|
+
# Declare any dependencies that are still in development here instead of in
|
9
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
10
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
11
|
+
# your gem to rubygems.org.
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2014 YOURNAME
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -6,64 +6,87 @@ Admin generator for redde projects
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
Add this line to your application's Gemfile:
|
9
|
+
* Add this line to your application's Gemfile and run `bundle` command:
|
10
10
|
|
11
|
-
|
11
|
+
```
|
12
|
+
gem 'redde'
|
13
|
+
```
|
12
14
|
|
13
|
-
|
15
|
+
* For the first time installation run
|
14
16
|
|
15
|
-
|
17
|
+
```
|
18
|
+
rails g redde:layout
|
19
|
+
```
|
16
20
|
|
17
|
-
|
21
|
+
This command will generate basic structure for your admin interface.
|
18
22
|
|
19
|
-
|
23
|
+
* Mound engine in your routes.rb
|
20
24
|
|
21
|
-
|
25
|
+
```
|
26
|
+
devise_for :managers, controllers: { registrations: 'managers/registrations' } if defined?(Devise)
|
27
|
+
mount Redde::Engine, at: '/redde'
|
28
|
+
```
|
22
29
|
|
23
|
-
|
30
|
+
It will disable Manager model registration with `devise` and mount engine.
|
24
31
|
|
25
|
-
|
32
|
+
* Include layout concern in your ApplicationController
|
26
33
|
|
27
|
-
|
34
|
+
```
|
35
|
+
class ApplicationController < ActionController::Base
|
36
|
+
include Redde::Layouts
|
37
|
+
# Prevent CSRF attacks by raising an exception.
|
38
|
+
# For APIs, you may want to use :null_session instead.
|
39
|
+
protect_from_forgery with: :exception
|
40
|
+
end
|
41
|
+
```
|
28
42
|
|
29
|
-
|
43
|
+
* Install and run migrations
|
30
44
|
|
31
|
-
|
45
|
+
```
|
46
|
+
rake redde:install:migrations
|
47
|
+
rake db:migrate
|
48
|
+
```
|
32
49
|
|
33
|
-
|
50
|
+
* Include assets in your `admin.js` and `admin.css`
|
34
51
|
|
35
|
-
|
52
|
+
`admin.js`
|
36
53
|
|
37
|
-
|
54
|
+
```
|
55
|
+
//= require redde
|
56
|
+
```
|
38
57
|
|
39
|
-
|
40
|
-
include Redde::Layout
|
41
|
-
# Prevent CSRF attacks by raising an exception.
|
42
|
-
# For APIs, you may want to use :null_session instead.
|
43
|
-
protect_from_forgery with: :exception
|
44
|
-
end
|
58
|
+
`admin.css`
|
45
59
|
|
46
|
-
|
60
|
+
```
|
61
|
+
*= require redde
|
62
|
+
```
|
47
63
|
|
48
|
-
|
64
|
+
### Scaffold
|
49
65
|
|
50
|
-
|
66
|
+
To generate admin views and controller for a model, enter:
|
51
67
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
'application'
|
57
|
-
end
|
58
|
-
end
|
68
|
+
```
|
69
|
+
rails g redde:scaffold ModelNames
|
70
|
+
```
|
71
|
+
It will generate empty controller with all needed stuff. If you want to customize it - feel free to override views and controller actions.
|
59
72
|
|
60
|
-
|
73
|
+
If you have `position` field of integer type in your model, generator will add special column as a hook for sort.
|
74
|
+
You should add POST `sort` action to you routes:
|
61
75
|
|
62
|
-
|
76
|
+
```
|
77
|
+
resources :article_categories do
|
78
|
+
post 'sort', on: :collection
|
79
|
+
end
|
80
|
+
```
|
81
|
+
If you have `visible` field of boolean type in your model, generator will add small eye column for toggling visiblity
|
63
82
|
|
64
|
-
|
83
|
+
### Notice
|
84
|
+
|
85
|
+
To customize notice, override method `default_notice` in controller
|
86
|
+
|
87
|
+
### Tree sort
|
65
88
|
|
66
|
-
|
89
|
+
If your model have `ancestry` and `position` fields, it will be rendered as tree automatically.
|
67
90
|
|
68
91
|
### UrlGenerator
|
69
92
|
|
@@ -102,73 +125,41 @@ Book should have title and slug fields.
|
|
102
125
|
b.to_param
|
103
126
|
=> '1-testovaya-kniga'
|
104
127
|
|
105
|
-
##
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
## Autoprefixer note for development mode
|
144
|
-
|
145
|
-
Its neccessary to have joined asset files, change assets debug to false in `config/environments/development.rb`:
|
146
|
-
|
147
|
-
config.assets.debug = false
|
148
|
-
|
149
|
-
## Localization's example
|
150
|
-
|
151
|
-
ru:
|
152
|
-
activerecord:
|
153
|
-
models:
|
154
|
-
product:
|
155
|
-
one: Продукт
|
156
|
-
acc: продукт (винительный падеж)
|
157
|
-
other: Продукты
|
158
|
-
attributes:
|
159
|
-
product:
|
160
|
-
name: Название
|
161
|
-
descr: Описание
|
162
|
-
|
163
|
-
## Sortable
|
164
|
-
|
165
|
-
If you have field `position` of integer type in your model, generator will add special column as a hook for sort.
|
166
|
-
You should add POST `sort` action to you routes:
|
167
|
-
|
168
|
-
resources :article_categories do
|
169
|
-
post 'sort', on: :collection
|
170
|
-
end
|
171
|
-
|
172
|
-
## Visible
|
173
|
-
|
174
|
-
If you have field `visible` of boolean type in your model, generator will add small eye column for toggling visiblity
|
128
|
+
## Photos
|
129
|
+
|
130
|
+
You can attach photos to any ActiveRecord model by including
|
131
|
+
|
132
|
+
```
|
133
|
+
include Redde::WithPhoto
|
134
|
+
```
|
135
|
+
|
136
|
+
## Localization
|
137
|
+
|
138
|
+
By default, views in admin interface use I18n for field names and titles.
|
139
|
+
Example:
|
140
|
+
|
141
|
+
```
|
142
|
+
ru:
|
143
|
+
activerecord:
|
144
|
+
models:
|
145
|
+
article:
|
146
|
+
acc: статью
|
147
|
+
many: Статьи
|
148
|
+
one: Статья
|
149
|
+
other: Статьи
|
150
|
+
article_category:
|
151
|
+
acc: категорию
|
152
|
+
many: Категории
|
153
|
+
one: Категория
|
154
|
+
other: Категории
|
155
|
+
|
156
|
+
attributes:
|
157
|
+
article:
|
158
|
+
title: Заголовок
|
159
|
+
slug: URL
|
160
|
+
body: Текст
|
161
|
+
article_category:
|
162
|
+
title: Заголовок
|
163
|
+
position: Позиция
|
164
|
+
visible: Отображать на сайте
|
165
|
+
```
|
data/Rakefile
CHANGED
@@ -1,2 +1,21 @@
|
|
1
1
|
#!/usr/bin/env rake
|
2
|
-
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
|
8
|
+
APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
|
9
|
+
|
10
|
+
load 'rails/tasks/engine.rake'
|
11
|
+
|
12
|
+
Bundler::GemHelper.install_tasks
|
13
|
+
|
14
|
+
Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each { |f| load f }
|
15
|
+
|
16
|
+
require 'rspec/core'
|
17
|
+
require 'rspec/core/rake_task'
|
18
|
+
|
19
|
+
desc 'Run all specs in spec directory (excluding plugin specs)'
|
20
|
+
RSpec::Core::RakeTask.new(spec: 'app:db:test:prepare')
|
21
|
+
task default: :spec
|
Binary file
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4
|
+
<metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
|
5
|
+
<defs>
|
6
|
+
<font id="redde-admin" horiz-adv-x="1000" >
|
7
|
+
<font-face font-family="redde-admin" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
8
|
+
<missing-glyph horiz-adv-x="1000" />
|
9
|
+
<glyph glyph-name="upload" unicode="" d="m500 776l260-244-164 0 0-256-190 0 0 256-166 0z m468-578q18-10 27-32t3-40l-28-154q-4-20-22-33t-40-13l-816 0q-22 0-40 13t-22 33l-28 154q-10 48 32 72l158 108 98 0-170-130 178 0q8 0 12-8l40-110 300 0 40 110q8 8 12 8l178 0-170 130 98 0z" horiz-adv-x="1000" />
|
10
|
+
</font>
|
11
|
+
</defs>
|
12
|
+
</svg>
|
Binary file
|
Binary file
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
|
2
|
+
<circle cx="8" cy="8" r="7" fill="none" stroke="#d15360" stroke-width="2" />
|
3
|
+
<path fill="#d15360" d="M9.415,5.172L8.001,6.586L6.586,5.171L5.172,6.585L6.586,8L5.173,9.414l1.414,1.414l1.414-1.414 l1.414,1.414l1.415-1.414L9.415,8l1.414-1.414L9.415,5.172z"/>
|
4
|
+
</svg>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="#d15360
|
2
|
+
">
|
3
|
+
<path d="M6,12c-3.314,0-6-2.687-6-6c0-3.313,2.686-6,6-6c3.313,0,6,2.686,6,6
|
4
|
+
C12,9.313,9.313,12,6,12z M9.535,3.879L8.121,2.464L6,4.586L3.878,2.464L2.464,3.879L4.586,6L2.464,8.121l1.414,1.414L6,7.414
|
5
|
+
l2.121,2.121l1.414-1.414L7.414,6L9.535,3.879z"/>
|
6
|
+
</svg>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 10"
|
2
|
+
style="enable-background:new 0 0 16 10;" xml:space="preserve">
|
3
|
+
<path fill="#fff" d="M16,2h-0.206l-0.007-0.382c-0.022-0.454-0.418-0.815-0.884-0.806c-0.466,0.008-0.826,0.383-0.803,0.836L14.104,2H14v2H4.185 L7,1.419L5.453,0L0,5l5.453,5L7,8.581L4.185,6H14h1.03c0.024,0.002,0.044,0.014,0.069,0.014L15.104,6H16V2z"/>
|
4
|
+
</svg>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="11" viewBox="0 0 16 11" fill="#000000">
|
2
|
+
<path d="M8,0C3.582,0,0,4.41,0,5.5S3.582,11,8,11s8-4.5,8-5.5S12.418,0,8,0z M8,9
|
3
|
+
C6.067,9,4.5,7.433,4.5,5.5C4.5,3.567,6.067,2,8,2s3.5,1.567,3.5,3.5C11.5,7.433,9.933,9,8,9z M8,4c0.828,0,1.5,0.671,1.5,1.5
|
4
|
+
C9.5,6.328,8.828,7,8,7C7.171,7,6.5,6.328,6.5,5.5C6.5,4.671,7.171,4,8,4z"/>
|
5
|
+
</svg>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="11" viewBox="0 0 16 11" fill="#dddddd">
|
2
|
+
<path d="M8,0C3.582,0,0,4.41,0,5.5S3.582,11,8,11s8-4.5,8-5.5S12.418,0,8,0z M8,9
|
3
|
+
C6.067,9,4.5,7.433,4.5,5.5C4.5,3.567,6.067,2,8,2s3.5,1.567,3.5,3.5C11.5,7.433,9.933,9,8,9z M8,4c0.828,0,1.5,0.671,1.5,1.5
|
4
|
+
C9.5,6.328,8.828,7,8,7C7.171,7,6.5,6.328,6.5,5.5C6.5,4.671,7.171,4,8,4z"/>
|
5
|
+
</svg>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="#bfd8e3">
|
2
|
+
<path d="M12,4.969v2h-1.101c-0.114,0.561-0.331,1.082-0.616,1.556l1.11,1.11l-1.414,1.414
|
3
|
+
l-1.044-1.044C8.367,10.416,7.712,10.714,7,10.86V12H5v-1.132c-0.538-0.109-1.04-0.312-1.499-0.579L2.49,11.299L1.076,9.885
|
4
|
+
L2.001,8.96C1.569,8.38,1.259,7.704,1.109,6.969H0v-2h1.101C1.238,4.293,1.52,3.673,1.9,3.127L0.826,2.053L2.24,0.638L3.352,1.75
|
5
|
+
C3.852,1.438,4.403,1.2,5,1.078V0h2v1.078c0.658,0.134,1.264,0.406,1.8,0.77l1.209-1.209l1.414,1.414l-1.227,1.227
|
6
|
+
c0.328,0.509,0.577,1.075,0.702,1.689H12z M6,3C4.343,3,3,4.343,3,6s1.343,3,3,3c1.657,0,3-1.343,3-3S7.657,3,6,3z M6,8
|
7
|
+
C4.896,8,4,7.104,4,6s0.896-2,2-2s2,0.896,2,2S7.104,8,6,8z"/>
|
8
|
+
</svg>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="#ffffff">
|
2
|
+
<path d="M12,4.969v2h-1.101c-0.114,0.561-0.331,1.082-0.616,1.556l1.11,1.11l-1.414,1.414
|
3
|
+
l-1.044-1.044C8.367,10.416,7.712,10.714,7,10.86V12H5v-1.132c-0.538-0.109-1.04-0.312-1.499-0.579L2.49,11.299L1.076,9.885
|
4
|
+
L2.001,8.96C1.569,8.38,1.259,7.704,1.109,6.969H0v-2h1.101C1.238,4.293,1.52,3.673,1.9,3.127L0.826,2.053L2.24,0.638L3.352,1.75
|
5
|
+
C3.852,1.438,4.403,1.2,5,1.078V0h2v1.078c0.658,0.134,1.264,0.406,1.8,0.77l1.209-1.209l1.414,1.414l-1.227,1.227
|
6
|
+
c0.328,0.509,0.577,1.075,0.702,1.689H12z M6,3C4.343,3,3,4.343,3,6s1.343,3,3,3c1.657,0,3-1.343,3-3S7.657,3,6,3z M6,8
|
7
|
+
C4.896,8,4,7.104,4,6s0.896-2,2-2s2,0.896,2,2S7.104,8,6,8z"/>
|
8
|
+
</svg>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<svg
|
2
|
+
xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 5.967 8.982"
|
3
|
+
style="enable-background:new 0 0 5.967 8.982;" xml:space="preserve" width="5.967" height="8.982">
|
4
|
+
<path fill="#fff" d="M1.528,8.928l4.386-4.308c0.07-0.069,0.07-0.19,0-0.259L1.528,0.054C1.493,0.019,1.446,0,1.396,0S1.3,0.019,1.265,0.054
|
5
|
+
l-1.21,1.189C0.018,1.278,0,1.325,0,1.372c0,0.047,0.018,0.094,0.055,0.129l3.045,2.99l-3.045,2.99c-0.07,0.069-0.07,0.19,0,0.259
|
6
|
+
l1.21,1.188C1.338,9,1.456,9,1.528,8.928z"/>
|
7
|
+
</svg>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<svg
|
3
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 11 7"
|
4
|
+
style="enable-background:new 0 0 11 7;" xml:space="preserve" width="11" height="7">
|
5
|
+
<path fill="#404344" d="M1.283,0L0,1.324L5.5,7L11,1.324L9.717,0L5.5,4.351L1.283,0z"/>
|
6
|
+
</svg>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="11.017" height="11.435" viewBox="0 0 11.017 11.435" fill="#ffffff">
|
2
|
+
<path d="M7.768,5.349c-0.103,0.139-0.307,0.14-0.396,0.302
|
3
|
+
c-0.13,0.233-0.057,0.561-0.139,0.813C7.14,6.75,6.902,6.771,6.884,7.145C7,7.161,7.117,7.177,7.232,7.193
|
4
|
+
c0.117,0.242,0.33,0.728,0.547,0.875c0.183,0.049,0.365,0.097,0.547,0.146c0.639,0.256,1.349,0.562,1.99,0.826
|
5
|
+
c0.583,0.24,0.484,0.312,0.695,0.909c0,0.406,0.011,0.955,0,1.486H0.005c-0.011-0.531,0-1.08,0-1.486
|
6
|
+
C0.215,9.352,0.07,9.28,0.653,9.04c0.641-0.264,1.351-0.57,1.99-0.826C2.826,8.165,3.008,8.117,3.19,8.068
|
7
|
+
c0.217-0.146,0.431-0.633,0.547-0.875l0.259-0.062c-0.059-0.319-0.261-0.344-0.346-0.57c-0.033-0.34-0.066-0.68-0.099-1.021
|
8
|
+
c0.001,0.016-0.238-0.042-0.27-0.062C2.944,5.272,2.938,4.433,2.905,4.084C2.89,3.924,3.117,3.793,3.054,3.5
|
9
|
+
c-0.37-1.714,0.16-2.873,0.999-3.139c0.582-0.23,1.669-0.658,2.683-0.048l0.251,0.228L7.394,0.61
|
10
|
+
c0.204,0.115,0.334,0.497,0.334,0.497C7.835,1.528,7.846,1.92,7.836,2.353C7.833,2.521,7.734,3.292,7.761,3.529
|
11
|
+
C7.783,3.724,7.833,3.739,7.912,3.9C8.049,4.18,8.003,4.566,7.95,4.849C7.921,5.003,7.86,5.223,7.768,5.349z"/>
|
12
|
+
</svg>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#= require fileapi
|
2
|
+
|
3
|
+
$ ->
|
4
|
+
$box = $('.js-photos-uploader')
|
5
|
+
return unless $box.length
|
6
|
+
|
7
|
+
$box.fileapi
|
8
|
+
maxSize: 20 * FileAPI.MB
|
9
|
+
autoUpload: true
|
10
|
+
dataType: 'html'
|
11
|
+
multiple: true
|
12
|
+
accept: "image/*"
|
13
|
+
onFileComplete: (e, uiEvt)->
|
14
|
+
if uiEvt.status is 200 && uiEvt.error is false
|
15
|
+
$('.js-photos').append( uiEvt.result )
|
16
|
+
else
|
17
|
+
alert('Ошибка загрузки')
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#= require jquery
|
2
|
+
#= require jquery_ujs
|
3
|
+
|
4
|
+
# Пока подключаем все подряд, потом сделать кастомизацию
|
5
|
+
#= require ./sortable
|
6
|
+
#= require ./sortTree
|
7
|
+
#= require ./fileapi
|
8
|
+
#= require ./redactor
|
9
|
+
|
10
|
+
$ ->
|
11
|
+
$(document).on 'click', '[data-href]', (e)->
|
12
|
+
location.href = $(e.currentTarget).data('href')
|