mokio 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/backend/movie_gallery.js.erb +3 -3
  3. data/app/assets/javascripts/backend/photo_gallery/functions.js +2 -4
  4. data/app/assets/stylesheets/backend/custom.css.scss +33 -3
  5. data/app/controllers/passwords_controller.rb +8 -0
  6. data/app/models/mokio/contact.rb +1 -0
  7. data/app/models/mokio/content.rb +1 -0
  8. data/app/models/mokio/menu.rb +2 -0
  9. data/app/models/mokio/mov_gallery.rb +1 -0
  10. data/app/models/mokio/pic_gallery.rb +1 -0
  11. data/app/models/mokio/static_module.rb +1 -0
  12. data/app/views/devise/mailer/reset_password_instructions.slim +8 -0
  13. data/app/views/devise/passwords/edit.html.haml +41 -0
  14. data/app/views/devise/passwords/new.html.haml +35 -0
  15. data/app/views/devise/sessions/new.html.haml +1 -1
  16. data/app/views/mokio/articles/_form.html.slim +1 -0
  17. data/app/views/mokio/common/_meta.html.slim +43 -44
  18. data/app/views/mokio/contacts/_form.html.slim +1 -0
  19. data/app/views/mokio/menus/_form.html.haml +8 -5
  20. data/app/views/mokio/mov_galleries/_form_inputs.html.slim +1 -0
  21. data/app/views/mokio/photos/photo.html.slim +14 -12
  22. data/app/views/mokio/pic_galleries/_form_inputs.html.slim +1 -0
  23. data/app/views/mokio/static_modules/_form.html.slim +1 -0
  24. data/app/views/mokio/youtubes/youtube.html.slim +10 -9
  25. data/config/locales/devise.en.yml +6 -0
  26. data/config/locales/devise.pl.yml +7 -1
  27. data/config/locales/en.yml +10 -1
  28. data/config/locales/pl.yml +11 -0
  29. data/config/routes.rb +4 -2
  30. data/db/migrate/20150220071158_add_subtitle_to_contents.rb +7 -0
  31. data/db/migrate/20150220091326_add_main_pic_to_mokio_menu.rb +5 -0
  32. data/lib/mokio/concerns/controllers/articles.rb +1 -1
  33. data/lib/mokio/concerns/controllers/contacts.rb +1 -1
  34. data/lib/mokio/concerns/controllers/menus.rb +1 -1
  35. data/lib/mokio/concerns/controllers/mov_galleries.rb +1 -1
  36. data/lib/mokio/concerns/controllers/pic_galleries.rb +1 -1
  37. data/lib/mokio/concerns/controllers/static_modules.rb +1 -1
  38. data/lib/mokio/concerns/models/menu.rb +2 -0
  39. data/lib/mokio/concerns/models/user.rb +7 -0
  40. data/lib/mokio/version.rb +1 -1
  41. data/spec/controllers/mokio/photos_controller_spec.rb +1 -1
  42. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c699e4ede04dd7a79e2766ec3509713d773bb90
4
- data.tar.gz: 0921f2de69320c60df935bfc8743ce59cd438819
3
+ metadata.gz: 7a79602440d253b63fdbecb64b2934f431ca4c90
4
+ data.tar.gz: c6eac19bc0b242e2f67bb35f962de4252d650f44
5
5
  SHA512:
6
- metadata.gz: 52e420ddad472cb8381e668b04f07160ed75ba352c9aa4de5656c62a40117560d96e9b695515dfa3af835dd362f622ee50e075bdc94b4c8b42f6dbedad0e496a
7
- data.tar.gz: 940fa445ad459f82942ce668c3f1ad969c2335cda3e6213e2630b41927a3731c0a9f6946c3f6f91ddb2e3b1d2cc503ae96cbe8bc2da9753d0e745d6a40d861da
6
+ metadata.gz: 1aaa048e9c81f0428aed55617141c2dc4bb8261245ffc4ac21a3d1ba23894d16a73b36a856d98c9e4c4f7fa9b60f994165cc2c6f4b98cdf0d688c3df71811eb7
7
+ data.tar.gz: 2c5786798f82fb34b4b3515297e9212a4082f9bb5014c2915c824e1671ff2717b88da6e297e04930699958d9326ff109a7fdab06b57a2519662b87729c59900a
@@ -17,8 +17,8 @@ $(document).ready(function() {
17
17
  // loads modal with edit form - displays loader during modal load
18
18
  $('.edit-youtube').click(function(e) {
19
19
  e.preventDefault();
20
- $('#gallery-loader').show();
21
- $('#gallery-loader').offset({top: $(this).parent().parent().offset().top, left: $(this).parent().parent().offset().left});
20
+ // $('#gallery-loader').show();
21
+ // $('#gallery-loader').offset({top: $(this).parent().parent().offset().top, left: $(this).parent().parent().offset().left});
22
22
 
23
23
  var url = $(this).attr('data-href');
24
24
  $('#edit-youtube-form').load(url, function(result){
@@ -113,7 +113,7 @@ $(document).ready(function() {
113
113
  //
114
114
  function sortablephotos(){
115
115
  $('.sortable').sortable({
116
- // handle: '.dragable .handler',
116
+ handle: '.drag_wrapper',
117
117
  placeholder: "ui-state-highlight",
118
118
 
119
119
  //
@@ -60,16 +60,14 @@ function prettyphoto(){
60
60
 
61
61
  function gallery_lazy_load() {
62
62
  //hide the action buttons
63
- $('.actionBtn, .dragable').hide();
63
+ $('.actionBtn').hide();
64
64
  //show action buttons on hover image
65
65
  $('.galleryView>li').hover(
66
66
  function () {
67
67
  $(this).find('.actionBtn').stop(true, true).show(300);
68
- $(this).find('.dragable,.handler').stop(true, true).show(300);
69
68
  },
70
69
  function () {
71
70
  $(this).find('.actionBtn').stop(true, true).hide(300);
72
- $(this).find('.dragable,.handler').stop(true, true).hide(300);
73
71
  }
74
72
  );
75
73
  //
@@ -154,7 +152,7 @@ function edit_image_button() {
154
152
  //
155
153
  function sortablephotos(){
156
154
  $('.sortable').sortable({
157
- handle: '.dragable .handler',
155
+ handle: '.drag_wrapper',
158
156
  placeholder: "ui-state-highlight",
159
157
 
160
158
  //
@@ -75,7 +75,7 @@ button.uploader {
75
75
 
76
76
  .handler {
77
77
  background: black;
78
- opacity: $default-opacity;
78
+
79
79
  padding: 4px 1px;
80
80
  cursor: pointer;
81
81
  }
@@ -159,10 +159,22 @@ input.btn[type="submit"] {
159
159
  margin-right: 15px;
160
160
  }
161
161
 
162
+
163
+
164
+ //.ui-state-highlight {
165
+ // background-color: #F5F5F5 !important;
166
+ // border: 1px solid #E5E5E5 !important;
167
+ // box-shadow: 0 1px 0 rgba(229, 229, 229, 0.1) !important;
168
+ //}
169
+
170
+ // 20.02.2015 mz
162
171
  .ui-state-highlight {
172
+ min-width: 114px;
163
173
  background-color: #F5F5F5 !important;
164
- border: 1px solid #E5E5E5 !important;
165
- box-shadow: 0 1px 0 rgba(229, 229, 229, 0.1) !important;
174
+ border: 1px dashed #E5E5E5 !important;
175
+ box-shadow: 0 1px 0 rgba(229,229,229,0.1) !important;
176
+ min-height: 94px;
177
+
166
178
  }
167
179
 
168
180
  #FlashInfo {
@@ -646,3 +658,21 @@ select[multiple] {
646
658
  }
647
659
  }
648
660
  }
661
+
662
+ // 20.02.2015 mz
663
+ .drag_wrapper {
664
+
665
+ cursor:move;
666
+ height:auto;
667
+ width:auto;
668
+ }
669
+
670
+ .sortableli {
671
+
672
+
673
+ min-height:100px;
674
+
675
+ .drag_wrapper {
676
+ min-height:100px;
677
+ }
678
+ }
@@ -0,0 +1,8 @@
1
+ class PasswordsController < Devise::PasswordsController
2
+ protected
3
+ def after_sending_reset_password_instructions_path_for(resource_name)
4
+ flash[:alert]=t("devise.passwords.send_instructions")
5
+ Mokio::Engine.routes.url_helpers.root_path<<new_user_session_path[1..-1] #delete one slash to prevent link like this: /backend//users/sign_in
6
+ end
7
+
8
+ end
@@ -4,6 +4,7 @@
4
4
  #
5
5
  # id :integer not null, primary key
6
6
  # title :string(255)
7
+ # subtitle :text
7
8
  # intro :text
8
9
  # content :text
9
10
  # type :string(255)
@@ -4,6 +4,7 @@
4
4
  #
5
5
  # id :integer not null, primary key
6
6
  # title :string(255)
7
+ # subtitle :text
7
8
  # intro :text
8
9
  # content :text
9
10
  # type :string(255)
@@ -22,6 +22,8 @@
22
22
  # fake :boolean default(FALSE)
23
23
  # meta_id :integer
24
24
  # slug :string(255)
25
+ # css_class :string
26
+ # css_body_class :string
25
27
  #
26
28
  module Mokio
27
29
  class Menu < ActiveRecord::Base
@@ -4,6 +4,7 @@
4
4
  #
5
5
  # id :integer not null, primary key
6
6
  # title :string(255)
7
+ # subtitle :text
7
8
  # intro :text
8
9
  # content :text
9
10
  # type :string(255)
@@ -4,6 +4,7 @@
4
4
  #
5
5
  # id :integer not null, primary key
6
6
  # title :string(255)
7
+ # subtitle :text
7
8
  # intro :text
8
9
  # content :text
9
10
  # type :string(255)
@@ -5,6 +5,7 @@
5
5
  # id :integer not null, primary key
6
6
  # available_modules_id :integer
7
7
  # title :string(255)
8
+ # subtitle :text
8
9
  # content :text
9
10
  # external_link :string(255)
10
11
  # lang_id :integer
@@ -0,0 +1,8 @@
1
+ p = t("devise.mailer.hello")<<" #{@resource.email}"
2
+
3
+ p = t("devise.mailer.reset_password_first_paragraph")
4
+
5
+ = link_to t("backend.change_password"), edit_password_url(@resource, reset_password_token: @token)
6
+
7
+ p = t("devise.mailer.reset_password_second_paragraph")
8
+ p = t("devise.mailer.reset_password_third_paragraph")
@@ -0,0 +1,41 @@
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 MOKIO - CMS Open Source
6
+ %meta{content: "MOKIO", name: "description"}/
7
+ %meta{content: "MOKIO", name: "application-name"}/
8
+
9
+ / Mobile Specific Metas
10
+ %meta{content: "width=device-width, initial-scale=1.0", name: "viewport"}/
11
+ = stylesheet_link_tag 'backend'
12
+ = csrf_meta_tags
13
+ = favicon_link_tag 'backend/favicon.ico'
14
+
15
+ %link{href: "images/favicon.ico", rel: "shortcut icon"}/
16
+ %body.loginPage
17
+ .container-fluid
18
+ #header
19
+ .row-fluid
20
+ .navbar
21
+ .navbar-inner
22
+ .container-fluid
23
+ %a#logo.brand{href: "http://www.bloomnet.eu", target: "_blank", title: "MOKIO - CMS Open Source"}
24
+ = image_tag "backend/mokio-logo.svg", alt:"Logo MOKIO"
25
+ .container-fluid
26
+ .loginContainer
27
+ -#= bt("reset_password_instruction")
28
+ = simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
29
+ = f.input :reset_password_token, as: :hidden
30
+ = f.input :only_password, as: :hidden, value: true
31
+ = f.full_error :reset_password_token
32
+ .form-row.row-fluid
33
+ -#= f.input :email, required: true, autofocus: true, :wrapper => :label_newline
34
+ = f.input :password, label: t("activerecord.attributes.mokio/user.password"), required: true, autofocus: true, :wrapper => :label_newline
35
+ = f.input :password_confirmation, label: t("activerecord.attributes.mokio/user.password_confirmation"), required: true, :wrapper => :label_newline
36
+ %br
37
+ -# = link_to bt("sign_up"), new_registration_path(resource_name)
38
+ -#= f.button :submit, bt("sign_in"), class: 'btn btn-info', id: 'loginBtn'
39
+ = f.button :submit, bt("change_password"), id:"loginBtn", class: 'btn btn-info'
40
+
41
+ -#= link_to "ble ble", new_user_password_path(resource_name)
@@ -0,0 +1,35 @@
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 MOKIO - CMS Open Source
6
+ %meta{content: "MOKIO", name: "description"}/
7
+ %meta{content: "MOKIO", name: "application-name"}/
8
+
9
+ / Mobile Specific Metas
10
+ %meta{content: "width=device-width, initial-scale=1.0", name: "viewport"}/
11
+ = stylesheet_link_tag 'backend'
12
+ = csrf_meta_tags
13
+ = favicon_link_tag 'backend/favicon.ico'
14
+
15
+ %link{href: "images/favicon.ico", rel: "shortcut icon"}/
16
+ %body.loginPage
17
+ .container-fluid
18
+ #header
19
+ .row-fluid
20
+ .navbar
21
+ .navbar-inner
22
+ .container-fluid
23
+ %a#logo.brand{href: "http://www.bloomnet.eu", target: "_blank", title: "MOKIO - CMS Open Source"}
24
+ = image_tag "backend/mokio-logo.svg", alt:"Logo MOKIO"
25
+ .container-fluid
26
+ .loginContainer
27
+ = simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
28
+ .form-row.row-fluid
29
+ = f.input :email, required: true, autofocus: true, :wrapper => :label_newline
30
+ %br
31
+ -# = link_to bt("sign_up"), new_registration_path(resource_name)
32
+ -#= f.button :submit, bt("sign_in"), class: 'btn btn-info', id: 'loginBtn'
33
+ = f.button :submit, bt("change_password"), id:"loginBtn", class: 'btn btn-info'
34
+
35
+ = render "devise/shared/links"
@@ -35,4 +35,4 @@
35
35
  %div
36
36
  =flash[:alert]
37
37
  %br
38
-
38
+ = link_to t("devise.link.forgot_password"), new_password_path(resource_name)
@@ -3,6 +3,7 @@
3
3
  = f.input :active, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('active')
4
4
  = f.input :home_page, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('home_page')
5
5
  = f.input :title, disabled: !obj.display_editable_field?('title')
6
+ = f.input :subtitle, disabled: !obj.display_editable_field?('subtitle'), :as => :string
6
7
  = f.input :intro, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Mini', :height => 150} }, disabled: !obj.display_editable_field?('intro')
7
8
  = f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 400} }, disabled: !obj.display_editable_field?('content')
8
9
  = f.input :display_from, :wrapper => :date, :as => :string, :input_html => { :class => "mask-date display_from", :value => (localize(f.object.display_from, :format => :datepicker) if f.object.display_from) }, disabled: !obj.display_editable_field?('display_from')
@@ -1,51 +1,50 @@
1
- - cache :meta_buttons do
2
- a data-toggle="modal" href=("#meta_g_modal" )
3
- button.btn.btn-success.btn-mini.box-form3.right
4
- span.icon16.icomoon-icon-google-plus.white
5
- = bt("meta_google", Mokio::Meta)
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)
6
5
 
7
- a data-toggle="modal" href=("#meta_f_modal" )
8
- button.btn.btn-primary.btn-mini.box-form2.right
9
- span.icon16.icomoon-icon-facebook-2.white
10
- = bt("meta_facebook", Mokio::Meta)
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)
11
10
 
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", Mokio::Meta)
19
- small= bt("meta_google_desc", Mokio::Meta)
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)
20
19
 
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
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
29
28
 
30
- .modal-footer
31
- button.btn.btn-primary type="button" data-dismiss="modal" = bt("close")
29
+ .modal-footer
30
+ button.btn.btn-primary type="button" data-dismiss="modal" = bt("close")
32
31
 
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", Mokio::Meta)
40
- small= bt("meta_facebook_desc", Mokio::Meta)
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)
41
40
 
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
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
49
48
 
50
- .modal-footer
51
- button.btn.btn-primary type="button" data-dismiss="modal" = bt("close")
49
+ .modal-footer
50
+ button.btn.btn-primary type="button" data-dismiss="modal" = bt("close")
@@ -2,6 +2,7 @@
2
2
  = f.input :active, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('active')
3
3
  = f.input :home_page, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('home_page')
4
4
  = f.input :title, disabled: !obj.display_editable_field?('title')
5
+ = f.input :subtitle, disabled: !obj.display_editable_field?('subtitle'), :as => :string
5
6
  = f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 400} }, disabled: !obj.display_editable_field?('content')
6
7
 
7
8
  = f.input :recipient_emails, :as => :string, :input_html => { :class => "recipients span10" }, disabled: !obj.display_editable_field?('recipient_emails')
@@ -1,19 +1,22 @@
1
+ = render :partial => "mokio/common/main_pic", locals: {f:f}
2
+ = f.input :lang_id, collection: Mokio::Lang.all.collect{|lang| [bt(lang.name), lang.id]}, include_blank: false, disabled: !@menu.display_editable_field?('lang_id')
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, disabled: !@menu.display_editable_field?('active')
5
+ = f.input :visible, :wrapper => :active_checkbox, disabled: !@menu.display_editable_field?('visible')
1
6
  .row-fluid
2
7
  %label.form-label.span2
3
8
  = btc('slug', Mokio::Menu)
4
9
  .span10
5
10
  = text_field_tag '', (@menu.full_slug.nil?) ? bt('no_slug', Mokio::Menu) : "/" + @menu.full_slug.to_s, readonly: true
6
- = f.input :lang_id, collection: Mokio::Lang.all.collect{|lang| [bt(lang.name), lang.id]}, include_blank: false, disabled: !@menu.display_editable_field?('lang_id')
7
- -# = f.input :lang_id, :as => :hidden, :input_html => { :value => (@menu.lang_id.nil? ? 1 : @menu.lang_id)}, disabled: !@menu.display_editable_field?('lang_id')
8
- = f.input :active, :wrapper => :active_checkbox, disabled: !@menu.display_editable_field?('active')
9
- = f.input :visible, :wrapper => :active_checkbox, disabled: !@menu.display_editable_field?('visible')
10
11
  = f.input :name, disabled: !@menu.display_editable_field?('name')
12
+ = f.input :subtitle, disabled: !@menu.display_editable_field?('subtitle'), :as => :string
11
13
  .row-fluid
12
14
  %label.form-label.span2
13
15
  = btc('type', Mokio::Menu)
14
16
  .span10
15
17
  = select_tag "menu_type", options_for_select([[btc("content",'Menu'), 'content'],[btc("external_link",'Menu'), 'external_link']], @menu.contents.empty? && !@menu.external_link.blank? ? "external_link" : "content")
16
-
18
+ = f.input :css_class, disabled: !@menu.display_editable_field?('css_class')
19
+ = f.input :css_body_class, disabled: !@menu.display_editable_field?('css_body_class')
17
20
  .row-fluid#content_box{:style => "display: #{@menu.contents.empty? && !@menu.external_link.blank? ? 'none' : 'block'};"}
18
21
  = 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'))
19
22
  #url_box{:style => "display: #{@menu.contents.empty? && !@menu.external_link.blank? ? 'block' : 'none'};"}
@@ -3,6 +3,7 @@
3
3
  = f.input :active, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('active')
4
4
  = f.input :home_page, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('home_page')
5
5
  = f.input :title, disabled: !obj.display_editable_field?('title')
6
+ = f.input :subtitle, disabled: !obj.display_editable_field?('subtitle'), :as => :string
6
7
  = 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')
7
8
  = f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 300} }, disabled: !obj.display_editable_field?('content')
8
9
  = 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')
@@ -1,18 +1,20 @@
1
1
  - cache [:photo_edit, photo] do
2
- li.sortableli id=photo.id class=(photo.thumb_name )
3
- .dragable
4
- span.handler
5
- span.icon16.brocco-icon-move.white
6
- a title=photo.name rel="prettyPhoto[pp_gal]" href=(photo.data_file.url )
2
+ li.sortableli id=photo.id class=(photo.thumb_name )
3
+ .drag_wrapper
4
+ .dragable
5
+ .actionBtn
6
+ a title=photo.name rel="prettyPhoto[pp_gal]" href=(photo.data_file.url )
7
+ span.icon16.icomoon-icon-zoom-in.white
7
8
  - if photo.thumb.blank?
8
- img alt=photo.name src=(photo.data_file.url(photo.thumb_name) )
9
+ img alt=photo.name src=(photo.data_file.url(photo.thumb_name) )
9
10
  - else
10
- img alt=photo.name src=(photo.thumb.url )
11
- .actionBtn
12
- a.edit data-toggle="modal" href=("#modaledit_#{photo.id}" )
13
- span.icon16.icomoon-icon-pencil-2.white
14
- = link_to self.send("#{photo.class.to_s.demodulize.downcase}_path", photo), remote: true, method: :delete, class: "delete" do
15
- span.icon16.icomoon-icon-remove.white
11
+ img alt=photo.name src=(photo.thumb.url )
12
+
13
+ .actionBtn
14
+ a.edit data-toggle="modal" href=("#modaledit_#{photo.id}" )
15
+ span.icon16.icomoon-icon-pencil-2.white
16
+ = link_to self.send("#{photo.class.to_s.demodulize.downcase}_path", photo), remote: true, method: :delete, class: "delete" do
17
+ span.icon16.icomoon-icon-remove.white
16
18
 
17
19
  /!
18
20
  /! edit form
@@ -3,6 +3,7 @@
3
3
  = f.input :active, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('active')
4
4
  = f.input :home_page, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('home_page')
5
5
  = f.input :title, disabled: !obj.display_editable_field?('title')
6
+ = f.input :subtitle, disabled: !obj.display_editable_field?('subtitle'), :as => :string
6
7
  = f.input :intro, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Mini', :height => 150} }, disabled: !obj.display_editable_field?('intro')
7
8
  = f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 300} }, disabled: !obj.display_editable_field?('content')
8
9
 
@@ -1,6 +1,7 @@
1
1
  = f.input :lang_id, collection: Mokio::Lang.all.collect{|lang| [bt(lang.name), lang.id]}, include_blank: bt('all'), disabled: !obj.display_editable_field?('lang_id')
2
2
  = f.input :active, :wrapper => :active_checkbox, disabled: !@static_module.display_editable_field?('active')
3
3
  = f.input :title, disabled: !@static_module.display_editable_field?('title')
4
+ = f.input :subtitle, disabled: !@static_module.display_editable_field?('subtitle'), :as => :string
4
5
  = f.input :intro, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Mini', :height => 150} }, disabled: !@static_module.display_editable_field?('intro')
5
6
  = f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Medium', :height => 400} }, disabled: !@static_module.display_editable_field?('content')
6
7
  = f.association :module_positions, :wrapper => :checkbox, :as => :check_boxes, disabled: !@static_module.display_editable_field?('module_positions')
@@ -1,12 +1,13 @@
1
1
  - cache [:youtube_edit, youtube] do
2
2
  li.sortableli id=(youtube.id )
3
- .dragable
4
- span.handler
5
- span.icon16.brocco-icon-move.white
6
- = link_to preview_movie_youtube_path(youtube), remote: true, method: :get, title: youtube.name.html_safe do
3
+ .drag_wrapper
4
+ .dragable
5
+ .actionBtn
6
+ = link_to preview_movie_youtube_path(youtube), remote: true, method: :get, title: youtube.name.html_safe do
7
+ span.icon16.icomoon-icon-film.white
7
8
  img class="img-load" alt=youtube.name src=(youtube.thumb_url[-1,1] == "0" ? youtube.thumb_external_url : youtube.thumb.url(:thumb))
8
- .actionBtn
9
- a.edit data-toggle="modal" class="edit-youtube" data-href="#{mokio.root_path}/youtubes/#{youtube.friendly_id}/edit" target=("edit-youtube-form")
10
- span.icon16.icomoon-icon-pencil-2.white
11
- = link_to youtube_path(youtube), remote: true, method: :delete, class: "delete" do
12
- span.icon16.icomoon-icon-remove.white
9
+ .actionBtn
10
+ a.edit data-toggle="modal" class="edit-youtube" data-href="#{mokio.root_path}/youtubes/#{youtube.friendly_id}/edit" target=("edit-youtube-form")
11
+ span.icon16.icomoon-icon-pencil-2.white
12
+ = link_to youtube_path(youtube), remote: true, method: :delete, class: "delete" do
13
+ span.icon16.icomoon-icon-remove.white
@@ -2,6 +2,8 @@
2
2
 
3
3
  en:
4
4
  devise:
5
+ link:
6
+ forgot_password: "Forgot your password?"
5
7
  confirmations:
6
8
  confirmed: "Your account was successfully confirmed."
7
9
  send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
@@ -17,6 +19,10 @@ en:
17
19
  unauthenticated: "You need to sign in or sign up before continuing."
18
20
  unconfirmed: "You have to confirm your account before continuing."
19
21
  mailer:
22
+ hello: "Hello"
23
+ reset_password_first_paragraph: "Someone has requested a link to change your password. You can do this through the link below."
24
+ reset_password_second_paragraph: "If you didn't request this, please ignore this email."
25
+ reset_password_third_paragraph: "Your password won't change until you access the link above and create a new one."
20
26
  confirmation_instructions:
21
27
  subject: "Confirmation instructions"
22
28
  reset_password_instructions:
@@ -1,5 +1,7 @@
1
1
  pl:
2
2
  devise:
3
+ link:
4
+ forgot_password: "Zapomniałeś hasła?"
3
5
  confirmations:
4
6
  confirmed: Konto zostało poprawnie aktywowane.
5
7
  send_instructions: Instrukcja jak aktywować konto zostanie niezwłocznie wysłana na podany adres e-mail.
@@ -15,6 +17,10 @@ pl:
15
17
  unauthenticated: Aby kontynuować zaloguj lub zarejestruj się.
16
18
  unconfirmed: Aby kontynuować aktywuj konto.
17
19
  mailer:
20
+ hello: "Witaj"
21
+ reset_password_first_paragraph: "Wysłano prośbę o zresetowanie hasła. Aby zresetować hasło kliknij w poniższy link."
22
+ reset_password_second_paragraph: "Jeśli nie Ty wysłałeś tę prośbę, prosimy o zignorowanie tego maila."
23
+ reset_password_third_paragraph: "Twoje hasło nie zmieni się dopóki nie ustawisz nowego."
18
24
  confirmation_instructions:
19
25
  subject: Instrukcja aktywacji konta
20
26
  reset_password_instructions:
@@ -26,7 +32,7 @@ pl:
26
32
  success: Logowanie przez konto %{kind} zakończyło się sukcesem.
27
33
  passwords:
28
34
  no_token: Do tej strony możesz dostać się tylko poprzez wiadomość e-mail resetującą hasło. Jeśli to z niej tu trafiłeś, upewnij się, że użyłeś pełnego adresu.
29
- send_instructions: Instrukcja zmiany hasła zostanie niezwłocznie wysłana na podany adres e-mail.
35
+ send_instructions: Instrukcja zmiany hasła zostanie wysłana na podany adres e-mail.
30
36
  send_paranoid_instructions: Jeśli Twój adres e-mail istnieje w naszej bazie, otrzymasz zaraz wiadomość z instrukcjami odzyskiwania hasła.
31
37
  updated: Hasło zmienione poprawnie. Zostałeś automatycznie zalogowany.
32
38
  updated_not_active: Hasło zmienione poprawnie.
@@ -298,8 +298,8 @@ en:
298
298
  not_deleted: "Menu <strong>'%{title}'</strong> has NOT beed deleted"
299
299
  index_title: Menu management
300
300
  index_add_new: Add menu element
301
- new_title: "New menu element"
302
301
  index_add_new_menu_position: Add menu position
302
+ new_title: "New menu element"
303
303
  edit_title: "Edit menu element"
304
304
  copy_title: "Copy menu element"
305
305
  save: Save
@@ -683,6 +683,7 @@ en:
683
683
  display_from: Displayed from
684
684
  display_to: Displayed to
685
685
  title: Title
686
+ subtitle: "Subtitle"
686
687
  type: Type
687
688
  updated_at: Updated at
688
689
  lang_id: Language
@@ -695,6 +696,7 @@ en:
695
696
  display_from: Displayed from
696
697
  display_to: Displayed to
697
698
  title: Title
699
+ subtitle: "Subtitle"
698
700
  type: Type
699
701
  updated_at: Updated at
700
702
  lang_id: Language
@@ -707,6 +709,7 @@ en:
707
709
  display_from: Displayed from
708
710
  display_to: Displayed to
709
711
  title: Title
712
+ subtitle: "Subtitle"
710
713
  type: Type
711
714
  updated_at: Updated at
712
715
  lang_id: Language
@@ -726,6 +729,7 @@ en:
726
729
  active: Active
727
730
  content: Content
728
731
  title: Title
732
+ subtitle: "Subtitle"
729
733
  type: Type
730
734
  updated_at: Updated at
731
735
  lang_id: Language
@@ -744,6 +748,7 @@ en:
744
748
  display_from: Displayed from
745
749
  display_to: Displayed to
746
750
  title: Title
751
+ subtitle: "Subtitle"
747
752
  module_positions: Positions
748
753
  always_displayed: Always displayed
749
754
  updated_at: Updated at
@@ -792,7 +797,11 @@ en:
792
797
  mokio/menu:
793
798
  lang_id: Language
794
799
  name: Name
800
+ subtitle: "Subtitle"
795
801
  external_link: Url
802
+ css_class: "Menu CSS class"
803
+ css_body_class: "Page CSS class"
804
+ main_pic: "thumbnail"
796
805
  active: Active
797
806
  visible: Visible
798
807
  description: Description
@@ -658,6 +658,8 @@ pl:
658
658
  taken: Podany adres e-mail jest już zajęty
659
659
  blank: Proszę wpisać adres email
660
660
  invalid: Podano nieprawidłowy adres e-mail
661
+ reset_password_token:
662
+ invalid: "Niepoprawny token."
661
663
  editable:
662
664
  not_permitted: Edycja niedozwolona
663
665
  messages:
@@ -683,6 +685,7 @@ pl:
683
685
  display_from: Wyświetlany od
684
686
  display_to: Wyświetlany do
685
687
  title: Tytuł
688
+ subtitle: "Podtytuł"
686
689
  type: Typ
687
690
  updated_at: Ostatnio edytowany
688
691
  lang_id: Język
@@ -695,6 +698,7 @@ pl:
695
698
  display_from: Wyświetlany od
696
699
  display_to: Wyświetlany do
697
700
  title: Tytuł
701
+ subtitle: "Podtytuł"
698
702
  type: Typ
699
703
  updated_at: Ostatnio edytowany
700
704
  lang_id: Język
@@ -707,6 +711,7 @@ pl:
707
711
  display_from: Wyświetlany od
708
712
  display_to: Wyświetlany do
709
713
  title: Tytuł
714
+ subtitle: "Podtytuł"
710
715
  type: Typ
711
716
  updated_at: Ostatnio edytowany
712
717
  lang_id: Język
@@ -726,6 +731,7 @@ pl:
726
731
  active: Włączona
727
732
  content: Treść
728
733
  title: Tytuł
734
+ subtitle: "Podtytuł"
729
735
  type: Typ
730
736
  updated_at: Ostatnio edytowany
731
737
  lang_id: Język
@@ -744,6 +750,7 @@ pl:
744
750
  display_from: Wyświetlany od
745
751
  display_to: Wyświetlany do
746
752
  title: Tytuł
753
+ subtitle: "Podtytuł"
747
754
  module_positions: Pozycje bloku
748
755
  always_displayed: Wyświetlany zawsze
749
756
  updated_at: Ostatnio edytowany
@@ -792,7 +799,11 @@ pl:
792
799
  mokio/menu:
793
800
  lang_id: Język
794
801
  name: Nazwa
802
+ subtitle: "Podtytuł"
795
803
  external_link: Url
804
+ css_class: "Klasa CSS menu"
805
+ css_body_class: "Klasa CSS strony"
806
+ main_pic: "Miniaturka"
796
807
  active: Włączony
797
808
  visible: Widoczny
798
809
  description: Opis
@@ -1,7 +1,9 @@
1
1
  Mokio::Engine.routes.draw do
2
2
  root to: "dashboard#show"
3
- devise_for :users, class_name: "Mokio::User", module: :devise
4
-
3
+ devise_for :users, :controllers => { :passwords => "passwords" }, class_name: "Mokio::User", skip: [:sessions]
4
+ devise_for :users, class_name: "Mokio::User", module: :devise, skip: [:passwords]
5
+
6
+
5
7
  #
6
8
  # menus routes
7
9
  #
@@ -0,0 +1,7 @@
1
+ class AddSubtitleToContents < ActiveRecord::Migration
2
+ def change
3
+ add_column :mokio_contents, :subtitle, :text, :after => :title
4
+ add_column :mokio_menus, :subtitle, :text, :after => :name
5
+ add_column :mokio_static_modules, :subtitle, :text, :after => :title
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ class AddMainPicToMokioMenu < ActiveRecord::Migration
2
+ def change
3
+ add_column :mokio_menus, :main_pic, :string
4
+ end
5
+ end
@@ -22,7 +22,7 @@ module Mokio
22
22
  # Never trust parameters from the scary internet, only allow the white list through.
23
23
  #
24
24
  def article_params #:doc:
25
- params.require(:article).permit( extended_parameters, :title, :intro, :content, :article_type, :home_page, :tpl, :contact, :active, :seq, :lang_id,
25
+ params.require(:article).permit( extended_parameters, :title, :subtitle, :intro, :content, :article_type, :home_page, :tpl, :contact, :active, :seq, :lang_id,
26
26
  :gallery_type, :display_from, :display_to, :main_pic, :tag_list, :menu_ids => [], :data_files_attributes => [:data_file, :main_pic, :id, :remove_data_file]
27
27
  )
28
28
  end
@@ -28,7 +28,7 @@ module Mokio
28
28
  # Never trust parameters from the scary internet, only allow the white list through.
29
29
  #
30
30
  def contact_params #:doc:
31
- params.require(:contact).permit(extended_parameters, :title, :intro, :content, :article_type, :contact, :active,:home_page, :lang_id, :recipient_emails, :menu_ids => [], :contact_template_attributes => Mokio::ContactTemplate.contact_template_attributes)
31
+ params.require(:contact).permit(extended_parameters, :title, :subtitle, :intro, :content, :article_type, :contact, :active,:home_page, :lang_id, :recipient_emails, :menu_ids => [], :contact_template_attributes => Mokio::ContactTemplate.contact_template_attributes)
32
32
  end
33
33
  end
34
34
  end
@@ -169,7 +169,7 @@ module Mokio
169
169
  # Never trust parameters from the scary internet, only allow the white list through.
170
170
  #
171
171
  def menu_params #:doc:
172
- params[:menu].permit(:name, :seq, :target, :external_link, :follow, :parent_id, :active, :visible, :description, :lang_id, :fake, :content_ids => [],:available_module_ids => [],
172
+ params[:menu].permit(:name, :subtitle, :seq, :target, :external_link, :css_class, :css_body_class, :main_pic, :follow, :parent_id, :active, :visible, :description, :lang_id, :fake, :content_ids => [],:available_module_ids => [],
173
173
  :meta_attributes => Mokio::Meta.meta_attributes)
174
174
  end
175
175
  end
@@ -39,7 +39,7 @@ module Mokio
39
39
  # Never trust parameters from the scary internet, only allow the white list through.
40
40
  #
41
41
  def mov_gallery_params #:doc:
42
- params.require(:mov_gallery).permit(:title, :type, :active, :home_page ,:intro, :content, :display_from, :display_to, :lang_id, :main_pic, :tag_list, :menu_ids => [], :data_file => [],
42
+ params.require(:mov_gallery).permit(:title, :subtitle, :type, :active, :home_page ,:intro, :content, :display_from, :display_to, :lang_id, :main_pic, :tag_list, :menu_ids => [], :data_file => [],
43
43
  :meta_attributes => Mokio::Meta.meta_attributes)
44
44
  end
45
45
  end
@@ -39,7 +39,7 @@ module Mokio
39
39
  # Never trust parameters from the scary internet, only allow the white list through.
40
40
  #
41
41
  def pic_gallery_params #:doc:
42
- params.require(:pic_gallery).permit(:title, :type, :active,:home_page, :intro, :content, :display_from, :display_to, :lang_id, :main_pic, :tag_list, :menu_ids => [], :data_file => [],
42
+ params.require(:pic_gallery).permit(:title, :subtitle, :type, :active,:home_page, :intro, :content, :display_from, :display_to, :lang_id, :main_pic, :tag_list, :menu_ids => [], :data_file => [],
43
43
  :meta_attributes => Mokio::Meta.meta_attributes)
44
44
  end
45
45
  end
@@ -20,7 +20,7 @@ module Mokio
20
20
  # Never trust parameters from the scary internet, only allow the white list through.
21
21
  #
22
22
  def static_module_params #:doc:
23
- params[:static_module].permit(:title, :content, :intro, :active, :always_displayed, :display_from, :display_to, :lang_id, { :module_position_ids => [] })
23
+ params[:static_module].permit(:title, :subtitle, :content, :intro, :active, :always_displayed, :display_from, :display_to, :lang_id, { :module_position_ids => [] })
24
24
  end
25
25
  end
26
26
  end
@@ -22,6 +22,8 @@ module Mokio
22
22
  belongs_to :lang
23
23
  belongs_to :meta, :dependent => :destroy
24
24
 
25
+ mount_uploader :main_pic, Mokio::MainPicUploader
26
+
25
27
  has_many :content_links, -> {order('mokio_content_links.seq')}, :dependent => :destroy
26
28
  has_many :contents, -> {order('mokio_content_links.seq')}, :through => :content_links
27
29
  has_many :selected_modules, -> {order('mokio_selected_modules.seq')}
@@ -51,6 +51,13 @@ module Mokio
51
51
  text :email
52
52
  end
53
53
  end
54
+
55
+ # Overwrite devise-3.4.1/lib/devise/models/recoverable.rb to force check password is filled
56
+ def reset_password!(new_password, new_password_confirmation)
57
+ self.only_password=true
58
+ super
59
+ end
60
+
54
61
  end
55
62
 
56
63
  module ClassMethods
@@ -2,5 +2,5 @@ module Mokio
2
2
  #
3
3
  # Actual Mokio version
4
4
  #
5
- VERSION = "0.0.12"
5
+ VERSION = "0.0.13"
6
6
  end
@@ -156,7 +156,7 @@ module Mokio
156
156
  end
157
157
 
158
158
  it "assigns photo id to @id" do
159
- assigns(:id).should eq(@photo.id.to_s)
159
+ assigns(:id).should eq(@photo.slug)
160
160
  end
161
161
  end
162
162
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mokio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - versoft
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-09 00:00:00.000000000 Z
11
+ date: 2015-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -200,20 +200,14 @@ dependencies:
200
200
  name: jquery-fileupload-rails
201
201
  requirement: !ruby/object:Gem::Requirement
202
202
  requirements:
203
- - - "~>"
204
- - !ruby/object:Gem::Version
205
- version: '0.4'
206
- - - ">="
203
+ - - '='
207
204
  - !ruby/object:Gem::Version
208
205
  version: 0.4.1
209
206
  type: :runtime
210
207
  prerelease: false
211
208
  version_requirements: !ruby/object:Gem::Requirement
212
209
  requirements:
213
- - - "~>"
214
- - !ruby/object:Gem::Version
215
- version: '0.4'
216
- - - ">="
210
+ - - '='
217
211
  - !ruby/object:Gem::Version
218
212
  version: 0.4.1
219
213
  - !ruby/object:Gem::Dependency
@@ -1260,6 +1254,7 @@ files:
1260
1254
  - app/controllers/mokio/static_modules_controller.rb
1261
1255
  - app/controllers/mokio/users_controller.rb
1262
1256
  - app/controllers/mokio/youtubes_controller.rb
1257
+ - app/controllers/passwords_controller.rb
1263
1258
  - app/datatables/commons_datatable.rb
1264
1259
  - app/helpers/mokio/backend/application_helper.rb
1265
1260
  - app/helpers/mokio/backend/backend_helper.rb
@@ -1300,8 +1295,11 @@ files:
1300
1295
  - app/uploaders/mokio/data_file_uploader.rb
1301
1296
  - app/uploaders/mokio/main_pic_uploader.rb
1302
1297
  - app/uploaders/mokio/thumb_uploader.rb
1298
+ - app/views/devise/mailer/reset_password_instructions.slim
1303
1299
  - app/views/devise/passwords/edit.html.erb
1300
+ - app/views/devise/passwords/edit.html.haml
1304
1301
  - app/views/devise/passwords/new.html.erb
1302
+ - app/views/devise/passwords/new.html.haml
1305
1303
  - app/views/devise/registrations/edit.html.erb
1306
1304
  - app/views/devise/registrations/new.html.haml
1307
1305
  - app/views/devise/sessions/new.html.haml
@@ -1463,6 +1461,8 @@ files:
1463
1461
  - db/migrate/20141024131942_migrate_external_codes_to_external_scripts.rb
1464
1462
  - db/migrate/20141209072051_change_data_type_for_display_dates.rb
1465
1463
  - db/migrate/20141209101853_add_menu_css_options.rb
1464
+ - db/migrate/20150220071158_add_subtitle_to_contents.rb
1465
+ - db/migrate/20150220091326_add_main_pic_to_mokio_menu.rb
1466
1466
  - lib/generators/mokio/copy/assets_generator.rb
1467
1467
  - lib/generators/mokio/copy/views_generator.rb
1468
1468
  - lib/generators/mokio/ga_script_generator.rb