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,11 +0,0 @@
1
- .form-inputs
2
- - unless @password_only
3
- = f.input :email, required: true, :wrapper => :input_span
4
- = f.input :password, :wrapper => :input_span
5
- = f.input :password_confirmation, :wrapper => :input_span
6
- - unless @password_only
7
- - for role in User::ROLES
8
- = check_box_tag "user[roles][#{role}]", role, @user.has_role?(role), {:name => "user[roles][]"}
9
- = label_tag "user_roles_#{role}", bt("role_name." + role, User)
10
- %br/
11
- = hidden_field_tag "user[roles][]", ""
@@ -1,13 +0,0 @@
1
- .span12
2
- = render :partial => "mokio/backend/common/notice"
3
- .box
4
- = box_title do
5
- = bt("edit_password", User)
6
- .content
7
- = common_form do
8
- .row-fluid
9
- = simple_form_for [:backend, @user], :url => update_password_backend_user_path, :html => { :class => 'form-horizontal' } do |f|
10
- = render :partial => "mokio/backend/users/form", :locals => {f: f, obj: @obj}
11
- .form-actions
12
- = btn_submit bt("save")
13
- = btn_cancel "/backend/users"
@@ -1,49 +0,0 @@
1
- .modal-dialog
2
- .modal-content
3
- .modal-header
4
- %h3.modal-title.modal-youtube{:id => "myModalLabel"}= bt("edit_youtube", Youtube)
5
- = common_form do
6
- = simple_form_for [:backend, @edited_movie], :html => { :class => 'form-horizontal' } do |f|
7
- .modal-body
8
- .video_preview
9
- .video_info
10
- .row-fluid
11
- = f.input :name
12
- .row-fluid
13
- = f.input :subtitle
14
- .row-fluid
15
- = f.input :intro, :input_html => { :class => "wysihtml5" }
16
- -# %br
17
- = hidden_field_tag :content_id, @edited_movie.content_id
18
- .row-fluid
19
- = f.label btc("preview", Youtube), :class => "form-label span2"
20
- .span10
21
- .video_frame
22
- = @video.embed_code.html_safe
23
- .row-fluid
24
- = f.label btc("thumb_from_net", Youtube), :class => "form-label span2"
25
- .span10
26
- #thumbnail-container
27
- = f.collection_radio_buttons(:thumb_external_url, ([@video.thumbnail_small]).collect{|t| [t, t]}, :first, :last, :item_wrapper_class => 'horizontal', :checked => @video.thumbnail_small) do |thumb|
28
- = thumb.label { image_tag(thumb.text) + thumb.radio_button }
29
- .row-fluid
30
- = f.label btc("thumb_own", Youtube), :class => "form-label span2"
31
- - if @edited_movie.thumb.present?
32
- %img.edit_view_img.thumb{:alt => @edited_movie.name, :src => @edited_movie.thumb.url }
33
- %span#movieinputbtn.btn.btn-info.fileinput-button
34
- %span= bt("change_thumb", Youtube)
35
- = f.file_field :thumb
36
- - else
37
- %span#movieinputbtn.btn.btn-info.fileinput-button
38
- %span.icomoon-icon-plus.white
39
- = bt("add_file", Youtube)
40
- = f.file_field :thumb
41
-
42
-
43
-
44
- .modal-footer
45
- = f.submit bt('save'), :class => "btn btn-primary edit_modal_submit", remote: true
46
- %button.btn.btn-default{ :type => "button", "data-dismiss" => "modal"}= bt("close")
47
-
48
-
49
-
@@ -1,24 +0,0 @@
1
- .page-header
2
- %h4
3
- = bt("gallery")
4
- %small
5
- = obj.title
6
- %ul#itemContainer.galleryView.movieGalleryView.sortable
7
- - obj.data_files.order_default.each do |youtube|
8
- = render :template => 'mokio/backend/youtubes/youtube', :locals => {youtube: youtube}
9
-
10
- #edit-youtube-form.modal.fade.modalyt{:role =>"dialog", "aria-hidden" => "true", :style => "display:none;", "aria-labelledby" => "EditYoutubeModalLabel"}
11
- .modal-dialog
12
- .modal-content
13
- .modal-header
14
- %h3.modal-title{:id => "EditYoutubeModalLabel"}= bt("edit_youtube")
15
-
16
- #edit-youtube-form-content.modal-body
17
- #loader
18
-
19
- .modal-footer
20
- %button.btn.btn-default.close-edit-youtube-form{ :type => "button", "data-dismiss" => "modal"}= bt("close")
21
- #gallery-loader
22
-
23
- - content_for :js do
24
- = javascript_include_tag 'backend/movie_gallery', :async => true
@@ -1,4 +0,0 @@
1
- .modal-dialog
2
- .modal-content
3
- #yt-uploader-content
4
- = render :partial => 'search_yt'
@@ -1 +0,0 @@
1
- %iframe{frameborder: "0", height: "500", src: "http://#{@video.embed_url}", width: "700"}
@@ -1,8 +0,0 @@
1
- .modal-header
2
- %h3.modal-title.modal-youtube{:id => "myModalLabel"}= bt("add_youtube", Youtube)
3
- .modal-body
4
- = render :partial => 'search_yt_body'
5
- - if @error
6
- = bt('no_movie_found', Youtube)
7
- #only-close-footer.modal-footer
8
- %button.btn.btn-default{:type => "button", "data-dismiss" => "modal"}= bt("close")
@@ -1,11 +0,0 @@
1
- .row-fluid.string.optional.youtube_youtube_id
2
- %label.form-label.span2.yt_label= bt("search_movie_url", Youtube)
3
- .span10
4
- %input#movie_url.string.optional{:type => 'text', :value => @yt}
5
- %input#content_id.string.optional{:type => 'hidden', :value => @content_id}
6
- %p.desc
7
- = bt('movie_url_desc', Youtube)
8
- :javascript
9
- yt_search();
10
- -# %button.btn.btn-info.ytfind= btc('search')
11
- -# %button#clear-yt.btn.ytclear= btc('clear')
@@ -1 +0,0 @@
1
- $("#yt-uploader-content").html("#{j render :template => 'mokio/backend/youtubes/preview' }");
@@ -1,36 +0,0 @@
1
- - if !@video.present?
2
- = render :partial => 'search_yt'
3
- - else
4
- .modal-dialog
5
- .modal-content
6
- #yt-uploader-content
7
- = common_form do
8
- = simple_form_for [:backend, @youtube], :html => { :class => 'form-horizontal' } do |f|
9
- .modal-body
10
- .video_preview
11
- = render :partial => 'search_yt_body'
12
- = f.input :name, :input_html => { :value => @video.title }
13
- = f.input :subtitle
14
- = f.input :movie_url, :as => :hidden, :input_html => { :value => @video.embed_url }
15
- = f.input :content_id, :as => :hidden, :input_html => { :value => @edited_gallery.id }
16
- = f.input :intro, :input_html => { :value => @video.description, :class => "wysihtml5" }
17
- %br
18
- = f.label :thumb, :class => "form-label span2"
19
- #thumbnail-container
20
- %br
21
- = f.collection_radio_buttons(:thumb_external_url, ([@video.thumbnail_small] + [@video.thumbnail_medium] + [@video.thumbnail_large]).collect{|t| [t, t]}, :first, :last, :item_wrapper_class => 'horizontal', :checked => @video.thumbnail_small) do |thumb|
22
- = thumb.label { image_tag(thumb.text) + thumb.radio_button }
23
-
24
- %span#movieinputbtn.btn.fileinput-button
25
- %span= bt("add_own_thumb", Youtube)
26
- = f.file_field :thumb
27
-
28
- %br
29
- .video_frame
30
- = @video.embed_code.html_safe
31
-
32
-
33
- .modal-footer
34
- = f.submit bt('save'), :class => "btn btn-primary edit_modal_submit", remote: true
35
- %button.btn.btn-default{ :type => "button", "data-dismiss" => "modal"}= bt("close")
36
-
@@ -1,5 +0,0 @@
1
- $('#video-preview-wrapper').css('width','100%');
2
- $('#video-preview-wrapper').height($(document).height());
3
- $('#video-preview').html("#{ j render :partial => "preview_movie" }");
4
- $('#video-preview-wrapper').css('display','block');
5
-
@@ -1,14 +0,0 @@
1
- .image-view
2
- - unless @edited_movie.thumb.blank?
3
- %img{ :src => @edited_movie.thumb.url, :alt => @edited_movie.thumb }
4
- - else
5
- = form_for [:backend, @edited_movie], :html => { :multipart => true }, :remote => true, :url => { :action => "update_thumb" } do |f|
6
- %span#photoinputbtn.btn.btn-success.fileinput-button
7
- %span= bt("add_file")
8
- = f.file_field :thumb
9
- %canvas#imageCanvas
10
- %ul#photo-fileinfo.unstyled
11
-
12
- .edit-sidebar
13
- = link_to remove_thumb_backend_photo_path(@edited_movie), remote: true, method: :delete do
14
- %span.icon24.icomoon-icon-remove
@@ -1,10 +0,0 @@
1
- %a.edit{"data-toggle" => "modal", :class => "load-modal", "data-href" => "/backend/youtubes/#{obj.id}/load_new_form", :id=>"add-youtube"}
2
- %button.btn.btn-info.uploader
3
- %span.icomoon-icon-plus.white
4
- = bt("add_#{obj.default_data_file.to_s.tableize}", @obj_class)
5
- .modal{:class =>"youtube-edit modal fade modalyt", :id => "new_yt_form", :role =>"dialog", "aria-hidden" => "true" , "aria-labelledby" => "myModalLabel"}
6
- .modal-dialog
7
- .modal-content
8
- .modal-header
9
- %h3#myModalLabel.modal-title= bt("youtube_upload",'Youtube')
10
- .modal-body
@@ -1,12 +0,0 @@
1
- %li.sortableli{ :id => youtube.id }
2
- .dragable
3
- %span.handler
4
- %span.icon16.brocco-icon-move.white
5
- = link_to preview_movie_backend_youtube_path(youtube), remote: true, method: :get, title: youtube.name.html_safe do
6
- %img{:class => "img-load", :alt => youtube.name, :src => (youtube.thumb_url[-1,1] == "0" ? youtube.thumb_external_url : youtube.thumb.url(:thumb_detail)) }
7
- .actionBtn
8
- %a.edit{"data-toggle" => "modal", :class => "edit-youtube", :data => {:href => "/backend/youtubes/#{youtube.friendly_id}/edit", :target => "edit-youtube-form" }}
9
- %span.icon16.icomoon-icon-pencil-2.white
10
- = link_to backend_youtube_path(youtube), remote: true, method: :delete, class: "delete" do
11
- %span.icon16.icomoon-icon-cancel-4.white
12
-
@@ -1,18 +0,0 @@
1
- /= render :partial => "mokio/common/gmap", locals: {obj: obj, f: f} if obj.class.has_gmap_enabled?
2
- /= render :partial => "mokio/common/meta", locals: {obj: obj, f: f} if obj.class.has_meta_enabled?
3
- /= render :partial => "mokio/common/main_pic", locals: {f:f}
4
-
5
-
6
- = lf.input :lang_id , :as => :hidden, :input_html => { :value => obj.lang_id }
7
- = lf.input :title, disabled: !obj.display_editable_field?('title')
8
- = lf.input :subtitle, disabled: !obj.display_editable_field?('subtitle'), :as => :string
9
- = lf.input :intro, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Mini', :height => 150} }, disabled: !obj.display_editable_field?('intro')
10
- = lf.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 400} }, disabled: !obj.display_editable_field?('content')
11
-
12
- .row-fluid
13
- label.form-label.span2
14
- = t('menus.content_assoc')
15
- .span10
16
- =collection_select(:article, :menu_ids,menu_select_grouped(Mokio::Menu.all.includes(:content_links).arrange(:order => :seq)),:id,:name, {disabled: lambda{|s| s.fake.present? },selected:obj.menus.map {|j| j.id} },:multiple => true)
17
-
18
-
@@ -1,48 +0,0 @@
1
- = lf.input :lang_id , :as => :hidden, :input_html => { :value => obj.lang_id }
2
- = lf.input :title, disabled: !obj.display_editable_field?('title')
3
- = lf.input :subtitle, disabled: !obj.display_editable_field?('subtitle'), :as => :string
4
- = lf.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 400} }, disabled: !obj.display_editable_field?('content')
5
-
6
- = lf.input :recipient_emails, :as => :string, :input_html => { :class => "recipients span10" }, disabled: !obj.display_editable_field?('recipient_emails')
7
- .row-fluid
8
- label.lorm-label.span2
9
- = t('menus.content_assoc')
10
- .span10
11
- =collection_select(:contact, :menu_ids,menu_select_grouped(Mokio::Menu.all.includes(:content_links).arrange(:order => :seq)),:id,:name, {disabled: lambda{|s| s.fake.present? },selected:obj.menus.map {|j| j.id} },:multiple => true)
12
-
13
-
14
- .contaner
15
- hr
16
- .row-fluid
17
- / .span1
18
- / .span7
19
- = f.fields_for :contact_template do |t|
20
- .label-wrapper
21
- = f.label btc("tpl", Mokio::Contact)
22
- .well
23
- = btc("form_data", Mokio::Contact)
24
- hr
25
- ul.unstyled
26
- li
27
- span.icon16.icomoon-icon-arrow-right-2
28
- = "%name% - #{t('contacts.form_name')}"
29
- li
30
- span.icon16.icomoon-icon-arrow-right-2
31
- = "%email% - #{t('contacts.form_email')}"
32
- li
33
- span.icon16.icomoon-icon-arrow-right-2
34
- = "%title% - #{t('contacts.form_title')}"
35
- li
36
- span.icon16.icomoon-icon-arrow-right-2
37
- = "%content% - #{t('contacts.form_content')}"
38
-
39
- = t.input :tpl, :label => "", :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 300} }
40
-
41
-
42
- = f.hidden_field :contact, value: true
43
- = f.hidden_field :intro, value: ""
44
-
45
- - content_for :js do
46
- = javascript_include_tag 'backend/plugins/forms/select/select2.min'
47
- javascript:
48
- $(".recipients").select2({tags: []});
@@ -1 +0,0 @@
1
- | $('.content').replaceWith('#{@content}');
@@ -1,13 +0,0 @@
1
- = render :partial => "mokio/common/main_pic", locals: {f:lf}
2
- = lf.input :lang_id , :as => :hidden, :input_html => { :value => obj.lang_id }
3
- = lf.input :title, disabled: !obj.display_editable_field?('title')
4
- = lf.input :subtitle, disabled: !obj.display_editable_field?('subtitle'), :as => :string
5
- = lf.input :intro, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Mini', :height => 150} }, disabled: !obj.display_editable_field?('intro')
6
- = lf.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 300} }, disabled: !obj.display_editable_field?('content')
7
-
8
- .row-fluid
9
- label.form-label.span2
10
- = t('menus.content_assoc')
11
- .span10
12
- =collection_select(:pic_gallery, :menu_ids,menu_select_grouped(Mokio::Menu.all.includes(:content_links).arrange(:order => :seq)),:id,:name, {disabled: lambda{|s| s.fake.present? },selected:obj.menus.map {|j| j.id} },:multiple => true)
13
-
@@ -1,50 +0,0 @@
1
- a data-toggle="modal" href=("#meta_g_modal" )
2
- button.btn.btn-success.btn-mini.box-form3.right
3
- span.icon16.icomoon-icon-google-plus.white
4
- = bt("meta_google", Mokio::Meta)
5
-
6
- a data-toggle="modal" href=("#meta_f_modal" )
7
- button.btn.btn-primary.btn-mini.box-form2.right
8
- span.icon16.icomoon-icon-facebook-2.white
9
- = bt("meta_facebook", Mokio::Meta)
10
-
11
- #meta_g_modal.modal.fade role="dialog" aria-hidden="true" style="display:none;" aria-labelledby="meta_g_ModalLabel"
12
- .modal-dialog
13
- .modal-content
14
- .modal-header
15
- h3.modal-title.modal-photo id="meta_g_ModalLabel"
16
- span.icon24.icomoon-icon-google-plus
17
- = bt("meta_google", Mokio::Meta)
18
- small= bt("meta_google_desc", Mokio::Meta)
19
-
20
- .modal-body
21
- = f.fields_for :meta do |m|
22
- = m.input :g_title
23
- = m.input :g_desc
24
- = m.input :g_keywords
25
- = m.input :g_author
26
- = m.input :g_copyright
27
- = m.input :g_application_name
28
-
29
- .modal-footer
30
- button.btn.btn-primary type="button" data-dismiss="modal" = bt("close")
31
-
32
- #meta_f_modal.modal.fade role="dialog" aria-hidden="true" style="display:none;" aria-labelledby="meta_f_ModalLabel"
33
- .modal-dialog
34
- .modal-content
35
- .modal-header
36
- h3.modal-title.modal-photo id="meta_f_ModalLabel"
37
- span.icon24.icomoon-icon-facebook-2
38
- = bt("meta_facebook", Mokio::Meta)
39
- small= bt("meta_facebook_desc", Mokio::Meta)
40
-
41
- .modal-body
42
- = f.fields_for :meta do |m|
43
- = m.input :f_title
44
- = m.input :f_type
45
- = m.input :f_image
46
- = m.input :f_url
47
- = m.input :f_desc
48
-
49
- .modal-footer
50
- button.btn.btn-primary type="button" data-dismiss="modal" = bt("close")
@@ -1,41 +0,0 @@
1
- - cache :gmap_button do
2
- a data-toggle="modal" href=("#gmap_modal_#{obj.lang_id}" )
3
- button.btn.btn-danger.btn-mini.box-form-gmap.right
4
- span.icon16.iconic-icon-map-pin-fill.white
5
- = bt("gmap", Mokio::Gmap)
6
-
7
- - cache [:gmap_form, obj.gmap] do
8
- .modal.fade id=("gmap_g_modal_#{obj.lang_id}") role="dialog" aria-hidden="true" style="display:none;" aria-labelledby="gmap_ModalLabel"
9
- .modal-dialog
10
- .modal-content
11
- .modal-header
12
- h3.modal-title.modal-photo id="gmap_ModalLabel_#{obj.lang_id}"
13
- span.icon24.iconic-icon-map-pin-fill
14
- = bt("gmap", Mokio::Gmap)
15
-
16
- .modal-body
17
- = f.fields_for :gmap do |g|
18
- .span12
19
- = g.input :full_address, :wrapper => :custom_without_label, :input_html => { :class => "gmap_full_address" }
20
- .hidden_elements
21
- = g.input :street_number, :input_html => { :class => "gmap_element gmap_street_number"}
22
- = g.input :route, :input_html => { :class => "gmap_element gmap_route"}
23
- = g.input :locality, :input_html => { :class => "gmap_element gmap_locality"}
24
- = g.input :postal_code, :input_html => { :class => "gmap_element gmap_postal_code"}
25
- = g.input :country, :as => :string, :input_html => { :class => "gmap_element gmap_country"}
26
- = g.input :administrative_area_level_2, :input_html => { :class => "gmap_element gmap_administrative_area_level_2"}
27
- = g.input :administrative_area_level_1, :input_html => { :class => "gmap_element gmap_administrative_area_level_1"}
28
- = g.input :gtype, :input_html => { :class => "gmap_element gmap_type"}
29
- = g.input :lat, :input_html => { :class => "gmap_element gmap_lat"}
30
- = g.input :lng, :input_html => { :class => "gmap_element gmap_lng"}
31
- = g.input :zoom, :input_html => { :class => "gmap_element gmap_zoom"}
32
-
33
- #map
34
- .modal-footer
35
- button.btn.btn-primary type="button" data-dismiss="modal" = bt("close")
36
-
37
-
38
- - content_for :js do
39
- = javascript_include_tag "//maps.google.com/maps/api/js?sensor=false"
40
- = javascript_include_tag "backend/jquery.ui.addresspicker"
41
- = javascript_include_tag "backend/gmap"
@@ -1,50 +0,0 @@
1
- a data-toggle="modal" href=("#meta_g_modal_#{obj.lang_id}" )
2
- button.btn.btn-success.btn-mini.box-form3.right
3
- span.icon16.icomoon-icon-google-plus.white
4
- = bt("meta_google", Mokio::Meta)
5
-
6
- a data-toggle="modal" href=("#meta_f_modal_#{obj.lang_id}" )
7
- button.btn.btn-primary.btn-mini.box-form2.right
8
- span.icon16.icomoon-icon-facebook-2.white
9
- = bt("meta_facebook", Mokio::Meta)
10
-
11
- .modal.fade id=("meta_g_modal_#{obj.lang_id}") role="dialog" aria-hidden="true" style="display:none;" aria-labelledby="meta_g_ModalLabel"
12
- .modal-dialog
13
- .modal-content
14
- .modal-header
15
- h3.modal-title.modal-photo id="meta_g_ModalLabel_#{obj.lang_id}"
16
- span.icon24.icomoon-icon-google-plus
17
- = bt("meta_google", Mokio::Meta)
18
- small= bt("meta_google_desc", Mokio::Meta)
19
-
20
- .modal-body
21
- = f.fields_for :meta do |m|
22
- = m.input :g_title
23
- = m.input :g_desc
24
- = m.input :g_keywords
25
- = m.input :g_author
26
- = m.input :g_copyright
27
- = m.input :g_application_name
28
-
29
- .modal-footer
30
- button.btn.btn-primary type="button" data-dismiss="modal" = bt("close")
31
-
32
- .modal.fade id =("meta_f_modal_#{obj.lang_id}") role="dialog" aria-hidden="true" style="display:none;" aria-labelledby="meta_f_ModalLabel_#{obj.lang_id}"
33
- .modal-dialog
34
- .modal-content
35
- .modal-header
36
- h3.modal-title.modal-photo id="meta_f_ModalLabel_#{obj.lang_id}"
37
- span.icon24.icomoon-icon-facebook-2
38
- = bt("meta_facebook", Mokio::Meta)
39
- small= bt("meta_facebook_desc", Mokio::Meta)
40
-
41
- .modal-body
42
- = f.fields_for :meta do |m|
43
- = m.input :f_title
44
- = m.input :f_type
45
- = m.input :f_image
46
- = m.input :f_url
47
- = m.input :f_desc
48
-
49
- .modal-footer
50
- button.btn.btn-primary type="button" data-dismiss="modal" = bt("close")