mokio 0.0.15 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. checksums.yaml +5 -5
  2. data/app/assets/javascripts/backend.js +6 -3
  3. data/app/assets/javascripts/backend/datatable.js.coffee.erb +28 -26
  4. data/app/assets/javascripts/backend/head.js +1 -0
  5. data/app/assets/javascripts/backend/main.js +69 -44
  6. data/app/assets/javascripts/backend/mokio_dynamic_fields.js +20 -0
  7. data/app/assets/javascripts/backend/vendors/select2/select2.min.js +2 -0
  8. data/app/assets/stylesheets/backend.scss +6 -2
  9. data/app/assets/stylesheets/backend/custom.scss +13 -1
  10. data/app/assets/stylesheets/backend/main.scss +74 -73
  11. data/app/assets/stylesheets/backend/plugins/forms/select2/select2.scss +4 -0
  12. data/app/assets/stylesheets/backend/plugins/tables/dataTables/{jquery.dataTables.scss → jquery.dataTables.css} +7 -7
  13. data/app/assets/stylesheets/backend/theme/main.scss +413 -0
  14. data/app/assets/stylesheets/backend/theme/nice-select/_nice-select-prefixed.scss +190 -0
  15. data/app/assets/stylesheets/backend/theme/nice-select/nice-select.scss +178 -0
  16. data/app/assets/stylesheets/backend/theme/nice-select/style.scss +20 -0
  17. data/app/assets/stylesheets/backend/vendors/select2/select2.min.css +1 -0
  18. data/app/datatables/commons_datatable.rb +56 -36
  19. data/app/helpers/mokio/backend/backend_helper.rb +27 -1
  20. data/app/helpers/mokio/backend/common_helper.rb +9 -4
  21. data/app/helpers/mokio/backend/dynamic_fields_helper.rb +91 -0
  22. data/app/models/devise_custom_failure.rb +9 -0
  23. data/app/models/mokio/article.rb +0 -1
  24. data/app/models/mokio/contact.rb +0 -1
  25. data/app/models/mokio/content.rb +0 -1
  26. data/app/models/mokio/menu.rb +0 -1
  27. data/app/models/mokio/mov_gallery.rb +0 -1
  28. data/app/models/mokio/pic_gallery.rb +0 -1
  29. data/app/models/mokio/seo_tag.rb +5 -0
  30. data/app/models/mokio/support.rb +0 -1
  31. data/app/uploaders/ckeditor_picture_uploader.rb +2 -2
  32. data/app/views/devise/sessions/new.html.haml +2 -1
  33. data/app/views/mokio/articles/_form.html.slim +6 -3
  34. data/app/views/mokio/common/_form_content.html.slim +4 -4
  35. data/app/views/mokio/common/edit.html.slim +1 -5
  36. data/app/views/mokio/common/index.html.slim +3 -0
  37. data/app/views/mokio/common/modals/_modal_seo_tags.html.slim +47 -0
  38. data/app/views/mokio/common/new.html.slim +1 -4
  39. data/app/views/mokio/contacts/_form.html.slim +9 -7
  40. data/app/views/mokio/contents/new.html.slim +1 -2
  41. data/app/views/mokio/data_files/_file_upload.html.erb +1 -6
  42. data/app/views/mokio/layout/sidebar.html.slim +6 -13
  43. data/app/views/mokio/menus/_form.html.slim +97 -0
  44. data/app/views/mokio/menus/{_form.html.haml → _old_form.html.haml} +5 -6
  45. data/app/views/mokio/menus/{_form_slim.html.slim → _old_form_slim.html.slim} +8 -10
  46. data/app/views/mokio/menus/new_menu_position.slim +1 -1
  47. data/app/views/mokio/mov_galleries/_form_inputs.html.slim +3 -3
  48. data/app/views/mokio/pic_galleries/_form_inputs.html.slim +3 -3
  49. data/app/views/mokio/static_modules/_form.html.slim +2 -1
  50. data/config/initializers/frontend.rb +3 -0
  51. data/config/initializers/simple_form.rb +9 -0
  52. data/config/locales/en.yml +16 -26
  53. data/config/locales/pl.yml +11 -20
  54. data/db/migrate/20140422135850_add_mokio_to_application.rb +22 -24
  55. data/db/migrate/20191217135611_create_mokio_seo_tags.rb +11 -0
  56. data/lib/mokio.rb +37 -10
  57. data/lib/mokio/concerns.rb +3 -13
  58. data/lib/mokio/concerns/common/controller_functions.rb +1 -15
  59. data/lib/mokio/concerns/common/controller_object.rb +2 -2
  60. data/lib/mokio/concerns/common/seo_tags.rb +32 -0
  61. data/lib/mokio/concerns/common/services/sitemap_service.rb +196 -0
  62. data/lib/mokio/concerns/controllers/application.rb +5 -5
  63. data/lib/mokio/concerns/controllers/base.rb +12 -12
  64. data/lib/mokio/concerns/controllers/common.rb +6 -4
  65. data/lib/mokio/concerns/controllers/data_files.rb +3 -3
  66. data/lib/mokio/concerns/controllers/menus.rb +11 -13
  67. data/lib/mokio/concerns/controllers/mov_galleries.rb +1 -2
  68. data/lib/mokio/concerns/controllers/photos.rb +10 -10
  69. data/lib/mokio/concerns/controllers/pic_galleries.rb +2 -3
  70. data/lib/mokio/concerns/controllers/users.rb +4 -3
  71. data/lib/mokio/concerns/controllers/youtubes.rb +7 -7
  72. data/lib/mokio/concerns/models/available_module.rb +3 -3
  73. data/lib/mokio/concerns/models/common.rb +1 -29
  74. data/lib/mokio/concerns/models/contact_template.rb +0 -4
  75. data/lib/mokio/concerns/models/content.rb +15 -7
  76. data/lib/mokio/concerns/models/data_file.rb +3 -9
  77. data/lib/mokio/concerns/models/lang.rb +11 -7
  78. data/lib/mokio/concerns/models/menu.rb +4 -4
  79. data/lib/mokio/concerns/models/module_position.rb +1 -1
  80. data/lib/mokio/concerns/models/recipient.rb +0 -2
  81. data/lib/mokio/concerns/models/seo_tag.rb +118 -0
  82. data/lib/mokio/concerns/models/static_module.rb +2 -2
  83. data/lib/mokio/concerns/models/user.rb +1 -1
  84. data/lib/mokio/engine.rb +7 -17
  85. data/lib/mokio/frontend_helpers.rb +1 -0
  86. data/lib/mokio/frontend_helpers/seo_tag_helper.rb +33 -0
  87. data/lib/mokio/simple-form-wrappers.rb +11 -0
  88. data/lib/mokio/version.rb +1 -1
  89. data/lib/tasks/mokio_install.rake +37 -9
  90. data/spec/dummy/Rakefile +1 -3
  91. data/spec/dummy/app/controllers/application_controller.rb +1 -1
  92. data/spec/dummy/config.ru +1 -2
  93. data/spec/dummy/config/application.rb +9 -12
  94. data/spec/dummy/config/database.yml +18 -0
  95. data/spec/dummy/config/environment.rb +1 -1
  96. data/spec/dummy/log/development.log +0 -0
  97. data/spec/dummy/log/development_mokio.log +9 -0
  98. data/spec/models/content_spec.rb +0 -1
  99. data/spec/models/menu_spec.rb +8 -9
  100. data/spec/models/mov_gallery_spec.rb +0 -1
  101. data/spec/models/pic_gallery_spec.rb +0 -1
  102. metadata +212 -407
  103. data/README.rdoc +0 -47
  104. data/app/assets/javascripts/backend/plugins/forms/select/select2.js +0 -2195
  105. data/app/assets/javascripts/backend/plugins/forms/select/select2.min.js +0 -76
  106. data/app/assets/javascripts/backend/plugins/tables/dataTables/jquery.dataTables.js +0 -12099
  107. data/app/assets/javascripts/backend/plugins/tables/dataTables/jquery.dataTables.min.js +0 -155
  108. data/app/controllers/mokio/base_articles_controller.rb +0 -3
  109. data/app/controllers/mokio/base_contacts_controller.rb +0 -5
  110. data/app/controllers/mokio/base_contents_controller.rb +0 -3
  111. data/app/controllers/mokio/base_mov_galleries_controller.rb +0 -3
  112. data/app/controllers/mokio/base_pic_galleries_controller.rb +0 -4
  113. data/app/controllers/passwords_controller.rb +0 -14
  114. data/app/models/mokio/base_article.rb +0 -29
  115. data/app/models/mokio/base_contact.rb +0 -30
  116. data/app/models/mokio/base_content.rb +0 -5
  117. data/app/models/mokio/base_mov_gallery.rb +0 -30
  118. data/app/models/mokio/base_pic_gallery.rb +0 -30
  119. data/app/models/mokio/meta.rb +0 -24
  120. data/app/views/mokio/backend/articles/_form.html.haml +0 -9
  121. data/app/views/mokio/backend/common/_form_content.html.haml +0 -36
  122. data/app/views/mokio/backend/common/_gmap.html.haml +0 -39
  123. data/app/views/mokio/backend/common/_main_pic.html.haml +0 -4
  124. data/app/views/mokio/backend/common/_meta.html.haml +0 -51
  125. data/app/views/mokio/backend/common/_notice.html.haml +0 -3
  126. data/app/views/mokio/backend/common/_obj.html.haml +0 -16
  127. data/app/views/mokio/backend/common/copy.html.haml +0 -5
  128. data/app/views/mokio/backend/common/edit.html.haml +0 -6
  129. data/app/views/mokio/backend/common/index.html.haml +0 -19
  130. data/app/views/mokio/backend/common/new.html.haml +0 -6
  131. data/app/views/mokio/backend/contacts/_form.html.haml +0 -42
  132. data/app/views/mokio/backend/contents/_content_info_widget.html.haml +0 -22
  133. data/app/views/mokio/backend/dashboard/_content.html.haml +0 -9
  134. data/app/views/mokio/backend/dashboard/show.html.haml +0 -35
  135. data/app/views/mokio/backend/dashboard/tbl_content.html.haml +0 -24
  136. data/app/views/mokio/backend/data_files/_file_upload.html.erb +0 -71
  137. data/app/views/mokio/backend/data_files/uploader.html.haml +0 -15
  138. data/app/views/mokio/backend/errors/404.html.haml +0 -45
  139. data/app/views/mokio/backend/errors/unauthorized.html.haml +0 -11
  140. data/app/views/mokio/backend/layout/_user_widget.html.haml +0 -8
  141. data/app/views/mokio/backend/layout/header.html.haml +0 -14
  142. data/app/views/mokio/backend/layout/sidebar.html.haml +0 -59
  143. data/app/views/mokio/backend/menus/_form.html.haml +0 -66
  144. data/app/views/mokio/backend/menus/_menu.html.haml +0 -24
  145. data/app/views/mokio/backend/menus/index.html.haml +0 -53
  146. data/app/views/mokio/backend/menus/index.json.jbuilder +0 -4
  147. data/app/views/mokio/backend/menus/lang_changed.js.haml +0 -6
  148. data/app/views/mokio/backend/menus/sort.html.haml +0 -1
  149. data/app/views/mokio/backend/menus/update_menu_breadcrumps.js.haml +0 -1
  150. data/app/views/mokio/backend/mov_galleries/_form.html.haml +0 -17
  151. data/app/views/mokio/backend/mov_galleries/_form_inputs.html.haml +0 -8
  152. data/app/views/mokio/backend/photos/_gallery.html.haml +0 -25
  153. data/app/views/mokio/backend/photos/create.js.haml +0 -1
  154. data/app/views/mokio/backend/photos/crop_photo.js.haml +0 -10
  155. data/app/views/mokio/backend/photos/crop_thumb.js.haml +0 -11
  156. data/app/views/mokio/backend/photos/destroy.js.haml +0 -1
  157. data/app/views/mokio/backend/photos/from_external_link.html.haml +0 -19
  158. data/app/views/mokio/backend/photos/get_photo.js.haml +0 -1
  159. data/app/views/mokio/backend/photos/get_thumb.js.haml +0 -1
  160. data/app/views/mokio/backend/photos/photo.html.haml +0 -54
  161. data/app/views/mokio/backend/photos/remove_thumb.js.haml +0 -10
  162. data/app/views/mokio/backend/photos/rotate_photo.js.haml +0 -10
  163. data/app/views/mokio/backend/photos/rotate_thumb.js.haml +0 -11
  164. data/app/views/mokio/backend/photos/thumb.html.haml +0 -9
  165. data/app/views/mokio/backend/photos/update_thumb.js.haml +0 -11
  166. data/app/views/mokio/backend/photos/upload_external_links.js.haml +0 -4
  167. data/app/views/mokio/backend/pic_galleries/_form.html.haml +0 -16
  168. data/app/views/mokio/backend/pic_galleries/_form_inputs.html.haml +0 -9
  169. data/app/views/mokio/backend/site_helper/first_login.html.haml +0 -14
  170. data/app/views/mokio/backend/static_modules/_form.html.haml +0 -9
  171. data/app/views/mokio/backend/users/_form.html.haml +0 -11
  172. data/app/views/mokio/backend/users/edit_password.html.haml +0 -13
  173. data/app/views/mokio/backend/youtubes/_edit.html.haml +0 -49
  174. data/app/views/mokio/backend/youtubes/_gallery.html.haml +0 -24
  175. data/app/views/mokio/backend/youtubes/_new.html.haml +0 -4
  176. data/app/views/mokio/backend/youtubes/_preview_movie.html.haml +0 -1
  177. data/app/views/mokio/backend/youtubes/_search_yt.html.haml +0 -8
  178. data/app/views/mokio/backend/youtubes/_search_yt_body.html.haml +0 -11
  179. data/app/views/mokio/backend/youtubes/find.js.haml +0 -1
  180. data/app/views/mokio/backend/youtubes/preview.html.haml +0 -36
  181. data/app/views/mokio/backend/youtubes/preview_movie.js.haml +0 -5
  182. data/app/views/mokio/backend/youtubes/thumb.html.haml +0 -14
  183. data/app/views/mokio/backend/youtubes/uploader.html.haml +0 -10
  184. data/app/views/mokio/backend/youtubes/youtube.html.haml +0 -12
  185. data/app/views/mokio/base_articles/_multi_lang_form.html.slim +0 -18
  186. data/app/views/mokio/base_contacts/_multi_lang_form.html.slim +0 -48
  187. data/app/views/mokio/base_contents/update_content_form.js.slim +0 -1
  188. data/app/views/mokio/base_pic_galleries/_multi_lang_form.html.slim +0 -13
  189. data/app/views/mokio/common/_meta.html.slim +0 -50
  190. data/app/views/mokio/common/_multi_lang_gmap.html.slim +0 -41
  191. data/app/views/mokio/common/_multi_lang_meta.html.slim +0 -50
  192. data/app/views/mokio/common/multi_lang_form_content.html.slim +0 -56
  193. data/db/migrate/20140731061227_create_mokio_external_scripts.rb +0 -12
  194. data/db/migrate/20141009125027_alter_external_scripts.rb +0 -13
  195. data/db/migrate/20141024131942_migrate_external_codes_to_external_scripts.rb +0 -25
  196. data/db/migrate/20141209072051_change_data_type_for_display_dates.rb +0 -8
  197. data/db/migrate/20141209101853_add_menu_css_options.rb +0 -6
  198. data/db/migrate/20150220071158_add_subtitle_to_contents.rb +0 -7
  199. data/db/migrate/20150220091326_add_main_pic_to_mokio_menu.rb +0 -5
  200. data/db/migrate/20150408074951_create_mokio_base_contents.rb +0 -17
  201. data/db/migrate/20150408075454_add_base_content_id_to_mokio_contents.mokio.rb +0 -6
  202. data/db/migrate/20150414054139_add_name_to_mokio_users.rb +0 -6
  203. data/db/migrate/20150414070406_add_author_and_editor_to_mokio_content.rb +0 -6
  204. data/db/migrate/20150528104851_add_base_content_id_to_mokio_data_files.rb +0 -5
  205. data/lib/mokio/concerns/controllers/base_articles.rb +0 -31
  206. data/lib/mokio/concerns/controllers/base_contacts.rb +0 -32
  207. data/lib/mokio/concerns/controllers/base_contents.rb +0 -167
  208. data/lib/mokio/concerns/controllers/base_mov_galleries.rb +0 -48
  209. data/lib/mokio/concerns/controllers/base_pic_galleries.rb +0 -32
  210. data/lib/mokio/concerns/models/base_article.rb +0 -21
  211. data/lib/mokio/concerns/models/base_contact.rb +0 -36
  212. data/lib/mokio/concerns/models/base_content.rb +0 -51
  213. data/lib/mokio/concerns/models/base_mov_gallery.rb +0 -19
  214. data/lib/mokio/concerns/models/base_pic_gallery.rb +0 -22
  215. data/lib/mokio/concerns/models/meta.rb +0 -39
  216. data/spec/factories/meta.rb +0 -37
  217. data/spec/models/meta_spec.rb +0 -26
@@ -1,66 +0,0 @@
1
- = f.input :lang_id, label: btc("language"), collection: Lang.all.collect{|lang| [bt(lang.name), lang.menu_id]}, include_blank: false, disabled: !@menu.display_editable_field?('lang_id')
2
-
3
- -# = f.input :lang_id, :as => :hidden, :input_html => { :value => (@menu.lang_id.nil? ? 1 : @menu.lang_id)}, disabled: !@menu.display_editable_field?('lang_id')
4
- = f.input :active, :wrapper => :active_checkbox, label: btc("active",'Menu'), disabled: !@menu.display_editable_field?('active')
5
- = f.input :visible, :wrapper => :active_checkbox,label: btc("visible",'Menu'), disabled: !@menu.display_editable_field?('visible')
6
- = f.input :name, label: btc("name",'Menu'), disabled: !@menu.display_editable_field?('name')
7
-
8
- .row-fluid
9
- = dual_select_box(@menu.available_contents, 'id', 'title', @menu.contents, 'id', 'title', btc('content', 'Menu'), '','menu[content_ids][]', true, false, false, @menu.display_editable_field?('contents'))
10
-
11
- = f.input :external_link, label: btc("external_link",'Menu'), disabled: !@menu.display_editable_field?('external_link')
12
- = f.input :description, label: btc("description",'Menu'), disabled: !@menu.display_editable_field?('description')
13
- = f.input :parent_id, label: btc("parent_menu",'Menu'), :collection => @menu.parent_tree.collect{|m| [m.name, m.id]}, include_blank: false, disabled: !@menu.display_editable_field?('parent_id')
14
-
15
- .row-fluid
16
- %label.form-label.span2
17
- = btc('path', Menu)
18
- .span10
19
- #menu_breadcrumps
20
- = tree_menu_breadcrumps(@menu.parent)
21
-
22
- = f.input :target, label: btc("target",'Menu'), :collection => [[bt("current_window_inside",'Menu'), nil], [bt("new_window",'Menu'), "_blank"], [bt("current_window_whole",'Menu'), "_whole"]], include_blank: false, disabled: !@menu.display_editable_field?('target')
23
-
24
- .row-fluid
25
- %label.form-label.span2 Moduły statyczne
26
- .span10
27
- .tabs_wrap
28
- %ul.nav.nav-tabs.pattern{:id => "tabs_modules"}
29
- - ModulePosition.all.each do |mp|
30
- %li
31
- %a{:href => "#" + mp.name.parameterize, :"data-toggle" => "tab"}
32
- = mp.name
33
-
34
- .tab-content
35
- - ModulePosition.all.each do |mp|
36
- .tab-pane.fade{:id => mp.name.parameterize}
37
- = dual_select_box(@menu.available_modules_by_pos[mp.id].nil? ? [] : @menu.available_modules_by_pos[mp.id], 'id', 'module_title', @menu.selected_modules_by_pos[mp.id].nil? ? [] : @menu.selected_modules_by_pos[mp.id], 'id', 'module_title', mp.name, '_' + mp.id.to_s, 'menu[available_module_ids][' + mp.id.to_s + '][]', false, true, true, @menu.display_editable_field?('available_modules'))
38
-
39
- - content_for :js do
40
- = javascript_include_tag "backend/menu/menu_dual_select"
41
-
42
- :javascript
43
- $(document).ready(function() {
44
- $('#menu_parent_id').change(function() {
45
- $.ajax({
46
- url: "/backend/menus/" + $('#menu_parent_id').val() + "/update_menu_breadcrumps",
47
- dataType: "script"
48
- });
49
- });
50
-
51
- $('#menu_lang_id').change(function() {
52
- var content_confirm = confirm('#{bt('content_remove_confirm', 'Menu')}');
53
- var modules_confirm = confirm('#{bt('modules_remove_confirm', 'Menu')}');
54
- $.ajax({
55
- url: "/backend/menus/lang_changed?lang_id=" + $('#menu_lang_id').val() + '&content_confirm='+ content_confirm + '&modules_confirm=' + modules_confirm,
56
- dataType: "script"
57
- });
58
- });
59
- dualSelectInit('', true);
60
- #{@dual_select_str}
61
-
62
- //tabs
63
- $('#tabs_modules li').first().addClass('active');
64
- $('.tabs_wrap .tab-pane').first().addClass('in active');
65
- });
66
-
@@ -1,24 +0,0 @@
1
- %div{ :class => "menu_div active_#{menu.active} visible_#{menu.visible} fake_#{menu.fake}"}
2
- - if menu.fake
3
- %span.menu_name
4
- = menu.name
5
- - else
6
- - if menu.invisible_content
7
- %span.warning
8
- !
9
- - if menu.editable && menu.contents.empty? && menu.external_link.blank?
10
- %span.blank
11
- !
12
- %span.menu_name
13
- = link_to menu.name, edit_url(menu.class, menu)
14
- %span.menu_details
15
- %span.content_type
16
- = "#{menu.content_type} "
17
- %span.updated
18
- = menu.updated_at_view
19
- %span.edit_buttons
20
- = table_controls_edit_btn(edit_url(menu.class, menu))
21
- - if menu.deletable
22
- = table_controls_delete_btn(obj_url(menu.class, menu), btc('confirm', Menu))
23
- - else
24
- %span.blank-delete
@@ -1,53 +0,0 @@
1
- -#= stylesheet_link_tag "menu", :media => "all"
2
- = render :partial => "mokio/backend/common/notice"
3
-
4
- .box.gradient
5
- .title
6
- %h4
7
- %span= bt("index_title", Menu)
8
- = btn_new( bt("index_add_new", Menu), new_url(Menu) )
9
-
10
- - if @menus.present?
11
- %ol#menusList.sortable
12
- - @menus.each do |menu, menu_children|
13
- %li{:id => "#menu_#{menu.id}", :class => "not-sortable"}
14
- = render :partial => "menu", :locals => {menu: menu}
15
- %ol
16
- - menu_children.each do |submenu, submenu_children|
17
- %li{:class => "not-sortable"}
18
- = render :partial => "menu", :locals => {menu: submenu}
19
- %ol= tree_menu(submenu_children, true)
20
- - else
21
- %h3 There are currently no menus.
22
-
23
- #legend.well.span4
24
- %label= btc("legend", Menu)
25
- .active_true
26
- = btc('menu_active_legend', Menu)
27
- .active_false
28
- = btc('menu_non_active_legend', Menu)
29
- .visible_true
30
- .menu_name
31
- = btc('menu_visible_legend', Menu)
32
- .visible_false
33
- .menu_name
34
- = btc('menu_non_visible_legend', Menu)
35
-
36
- - content_for :js do
37
- = javascript_include_tag "backend/menu/jquery.ui.nestedSortable", :async => true
38
-
39
- :javascript
40
- setTimeout(function(){
41
- $('.sortable').nestedSortable({
42
- handle: 'div',
43
- items: 'li.sortable_true',
44
- toleranceElement: '> div',
45
- protectRoot: true,
46
- update: function(event, ui) {
47
- $.post("/backend/menus/sort", $(this).nestedSortable('serialize'));
48
- }
49
- });
50
- },300);
51
- //$("ol.sortable").bind("sortstop", function (event, ui) {
52
- // return ui.item.hasClass("sortable_true");
53
- // });
@@ -1,4 +0,0 @@
1
- json.array!(@menus) do |menu|
2
- json.extract! menu, :id
3
- json.url backend_menu_url(menu, format: :json)
4
- end
@@ -1,6 +0,0 @@
1
- $('#menu_parent_id').html("#{j (options_from_collection_for_select(@menu.parent_tree, 'id', 'name'))}");
2
- $('#menu_breadcrumps').html("");
3
- if (#{@content_confirm}) {remove_except_all_lang('')}
4
- if (#{@modules_confirm}) {$('[id^=fake-select_]').each(function(i, val) {remove_except_all_lang($(val).attr('id').substring(11));})}
5
- $('#box1View').html("#{j (options_for_select(@menu.available_contents.collect{|elt| [elt.title, elt.id,{class: 'displayed_' + elt.displayed?.to_s}]}))}");
6
- #{replace_available_modules}
@@ -1 +0,0 @@
1
- $('#notice').html('#{remder :partial => }')
@@ -1 +0,0 @@
1
- $('#menu_breadcrumps').html('#{tree_menu_breadcrumps(@menu)}')
@@ -1,17 +0,0 @@
1
- - if params[:action] == "edit"
2
- %h2.center.gallerytitle= "#{bt('gallery')}: #{obj.title}"
3
- %span.btn.btn-info.editcontentbtn
4
- %span.icomoon-icon-pencil.white
5
- = bt('edit_gallery_content', @obj_class)
6
- .editcontent
7
- %hr
8
- -# = f.input :content_id
9
- = render :partial => "mokio/backend/mov_galleries/form_inputs", locals: {f:f}
10
- .form-actions
11
- = btn_submit bt("save")
12
- = btn_submit bt("save_and_create_new"), true
13
- = btn_cancel "/backend/#{obj.class.to_s.tableize}"
14
- %hr
15
-
16
- - else
17
- = render :partial => "mokio/backend/mov_galleries/form_inputs", locals: {f:f}
@@ -1,8 +0,0 @@
1
- = render :partial => "mokio/backend/common/main_pic", locals: {f:f}
2
- = f.input :lang_id, collection: Lang.all.collect{|lang| [bt(lang.name), lang.menu_id]}, include_blank: bt('all'), disabled: !obj.display_editable_field?('lang_id')
3
- = f.input :active, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('active')
4
- = f.input :title, disabled: !obj.display_editable_field?('title')
5
- = f.input :intro, label: btc("intro", 'mov_gallery'), :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Mini', :height => 150} }, disabled: !obj.display_editable_field?('intro')
6
- = f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 300} }, disabled: !obj.display_editable_field?('content')
7
- = f.input :display_from, :wrapper => :date, :as => :string, :input_html => { :class => "mask-date display_from", :value => (localize(f.object.display_from) if f.object.display_from) }, disabled: !obj.display_editable_field?('display_from')
8
- = f.input :display_to, :wrapper => :date, :as => :string, :input_html => { :class => "mask-date display_to", :value => (localize(f.object.display_to) if f.object.display_to) }, disabled: !obj.display_editable_field?('display_to')
@@ -1,25 +0,0 @@
1
- .page-header
2
- %h4
3
- = bt("gallery")
4
- %small
5
- = obj.title
6
- %ul#itemContainer.galleryView.sortable
7
- - obj.data_files.order_default.each do |photo|
8
- = render :template => 'mokio/backend/photos/photo', :locals => {photo: photo}
9
-
10
- #edit-photo-form.modal.fade{:role =>"dialog", "aria-hidden" => "true", :style => "display:none;", "aria-labelledby" => "EditPhotoModalLabel"}
11
- .modal-dialog
12
- .modal-content
13
- .modal-header
14
- %h3.modal-title{:id => "EditPhotoModalLabel"}= "edit"
15
-
16
- #edit-photo-form-content.modal-body
17
- #loader
18
-
19
- .modal-footer
20
- %button.btn.btn-default.close-edit-photo-form{ :type => "button", "data-dismiss" => "modal"}= bt("close")
21
-
22
- - content_for :js do
23
- = javascript_include_tag 'backend/photo_gallery/functions', :async => true
24
- = javascript_include_tag 'backend/photo_gallery/photoEditForm', :async => true
25
- = javascript_include_tag 'backend/photo_gallery/photo_gallery', :async => true
@@ -1 +0,0 @@
1
- $("#itemContainer").append("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @photo} }");
@@ -1,10 +0,0 @@
1
- $(".photo_holder").html('<img id="photo_edited" src="#{@edited_photo.data_file.url(:normal)}"></img>');
2
- previous = $("#itemContainer").find("li##{@edited_photo.id}").prev();
3
- $("#itemContainer").find("li##{@edited_photo.id}").remove();
4
- $("#itemContainer").find("#modaledit_#{@edited_photo.id}").remove();
5
- if (previous.attr("id")){
6
- previous.after("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
7
- }
8
- else {
9
- $("#itemContainer").prepend("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
10
- }
@@ -1,11 +0,0 @@
1
- $(".photo_holder").html('<img id="photo_edited" src="#{@edited_photo.thumb.url}"></img>');
2
- previous = $("#itemContainer").find("li##{@edited_photo.id}").prev();
3
- $("#itemContainer").find("li##{@edited_photo.id}").remove();
4
- $("#itemContainer").find("#modaledit_#{@edited_photo.id}").remove();
5
- if (previous.attr("id")){
6
- previous.after("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
7
- }
8
- else {
9
- $("#itemContainer").prepend("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
10
- }
11
-
@@ -1 +0,0 @@
1
- $("#itemContainer").find("#modaledit_#{@id}").remove();
@@ -1,19 +0,0 @@
1
- %span.btn.btn-info.add_external_link{"data-toggle" => "modal", "data-target" => "#modal_external_link"}
2
- %span.icomoon-icon-plus.white
3
- = bt('add_external_link', @obj_class)
4
-
5
- #modal_external_link.modal.fade{:role =>"dialog", "aria-labelledby" => "myModalLabel2", "aria-hidden" => "true", :style => "display: none;"}
6
- .modal-dialog
7
- .modal-content
8
- .modal-header
9
- %h3#myModalLabel2.modal-title
10
- = bt("file_upload")
11
- %small= bt("links_upload_info", @obj_class)
12
- = simple_form_for [:backend, obj.default_data_file.new], :html => {:multipart => true}, :remote => true, :url => { :action => "upload_external_links", :controller => "mokio/backend/#{obj.default_data_file.to_s.tableize}" } do |f|
13
- .modal-body
14
- = f.input :content_id, :as => :hidden, :input_html => { :value => obj.id }
15
- = f.input :remote_data_file_url, :as => :text
16
-
17
- .modal-footer
18
- = f.submit bt("add"), :class => "btn btn-primary upload_external_links_btn", remote: true, data: { disable_with: bt("wait") }
19
- %button.btn.btn-primary{ :type => "button", "data-dismiss" => "modal"}= bt("close")
@@ -1 +0,0 @@
1
- $(".photo_holder").html('<img id="photo_edited" src="#{@edited_photo.data_file.url(:normal)}"></img>');
@@ -1 +0,0 @@
1
- $(".photo_holder").html("#{j render :template => 'mokio/backend/photos/thumb', :locals => {photo: @edited_photo} }");
@@ -1,54 +0,0 @@
1
- %li.sortableli{ :id => photo.id, :class => photo.thumb_name }
2
- .dragable
3
- %span.handler
4
- %span.icon16.brocco-icon-move.white
5
- %a{:title => photo.name, :rel => "prettyPhoto[pp_gal]", :href => photo.data_file.url }
6
- - if photo.thumb.blank?
7
- %img{:alt => photo.name, :src => photo.data_file.url(photo.thumb_name) }
8
- - else
9
- %img{:alt => photo.name, :src => photo.thumb.url }
10
- .actionBtn
11
- %a.edit{"data-toggle" => "modal", :href => "#modaledit_#{photo.id}" }
12
- %span.icon16.icomoon-icon-pencil-2.white
13
- = link_to backend_photo_path(photo), remote: true, method: :delete, class: "delete" do
14
- %span.icon16.icomoon-icon-remove.white
15
-
16
- /
17
- / edit form
18
- /
19
- .modal.fade{:id =>"modaledit_#{photo.id}", :role =>"dialog", "aria-hidden" => "true", :style => "display:none;", "aria-labelledby" => "myModalLabel"}
20
- .modal-dialog
21
- .modal-content
22
- .modal-header
23
- %h3.modal-title.modal-photo{:id => "myModalLabel"}= bt("edit_photo")
24
- %button.btn.btn-options
25
- %span.icon16.icomoon-icon-cog
26
- .photo-options-fields
27
- %ul
28
- %li.photo_thumb
29
- %span.icon8.icomoon-icon-pencil-2
30
- = bt("add_own_thumb", Photo)
31
-
32
- = simple_form_for [:backend, photo], :html => { :class => 'form-horizontal' }, :remote => true do |f|
33
- .modal-body
34
- .span9
35
- = f.input :name
36
- = f.input :subtitle
37
- = f.input :intro
38
- = f.input :external_link
39
- = f.input :active, :wrapper => :active_checkbox
40
- .span3
41
- .edit_view_img_container
42
- = bt("thumb", Photo)
43
- - if photo.thumb.blank?
44
- %img.edit_view_img{:alt => photo.name, :src => photo.data_file.url(photo.thumb_name) }
45
- - else
46
- %img.edit_view_img.thumb{:alt => photo.name, :src => photo.thumb.url }
47
- .buttons
48
- %a.fancybox{:href => photo.data_file.url}
49
- %button.btn.btn-success.btn-mini= bt("show_photo", Photo)
50
- %button.btn.btn-primary.btn-mini= bt("edit_thumb", Photo)
51
-
52
- .modal-footer
53
- = f.submit bt('save'), :class => "btn btn-primary edit_modal_submit", remote: true
54
- %button.btn.btn-default{ :type => "button", "data-dismiss" => "modal"}= bt("close")
@@ -1,10 +0,0 @@
1
- $(".photo_holder").html("#{j render :template => 'mokio/backend/photos/thumb', :locals => {photo: @edited_photo} }");
2
- previous = $("#itemContainer").find("li##{@edited_photo.id}").prev();
3
- $("#itemContainer").find("li##{@edited_photo.id}").remove();
4
- $("#itemContainer").find("#modaledit_#{@edited_photo.id}").remove();
5
- if (previous.attr("id")){
6
- previous.after("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
7
- }
8
- else {
9
- $("#itemContainer").prepend("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
10
- }
@@ -1,10 +0,0 @@
1
- $(".photo_holder").html('<img id="photo_edited" src="#{@edited_photo.data_file.url(:normal)}"></img>');
2
- previous = $("#itemContainer").find("li##{@edited_photo.id}").prev();
3
- $("#itemContainer").find("li##{@edited_photo.id}").remove();
4
- $("#itemContainer").find("#modaledit_#{@edited_photo.id}").remove();
5
- if (previous.attr("id")){
6
- previous.after("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
7
- }
8
- else {
9
- $("#itemContainer").prepend("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
10
- }
@@ -1,11 +0,0 @@
1
- $(".photo_holder").html('<img id="photo_edited" src="#{@edited_photo.thumb.url}"></img>');
2
- previous = $("#itemContainer").find("li##{@edited_photo.id}").prev();
3
- $("#itemContainer").find("li##{@edited_photo.id}").remove();
4
- $("#itemContainer").find("#modaledit_#{@edited_photo.id}").remove();
5
- if (previous.attr("id")){
6
- previous.after("#{j render :template => '/backend/photos/photo', :locals => {photo: @edited_photo} }");
7
- }
8
- else {
9
- $("#itemContainer").prepend("#{j render :template => '/backend/photos/photo', :locals => {photo: @edited_photo} }");
10
- }
11
-
@@ -1,9 +0,0 @@
1
- - if photo.thumb.blank?
2
- .thumb_upload
3
- = form_for [:backend, @edited_photo], :html => { :id => "uploadthumb", :multipart => true }, :remote => true, :url => { :action => "update_thumb" } do |f|
4
- %h5= bt("thumb_upload_info", Photo)
5
- %span#photoinputbtn.btn.fileinput-button
6
- %span= bt("add_file", Photo)
7
- = f.file_field :thumb
8
- - else
9
- %img#photo_edited{ :src => photo.thumb.url }
@@ -1,11 +0,0 @@
1
- $(".photo_holder").html("#{j render :template => 'mokio/backend/photos/thumb', :locals => {photo: @edited_photo} }");
2
- previous = $("#itemContainer").find("li##{@edited_photo.id}").prev();
3
- $("#itemContainer").find("li##{@edited_photo.id}").remove();
4
- $("#itemContainer").find("#modaledit_#{@edited_photo.id}").remove();
5
- if (previous.attr("id")){
6
- previous.after("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
7
- }
8
- else {
9
- $("#itemContainer").prepend("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: @edited_photo} }");
10
- }
11
-
@@ -1,4 +0,0 @@
1
- - @photos.each do |photo|
2
- $("#itemContainer").append("#{j render :template => 'mokio/backend/photos/photo', :locals => {photo: photo} }");
3
- activeButtonForPhoto(#{photo.id});
4
- $("#myModalLabel2 .loader").remove();
@@ -1,16 +0,0 @@
1
- - if params[:action] == "edit"
2
- %h2.center.gallerytitle= "#{bt('gallery')}: #{obj.title}"
3
- %span.btn.btn-info.editcontentbtn
4
- %span.icon8.icomoon-icon-pencil.white
5
- = bt('edit_gallery_content', @obj_class)
6
- .editcontent
7
- %hr
8
- = render :partial => "mokio/backend/pic_galleries/form_inputs", locals: {f:f}
9
- .form-actions
10
- = btn_submit bt("save")
11
- = btn_submit bt("save_and_create_new"), true
12
- = btn_cancel "/backend/#{obj.class.to_s.tableize}"
13
- %hr
14
-
15
- - else
16
- = render :partial => "mokio/backend/pic_galleries/form_inputs", locals: {f:f}
@@ -1,9 +0,0 @@
1
- = render :partial => "mokio/backend/common/main_pic", locals: {f:f}
2
- = f.input :lang_id, collection: Lang.all.collect{|lang| [bt(lang.name), lang.menu_id]}, include_blank: bt('all'), disabled: !obj.display_editable_field?('lang_id')
3
- = f.input :active, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('active')
4
- = f.input :title, disabled: !obj.display_editable_field?('title')
5
- = f.input :intro, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Mini', :height => 150} }, disabled: !obj.display_editable_field?('intro')
6
- = f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 300} }, disabled: !obj.display_editable_field?('content')
7
-
8
- = f.input :display_from, :wrapper => :date, :as => :string, :input_html => { :class => "mask-date display_from", :value => (localize(f.object.display_from) if f.object.display_from) }, disabled: !obj.display_editable_field?('display_from')
9
- = f.input :display_to, :wrapper => :date, :as => :string, :input_html => { :class => "mask-date display_to", :value => (localize(f.object.display_to) if f.object.display_to) }, disabled: !obj.display_editable_field?('display_to')
@@ -1,14 +0,0 @@
1
- - path = request.original_fullpath
2
-
3
- - if cookies[path].blank? || Mokio::SiteHelper.debug || Mokio.debug_all && Mokio.enable_site_helper
4
- - cookies[path] = { :value => path, expires: 1.year.from_now }
5
-
6
- %ol#joyRideTipContent
7
- - Mokio::SiteHelper.steps_for_url(path).each do |step, options|
8
- %li{ "data-class" => options["data-class"], "data-text" => t(options["data-text"]), "data-options" => options["data-options"] }
9
- %h2= t( options[:title] )
10
- %p= t( options[:text] )
11
-
12
- - content_for :js do
13
- = javascript_include_tag "backend/help-engine/jquery.joyride-2.1"
14
- = javascript_include_tag "backend/help-engine/help-engine"
@@ -1,9 +0,0 @@
1
- = f.input :active, :wrapper => :active_checkbox, disabled: !@static_module.display_editable_field?('active')
2
- = f.input :title, disabled: !@static_module.display_editable_field?('title')
3
- = f.input :intro, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Mini', :height => 150} }, disabled: !@static_module.display_editable_field?('intro')
4
- = f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 400} }, disabled: !@static_module.display_editable_field?('content')
5
- = f.input :lang_id, :as => :hidden, :input_html => { :value => (@static_module.lang_id.nil? ? 1 : @static_module.lang_id)}, disabled: !@static_module.display_editable_field?('lang_id')
6
- = f.association :module_positions, :wrapper => :checkbox, :as => :check_boxes, disabled: !@static_module.display_editable_field?('module_positions')
7
- = f.input :always_displayed, :wrapper => :active_checkbox, disabled: !@static_module.display_editable_field?('always_displayed')
8
- = f.input :display_from, :wrapper => :date, :as => :string, :input_html => { :class => "mask-date display_from", :value => (localize(f.object.display_from) if f.object.display_from) }, disabled: !@static_module.display_editable_field?('display_from')
9
- = f.input :display_to, :wrapper => :date, :as => :string, :input_html => { :class => "mask-date display_to", :value => (localize(f.object.display_to) if f.object.display_to) }, disabled: !@static_module.display_editable_field?('display_to')