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,51 +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", 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", Meta)
10
-
11
-
12
- #meta_g_modal.modal.fade{:role =>"dialog", "aria-hidden" => "true", :style => "display:none;", "aria-labelledby" => "meta_g_ModalLabel"}
13
- .modal-dialog
14
- .modal-content
15
- .modal-header
16
- %h3.modal-title.modal-photo{:id => "meta_g_ModalLabel"}
17
- %span.icon24.icomoon-icon-google-plus
18
- = bt("meta_google", Meta)
19
- %small= bt("meta_google_desc", Meta)
20
-
21
- .modal-body
22
- = f.fields_for :meta do |m|
23
- = m.input :g_title
24
- = m.input :g_desc
25
- = m.input :g_keywords
26
- = m.input :g_author
27
- = m.input :g_copyright
28
- = m.input :g_application_name
29
-
30
- .modal-footer
31
- %button.btn.btn-primary{ :type => "button", "data-dismiss" => "modal"}= bt("close")
32
-
33
- #meta_f_modal.modal.fade{:role =>"dialog", "aria-hidden" => "true", :style => "display:none;", "aria-labelledby" => "meta_f_ModalLabel"}
34
- .modal-dialog
35
- .modal-content
36
- .modal-header
37
- %h3.modal-title.modal-photo{:id => "meta_f_ModalLabel"}
38
- %span.icon24.icomoon-icon-facebook-2
39
- = bt("meta_facebook", Meta)
40
- %small= bt("meta_facebook_desc", Meta)
41
-
42
- .modal-body
43
- = f.fields_for :meta do |m|
44
- = m.input :f_title
45
- = m.input :f_type
46
- = m.input :f_image
47
- = m.input :f_url
48
- = m.input :f_desc
49
-
50
- .modal-footer
51
- %button.btn.btn-primary{ :type => "button", "data-dismiss" => "modal"}= bt("close")
@@ -1,3 +0,0 @@
1
- - content_for :js do
2
- - flash.each do |key, msg|
3
- = flash_message(msg)
@@ -1,16 +0,0 @@
1
- %tr.odd.gradeA{ :class => ("disabled" if !obj.active) }
2
- - @obj_class.columns_for_table.each do |t|
3
- %td{ :id => obj.id }
4
- -#
5
- -# Common index tries to find object.attribute_view function in your Model to parse value
6
- -# if it's not defined, just puts simple object.atribute value
7
- -#
8
- - if obj.respond_to?("#{t}_view")
9
- = eval("obj.#{t}_view")
10
- - else
11
- = obj.try(t)
12
- %td
13
- .controls.center
14
- = table_controls_edit_btn( edit_url(@obj_class, obj) ) if obj.editable
15
- = table_controls_delete_btn( obj_url(@obj_class, obj) ) if obj.deletable
16
- = table_controls_copy_btn( copy_url(@obj_class, obj) ) if obj.editable
@@ -1,5 +0,0 @@
1
- .span12
2
- = render :partial => "mokio/backend/common/notice"
3
- .box
4
- = box_title bt("copy_title", @obj_class)
5
- = render :partial => "mokio/backend/common/form_content", locals: {obj: obj}
@@ -1,6 +0,0 @@
1
- .span12
2
- = render :partial => "mokio/backend/common/notice"
3
- .box
4
- = box_title do
5
- = bt("edit_title", obj.respond_to?(:type) ? obj.type : @obj_class)
6
- = render :partial => "mokio/backend/common/form_content", locals: {obj: obj}
@@ -1,19 +0,0 @@
1
- .span12
2
- = render :partial => "mokio/backend/common/notice"
3
-
4
- .box.gradient
5
- = box_title do
6
- %span= bt("index_title", @obj_class)
7
- = btn_new( bt("index_add_new", @obj_class), new_url(@obj_class) )
8
-
9
- .content.noPad.clearfix
10
- = responsive_dynamic_table do # see in CommonHelper
11
- %thead
12
- %tr
13
- -# Remember to override columns_for_table in your Model
14
- - @obj_class.columns_for_table.each do |t|
15
- %th= bt(t, @obj_class)
16
- %th= bt("actions")
17
- %tbody
18
- - cache obj do
19
- = render partial: "mokio/backend/common/obj", collection: obj
@@ -1,6 +0,0 @@
1
- .span12
2
- = render :partial => "mokio/backend/common/notice"
3
- .box
4
- = box_title do
5
- = bt("new_title", @obj_class)
6
- = render :partial => "mokio/backend/common/form_content", locals: {obj: obj}
@@ -1,42 +0,0 @@
1
- = 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')
2
- = f.input :active, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('active')
3
- = f.input :title, disabled: !obj.display_editable_field?('title')
4
- = f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 400} }, disabled: !obj.display_editable_field?('content')
5
-
6
- = f.input :recipient_emails, :as => :string, :input_html => { :class => "recipients span10" }, disabled: !obj.display_editable_field?('recipient_emails')
7
-
8
- .contaner
9
- %hr
10
- .row-fluid
11
- -# .span1
12
- -# .span7
13
- = f.fields_for :contact_template do |t|
14
- .label-wrapper
15
- = f.label btc("tpl", Contact)
16
- .well
17
- = btc("form_data", Contact)
18
- %hr
19
- %ul.unstyled
20
- %li
21
- %span.icon16.icomoon-icon-arrow-right-2
22
- = "%name% - Imię i nazwisko lub nazwa firmy"
23
- %li
24
- %span.icon16.icomoon-icon-arrow-right-2
25
- = "%email% - Adres e-mail"
26
- %li
27
- %span.icon16.icomoon-icon-arrow-right-2
28
- = "%title% - Tytuł"
29
- %li
30
- %span.icon16.icomoon-icon-arrow-right-2
31
- = "%content% - Treść"
32
-
33
- = t.input :tpl, :label => "", :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 300} }
34
-
35
-
36
- = f.hidden_field :contact, value: true
37
- = f.hidden_field :intro, value: ""
38
-
39
- - content_for :js do
40
- = javascript_include_tag 'backend/plugins/forms/select/select2.min'
41
- :javascript
42
- $(".recipients").select2({tags:[]});
@@ -1,22 +0,0 @@
1
- .sidebar-widget
2
- %h5.title= bt("content_now")
3
- .content
4
- .rightnow
5
- %ul.unstyled
6
- %li
7
- %span.number= Article.count
8
- = succeed bt("articles_now") do
9
- %span.icon16.icomoon-icon-file
10
- %li
11
- %span.number= PicGallery.count
12
- = succeed bt("pic_galleries_now") do
13
- %span.icon16.icomoon-icon-picture
14
- %li
15
- %span.number= MovGallery.count
16
- = succeed bt("mov_galleries_now") do
17
- %span.icon16.icomoon-icon-movie
18
-
19
- %li
20
- %span.number= Contact.count
21
- = succeed bt("contacts_now") do
22
- %span.icon16.icomoon-icon-mail-3
@@ -1,9 +0,0 @@
1
- %tr
2
- %td
3
- %a{:href => edit_url(content.class.base_class, content)}
4
- = content.title
5
- %td
6
- .controls.center
7
- = table_controls_edit_btn( edit_url(content.class.base_class, content) )
8
- = table_controls_delete_btn( obj_url(content.class.base_class, content) ) if content.deletable
9
- = table_controls_copy_btn( copy_url(content.class.base_class, content) ) if content.deletable
@@ -1,35 +0,0 @@
1
- .row-fluid
2
- = render :partial => "mokio/backend/common/notice"
3
-
4
- .box.gradient
5
- = box_title do
6
- %span= bt("dashboard")
7
-
8
- .row-fluid
9
- - unless @loose_content.empty?
10
- = render :template => "mokio/backend/dashboard/tbl_content", |
11
- locals: { collection: @loose_content, |
12
- title_msg: bt('content_not_in_menu'), |
13
- label_msg: bt("all_dashboard"), |
14
- more: @more_loose_content, |
15
- more_link: only_loose_backend_contents_path }
16
-
17
- - unless @empty_menu.empty?
18
- = render :template => "mokio/backend/dashboard/tbl_content", |
19
- locals: { collection: @empty_menu, |
20
- title_msg: bt('menu_with_invisible'), |
21
- label_msg: bt("all_dashboard"), |
22
- more: @more_empty_menu, |
23
- more_link: only_loose_backend_contents_path }
24
-
25
- .row-fluid
26
- = render :template => "mokio/backend/dashboard/tbl_content", |
27
- locals: { collection: @last_updated, |
28
- title_msg: bt('last_updated_content'), |
29
- label_msg: bt("last_updated"), |
30
- more: @last_updated.any? ? @last_updated.first.updated_at.strftime("%d-%m-%Y") : "" }
31
- = render :template => "mokio/backend/dashboard/tbl_content", |
32
- locals: { collection: @last_created, |
33
- title_msg: bt('last_created_content'), |
34
- label_msg: bt("last_created"), |
35
- more: @last_created.any? ? @last_created.first.updated_at.strftime("%d-%m-%Y") : "" }
@@ -1,24 +0,0 @@
1
- .span6
2
- .box.dashboard-box
3
- = box_title do
4
- = title_msg
5
- - if collection.any?
6
- %span.label.label-success.dashboard_label= "#{label_msg} #{more}"
7
- .content
8
- %table.responsive.table
9
- - if collection.any?
10
- %thead
11
- %tr
12
- %th= bt("name")
13
- %th= bt("actions")
14
- %tbody
15
- = render partial: "content", collection: collection
16
- - else
17
- %tbody
18
- %p= bt('no_records_found')
19
-
20
- - if local_assigns[:more_link]
21
- %a{:href => more_link }
22
- %span.btn.btn-info.btn-mini.btn-more
23
- = bt("more")
24
- %span.icomoon-icon-arrow-right-4.white
@@ -1,71 +0,0 @@
1
- <%= form_for [:backend, file_type.new], :remote => true, :html => { :multipart => true, :id => "fileupload" } do |f| %>
2
- <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
3
- <div class="fileupload-buttonbar">
4
- <!-- The fileinput-button span is used to style the file input field as button -->
5
- <span class="btn btn-success fileinput-button">
6
- <span><%= bt("add_files") %></span>
7
- <%= f.hidden_field :content_id, :value => obj.id, name: "photo[content_id]" %>
8
- <%= f.file_field :data_file, multiple:true, name: "photo[data_file]" %>
9
- </span>
10
- <button type="submit" class="btn btn-primary start">
11
- <span><%= bt("start_upload") %></span>
12
- </button>
13
- <button type="reset" class="btn btn-warning cancel">
14
- <span><%= bt("cancel_upload") %></span>
15
- </button>
16
- </div>
17
- <!-- The loading indicator is shown during image processing -->
18
- <div class="fileupload-loading"></div>
19
- <br>
20
- <!-- The table listing the files available for upload/download -->
21
- <table class="table table-striped"><tbody class="files" ></tbody>
22
- </table>
23
- <% end %>
24
-
25
-
26
- <script>
27
- var fileUploadErrors = {
28
- maxFileSize: 'File is too big',
29
- minFileSize: 'File is too small',
30
- acceptFileTypes: 'Filetype not allowed',
31
- maxNumberOfFiles: 'Max number of files exceeded',
32
- uploadedBytes: 'Uploaded bytes exceed file size',
33
- emptyResult: 'Empty file upload result'
34
- };
35
- </script>
36
-
37
- <!-- The template to display files available for upload -->
38
- <script id="template-upload" type="text/x-tmpl">
39
- {% for (var i=0, file; file=o.files[i]; i++) { %}
40
- <tr class="template-upload fade">
41
- <td class="preview"><span class="fade"></span></td>
42
- <td class="name"><span>{%=file.name%}</span></td>
43
- <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
44
- {% if (file.error) { %}
45
- <td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
46
- {% } else if (o.files.valid && !i) { %}
47
- <td>
48
- <div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
49
- </td>
50
- <td class="start">{% if (!o.options.autoUpload) { %}
51
- <button class="btn btn-primary">
52
- <span>{%=locale.fileupload.start%}</span>
53
- </button>
54
- {% } %}</td>
55
- {% } else { %}
56
- <td colspan="2"></td>
57
- {% } %}
58
- <td class="cancel">{% if (!i) { %}
59
- <button class="btn btn-warning">
60
- <span>{%=locale.fileupload.cancel%}</span>
61
- </button>
62
- {% } %}</td>
63
- </tr>
64
- {% } %}
65
- </script>
66
-
67
-
68
- <!-- The template to display files available for download -->
69
- <script id="template-download" type="text/x-tmpl">
70
-
71
- </script>
@@ -1,15 +0,0 @@
1
- %button.btn.btn-info.uploader{"data-toggle" => "modal", "data-target" => "#modalupload"}
2
- %span.icomoon-icon-plus.white
3
- = bt("add_#{obj.default_data_file.to_s.tableize}", @obj_class)
4
-
5
- = render :template => "mokio/backend/photos/from_external_link", locals: {obj: obj} if (obj.default_data_file == Photo || obj.default_data_file == SliderPhoto)
6
-
7
- #modalupload.modal.fade{:role =>"dialog", "aria-labelledby" => "myModalLabel", "aria-hidden" => "true", :style => "display: none;"}
8
- .modal-dialog
9
- .modal-content
10
- .modal-header
11
- %h3#myModalLabel.modal-title= bt("file_upload")
12
- .modal-body
13
- = render :partial => "mokio/backend/data_files/file_upload", locals: {file_type: obj.default_data_file }
14
- .modal-footer
15
- %button.btn.btn-primary{ :type => "button", "data-dismiss" => "modal"}= bt("close")
@@ -1,45 +0,0 @@
1
- !!!
2
- %html{xmlns: "http://www.w3.org/1999/xhtml"}
3
- %head
4
- %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/
5
- %title Strony nie znaleziono
6
- / Mobile Specific Metas
7
- %meta{content: "width=device-width, initial-scale=1.0", name: "viewport"}/
8
- / Le styles
9
- = stylesheet_link_tag 'backend/errors'
10
-
11
- / Le HTML5 shim, for IE6-8 support of HTML5 elements
12
- /[if lt IE 9]
13
- = javascript_include_tag 'html5'
14
-
15
- %body.errorPage
16
- .container-fluid
17
- .errorContainer
18
- .page-header
19
- %h1.center
20
- 404
21
- %small error
22
- %h2.center The page cannot be found.
23
- .center
24
- %a.btn{href: "javascript: history.go(-1)", style: "margin-right:10px;"}
25
- %span.icon16.icomoon-icon-arrow-left-10>
26
- Go back
27
- %a.btn{href: "#{backend_root_path}"}
28
- %span.icon16.icomoon-icon-screen>
29
- Dashboard
30
- / End .container-fluid
31
- /
32
- Le javascript
33
- \==================================================
34
- = javascript_include_tag 'backend/errors'
35
- :javascript
36
- // document ready function
37
- $(document).ready(function() {
38
- //------------- Some fancy stuff in error pages -------------//
39
- $('.errorContainer').hide();
40
- $('.errorContainer').fadeIn(1000).animate({
41
- 'top': "50%", 'margin-top': +($('.errorContainer').height()/-2-30)
42
- }, {duration: 750, queue: false}, function() {
43
- // Animation complete.
44
- });
45
- });
@@ -1,11 +0,0 @@
1
- .errorPage
2
- .container-fluid
3
- .errorContainer#unauth
4
- .page-header
5
- %h3.center
6
- You are not authorized to perform this action
7
-
8
- .center
9
- %a.btn{href: "javascript: history.go(-1)", style: "margin-right:10px;"}
10
- %span.icon16.icomoon-icon-arrow-left-10>
11
- Go back
@@ -1,8 +0,0 @@
1
- - if user_signed_in?
2
- %ul.nav.pull-right.usernav
3
- %li#username
4
- #{current_user.email}
5
- %li
6
- = link_to bt('change_password'), edit_password_backend_user_path(current_user), :method => :get
7
- %li
8
- = link_to bt('logout'), destroy_user_session_path, :method => :delete
@@ -1,14 +0,0 @@
1
- .navbar
2
- .navbar-inner
3
- .container-fluid
4
- %a.brand#logo{ href: "/", title: "MOKIO - CMS Open Source", target: "_blank"}
5
- %img{ src: asset_path("backend/mokio-logo.svg"), alt:"Logo MOKIO"}
6
-
7
-
8
- .nav-no-collapse
9
- %ul.nav
10
- %li
11
- %a{href: ( defined?(root_path) ? root_path : "#" ), target: "_blank"}
12
- %span.icon16.icomoon-icon-home
13
- = bt("site_preview")
14
- = render 'mokio/backend/layout/user_widget'
@@ -1,59 +0,0 @@
1
- .shortcuts
2
- %ul
3
- %li.nav-heading
4
- .sidenav
5
- .sidebar-widget{style: "margin: -1px 0 0 0;"}
6
- %h5.title{style: "margin-bottom:0"}= bt("sidebar_title", "backend.sidebar")
7
- .mainnav
8
- %ul#sidebar-ul
9
- %li.dashboard_nav
10
- %a{href: backend_root_path}
11
- %span.icon16.icomoon-icon-screen-2
12
- = bt("dashboard")
13
- - if can? :manage, Content
14
- %li.contentmanagment_nav
15
- %a{:href => backend_contents_path}
16
- %span.icon16.icomoon-icon-stats-up>
17
- = bt("content_management", "backend.sidebar")
18
- - if can? :create, Content
19
- %li.content_nav
20
- %a{href: "#"}
21
- %span.icon16.icomoon-icon-list-view-2>
22
- = bt("add_content", "backend.sidebar")
23
- %ul.sub
24
- %li
25
- %a{:href => new_backend_article_path}
26
- %span.icon16.icomoon-icon-pencil>
27
- = bt("article", "backend.sidebar")
28
- %li
29
- %a{href: new_backend_pic_gallery_path}
30
- %span.icon16.icomoon-icon-picture>
31
- = bt("pic_galery", "backend.sidebar")
32
- %li
33
- %a{href: new_backend_mov_gallery_path}
34
- %span.icon16.icomoon-icon-movie>
35
- = bt("mov_galery", "backend.sidebar")
36
- %li
37
- %a{href: new_backend_contact_path}
38
- %span.icon16.icomoon-icon-mail-3>
39
- = bt("contact", "backend.sidebar")
40
- - if can? :manage, Menu
41
- %li.menu_nav
42
- %a{href: backend_menus_path}
43
- %span.icon16.icomoon-icon-menu-2>
44
- = bt("menu", "backend.sidebar")
45
- - if can? :manage, StaticModule
46
- %li.static_module_nav
47
- %a{href: backend_static_modules_path}
48
- %span.icon16.icomoon-icon-cube>
49
- = bt("modules", "backend.sidebar")
50
-
51
- - if can? :manage, User
52
- %li.user_nav
53
- %a{href: backend_users_path}
54
- %span.icon16.entypo-icon-users
55
- = bt("users", "backend.sidebar")
56
-
57
- - if @obj_class == Content && params[:action] == "index"
58
- = render :partial => "mokio/backend/contents/content_info_widget"
59
-