optimacms 0.1.54 → 0.1.55

Sign up to get free protection for your applications and to get access to all the features.
Files changed (321) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/optimacms/admin.js +4 -4
  3. data/app/assets/stylesheets/optimacms/admin.css.scss +6 -6
  4. data/app/assets/stylesheets/optimacms/admin_tpl.css.scss +15 -15
  5. data/app/assets/stylesheets/optimacms/bootstrap_and_overrides.css.scss +52 -52
  6. data/app/assets/stylesheets/optimacms/bootstrap_custom.css.scss +49 -49
  7. data/app/assets/stylesheets/optimacms/bootstrap_variables.css.scss +860 -860
  8. data/app/assets/stylesheets/optimacms/colors.css.scss +68 -68
  9. data/app/assets/stylesheets/optimacms/skins/noskin.css.scss +95 -95
  10. data/app/assets/stylesheets/optimacms/tinymce.css.scss +54 -54
  11. data/app/assets/stylesheets/optimacms/tpl.css.scss +309 -309
  12. data/app/controllers/optimacms/admin/admin_base_controller.rb +44 -44
  13. data/app/controllers/optimacms/admin/dashboard_controller.rb +6 -6
  14. data/app/controllers/optimacms/admin/layouts_controller.rb +76 -76
  15. data/app/controllers/optimacms/admin/pages_controller.rb +229 -229
  16. data/app/controllers/optimacms/admin/templates_controller.rb +315 -315
  17. data/app/controllers/optimacms/dev_controller.rb +40 -40
  18. data/app/controllers/optimacms/elfinder_controller.rb +39 -39
  19. data/app/controllers/optimacms/page_base_controller.rb +6 -6
  20. data/app/controllers/optimacms/pages_controller.rb +170 -167
  21. data/app/controllers/optimacms/tinymce_assets_controller.rb +20 -20
  22. data/app/helpers/optimacms/application_helper.rb +20 -3
  23. data/app/helpers/optimacms/forms_helper.rb +75 -75
  24. data/app/inputs/textarea_tinymce_input.rb +27 -27
  25. data/app/models/concerns/optimacms/meta_content.rb +63 -63
  26. data/app/models/optimacms/language.rb +14 -14
  27. data/app/models/optimacms/layout.rb +53 -53
  28. data/app/models/optimacms/mediafile.rb +17 -17
  29. data/app/models/optimacms/page.rb +171 -171
  30. data/app/models/optimacms/page_translation.rb +10 -10
  31. data/app/models/optimacms/template.rb +390 -390
  32. data/app/models/optimacms/template_type.rb +20 -20
  33. data/app/views/optimacms/admin/common/_js_tinymce.html.haml +49 -49
  34. data/app/views/optimacms/admin/common/_modal_div.html.haml +16 -16
  35. data/app/views/optimacms/admin/dashboard/index.html.haml +18 -18
  36. data/app/views/optimacms/admin/layouts/_form.html.haml +22 -22
  37. data/app/views/optimacms/admin/layouts/edit.html.haml +5 -5
  38. data/app/views/optimacms/admin/layouts/index.html.haml +25 -25
  39. data/app/views/optimacms/admin/layouts/main.html.haml +6 -6
  40. data/app/views/optimacms/admin/layouts/new.html.haml +5 -5
  41. data/app/views/optimacms/admin/pages/_form.html.haml +78 -78
  42. data/app/views/optimacms/admin/pages/_form_folder.html.haml +14 -14
  43. data/app/views/optimacms/admin/pages/_form_old.html.haml +107 -107
  44. data/app/views/optimacms/admin/pages/_meta.html.haml +48 -48
  45. data/app/views/optimacms/admin/pages/edit.html.haml +5 -5
  46. data/app/views/optimacms/admin/pages/editfolder.html.haml +15 -15
  47. data/app/views/optimacms/admin/pages/index.html.haml +58 -58
  48. data/app/views/optimacms/admin/pages/new.html.haml +5 -5
  49. data/app/views/optimacms/admin/pages/newfolder.html.haml +15 -15
  50. data/app/views/optimacms/admin/shared/_breadcrumbs.html.haml +7 -7
  51. data/app/views/optimacms/admin/shared/_flash.html.haml +23 -23
  52. data/app/views/optimacms/admin/shared/_footer.html.haml +5 -5
  53. data/app/views/optimacms/admin/shared/_form_errors.html.haml +11 -11
  54. data/app/views/optimacms/admin/shared/_leftmenu.html.haml +49 -49
  55. data/app/views/optimacms/admin/shared/_top.html.haml +33 -33
  56. data/app/views/optimacms/admin/templates/_form.html.haml +61 -61
  57. data/app/views/optimacms/admin/templates/_js_form_modal.html.haml +43 -43
  58. data/app/views/optimacms/admin/templates/create.js.haml +3 -3
  59. data/app/views/optimacms/admin/templates/edit.html.haml +5 -5
  60. data/app/views/optimacms/admin/templates/editfolder.html.haml +31 -31
  61. data/app/views/optimacms/admin/templates/index.html.haml +48 -48
  62. data/app/views/optimacms/admin/templates/new.html.haml +37 -37
  63. data/app/views/optimacms/admin/templates/newattach.html.haml +32 -32
  64. data/app/views/optimacms/admin/templates/newfolder.html.haml +28 -28
  65. data/app/views/optimacms/elfinder/index.html.erb +54 -54
  66. data/config/initializers/assets.rb +2 -2
  67. data/config/initializers/kaminari.rb +10 -10
  68. data/config/initializers/paperclip.rb +11 -11
  69. data/config/initializers/paperclip_media_type_spoof_detector_override.rb +7 -7
  70. data/config/initializers/simple_form.rb +166 -166
  71. data/config/initializers/simple_form_bootstrap.rb +146 -146
  72. data/config/locales/simple_form.en.yml +3 -3
  73. data/config/locales/simple_form.ru.yml +3 -3
  74. data/config/tinymce.yml +6 -6
  75. data/lib/optimacms/fileutils/fileutils.rb +39 -39
  76. data/lib/optimacms/filters/form_filter.rb +226 -226
  77. data/lib/optimacms/mycontroller.rb +82 -69
  78. data/lib/optimacms/page_services/page_data.rb +97 -97
  79. data/lib/optimacms/page_services/page_process_service.rb +32 -32
  80. data/lib/optimacms/page_services/page_route_service.rb +156 -156
  81. data/lib/optimacms/simple_form_extensions/button_components.rb +33 -33
  82. data/lib/optimacms/version.rb +3 -3
  83. data/spec/dummy/app/assets/stylesheets/application.css.scss +11 -11
  84. data/spec/dummy/app/assets/stylesheets/bootstrap_and_overrides.css.scss +3 -3
  85. data/spec/dummy/app/assets/stylesheets/bootstrap_custom.css.scss +49 -49
  86. data/spec/dummy/app/assets/stylesheets/tpl.css.scss +62 -62
  87. data/spec/dummy/app/controllers/home_controller.rb +6 -6
  88. data/spec/dummy/app/controllers/my_controller.rb +6 -6
  89. data/spec/dummy/app/controllers/news_controller.rb +46 -46
  90. data/spec/dummy/app/models/news.rb +7 -7
  91. data/spec/dummy/app/views/home/index.html.haml +18 -18
  92. data/spec/dummy/app/views/my/hello.html.haml +4 -4
  93. data/spec/dummy/app/views/news/index.html.haml +13 -13
  94. data/spec/dummy/app/views/news/show.html.haml +6 -6
  95. data/spec/dummy/app/views/pages/1.html.erb +16 -16
  96. data/spec/dummy/app/views/pages/about.html.erb +12 -12
  97. data/spec/dummy/app/views/pages/text1.html +1 -1
  98. data/spec/dummy/app/views/services/index.html.haml +9 -9
  99. data/spec/dummy/app/views/services/service.html.haml +2 -2
  100. data/spec/dummy/app/views/temp/html1.html +1 -1
  101. data/spec/dummy/app/views/temp/p1.html.haml +6 -6
  102. data/spec/dummy/app/views/temp/t1.html.haml +13 -13
  103. data/spec/dummy/app/views/temp9/t2.html +8 -8
  104. data/spec/dummy/app/views/workers/_breadcrumb_worker.html.haml +11 -11
  105. data/spec/dummy/app/views/workers/_breadcrumb_workers.html.haml +9 -9
  106. data/spec/dummy/app/views/workers/_contacts_our.html.haml +3 -3
  107. data/spec/dummy/app/views/workers/_list_worker.html.haml +46 -46
  108. data/spec/dummy/app/views/workers/_list_workers.html.haml +6 -6
  109. data/spec/dummy/app/views/workers/_share_js.html.haml +22 -22
  110. data/spec/dummy/app/views/workers/_share_worker.html.haml +11 -11
  111. data/spec/dummy/app/views/workers/_show_info.html.haml +53 -53
  112. data/spec/dummy/app/views/workers/_tabs.html.haml +11 -11
  113. data/spec/dummy/app/views/workers/contacts.html.haml +19 -19
  114. data/spec/dummy/app/views/workers/index.html.haml +49 -49
  115. data/spec/dummy/app/views/workers/portfolio.html.haml +20 -20
  116. data/spec/dummy/app/views/workers/services.html.haml +11 -11
  117. data/spec/dummy/app/views/workers/show.html.haml +53 -53
  118. data/spec/dummy/app/views/workers/show_notfound.html.haml +8 -8
  119. data/spec/dummy/app/views/workers/t2.html.haml +1 -1
  120. data/spec/dummy/app/views/workers/work.html.haml +43 -43
  121. data/spec/dummy/config/tinymce.yml +5 -5
  122. data/spec/dummy/db/schema.rb +164 -164
  123. data/spec/dummy/log/development.log +0 -20396
  124. data/spec/factories/page.rb +25 -25
  125. data/spec/models/page_spec.rb +92 -92
  126. data/spec/spec_helper.rb +89 -89
  127. data/spec/support/factory_girl.rb +15 -15
  128. metadata +1431 -1817
  129. data/spec/dummy/app/views/temp/_part2.html.haml +0 -1
  130. data/spec/dummy/log/test.log +0 -203
  131. data/spec/dummy/tmp/cache/assets/development/sass/0abc660c880b2e10d695d713e519e6a4257cd348/application.css.scssc +0 -0
  132. data/spec/dummy/tmp/cache/assets/development/sass/0abc660c880b2e10d695d713e519e6a4257cd348/bootstrap_and_overrides.css.scssc +0 -0
  133. data/spec/dummy/tmp/cache/assets/development/sass/0abc660c880b2e10d695d713e519e6a4257cd348/bootstrap_custom.css.scssc +0 -0
  134. data/spec/dummy/tmp/cache/assets/development/sass/0abc660c880b2e10d695d713e519e6a4257cd348/bootstrap_variables.css.scssc +0 -0
  135. data/spec/dummy/tmp/cache/assets/development/sass/0abc660c880b2e10d695d713e519e6a4257cd348/tpl.css.scssc +0 -0
  136. data/spec/dummy/tmp/cache/assets/development/sass/18577b7353d72dbc7e81d46af07240af8557f987/_hacks.scssc +0 -0
  137. data/spec/dummy/tmp/cache/assets/development/sass/255a203cf5ecbb5470dfd267d6d4b923c8f1e5f0/_css3.scssc +0 -0
  138. data/spec/dummy/tmp/cache/assets/development/sass/255a203cf5ecbb5470dfd267d6d4b923c8f1e5f0/_support.scssc +0 -0
  139. data/spec/dummy/tmp/cache/assets/development/sass/4b8b59c3cee3225b46cdcaa54f7d0474421be9c6/_bootstrap-sprockets.scssc +0 -0
  140. data/spec/dummy/tmp/cache/assets/development/sass/7f871ea7e3a8127767d5a5868622ef2909611f26/noskin.css.scssc +0 -0
  141. data/spec/dummy/tmp/cache/assets/development/sass/a1b4b92b7663fe8c3e3678ca845c8a0566c3ca13/admin.css.scssc +0 -0
  142. data/spec/dummy/tmp/cache/assets/development/sass/a1b4b92b7663fe8c3e3678ca845c8a0566c3ca13/admin_tpl.css.scssc +0 -0
  143. data/spec/dummy/tmp/cache/assets/development/sass/a1b4b92b7663fe8c3e3678ca845c8a0566c3ca13/bootstrap_and_overrides.css.scssc +0 -0
  144. data/spec/dummy/tmp/cache/assets/development/sass/a1b4b92b7663fe8c3e3678ca845c8a0566c3ca13/bootstrap_custom.css.scssc +0 -0
  145. data/spec/dummy/tmp/cache/assets/development/sass/a1b4b92b7663fe8c3e3678ca845c8a0566c3ca13/bootstrap_variables.css.scssc +0 -0
  146. data/spec/dummy/tmp/cache/assets/development/sass/a1b4b92b7663fe8c3e3678ca845c8a0566c3ca13/colors.css.scssc +0 -0
  147. data/spec/dummy/tmp/cache/assets/development/sass/a1b4b92b7663fe8c3e3678ca845c8a0566c3ca13/tinymce.css.scssc +0 -0
  148. data/spec/dummy/tmp/cache/assets/development/sass/a1b4b92b7663fe8c3e3678ca845c8a0566c3ca13/tpl.css.scssc +0 -0
  149. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_alerts.scssc +0 -0
  150. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_background-variant.scssc +0 -0
  151. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_border-radius.scssc +0 -0
  152. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_buttons.scssc +0 -0
  153. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_center-block.scssc +0 -0
  154. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_clearfix.scssc +0 -0
  155. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_forms.scssc +0 -0
  156. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_gradients.scssc +0 -0
  157. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_grid-framework.scssc +0 -0
  158. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_grid.scssc +0 -0
  159. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_hide-text.scssc +0 -0
  160. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_image.scssc +0 -0
  161. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_labels.scssc +0 -0
  162. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_list-group.scssc +0 -0
  163. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_nav-divider.scssc +0 -0
  164. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_nav-vertical-align.scssc +0 -0
  165. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_opacity.scssc +0 -0
  166. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_pagination.scssc +0 -0
  167. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_panels.scssc +0 -0
  168. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_progress-bar.scssc +0 -0
  169. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_reset-filter.scssc +0 -0
  170. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_resize.scssc +0 -0
  171. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_responsive-visibility.scssc +0 -0
  172. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_size.scssc +0 -0
  173. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_tab-focus.scssc +0 -0
  174. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_table-row.scssc +0 -0
  175. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_text-emphasis.scssc +0 -0
  176. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_text-overflow.scssc +0 -0
  177. data/spec/dummy/tmp/cache/assets/development/sass/bfa17faa2a4aa370d46a5900b72c48f05b4837d1/_vendor-prefixes.scssc +0 -0
  178. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_appearance.scssc +0 -0
  179. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_background-clip.scssc +0 -0
  180. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_background-origin.scssc +0 -0
  181. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_background-size.scssc +0 -0
  182. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_border-radius.scssc +0 -0
  183. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_box-shadow.scssc +0 -0
  184. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_box-sizing.scssc +0 -0
  185. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_box.scssc +0 -0
  186. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_columns.scssc +0 -0
  187. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_filter.scssc +0 -0
  188. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_font-face.scssc +0 -0
  189. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_hyphenation.scssc +0 -0
  190. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_images.scssc +0 -0
  191. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_inline-block.scssc +0 -0
  192. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_opacity.scssc +0 -0
  193. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_regions.scssc +0 -0
  194. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_shared.scssc +0 -0
  195. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_text-shadow.scssc +0 -0
  196. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_transform.scssc +0 -0
  197. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_transition.scssc +0 -0
  198. data/spec/dummy/tmp/cache/assets/development/sass/e04ca948242d213270bfe676c8b96e7b33226468/_user-interface.scssc +0 -0
  199. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_alerts.scssc +0 -0
  200. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_badges.scssc +0 -0
  201. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_breadcrumbs.scssc +0 -0
  202. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_button-groups.scssc +0 -0
  203. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_buttons.scssc +0 -0
  204. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_carousel.scssc +0 -0
  205. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_close.scssc +0 -0
  206. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_code.scssc +0 -0
  207. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_component-animations.scssc +0 -0
  208. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_dropdowns.scssc +0 -0
  209. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_forms.scssc +0 -0
  210. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_glyphicons.scssc +0 -0
  211. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_grid.scssc +0 -0
  212. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_input-groups.scssc +0 -0
  213. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_jumbotron.scssc +0 -0
  214. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_labels.scssc +0 -0
  215. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_list-group.scssc +0 -0
  216. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_media.scssc +0 -0
  217. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_mixins.scssc +0 -0
  218. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_modals.scssc +0 -0
  219. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_navbar.scssc +0 -0
  220. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_navs.scssc +0 -0
  221. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_normalize.scssc +0 -0
  222. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_pager.scssc +0 -0
  223. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_pagination.scssc +0 -0
  224. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_panels.scssc +0 -0
  225. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_popovers.scssc +0 -0
  226. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_print.scssc +0 -0
  227. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_progress-bars.scssc +0 -0
  228. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_responsive-embed.scssc +0 -0
  229. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_responsive-utilities.scssc +0 -0
  230. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_scaffolding.scssc +0 -0
  231. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_tables.scssc +0 -0
  232. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_thumbnails.scssc +0 -0
  233. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_tooltip.scssc +0 -0
  234. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_type.scssc +0 -0
  235. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_utilities.scssc +0 -0
  236. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_variables.scssc +0 -0
  237. data/spec/dummy/tmp/cache/assets/development/sass/e541a95436c6e387d69ff457c2fe7f7bd11c2069/_wells.scssc +0 -0
  238. data/spec/dummy/tmp/cache/assets/development/sass/fc41a79de5ec40d34c8a83221f3f3da2c64f4153/font-awesome.css.erbc +0 -0
  239. data/spec/dummy/tmp/cache/assets/development/sprockets/002bd8f28c62a795a10ce5716ceffc21 +0 -0
  240. data/spec/dummy/tmp/cache/assets/development/sprockets/053f826d1ea01a2fac355de0755e5c40 +0 -0
  241. data/spec/dummy/tmp/cache/assets/development/sprockets/05e27d4921b00a0fdddb47a737a64494 +0 -0
  242. data/spec/dummy/tmp/cache/assets/development/sprockets/0a470277dd21c166b9dfb68b03d34d5c +0 -0
  243. data/spec/dummy/tmp/cache/assets/development/sprockets/0b1671e1bffda60e6a95f72b9176d628 +0 -0
  244. data/spec/dummy/tmp/cache/assets/development/sprockets/0c01383de62960e3667c7bf3788ecdb6 +0 -0
  245. data/spec/dummy/tmp/cache/assets/development/sprockets/0d2f255829ff9f72d98dead4f35ddf02 +0 -0
  246. data/spec/dummy/tmp/cache/assets/development/sprockets/11f54468370774efca0fe1afb2ebf1d9 +0 -0
  247. data/spec/dummy/tmp/cache/assets/development/sprockets/1c0ef71c34dc1d573e1b4b527116e3cc +0 -0
  248. data/spec/dummy/tmp/cache/assets/development/sprockets/2168c08c151d642aa46ea4bc6283929c +0 -0
  249. data/spec/dummy/tmp/cache/assets/development/sprockets/2a9369c8d28de014045a120b692e8139 +0 -0
  250. data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  251. data/spec/dummy/tmp/cache/assets/development/sprockets/2f7d38a264678a2db4a0d569a3313cb1 +0 -0
  252. data/spec/dummy/tmp/cache/assets/development/sprockets/3240ef40c1dc9d13156bbd790ec2651a +0 -0
  253. data/spec/dummy/tmp/cache/assets/development/sprockets/332dfe4887cbad3adbd20e6609fa4960 +0 -0
  254. data/spec/dummy/tmp/cache/assets/development/sprockets/3347cc312918facec5bbac684ea65715 +0 -0
  255. data/spec/dummy/tmp/cache/assets/development/sprockets/3cd4037d8c32ad8fcdd5e3bbb8dfc35a +0 -0
  256. data/spec/dummy/tmp/cache/assets/development/sprockets/4016d2fd0b776ceb82fcbfbc5d2e26b1 +0 -0
  257. data/spec/dummy/tmp/cache/assets/development/sprockets/43dc3e92cd09deb0fc54dd97b46935e9 +0 -0
  258. data/spec/dummy/tmp/cache/assets/development/sprockets/452d7e35d5a012ae12fa7346fcf2239b +0 -0
  259. data/spec/dummy/tmp/cache/assets/development/sprockets/49c7cb5dd916ffc9e87ce3b989c92062 +0 -0
  260. data/spec/dummy/tmp/cache/assets/development/sprockets/529a74a4530de52f6c3ebbf107ffe9f2 +0 -0
  261. data/spec/dummy/tmp/cache/assets/development/sprockets/55a2847335c39261e1efe764deb18592 +0 -0
  262. data/spec/dummy/tmp/cache/assets/development/sprockets/56c7eb172a7423728c45d0a751d198e3 +0 -0
  263. data/spec/dummy/tmp/cache/assets/development/sprockets/6789fe765d536063c998330523bb12b9 +0 -0
  264. data/spec/dummy/tmp/cache/assets/development/sprockets/678a2e392e656b8132f0420e4ec28ed6 +0 -0
  265. data/spec/dummy/tmp/cache/assets/development/sprockets/6843f0414f73089579ae0f9fddf7b38f +0 -0
  266. data/spec/dummy/tmp/cache/assets/development/sprockets/6c7c58744c14732af9bf574870fdf07e +0 -0
  267. data/spec/dummy/tmp/cache/assets/development/sprockets/6cdbd6f171a27a578bcb07dd5bfa83a2 +0 -0
  268. data/spec/dummy/tmp/cache/assets/development/sprockets/6e431ed1dfb5bbcbd33a5f9e069dd3ab +0 -0
  269. data/spec/dummy/tmp/cache/assets/development/sprockets/6f943f22c610e6417422e4a13e0bcc0d +0 -0
  270. data/spec/dummy/tmp/cache/assets/development/sprockets/73fbaa501dc0b072cf2c27fa7dfe0d91 +0 -0
  271. data/spec/dummy/tmp/cache/assets/development/sprockets/7c886717bced4d59ab89e012b52f40de +0 -0
  272. data/spec/dummy/tmp/cache/assets/development/sprockets/821470da3272c8b99070972d4f4f58ca +0 -0
  273. data/spec/dummy/tmp/cache/assets/development/sprockets/88d843fcb07453d1057fac1e254fde0d +0 -0
  274. data/spec/dummy/tmp/cache/assets/development/sprockets/8956737a82f17db48d50e13f133aeefc +0 -0
  275. data/spec/dummy/tmp/cache/assets/development/sprockets/8ab512c9b33ac90e699b73469d71f061 +0 -0
  276. data/spec/dummy/tmp/cache/assets/development/sprockets/8b5a7992567ebbeb9a882d074778f8c8 +0 -0
  277. data/spec/dummy/tmp/cache/assets/development/sprockets/8d71fe4f0e2910900097bdc07bf2d6af +0 -0
  278. data/spec/dummy/tmp/cache/assets/development/sprockets/8e1785ddbfab42cd2df0416eb3932253 +0 -0
  279. data/spec/dummy/tmp/cache/assets/development/sprockets/9024d024c62c2668836b1e1b7b3b78cc +0 -0
  280. data/spec/dummy/tmp/cache/assets/development/sprockets/928ed298f875a25727ca516f5c03f344 +0 -0
  281. data/spec/dummy/tmp/cache/assets/development/sprockets/97c1e12a09973e0fb97f23a1dc496443 +0 -0
  282. data/spec/dummy/tmp/cache/assets/development/sprockets/991576185140a77411185839fd0533f1 +0 -0
  283. data/spec/dummy/tmp/cache/assets/development/sprockets/99e8d6370ba85ec4a61d953f5ed261af +0 -0
  284. data/spec/dummy/tmp/cache/assets/development/sprockets/9ee80730ab26986d507820ac7a288d5c +0 -0
  285. data/spec/dummy/tmp/cache/assets/development/sprockets/a3faca31eb11ba1a981535f9c8408282 +0 -0
  286. data/spec/dummy/tmp/cache/assets/development/sprockets/a5c68a2aec806face32c749f380f1e14 +0 -0
  287. data/spec/dummy/tmp/cache/assets/development/sprockets/a64dbcf0e4afe0985b1abd3e209d17cd +0 -0
  288. data/spec/dummy/tmp/cache/assets/development/sprockets/a6d357fbe03dae6f590180f6c5e0e148 +0 -0
  289. data/spec/dummy/tmp/cache/assets/development/sprockets/aa58fb159780a7200a1bc4c6844cc5c4 +0 -0
  290. data/spec/dummy/tmp/cache/assets/development/sprockets/aaba73a43e02d8c6550bae851f17e7a0 +0 -0
  291. data/spec/dummy/tmp/cache/assets/development/sprockets/af26c017afcf68f1edd44a4c9bb942e4 +0 -0
  292. data/spec/dummy/tmp/cache/assets/development/sprockets/b3defd466aec80b128284b8d85324630 +0 -0
  293. data/spec/dummy/tmp/cache/assets/development/sprockets/b48ed8a3de3ca66055ee4fd18b16421f +0 -0
  294. data/spec/dummy/tmp/cache/assets/development/sprockets/ba9859d0d2b7d4d7d5b03ff3a71ed478 +0 -0
  295. data/spec/dummy/tmp/cache/assets/development/sprockets/bcca522c6302f184f12fe0e8a7d7e71a +0 -0
  296. data/spec/dummy/tmp/cache/assets/development/sprockets/be8a0cd6c3605b9d7c22642609316a9f +0 -0
  297. data/spec/dummy/tmp/cache/assets/development/sprockets/c11c6d97cfc7ef7945fa87f14b44445c +0 -0
  298. data/spec/dummy/tmp/cache/assets/development/sprockets/c13fc73ceafa45876a901b3e775b83ae +0 -0
  299. data/spec/dummy/tmp/cache/assets/development/sprockets/c5f3450b5366b6fbdc4172ce089fba48 +0 -0
  300. data/spec/dummy/tmp/cache/assets/development/sprockets/c982bb1e71844744a60dc9b4afcb2f49 +0 -0
  301. data/spec/dummy/tmp/cache/assets/development/sprockets/cf24c3f1bb8adb1f168758f2bd9775c9 +0 -0
  302. data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  303. data/spec/dummy/tmp/cache/assets/development/sprockets/d3e5a199890ba7c706fc62c2b891714d +0 -0
  304. data/spec/dummy/tmp/cache/assets/development/sprockets/d584baf83d8a779d945f9668f902fa7c +0 -0
  305. data/spec/dummy/tmp/cache/assets/development/sprockets/d71b820ce5f8b310e466f517bd3a8e4b +0 -0
  306. data/spec/dummy/tmp/cache/assets/development/sprockets/d8dab59d17daf5a5081153e2ad7d09b4 +0 -0
  307. data/spec/dummy/tmp/cache/assets/development/sprockets/dd4a8658311b7a2cd8effa6479827559 +0 -0
  308. data/spec/dummy/tmp/cache/assets/development/sprockets/e11970a225a09526aac3f76d7ee91822 +0 -0
  309. data/spec/dummy/tmp/cache/assets/development/sprockets/e3dd086dd858b5bff9cfd60a031c2091 +0 -0
  310. data/spec/dummy/tmp/cache/assets/development/sprockets/e43bcf201d76cdf6e1fe345195c1cd9e +0 -0
  311. data/spec/dummy/tmp/cache/assets/development/sprockets/e945ca604ee0240455a5652953b3e495 +0 -0
  312. data/spec/dummy/tmp/cache/assets/development/sprockets/ec33505f0e2ed4dd12951ecceffa3695 +0 -0
  313. data/spec/dummy/tmp/cache/assets/development/sprockets/ee287313e28f341f83628dec0a353fa6 +0 -0
  314. data/spec/dummy/tmp/cache/assets/development/sprockets/ee9a23832dc2a49ee6ec6d3f1d6a0e1f +0 -0
  315. data/spec/dummy/tmp/cache/assets/development/sprockets/ef2d6862f5fd690c5387cafd88944a9f +0 -0
  316. data/spec/dummy/tmp/cache/assets/development/sprockets/ef8c3824b85ed745cad651aadda4f2b8 +0 -0
  317. data/spec/dummy/tmp/cache/assets/development/sprockets/f557612d05bb9fea499dce8352b3f0ca +0 -0
  318. data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  319. data/spec/dummy/tmp/cache/assets/development/sprockets/f7f3056583a2454471a4a5f7200dcefa +0 -0
  320. data/spec/dummy/tmp/cache/assets/development/sprockets/f9c51fa87975943d31bc1bfd7cb684c6 +0 -0
  321. data/spec/dummy/tmp/cache/assets/development/sprockets/ff9ed89418a3f78032b8f8184dd98e80 +0 -0
@@ -1,20 +1,20 @@
1
- module Optimacms
2
- class TemplateType < ActiveRecord::Base
3
- self.table_name = 'cms_templatetypes'
4
-
5
- TYPE_LAYOUT = 1
6
- TYPE_PAGE = 2
7
- TYPE_PARTIAL = 3
8
- TYPE_BLOCKVIEW = 4
9
-
10
- #
11
- has_many :templates
12
-
13
-
14
- # properties
15
-
16
- def to_s
17
- title
18
- end
19
- end
20
- end
1
+ module Optimacms
2
+ class TemplateType < ActiveRecord::Base
3
+ self.table_name = 'cms_templatetypes'
4
+
5
+ TYPE_LAYOUT = 1
6
+ TYPE_PAGE = 2
7
+ TYPE_PARTIAL = 3
8
+ TYPE_BLOCKVIEW = 4
9
+
10
+ #
11
+ has_many :templates
12
+
13
+
14
+ # properties
15
+
16
+ def to_s
17
+ title
18
+ end
19
+ end
20
+ end
@@ -1,49 +1,49 @@
1
- <script type="text/javascript" src="/js/tinymce/tinymce.min.js"></script>
2
- <script type="text/javascript" src="/js/tinymce/jquery.tinymce.min.js"></script>
3
-
4
-
5
- :javascript
6
- tinymce.init({
7
- selector: "textarea.editor",
8
- plugins: [
9
- "advlist autolink lists link image charmap print preview anchor",
10
- "searchreplace visualblocks code fullscreen",
11
- "insertdatetime media table contextmenu paste"
12
- ],
13
- toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image myblock",
14
- file_browser_callback : elFinderBrowser,
15
- relative_urls: false,
16
- content_css : "#{asset_path('optimacms/tinymce.css')}",
17
- protect2: [
18
- /\<\/?(if|endif)\>/g, // Protect <if> & </endif>
19
- /\<xsl\:[^>]+\>/g, // Protect <xsl:...>
20
- /<\?php.*?\?>/g // Protect php code
21
- ],
22
- setup: function(editor) {
23
- editor.addButton('myblock', {
24
- title: 'block',
25
- image: '#{image_url('tinymce/icon_block2.png')}',
26
- onclick: function() {
27
- editor.insertContent('#{tinymce_editor_insert_block}');
28
- }
29
-
30
- });
31
- }
32
-
33
-
34
- });
35
-
36
- function elFinderBrowser (field_name, url, type, win) {
37
- tinymce.activeEditor.windowManager.open({
38
- file: '/elfinder_manager',// use an absolute path!
39
- title: 'elFinder 2.0',
40
- width: 900,
41
- height: 650,
42
- resizable: 'yes'
43
- }, {
44
- setUrl: function (url) {
45
- win.document.getElementById(field_name).value = url;
46
- }
47
- });
48
- return false;
49
- }
1
+ <script type="text/javascript" src="/js/tinymce/tinymce.min.js"></script>
2
+ <script type="text/javascript" src="/js/tinymce/jquery.tinymce.min.js"></script>
3
+
4
+
5
+ :javascript
6
+ tinymce.init({
7
+ selector: "textarea.editor",
8
+ plugins: [
9
+ "advlist autolink lists link image charmap print preview anchor",
10
+ "searchreplace visualblocks code fullscreen",
11
+ "insertdatetime media table contextmenu paste"
12
+ ],
13
+ toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image myblock",
14
+ file_browser_callback : elFinderBrowser,
15
+ relative_urls: false,
16
+ content_css : "#{asset_path('optimacms/tinymce.css')}",
17
+ protect2: [
18
+ /\<\/?(if|endif)\>/g, // Protect <if> & </endif>
19
+ /\<xsl\:[^>]+\>/g, // Protect <xsl:...>
20
+ /<\?php.*?\?>/g // Protect php code
21
+ ],
22
+ setup: function(editor) {
23
+ editor.addButton('myblock', {
24
+ title: 'block',
25
+ image: '#{image_url('tinymce/icon_block2.png')}',
26
+ onclick: function() {
27
+ editor.insertContent('#{tinymce_editor_insert_block}');
28
+ }
29
+
30
+ });
31
+ }
32
+
33
+
34
+ });
35
+
36
+ function elFinderBrowser (field_name, url, type, win) {
37
+ tinymce.activeEditor.windowManager.open({
38
+ file: '/elfinder_manager',// use an absolute path!
39
+ title: 'elFinder 2.0',
40
+ width: 900,
41
+ height: 650,
42
+ resizable: 'yes'
43
+ }, {
44
+ setUrl: function (url) {
45
+ win.document.getElementById(field_name).value = url;
46
+ }
47
+ });
48
+ return false;
49
+ }
@@ -1,16 +1,16 @@
1
- .modal.fade(id="modal#{name}Form" tabindex="-1" role="dialog" aria-labelledby="mod#{name}Label" aria-hidden="true")
2
- .modal-dialog
3
- .modal-content
4
- .modal-header
5
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
6
- %h4.modal-title{id: "mod#{name}Label"}
7
- =title
8
-
9
- .modal-body
10
- .modalContent
11
-
12
- .modal-footer
13
- -#<button type="button" class="btn btn-primary">Save</button>
14
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
15
-
16
-
1
+ .modal.fade(id="modal#{name}Form" tabindex="-1" role="dialog" aria-labelledby="mod#{name}Label" aria-hidden="true")
2
+ .modal-dialog
3
+ .modal-content
4
+ .modal-header
5
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
6
+ %h4.modal-title{id: "mod#{name}Label"}
7
+ =title
8
+
9
+ .modal-body
10
+ .modalContent
11
+
12
+ .modal-footer
13
+ -#<button type="button" class="btn btn-primary">Save</button>
14
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
15
+
16
+
@@ -1,18 +1,18 @@
1
- .alert.alert-block.alert-success
2
- %button.close( data-dismiss="alert" type="button")
3
- %i.fa.fa-times
4
-
5
- Welcome to
6
- %strong.green
7
- OptimaCMS
8
- %small (v0.1.1)
9
- , the lightweight, feature-rich and easy to use admin
10
-
11
-
12
- .page-header
13
- %h1
14
- Dashboard
15
- %small
16
- <i class="ace-icon fa fa-angle-double-right"></i>
17
- overview & stats
18
-
1
+ .alert.alert-block.alert-success
2
+ %button.close( data-dismiss="alert" type="button")
3
+ %i.fa.fa-times
4
+
5
+ Welcome to
6
+ %strong.green
7
+ OptimaCMS
8
+ %small (v0.1.1)
9
+ , the lightweight, feature-rich and easy to use admin
10
+
11
+
12
+ .page-header
13
+ %h1
14
+ Dashboard
15
+ %small
16
+ <i class="ace-icon fa fa-angle-double-right"></i>
17
+ overview & stats
18
+
@@ -1,22 +1,22 @@
1
- .row
2
- .col-md-12
3
- =horizontal_simple_form_for @item do |f|
4
- = f.input :title, label: "Title"
5
- = f.input :content, as: :textarea_tinymce, label: "Content", input_html: {:rows => 16, :cols => 120}
6
-
7
- = f.button :submit_cancel, 'Save', :cancel=>@url_back
8
-
9
- -#=f.submit 'Сохранить', :class=>'btn btn-sm btn-primary'
10
- -#=link_to 'Отмена', '#', :class=>'btn btn-sm btn-default', :id=>'link_form_cancel'
11
-
12
-
13
-
14
-
15
-
16
- :coffeescript
17
- $(document).ready(function() {
18
- $("#link_form_cancel").click(function(e){
19
- e.preventDefault();
20
- window.location = "#{@url_back}";
21
- });
22
- });
1
+ .row
2
+ .col-md-12
3
+ =horizontal_simple_form_for @item do |f|
4
+ = f.input :title, label: "Title"
5
+ = f.input :content, as: :textarea_tinymce, label: "Content", input_html: {:rows => 16, :cols => 120}
6
+
7
+ = f.button :submit_cancel, 'Save', :cancel=>@url_back
8
+
9
+ -#=f.submit 'Сохранить', :class=>'btn btn-sm btn-primary'
10
+ -#=link_to 'Отмена', '#', :class=>'btn btn-sm btn-default', :id=>'link_form_cancel'
11
+
12
+
13
+
14
+
15
+
16
+ :coffeescript
17
+ $(document).ready(function() {
18
+ $("#link_form_cancel").click(function(e){
19
+ e.preventDefault();
20
+ window.location = "#{@url_back}";
21
+ });
22
+ });
@@ -1,5 +1,5 @@
1
- %h1 Edit Layout
2
-
3
- = render 'form'
4
-
5
-
1
+ %h1 Edit Layout
2
+
3
+ = render 'form'
4
+
5
+
@@ -1,25 +1,25 @@
1
- .page-header
2
- .row
3
- .col-md-8
4
- %h1
5
- Layouts
6
- %small
7
- <i class="ace-icon fa fa-angle-double-right"></i>
8
- edit layouts content
9
- .col-md-2
10
- =link_to 'New layout', new_layout_path, :class=>'btn btn-sm btn-primary'
11
-
12
-
13
-
14
-
15
-
16
- %table.table.table-striped.table-bordered
17
- %tr
18
- %th Title
19
- %th Commands
20
- - @items.each do |item|
21
- %tr
22
- %td
23
- =link_to item.title, edit_layout_path(item)
24
- %td
25
- =link_to 'Edit', edit_layout_path(item)
1
+ .page-header
2
+ .row
3
+ .col-md-8
4
+ %h1
5
+ Layouts
6
+ %small
7
+ <i class="ace-icon fa fa-angle-double-right"></i>
8
+ edit layouts content
9
+ .col-md-2
10
+ =link_to 'New layout', new_layout_path, :class=>'btn btn-sm btn-primary'
11
+
12
+
13
+
14
+
15
+
16
+ %table.table.table-striped.table-bordered
17
+ %tr
18
+ %th Title
19
+ %th Commands
20
+ - @items.each do |item|
21
+ %tr
22
+ %td
23
+ =link_to item.title, edit_layout_path(item)
24
+ %td
25
+ =link_to 'Edit', edit_layout_path(item)
@@ -1,6 +1,6 @@
1
- - modal = (@modal || 0).to_i
2
- - if modal==1
3
- = render :template => 'optimacms/admin/layouts/modal'
4
- - else
5
- = render :template => 'optimacms/admin/layouts/basic'
6
-
1
+ - modal = (@modal || 0).to_i
2
+ - if modal==1
3
+ = render :template => 'optimacms/admin/layouts/modal'
4
+ - else
5
+ = render :template => 'optimacms/admin/layouts/basic'
6
+
@@ -1,5 +1,5 @@
1
- %h1 New Layout
2
-
3
- = render 'form'
4
-
5
-
1
+ %h1 New Layout
2
+
3
+ = render 'form'
4
+
5
+
@@ -1,78 +1,78 @@
1
-
2
- .row
3
- .col-md-12
4
- =horizontal_simple_form_for @item do |f|
5
- = render 'optimacms/admin/shared/form_errors', :object=>@item
6
-
7
- = f.input :parent_id, as: :hidden
8
-
9
- = f.input :title, label: "Title"
10
- = f.input :url, as: :string, label: "URL", :hint=> "parsed: #{@item.parsed_url}"
11
-
12
- = f.input :name, as: :string, label: "Name", :hint=>'Unique name of page. only latin letters, no spaces'
13
- - if @item && @item.parent_id>0
14
- = f.input :parent_title, disabled: true, label: 'Folder'
15
-
16
- = f.input :controller_action, as: :string, label: "Controller", :hint=>'controller#action. ex.: news#index'
17
-
18
- = f.association :layout, label: "Layout", collection: @layouts, label_method: :title
19
-
20
- .form-group.page_template
21
- %label(for="inputTemplate" class="col-sm-2 col-md-1 control-label")
22
- Template
23
-
24
- .col-sm-4.col-md-4.control
25
- -#= f.input_field :client, :as => :autocomplete, :source_query => autocomplete_client_name_orders_path, :minLength => 1, :items => 10, :class=>'form-control', :afterSelect=>'client_autocomplete_after_select'
26
- =f.input_field :template, :as => :autocomplete, :source_query => autocomplete_templates_url, :class=>'form-control'
27
-
28
- .col-sm-2.col-md-2
29
- =link_to '#', :class=>"btn btn-sm btn-default", :id=>'linkAddTemplate' do
30
- %i.fa.fa-plus
31
-
32
- =link_to '#', :class=>"btn btn-sm btn-default" do
33
- %i.fa.fa-search
34
-
35
- =link_to '#', :class=>"btn btn-sm btn-default" do
36
- %i.fa.fa-refresh
37
-
38
- -#= f.input :view_path, label: "Template"
39
- -#= f.input :content, as: :text, label: "Content", input_html: {:rows => 16, :cols => 120}
40
-
41
- = f.input :is_translated, label: "Translate?"
42
-
43
- = render 'meta', f: f, item: @item
44
-
45
- = f.button :submit_cancel, 'Save', :cancel=>@url_back
46
-
47
-
48
-
49
- = render 'optimacms/admin/templates/js_form_modal'
50
-
51
-
52
- #div_template_info(style="visibilty:none;")
53
- - if @item.template
54
- =link_to 'Edit template "'+@item.template.to_s+'"', edit_template_path(@item.template)
55
-
56
-
57
- = render 'optimacms/admin/common/js_tinymce'
58
-
59
- :javascript
60
- var page_template_id = 0;
61
- var page_template_title = '';
62
-
63
- function autocomplete_set_item(input_id, id, title){
64
- var obj_input = $('#'+input_id);
65
- var obj_id = $('#'+obj_input.attr("data-field-id"));
66
- if (obj_id)
67
- obj_id.val(id);
68
-
69
- obj_input.val(title);
70
-
71
- }
72
-
73
-
74
- :javascript
75
- $(document).ready(function() {
76
- $('.form-group.page_template div.control').append($("#div_template_info"));
77
- $("#div_template_info").show();
78
- });
1
+
2
+ .row
3
+ .col-md-12
4
+ =horizontal_simple_form_for @item do |f|
5
+ = render 'optimacms/admin/shared/form_errors', :object=>@item
6
+
7
+ = f.input :parent_id, as: :hidden
8
+
9
+ = f.input :title, label: "Title"
10
+ = f.input :url, as: :string, label: "URL", :hint=> "parsed: #{@item.parsed_url}"
11
+
12
+ = f.input :name, as: :string, label: "Name", :hint=>'Unique name of page. only latin letters, no spaces'
13
+ - if @item && @item.parent_id>0
14
+ = f.input :parent_title, disabled: true, label: 'Folder'
15
+
16
+ = f.input :controller_action, as: :string, label: "Controller", :hint=>'controller#action. ex.: news#index'
17
+
18
+ = f.association :layout, label: "Layout", collection: @layouts, label_method: :title
19
+
20
+ .form-group.page_template
21
+ %label(for="inputTemplate" class="col-sm-2 col-md-1 control-label")
22
+ Template
23
+
24
+ .col-sm-4.col-md-4.control
25
+ -#= f.input_field :client, :as => :autocomplete, :source_query => autocomplete_client_name_orders_path, :minLength => 1, :items => 10, :class=>'form-control', :afterSelect=>'client_autocomplete_after_select'
26
+ =f.input_field :template, :as => :autocomplete, :source_query => autocomplete_templates_url, :class=>'form-control'
27
+
28
+ .col-sm-2.col-md-2
29
+ =link_to '#', :class=>"btn btn-sm btn-default", :id=>'linkAddTemplate' do
30
+ %i.fa.fa-plus
31
+
32
+ =link_to '#', :class=>"btn btn-sm btn-default" do
33
+ %i.fa.fa-search
34
+
35
+ =link_to '#', :class=>"btn btn-sm btn-default" do
36
+ %i.fa.fa-refresh
37
+
38
+ -#= f.input :view_path, label: "Template"
39
+ -#= f.input :content, as: :text, label: "Content", input_html: {:rows => 16, :cols => 120}
40
+
41
+ = f.input :is_translated, label: "Translate?"
42
+
43
+ = render 'meta', f: f, item: @item
44
+
45
+ = f.button :submit_cancel, 'Save', :cancel=>@url_back
46
+
47
+
48
+
49
+ = render 'optimacms/admin/templates/js_form_modal'
50
+
51
+
52
+ #div_template_info(style="visibilty:none;")
53
+ - if @item.template
54
+ =link_to 'Edit template "'+@item.template.to_s+'"', edit_template_path(@item.template)
55
+
56
+
57
+ = render 'optimacms/admin/common/js_tinymce'
58
+
59
+ :javascript
60
+ var page_template_id = 0;
61
+ var page_template_title = '';
62
+
63
+ function autocomplete_set_item(input_id, id, title){
64
+ var obj_input = $('#'+input_id);
65
+ var obj_id = $('#'+obj_input.attr("data-field-id"));
66
+ if (obj_id)
67
+ obj_id.val(id);
68
+
69
+ obj_input.val(title);
70
+
71
+ }
72
+
73
+
74
+ :javascript
75
+ $(document).ready(function() {
76
+ $('.form-group.page_template div.control').append($("#div_template_info"));
77
+ $("#div_template_info").show();
78
+ });
@@ -1,14 +1,14 @@
1
- - url = @item.persisted? ? updatefolder_page_path : createfolder_pages_path
2
-
3
- =horizontal_simple_form_for @item, url: url do |f|
4
- = render 'optimacms/admin/shared/form_errors', :object=>@item
5
-
6
- = f.input :parent_id, as: :hidden
7
- = f.input :is_folder, as: :hidden
8
-
9
- = f.input :title, label: "Title"
10
-
11
- - if @item.parent_id>0
12
- = f.input :parent_title, disabled: true, label: 'Parent folder'
13
-
14
- = f.button :submit_cancel, 'Save', :cancel=>@url_back
1
+ - url = @item.persisted? ? updatefolder_page_path : createfolder_pages_path
2
+
3
+ =horizontal_simple_form_for @item, url: url do |f|
4
+ = render 'optimacms/admin/shared/form_errors', :object=>@item
5
+
6
+ = f.input :parent_id, as: :hidden
7
+ = f.input :is_folder, as: :hidden
8
+
9
+ = f.input :title, label: "Title"
10
+
11
+ - if @item.parent_id>0
12
+ = f.input :parent_title, disabled: true, label: 'Parent folder'
13
+
14
+ = f.button :submit_cancel, 'Save', :cancel=>@url_back