redde 0.1.18 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (362) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/.hound.yml +2 -0
  4. data/.rubocop.yml +19 -0
  5. data/.travis.yml +5 -4
  6. data/Gemfile +8 -5
  7. data/MIT-LICENSE +20 -0
  8. data/README.md +96 -105
  9. data/Rakefile +20 -1
  10. data/app/assets/fonts/redde-admin.eot +0 -0
  11. data/app/assets/fonts/redde-admin.svg +12 -0
  12. data/app/assets/fonts/redde-admin.ttf +0 -0
  13. data/app/assets/fonts/redde-admin.woff +0 -0
  14. data/app/assets/images/redde/close-hover.svg +4 -0
  15. data/app/assets/images/redde/close.svg +6 -0
  16. data/app/assets/images/redde/enter.svg +4 -0
  17. data/app/assets/images/redde/eye.svg +5 -0
  18. data/app/assets/images/redde/eye_disactive.svg +5 -0
  19. data/app/assets/images/redde/main-menu/cog.svg +8 -0
  20. data/app/assets/images/redde/main-menu/cog_active.svg +8 -0
  21. data/app/assets/images/redde/main-menu/folder.svg +4 -0
  22. data/app/assets/images/redde/main-menu/folder_active.svg +4 -0
  23. data/app/assets/images/redde/main-menu/home.svg +4 -0
  24. data/app/assets/images/redde/main-menu/home_active.svg +4 -0
  25. data/app/assets/images/redde/main-menu/list.svg +4 -0
  26. data/app/assets/images/redde/main-menu/list_active.svg +4 -0
  27. data/app/assets/images/redde/next.svg +7 -0
  28. data/app/assets/images/redde/plus.svg +3 -0
  29. data/app/assets/images/redde/sel.svg +6 -0
  30. data/app/assets/images/redde/user.svg +12 -0
  31. data/app/assets/javascripts/redde/fileapi.js.coffee +17 -0
  32. data/app/assets/javascripts/redde/index.js.coffee +12 -0
  33. data/app/assets/javascripts/redde/redactor/index.coffee +8 -0
  34. 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
  35. data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/redactor.js.erb +250 -250
  36. data/app/assets/javascripts/redde/sortTree/index.js.coffee +47 -0
  37. data/app/assets/javascripts/redde/sortable.coffee +47 -0
  38. data/{spec/dummy/app/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/error-msg.sass +4 -2
  39. data/app/assets/stylesheets/redde/blocks/flash-msg.sass +22 -0
  40. data/app/assets/stylesheets/redde/blocks/list-v2.sass +96 -0
  41. data/app/assets/stylesheets/redde/blocks/photos-uploader.sass +21 -0
  42. data/app/assets/stylesheets/redde/blocks/photos.sass +56 -0
  43. data/app/assets/stylesheets/redde/blocks/redde-form.sass +55 -0
  44. data/app/assets/stylesheets/redde/blocks/sort-tree.sass +46 -0
  45. data/app/assets/stylesheets/redde/defaults/btn.sass +30 -0
  46. data/app/assets/stylesheets/redde/defaults/del.sass +23 -0
  47. data/app/assets/stylesheets/redde/defaults/index.sass +87 -0
  48. data/app/assets/stylesheets/redde/defaults/inp.sass +20 -0
  49. data/app/assets/stylesheets/redde/defaults/reset.sass +25 -0
  50. data/app/assets/stylesheets/redde/defaults/sbm.sass +32 -0
  51. data/app/assets/stylesheets/redde/defaults/sel.sass +29 -0
  52. data/app/assets/stylesheets/redde/fonts.sass +42 -0
  53. data/app/assets/stylesheets/redde/index.scss +5 -0
  54. data/app/assets/stylesheets/redde/layouts/header.sass +63 -0
  55. data/app/assets/stylesheets/redde/layouts/main-menu.sass +63 -0
  56. data/app/assets/stylesheets/redde/layouts/main.sass +48 -0
  57. data/app/assets/stylesheets/redde/layouts/page-header.sass +34 -0
  58. data/app/assets/stylesheets/redde/layouts/page-sidebar.sass +9 -0
  59. data/app/assets/stylesheets/redde/mixins.sass +10 -0
  60. data/{spec/dummy/app/assets/stylesheets → app/assets/stylesheets/redde}/redactor/index.scss +46 -49
  61. data/app/assets/stylesheets/redde-admin/blocks/list-v2.sass +96 -0
  62. data/app/assets/stylesheets/redde-admin/defaults/del.sass +23 -0
  63. data/app/controllers/admin/base_controller.rb +81 -0
  64. data/{lib/generators/redde/layout/templates/controllers → app/controllers/admin}/managers_controller.rb +10 -6
  65. data/app/controllers/admin/redde_photos_controller.rb +31 -0
  66. data/app/controllers/admin/system_commands_controller.rb +11 -0
  67. data/app/form_builders/redde_form_builder.rb +106 -0
  68. data/app/helpers/redde/admin_helper.rb +33 -0
  69. data/app/helpers/redde/form_helper.rb +59 -0
  70. data/app/helpers/redde/index_helper.rb +61 -0
  71. data/{lib/redde/concerns/layout.rb → app/models/concerns/redde/layouts.rb} +1 -1
  72. data/app/models/concerns/redde/photoable.rb +5 -0
  73. data/{lib/redde/concerns → app/models/concerns/redde}/sluggable.rb +6 -3
  74. data/app/models/concerns/redde/tree_sortable.rb +40 -0
  75. data/{lib/redde/concerns → app/models/concerns/redde}/with_photo.rb +5 -5
  76. data/app/models/redde/photo.rb +16 -0
  77. data/app/models/redde/system_command.rb +43 -0
  78. data/{lib → app/models}/redde/url_generator.rb +7 -3
  79. data/{lib/generators/redde/photo/templates/uploader.rb → app/uploaders/photo_uploader.rb} +4 -4
  80. data/app/views/admin/base/_tree_item.html.haml +10 -0
  81. data/app/views/admin/base/edit.html.haml +21 -0
  82. data/app/views/admin/base/index.html.haml +68 -0
  83. data/app/views/admin/base/tree.html.haml +14 -0
  84. data/app/views/admin/managers/edit.html.haml +11 -0
  85. data/app/views/admin/managers/index.html.haml +17 -0
  86. data/{lib/generators/redde/layout/templates/base → app/views/admin/redde}/_header.html.haml +5 -6
  87. data/app/views/admin/redde/_main_menu.html.haml +12 -0
  88. data/app/views/admin/redde/_page_header.html.haml +3 -0
  89. data/app/views/admin/redde/_sidebar.html.haml +16 -0
  90. data/{lib/generators/redde/layout/templates/base → app/views/admin/redde}/_validate.haml +2 -2
  91. data/app/views/admin/redde_photos/_photo.haml +11 -0
  92. data/app/views/admin/redde_photos/_photos.haml +28 -0
  93. data/app/views/admin/system_commands/index.html.haml +25 -0
  94. data/app/views/kaminari/redde/_first_page.html.haml +9 -0
  95. data/app/views/kaminari/redde/_gap.html.haml +8 -0
  96. data/app/views/kaminari/redde/_last_page.html.haml +9 -0
  97. data/app/views/kaminari/redde/_next_page.html.haml +9 -0
  98. data/app/views/kaminari/redde/_page.html.haml +10 -0
  99. data/app/views/kaminari/redde/_paginator.html.haml +18 -0
  100. data/app/views/kaminari/redde/_prev_page.html.haml +9 -0
  101. data/{lib/generators/redde/layout/templates → app/views}/layouts/admin.html.haml +28 -29
  102. data/{lib/generators/redde/layout/templates → app/views}/layouts/login.html.haml +32 -32
  103. data/bin/rails +12 -0
  104. data/config/locales/paginate.ru.yml +9 -0
  105. data/config/routes.rb +8 -0
  106. data/db/migrate/20160121152706_create_redde_photos.rb +16 -0
  107. data/lib/generators/redde/layout/layout_generator.rb +3 -26
  108. data/lib/generators/redde/layout/templates/assets/javascripts/admin.js +1 -0
  109. data/lib/generators/redde/layout/templates/assets/stylesheets/admin.css +15 -0
  110. data/lib/generators/redde/scaffold/scaffold_generator.rb +45 -8
  111. data/lib/generators/redde/scaffold/templates/controllers/controller.rb +2 -45
  112. data/lib/generators/redde/scaffold/templates/edit.html.haml +4 -9
  113. data/lib/generators/redde/scaffold/templates/index.html.haml +2 -6
  114. data/lib/generators/redde/scaffold/templates/ru.yml +14 -0
  115. data/lib/redde/engine.rb +16 -0
  116. data/lib/redde/version.rb +1 -1
  117. data/lib/redde.rb +20 -4
  118. data/lib/tasks/redde_tasks.rake +4 -0
  119. data/redde.gemspec +44 -22
  120. metadata +482 -455
  121. data/Guardfile +0 -24
  122. data/LICIENSE.md +0 -21
  123. data/lib/generators/redde/layout/templates/assets/images/admin/del.png +0 -0
  124. data/lib/generators/redde/layout/templates/assets/images/admin/folder_.png +0 -0
  125. data/lib/generators/redde/layout/templates/assets/javascripts/admin/index.js +0 -20
  126. data/lib/generators/redde/layout/templates/assets/redactor/javascripts/redactor/index.coffee +0 -4
  127. data/lib/generators/redde/layout/templates/assets/redactor/stylesheets/redactor/index.scss +0 -369
  128. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/error-msg.sass +0 -47
  129. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/notice.scss +0 -39
  130. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/photos.scss +0 -31
  131. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/sortable.sass +0 -44
  132. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/custom/index.scss +0 -1
  133. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/index.scss +0 -131
  134. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/input.sass +0 -35
  135. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/reset.sass +0 -33
  136. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/table.scss +0 -24
  137. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/index.scss +0 -6
  138. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/header.sass +0 -50
  139. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/launchbar.sass +0 -23
  140. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/main.sass +0 -38
  141. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-header.sass +0 -22
  142. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-sidebar.sass +0 -24
  143. data/lib/generators/redde/layout/templates/base/_launchbar.html.haml +0 -11
  144. data/lib/generators/redde/layout/templates/base/_sidebar.html.haml +0 -14
  145. data/lib/generators/redde/layout/templates/controllers/base_controller.rb +0 -28
  146. data/lib/generators/redde/layout/templates/form_builders/redde_form_builder.rb +0 -63
  147. data/lib/generators/redde/layout/templates/helpers/admin_helper.rb +0 -94
  148. data/lib/generators/redde/photo/photo_generator.rb +0 -35
  149. data/lib/generators/redde/photo/templates/controller.rb +0 -20
  150. data/lib/generators/redde/photo/templates/create_photos.rb +0 -16
  151. data/lib/generators/redde/photo/templates/photo.rb +0 -4
  152. data/lib/generators/redde/photo/templates/photos/_photo.haml +0 -5
  153. data/lib/generators/redde/photo/templates/photos/_photos.haml +0 -19
  154. data/lib/generators/redde/photo/templates/photos/create.js.erb +0 -1
  155. data/lib/redde/concerns/photoable.rb +0 -17
  156. data/spec/dummy/.rspec +0 -1
  157. data/spec/dummy/README.rdoc +0 -28
  158. data/spec/dummy/Rakefile +0 -6
  159. data/spec/dummy/app/assets/images/admin/addphoto.png +0 -0
  160. data/spec/dummy/app/assets/images/admin/ajaxloader2.gif +0 -0
  161. data/spec/dummy/app/assets/images/admin/arrow_down.png +0 -0
  162. data/spec/dummy/app/assets/images/admin/arrow_enter.png +0 -0
  163. data/spec/dummy/app/assets/images/admin/arrow_right.png +0 -0
  164. data/spec/dummy/app/assets/images/admin/coins.png +0 -0
  165. data/spec/dummy/app/assets/images/admin/confirm.png +0 -0
  166. data/spec/dummy/app/assets/images/admin/del.png +0 -0
  167. data/spec/dummy/app/assets/images/admin/delete.png +0 -0
  168. data/spec/dummy/app/assets/images/admin/email.png +0 -0
  169. data/spec/dummy/app/assets/images/admin/error-label-triangle.png +0 -0
  170. data/spec/dummy/app/assets/images/admin/error.png +0 -0
  171. data/spec/dummy/app/assets/images/admin/favicon.png +0 -0
  172. data/spec/dummy/app/assets/images/admin/fio.png +0 -0
  173. data/spec/dummy/app/assets/images/admin/folder.png +0 -0
  174. data/spec/dummy/app/assets/images/admin/folder_.png +0 -0
  175. data/spec/dummy/app/assets/images/admin/icon_eye.gif +0 -0
  176. data/spec/dummy/app/assets/images/admin/lightbox/css/jquery.lightbox-0.5.css +0 -101
  177. data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-blank.gif +0 -0
  178. data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-btn-close.gif +0 -0
  179. data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-btn-next.gif +0 -0
  180. data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-btn-prev.gif +0 -0
  181. data/spec/dummy/app/assets/images/admin/lightbox/images/lightbox-ico-loading.gif +0 -0
  182. data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.js +0 -32
  183. data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.lightbox-0.5.js +0 -477
  184. data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.lightbox-0.5.min.js +0 -42
  185. data/spec/dummy/app/assets/images/admin/lightbox/js/jquery.lightbox-0.5.pack.js +0 -14
  186. data/spec/dummy/app/assets/images/admin/logo.png +0 -0
  187. data/spec/dummy/app/assets/images/admin/logo_reddeshop.png +0 -0
  188. data/spec/dummy/app/assets/images/admin/move_handler.png +0 -0
  189. data/spec/dummy/app/assets/images/admin/phone.png +0 -0
  190. data/spec/dummy/app/assets/images/admin/photo_ico.png +0 -0
  191. data/spec/dummy/app/assets/images/admin/print.png +0 -0
  192. data/spec/dummy/app/assets/images/admin/refresh.png +0 -0
  193. data/spec/dummy/app/assets/images/admin/submit.png +0 -0
  194. data/spec/dummy/app/assets/images/admin/submit_hover.png +0 -0
  195. data/spec/dummy/app/assets/images/admin/view.png +0 -0
  196. data/spec/dummy/app/assets/images/admin/view_mk.png +0 -0
  197. data/spec/dummy/app/assets/images/redactor/icons.png +0 -0
  198. data/spec/dummy/app/assets/images/redactor/plugins/file.html +0 -3
  199. data/spec/dummy/app/assets/images/redactor/plugins/image.html +0 -39
  200. data/spec/dummy/app/assets/images/redactor/plugins/image_edit.html +0 -35
  201. data/spec/dummy/app/assets/images/redactor/plugins/link.html +0 -74
  202. data/spec/dummy/app/assets/images/redactor/plugins/table.html +0 -25
  203. data/spec/dummy/app/assets/images/redactor/plugins/video.html +0 -15
  204. data/spec/dummy/app/assets/javascripts/admin/jquery.mjs.nestedSortable.js +0 -429
  205. data/spec/dummy/app/assets/javascripts/admin.js +0 -21
  206. data/spec/dummy/app/assets/javascripts/application.js +0 -14
  207. data/spec/dummy/app/assets/javascripts/jquery-migrate-1.2.1.js +0 -521
  208. data/spec/dummy/app/assets/javascripts/redactor/langs/en.js +0 -76
  209. data/spec/dummy/app/assets/javascripts/redactor/langs/ru.js +0 -75
  210. data/spec/dummy/app/assets/javascripts/redactor/redactor.js.erb +0 -2248
  211. data/spec/dummy/app/assets/javascripts/redactor/toolbars/default.js +0 -219
  212. data/spec/dummy/app/assets/stylesheets/admin/blocks/list.scss +0 -22
  213. data/spec/dummy/app/assets/stylesheets/admin/blocks/notice.scss +0 -39
  214. data/spec/dummy/app/assets/stylesheets/admin/blocks/orders.scss +0 -22
  215. data/spec/dummy/app/assets/stylesheets/admin/blocks/paginate.sass +0 -28
  216. data/spec/dummy/app/assets/stylesheets/admin/blocks/pagination.scss +0 -28
  217. data/spec/dummy/app/assets/stylesheets/admin/blocks/partners.scss +0 -15
  218. data/spec/dummy/app/assets/stylesheets/admin/blocks/phead-tabs.sass +0 -27
  219. data/spec/dummy/app/assets/stylesheets/admin/blocks/photos.scss +0 -31
  220. data/spec/dummy/app/assets/stylesheets/admin/blocks/sortable.sass +0 -44
  221. data/spec/dummy/app/assets/stylesheets/admin/custom/index.scss +0 -1
  222. data/spec/dummy/app/assets/stylesheets/admin/defaults/index.scss +0 -131
  223. data/spec/dummy/app/assets/stylesheets/admin/defaults/input.sass +0 -35
  224. data/spec/dummy/app/assets/stylesheets/admin/defaults/reset.sass +0 -33
  225. data/spec/dummy/app/assets/stylesheets/admin/defaults/table.scss +0 -24
  226. data/spec/dummy/app/assets/stylesheets/admin/index.scss +0 -6
  227. data/spec/dummy/app/assets/stylesheets/admin/layouts/header.sass +0 -50
  228. data/spec/dummy/app/assets/stylesheets/admin/layouts/launchbar.sass +0 -23
  229. data/spec/dummy/app/assets/stylesheets/admin/layouts/login.sass +0 -25
  230. data/spec/dummy/app/assets/stylesheets/admin/layouts/main.sass +0 -38
  231. data/spec/dummy/app/assets/stylesheets/admin/layouts/page-header.sass +0 -22
  232. data/spec/dummy/app/assets/stylesheets/admin/layouts/page-sidebar.sass +0 -24
  233. data/spec/dummy/app/assets/stylesheets/admin/layouts/sidebar.sass +0 -30
  234. data/spec/dummy/app/assets/stylesheets/admin/shop/_filter.scss +0 -16
  235. data/spec/dummy/app/assets/stylesheets/admin/shop/_order-sh.scss +0 -59
  236. data/spec/dummy/app/assets/stylesheets/admin/shop/_pe.scss +0 -43
  237. data/spec/dummy/app/assets/stylesheets/redactor/wym.css +0 -136
  238. data/spec/dummy/app/controllers/admin/base_controller.rb +0 -28
  239. data/spec/dummy/app/controllers/admin/managers_controller.rb +0 -36
  240. data/spec/dummy/app/controllers/application_controller.rb +0 -6
  241. data/spec/dummy/app/controllers/articles_controller.rb +0 -8
  242. data/spec/dummy/app/controllers/managers/registrations_controller.rb +0 -21
  243. data/spec/dummy/app/helpers/admin_helper.rb +0 -94
  244. data/spec/dummy/app/models/article.rb +0 -4
  245. data/spec/dummy/app/models/article_category.rb +0 -2
  246. data/spec/dummy/app/models/photo.rb +0 -3
  247. data/spec/dummy/app/views/admin/base/_header.html.haml +0 -12
  248. data/spec/dummy/app/views/admin/base/_launchbar.html.haml +0 -11
  249. data/spec/dummy/app/views/admin/base/_sidebar.html.haml +0 -14
  250. data/spec/dummy/app/views/admin/base/_validate.haml +0 -8
  251. data/spec/dummy/app/views/admin/base/welcome.haml +0 -2
  252. data/spec/dummy/app/views/admin/photos/_photo.haml +0 -5
  253. data/spec/dummy/app/views/admin/photos/_photos.haml +0 -19
  254. data/spec/dummy/app/views/admin/photos/create.js.erb +0 -1
  255. data/spec/dummy/app/views/admin/photos/destroy.js.erb +0 -1
  256. data/spec/dummy/app/views/articles/show.html.haml +0 -2
  257. data/spec/dummy/app/views/layouts/admin.html.haml +0 -29
  258. data/spec/dummy/app/views/layouts/application.html.erb +0 -15
  259. data/spec/dummy/app/views/layouts/login.html.haml +0 -32
  260. data/spec/dummy/bin/bundle +0 -3
  261. data/spec/dummy/bin/rails +0 -4
  262. data/spec/dummy/bin/rake +0 -4
  263. data/spec/dummy/config/application.rb +0 -33
  264. data/spec/dummy/config/boot.rb +0 -5
  265. data/spec/dummy/config/database.yml +0 -25
  266. data/spec/dummy/config/environment.rb +0 -5
  267. data/spec/dummy/config/environments/development.rb +0 -29
  268. data/spec/dummy/config/environments/production.rb +0 -80
  269. data/spec/dummy/config/environments/test.rb +0 -36
  270. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  271. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  272. data/spec/dummy/config/initializers/inflections.rb +0 -16
  273. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  274. data/spec/dummy/config/initializers/secret_token.rb +0 -12
  275. data/spec/dummy/config/initializers/session_store.rb +0 -3
  276. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  277. data/spec/dummy/config/locales/en.yml +0 -36
  278. data/spec/dummy/config/routes.rb +0 -4
  279. data/spec/dummy/config.ru +0 -4
  280. data/spec/dummy/db/migrate/20130908123351_create_articles.rb +0 -9
  281. data/spec/dummy/db/migrate/20140128152208_create_article_categories.rb +0 -11
  282. data/spec/dummy/db/migrate/20140607122532_create_photos.rb +0 -16
  283. data/spec/dummy/db/schema.rb +0 -98
  284. data/spec/dummy/public/404.html +0 -58
  285. data/spec/dummy/public/422.html +0 -58
  286. data/spec/dummy/public/500.html +0 -57
  287. data/spec/dummy/public/favicon.ico +0 -0
  288. data/spec/generators/layout_generator_spec.rb +0 -42
  289. data/spec/generators/photo_generator_spec.rb +0 -32
  290. data/spec/generators/scaffold_generator_spec.rb +0 -58
  291. data/spec/models/sluggable_spec.rb +0 -42
  292. data/spec/models/url_generator_spec.rb +0 -18
  293. data/spec/models/with_photo_spec.rb +0 -25
  294. data/spec/spec_helper.rb +0 -52
  295. /data/{lib/generators/redde/layout/templates/assets/redactor → app/assets}/images/.keep +0 -0
  296. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/addphoto.png +0 -0
  297. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/ajaxloader2.gif +0 -0
  298. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/arrow_down.png +0 -0
  299. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/arrow_enter.png +0 -0
  300. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/arrow_right.png +0 -0
  301. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/coins.png +0 -0
  302. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/confirm.png +0 -0
  303. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/delete.png +0 -0
  304. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/email.png +0 -0
  305. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/error.png +0 -0
  306. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/favicon.png +0 -0
  307. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/fio.png +0 -0
  308. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/icon_eye.gif +0 -0
  309. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/css/jquery.lightbox-0.5.css +0 -0
  310. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-blank.gif +0 -0
  311. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-btn-close.gif +0 -0
  312. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-btn-next.gif +0 -0
  313. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-btn-prev.gif +0 -0
  314. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/images/lightbox-ico-loading.gif +0 -0
  315. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.js +0 -0
  316. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.lightbox-0.5.js +0 -0
  317. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.lightbox-0.5.min.js +0 -0
  318. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/lightbox/js/jquery.lightbox-0.5.pack.js +0 -0
  319. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/logo_reddeshop.png +0 -0
  320. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/phone.png +0 -0
  321. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/photo_ico.png +0 -0
  322. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/print.png +0 -0
  323. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/refresh.png +0 -0
  324. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/submit.png +0 -0
  325. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/submit_hover.png +0 -0
  326. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/view.png +0 -0
  327. /data/{lib/generators/redde/layout/templates → app}/assets/images/admin/view_mk.png +0 -0
  328. /data/{lib/generators/redde/layout/templates/assets/images/admin → app/assets/images/redde}/error-label-triangle.png +0 -0
  329. /data/{lib/generators/redde/layout/templates/assets/images/admin → app/assets/images/redde}/folder.png +0 -0
  330. /data/{lib/generators/redde/layout/templates/assets/images/admin → app/assets/images/redde}/logo.png +0 -0
  331. /data/{lib/generators/redde/layout/templates/assets/images/admin/move_handler.png → app/assets/images/redde/move-handler.png} +0 -0
  332. /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/icons.png +0 -0
  333. /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/file.html +0 -0
  334. /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/image.html +0 -0
  335. /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/image_edit.html +0 -0
  336. /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/link.html +0 -0
  337. /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/table.html +0 -0
  338. /data/{lib/generators/redde/layout/templates/assets/redactor/images → app/assets/images/redde}/redactor/plugins/video.html +0 -0
  339. /data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/langs/en.js +0 -0
  340. /data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/langs/ru.js +0 -0
  341. /data/{lib/generators/redde/layout/templates/assets/redactor/javascripts → app/assets/javascripts/redde}/redactor/toolbars/default.js +0 -0
  342. /data/{lib/generators/redde/layout/templates/assets/javascripts/admin → app/assets/javascripts/redde/sortTree}/jquery.mjs.nestedSortable.js +0 -0
  343. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/list.scss +0 -0
  344. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/orders.scss +0 -0
  345. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/paginate.sass +0 -0
  346. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/pagination.scss +0 -0
  347. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/partners.scss +0 -0
  348. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/blocks/phead-tabs.sass +0 -0
  349. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/layouts/login.sass +0 -0
  350. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/layouts/sidebar.sass +0 -0
  351. /data/{lib/generators/redde/layout/templates/assets/redactor/stylesheets → app/assets/stylesheets/redde}/redactor/wym.css +0 -0
  352. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/shop/_filter.scss +0 -0
  353. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/shop/_order-sh.scss +0 -0
  354. /data/{lib/generators/redde/layout/templates/assets/stylesheets/admin → app/assets/stylesheets/redde}/shop/_pe.scss +0 -0
  355. /data/{spec/dummy/app/assets/images → app/controllers}/.keep +0 -0
  356. /data/{lib/generators/redde/layout/templates → app}/controllers/managers/registrations_controller.rb +0 -0
  357. /data/{spec/dummy/app/models → app/helpers}/.keep +0 -0
  358. /data/{spec/dummy/lib/assets → app/mailers}/.keep +0 -0
  359. /data/{spec/dummy/log → app/models}/.keep +0 -0
  360. /data/{spec/dummy/app/assets/stylesheets/application.css.scss → app/views/.keep} +0 -0
  361. /data/{lib/generators/redde/layout/templates → app/views/admin}/base/welcome.haml +0 -0
  362. /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
@@ -18,6 +18,8 @@ tmp
18
18
  *.DS_Store
19
19
  .rvmrc
20
20
  .powrc
21
+ .ruby-version
22
+ .ruby-gemset
21
23
 
22
24
  /spec/dummy/public/uploads
23
25
  /spec/dummy/log
data/.hound.yml ADDED
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ enabled: true
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.0.0
7
- - 2.1
6
+ - 2.2
7
+ before_install:
8
+ - gem install bundler
8
9
  before_script:
9
- - 'cd spec/dummy; rake db:setup RAILS_ENV=test'
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
- # Specify your gem's dependencies in redde.gemspec
4
- gem 'russian', '>= 0.6.0'
5
- gem 'haml'
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
- gem 'redde'
11
+ ```
12
+ gem 'redde'
13
+ ```
12
14
 
13
- And then execute:
15
+ * For the first time installation run
14
16
 
15
- $ bundle
17
+ ```
18
+ rails g redde:layout
19
+ ```
16
20
 
17
- ## Requirements
21
+ This command will generate basic structure for your admin interface.
18
22
 
19
- ### Gems
23
+ * Mound engine in your routes.rb
20
24
 
21
- Layout requires 'devise' gem with generated user model. If You use another auth solution, feel free to modify partial with user info and logout link.
25
+ ```
26
+ devise_for :managers, controllers: { registrations: 'managers/registrations' } if defined?(Devise)
27
+ mount Redde::Engine, at: '/redde'
28
+ ```
22
29
 
23
- ### Assets
30
+ It will disable Manager model registration with `devise` and mount engine.
24
31
 
25
- Add this line to assets precompilation in `config/production.rb`:
32
+ * Include layout concern in your ApplicationController
26
33
 
27
- config.assets.precompile += %w( admin.js admin.css redactor/wym.css )
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
- ## Usage
43
+ * Install and run migrations
30
44
 
31
- ### Layout
45
+ ```
46
+ rake redde:install:migrations
47
+ rake db:migrate
48
+ ```
32
49
 
33
- To generate admin layout type:
50
+ * Include assets in your `admin.js` and `admin.css`
34
51
 
35
- rails g redde:layout
52
+ `admin.js`
36
53
 
37
- To set admin login layout you need to include `Redde::Layout` concern:
54
+ ```
55
+ //= require redde
56
+ ```
38
57
 
39
- class ApplicationController < ActionController::Base
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
- This concern adds layout switch with:
60
+ ```
61
+ *= require redde
62
+ ```
47
63
 
48
- layout :layout_by_resource
64
+ ### Scaffold
49
65
 
50
- with method `layout_by_resource`:
66
+ To generate admin views and controller for a model, enter:
51
67
 
52
- def layout_by_resource
53
- if devise_controller? && controller_name == 'sessions'
54
- 'login'
55
- else
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
- Feel free to change this methos as you need.
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
- ### Scaffold
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
- To generate admin views and controller for a model, enter:
83
+ ### Notice
84
+
85
+ To customize notice, override method `default_notice` in controller
86
+
87
+ ### Tree sort
65
88
 
66
- rails g redde:scaffold ModelNames
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
- rails g redde:photo
108
-
109
- Добавьте в routes.rb единожды
110
-
111
- concern :imageable do
112
- resources :photos, only: [:show, :create, :destroy] do
113
- post 'sort', on: :collection
114
- end
115
- end
116
-
117
- и для каждой модели роуты `concerns :imageable` к которой необходимо добавить фотографии, например для Product
118
-
119
- namespace :admin do
120
- resources :products do
121
- concerns :imageable
122
- end
123
- end
124
-
125
- Не забудьте добавить полиморфную связь
126
-
127
- has_many :photos, dependent: :destroy, as: :imageable
128
-
129
- создаст scaffold для модели Photo с полиморфной связью
130
-
131
- ## Gemset dependenсies
132
-
133
- Somehow, some dependencies are not initialized inside rails apps. If you get error about missing gems, add these gems to your Gemfile:
134
-
135
- gem 'autoprefixer-rails'
136
- gem 'jquery-ui-rails'
137
- gem 'haml-rails'
138
- gem 'russian'
139
- gem 'devise'
140
-
141
- Its highly possible, that you will not have any problems with gems
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
- require "bundler/gem_tasks"
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="&#xe800;" 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,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="11" height="10" viewBox="0 0 11 10" fill="#bfd8e3">
2
+ <path d="M10,10H1c-0.552,0-1-0.448-1-1V3c0-0.552,0.448-1,1-1h9c0.552,0,1,0.448,1,1v6
3
+ C11,9.552,10.552,10,10,10z M2,0c1,0,3,0,3,0s1,0,1,1H1C1,1,1,0,2,0z"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="11" height="10" viewBox="0 0 11 10" fill="#ffffff">
2
+ <path d="M10,10H1c-0.552,0-1-0.448-1-1V3c0-0.552,0.448-1,1-1h9c0.552,0,1,0.448,1,1v6
3
+ C11,9.552,10.552,10,10,10z M2,0c1,0,3,0,3,0s1,0,1,1H1C1,1,1,0,2,0z"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="11" viewBox="0 0 12 11" fill="#bfd8e3">
2
+ <path d="M11,6v5H7V8c0-0.552-0.448-1-1-1S5,7.448,5,8v3H1V6H0V5h1V4h1V3h1V2h1V1h1V0h2v1h1
3
+ V0h2v3v1h1v1h1v1H11z"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="11" viewBox="0 0 12 11" fill="#ffffff">
2
+ <path d="M11,6v5H7V8c0-0.552-0.448-1-1-1S5,7.448,5,8v3H1V6H0V5h1V4h1V3h1V2h1V1h1V0h2v1h1
3
+ V0h2v3v1h1v1h1v1H11z"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="10" viewBox="0 0 12 10" fill="#bfd8e3">
2
+ <path d="M4,10V8h8v2H4z M4,4h8v2H4V4z M4,0h8v2H4V0z M0,8h2v2H0V8z M0,4h2v2H0V4z M0,0h2v2
3
+ H0V0z"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="12" height="10" viewBox="0 0 12 10" fill="#ffffff">
2
+ <path d="M4,10V8h8v2H4z M4,4h8v2H4V4z M4,0h8v2H4V0z M0,8h2v2H0V8z M0,4h2v2H0V4z M0,0h2v2
3
+ H0V0z"/>
4
+ </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,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8" fill="#ffffff">
2
+ <path d="M8,5H5v3H3V5H0V3h3V0h2v3h3V5z"/>
3
+ </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')
@@ -0,0 +1,8 @@
1
+ #= depend_on_asset redde/redactor.css
2
+ #= require ./jquery-migrate-1.3.0
3
+ #= require ./redactor
4
+ #= require ./langs/ru
5
+ #= require ./toolbars/default
6
+
7
+ $ ->
8
+ $('.js-redactor').redactor()