mokio 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/backend.css.scss +3 -1
- data/app/assets/stylesheets/backend/custom.css.scss +45 -30
- data/app/assets/stylesheets/backend/menu.css.scss +7 -0
- data/app/controllers/mokio/base_articles_controller.rb +3 -0
- data/app/controllers/mokio/base_contacts_controller.rb +5 -0
- data/app/controllers/mokio/base_contents_controller.rb +3 -0
- data/app/controllers/mokio/base_mov_galleries_controller.rb +3 -0
- data/app/controllers/mokio/base_pic_galleries_controller.rb +4 -0
- data/app/controllers/mokio/support_controller.rb +11 -0
- data/app/controllers/passwords_controller.rb +6 -0
- data/app/models/mokio/base_article.rb +29 -0
- data/app/models/mokio/base_contact.rb +30 -0
- data/app/models/mokio/base_content.rb +5 -0
- data/app/models/mokio/base_mov_gallery.rb +30 -0
- data/app/models/mokio/base_pic_gallery.rb +30 -0
- data/app/models/mokio/support.rb +29 -0
- data/app/uploaders/ckeditor_attachment_file_uploader.rb +1 -1
- data/app/views/devise/sessions/new.html.haml +0 -1
- data/app/views/mokio/articles/_form.html.slim +3 -2
- data/app/views/mokio/base_articles/_multi_lang_form.html.slim +18 -0
- data/app/views/mokio/base_contacts/_multi_lang_form.html.slim +48 -0
- data/app/views/mokio/base_contents/update_content_form.js.slim +1 -0
- data/app/views/mokio/base_pic_galleries/_multi_lang_form.html.slim +13 -0
- data/app/views/mokio/common/_main_pic.html.slim +3 -1
- data/app/views/mokio/common/_multi_lang_gmap.html.slim +41 -0
- data/app/views/mokio/common/_multi_lang_meta.html.slim +50 -0
- data/app/views/mokio/common/edit.html.slim +5 -1
- data/app/views/mokio/common/multi_lang_form_content.html.slim +56 -0
- data/app/views/mokio/common/new.html.slim +4 -1
- data/app/views/mokio/contacts/_form.html.slim +2 -1
- data/app/views/mokio/contents/_common.slim +2 -0
- data/app/views/mokio/contents/delete_main_pic.js.slim +1 -0
- data/app/views/mokio/contents/new.html.slim +50 -0
- data/app/views/mokio/data_files/_file_upload.html.erb +8 -1
- data/app/views/mokio/layout/_user_widget.html.slim +4 -0
- data/app/views/mokio/layout/sidebar.html.slim +19 -9
- data/app/views/mokio/layout/sidebar_support.html.slim +4 -0
- data/app/views/mokio/menus/_form.html.haml +13 -5
- data/app/views/mokio/menus/_menu.html.slim +1 -1
- data/app/views/mokio/mov_galleries/_form_inputs.html.slim +5 -4
- data/app/views/mokio/pic_galleries/_form.html.slim +1 -1
- data/app/views/mokio/pic_galleries/_form_inputs.html.slim +5 -5
- data/app/views/mokio/support/index.html.slim +23 -0
- data/app/views/mokio/users/_form.html.slim +2 -0
- data/app/views/mokio/youtubes/_gallery.html.slim +9 -10
- data/app/views/mokio/youtubes/_search_yt.html.slim +8 -9
- data/config/locales/en.yml +24 -0
- data/config/locales/pl.yml +48 -1
- data/config/routes.rb +63 -2
- data/config/views.yml +4 -0
- data/db/migrate/20150408074951_create_mokio_base_contents.rb +17 -0
- data/db/migrate/20150408075454_add_base_content_id_to_mokio_contents.mokio.rb +6 -0
- data/db/migrate/20150414054139_add_name_to_mokio_users.rb +6 -0
- data/db/migrate/20150414070406_add_author_and_editor_to_mokio_content.rb +6 -0
- data/db/migrate/20150528104851_add_base_content_id_to_mokio_data_files.rb +5 -0
- data/lib/generators/mokio/btr_generator.rb +11 -0
- data/lib/generators/mokio/contents_generator.rb +58 -0
- data/lib/generators/mokio/templates/contents/_form.html.slim +15 -0
- data/lib/generators/mokio/templates/contents/_sidebar_btn.html.slim +1 -0
- data/lib/generators/mokio/templates/contents/controller.rb +23 -0
- data/lib/generators/mokio/templates/contents/model.rb +24 -0
- data/lib/generators/mokio/templates/contents/views_template.yml +6 -0
- data/lib/generators/mokio/templates/mokio.rb +32 -0
- data/lib/generators/mokio/templates/translations/backend_example.yml +57 -0
- data/lib/mokio.rb +13 -2
- data/lib/mokio/concerns.rb +15 -1
- data/lib/mokio/concerns/common/controller_functions.rb +19 -1
- data/lib/mokio/concerns/common/controller_object.rb +2 -2
- data/lib/mokio/concerns/controllers/application.rb +32 -3
- data/lib/mokio/concerns/controllers/articles.rb +39 -3
- data/lib/mokio/concerns/controllers/base.rb +1 -0
- data/lib/mokio/concerns/controllers/base_articles.rb +31 -0
- data/lib/mokio/concerns/controllers/base_contacts.rb +32 -0
- data/lib/mokio/concerns/controllers/base_contents.rb +167 -0
- data/lib/mokio/concerns/controllers/base_mov_galleries.rb +48 -0
- data/lib/mokio/concerns/controllers/base_pic_galleries.rb +32 -0
- data/lib/mokio/concerns/controllers/common.rb +7 -8
- data/lib/mokio/concerns/controllers/contacts.rb +39 -1
- data/lib/mokio/concerns/controllers/contents.rb +1 -0
- data/lib/mokio/concerns/controllers/main_pics.rb +32 -0
- data/lib/mokio/concerns/controllers/menus.rb +3 -2
- data/lib/mokio/concerns/controllers/mov_galleries.rb +19 -3
- data/lib/mokio/concerns/controllers/photos.rb +1 -1
- data/lib/mokio/concerns/controllers/pic_galleries.rb +18 -3
- data/lib/mokio/concerns/models/article.rb +1 -0
- data/lib/mokio/concerns/models/base_article.rb +21 -0
- data/lib/mokio/concerns/models/base_contact.rb +36 -0
- data/lib/mokio/concerns/models/base_content.rb +51 -0
- data/lib/mokio/concerns/models/base_mov_gallery.rb +19 -0
- data/lib/mokio/concerns/models/base_pic_gallery.rb +22 -0
- data/lib/mokio/concerns/models/common.rb +1 -1
- data/lib/mokio/concerns/models/contact_template.rb +4 -0
- data/lib/mokio/concerns/models/content.rb +12 -0
- data/lib/mokio/concerns/models/data_file.rb +9 -3
- data/lib/mokio/concerns/models/lang.rb +1 -1
- data/lib/mokio/concerns/models/recipient.rb +2 -0
- data/lib/mokio/concerns/models/user.rb +5 -1
- data/lib/mokio/frontend_helpers/menu_helper.rb +17 -8
- data/lib/mokio/version.rb +1 -1
- data/spec/dummy/config/routes.rb +2 -0
- metadata +55 -11
- data/app/views/devise/passwords/edit.html.erb +0 -19
- data/app/views/devise/passwords/new.html.erb +0 -15
- data/app/views/mokio/menus/sort.html.slim +0 -1
- data/spec/dummy/config/views.yml +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a2f828a14284c71da74123472dba734e06d96d9
|
|
4
|
+
data.tar.gz: c5320526c39917236203aa006823e1c106646f22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5805ad6e9465a121b0e910b2801ecdb30474bb3c1fb04536cdb7648b895ccbd6afe331d45e5e0a4f982669dae26a8c6c126a99e2ccd7faa775423e089abed654
|
|
7
|
+
data.tar.gz: edeefa6e2a66281dfa6b21d190c45d4d7faf1124f763020d6d0d4f2e838a0cac972d100c3a303097959c997326c04d5db1978253149523ae61053255ad3ac512
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// ========================================
|
|
2
2
|
// scss variables
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
//
|
|
4
|
+
$layout-z-index: 1050;
|
|
5
|
+
$default-opacity: 0.8;
|
|
6
6
|
//
|
|
7
7
|
// ========================================
|
|
8
8
|
.content {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
.edit_view_img {
|
|
31
31
|
border: 1px solid #CCCCCC;
|
|
32
|
-
}
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
.buttons {
|
|
35
35
|
margin-top: 5px;
|
|
@@ -55,16 +55,16 @@ button.uploader {
|
|
|
55
55
|
overflow: auto;
|
|
56
56
|
|
|
57
57
|
li {
|
|
58
|
-
// width: 150px;
|
|
59
|
-
// height: 150px;
|
|
58
|
+
// width: 150px;
|
|
59
|
+
// height: 150px;
|
|
60
60
|
margin-left: 2px !important;
|
|
61
61
|
margin-right: -3px !important;
|
|
62
62
|
vertical-align: top;
|
|
63
63
|
padding: 5px;
|
|
64
64
|
|
|
65
65
|
img {
|
|
66
|
-
// width: 140px;
|
|
67
|
-
// height: 140px;
|
|
66
|
+
// width: 140px;
|
|
67
|
+
// height: 140px;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.dragable {
|
|
@@ -108,16 +108,16 @@ button.uploader {
|
|
|
108
108
|
overflow: auto;
|
|
109
109
|
|
|
110
110
|
li {
|
|
111
|
-
// width: 318px;
|
|
112
|
-
// height: 189px;
|
|
111
|
+
// width: 318px;
|
|
112
|
+
// height: 189px;
|
|
113
113
|
margin-left: 2px !important;
|
|
114
114
|
margin-right: -3px !important;
|
|
115
115
|
vertical-align: top;
|
|
116
116
|
padding: 5px;
|
|
117
117
|
|
|
118
118
|
img {
|
|
119
|
-
// width: 308px;
|
|
120
|
-
// height: 173px;
|
|
119
|
+
// width: 308px;
|
|
120
|
+
// height: 173px;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.dragable {
|
|
@@ -161,20 +161,21 @@ input.btn[type="submit"] {
|
|
|
161
161
|
|
|
162
162
|
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
169
|
|
|
170
170
|
// 20.02.2015 mz
|
|
171
|
-
.ui-state-highlight {
|
|
171
|
+
.drag_wrapper > .ui-state-highlight {
|
|
172
172
|
min-width: 114px;
|
|
173
|
+
min-height: 94px;
|
|
173
174
|
background-color: #F5F5F5 !important;
|
|
174
175
|
border: 1px dashed #E5E5E5 !important;
|
|
175
176
|
box-shadow: 0 1px 0 rgba(229,229,229,0.1) !important;
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
|
|
178
|
+
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
#FlashInfo {
|
|
@@ -299,7 +300,7 @@ input.btn[type="submit"] {
|
|
|
299
300
|
|
|
300
301
|
img {
|
|
301
302
|
height: 400px;
|
|
302
|
-
width: 450px;
|
|
303
|
+
width: 450px;
|
|
303
304
|
}
|
|
304
305
|
|
|
305
306
|
h5 {
|
|
@@ -356,11 +357,11 @@ input.btn[type="submit"] {
|
|
|
356
357
|
|
|
357
358
|
a { margin-bottom: 20px; }
|
|
358
359
|
a:hover { text-decoration: none !important; }
|
|
359
|
-
|
|
360
|
+
|
|
360
361
|
span {
|
|
361
362
|
margin-left: 35px;
|
|
362
363
|
margin-top: 20px;
|
|
363
|
-
cursor: pointer;
|
|
364
|
+
cursor: pointer;
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
367
|
}
|
|
@@ -442,7 +443,7 @@ input.btn[type="submit"] {
|
|
|
442
443
|
img { max-width: none; }
|
|
443
444
|
}
|
|
444
445
|
|
|
445
|
-
.jcrop-holder {
|
|
446
|
+
.jcrop-holder {
|
|
446
447
|
border: 2px solid #FFFFFF;
|
|
447
448
|
margin: 0 auto;
|
|
448
449
|
}
|
|
@@ -529,22 +530,22 @@ input.btn[type="submit"] {
|
|
|
529
530
|
.select2-container { width: 92%; }
|
|
530
531
|
|
|
531
532
|
h3 small {
|
|
532
|
-
|
|
533
|
+
font-size: 12px;
|
|
533
534
|
}
|
|
534
535
|
}
|
|
535
|
-
.box-form2 {
|
|
536
|
+
.box-form2 {
|
|
536
537
|
position: absolute;
|
|
537
538
|
right: 45px;
|
|
538
539
|
top: -55px;
|
|
539
540
|
}
|
|
540
|
-
.box-form3 {
|
|
541
|
+
.box-form3 {
|
|
541
542
|
position: absolute;
|
|
542
543
|
right: 195px;
|
|
543
544
|
top: -55px;
|
|
544
545
|
box-shadow: none;
|
|
545
546
|
}
|
|
546
547
|
|
|
547
|
-
.box-form-gmap {
|
|
548
|
+
.box-form-gmap {
|
|
548
549
|
position: absolute;
|
|
549
550
|
right: 318px;
|
|
550
551
|
top: -55px;
|
|
@@ -554,8 +555,8 @@ input.btn[type="submit"] {
|
|
|
554
555
|
#gmap_modal {
|
|
555
556
|
.gmap_full_address { margin: 0 auto;}
|
|
556
557
|
.hidden_elements { display: none !important;}
|
|
557
|
-
#map {
|
|
558
|
-
width: 100%;
|
|
558
|
+
#map {
|
|
559
|
+
width: 100%;
|
|
559
560
|
height: 350px;
|
|
560
561
|
img { max-width: none; height: auto; }
|
|
561
562
|
}
|
|
@@ -675,4 +676,18 @@ select[multiple] {
|
|
|
675
676
|
.drag_wrapper {
|
|
676
677
|
min-height:100px;
|
|
677
678
|
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.delete-mainpic-button {
|
|
682
|
+
vertical-align: top;
|
|
683
|
+
margin-left: -35px;
|
|
684
|
+
margin-top: 5px;
|
|
685
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
686
|
+
padding: 1px 4px;
|
|
687
|
+
border-radius: 2px;
|
|
688
|
+
color: rgba(255, 255, 255, 0.9)
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.delete-mainpic-button:hover {
|
|
692
|
+
color: rgba(255, 255, 255, 1)
|
|
678
693
|
}
|
|
@@ -250,6 +250,13 @@ $inactive_color: #dddddd;
|
|
|
250
250
|
font-weight: 700;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
.no_content {
|
|
254
|
+
display: inline-block;
|
|
255
|
+
margin: 0 5px 0 0;
|
|
256
|
+
text-align: center;
|
|
257
|
+
width: 15px;
|
|
258
|
+
}
|
|
259
|
+
|
|
253
260
|
.displayed_false {
|
|
254
261
|
// color:$inactive_color ;
|
|
255
262
|
text-decoration: line-through;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
class PasswordsController < Devise::PasswordsController
|
|
2
|
+
before_filter :set_mailer_host
|
|
3
|
+
|
|
4
|
+
def set_mailer_host
|
|
5
|
+
ActionMailer::Base.default_url_options[:host] = request.host_with_port
|
|
6
|
+
end
|
|
7
|
+
|
|
2
8
|
protected
|
|
3
9
|
def after_sending_reset_password_instructions_path_for(resource_name)
|
|
4
10
|
flash[:alert]=t("devise.passwords.send_instructions")
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# == Schema Information
|
|
2
|
+
#
|
|
3
|
+
# Table name: contents
|
|
4
|
+
#
|
|
5
|
+
# id :integer not null, primary key
|
|
6
|
+
# title :string(255)
|
|
7
|
+
# intro :text
|
|
8
|
+
# content :text
|
|
9
|
+
# type :string(255)
|
|
10
|
+
# home_page :boolean
|
|
11
|
+
# tpl :string(255)
|
|
12
|
+
# contact :boolean
|
|
13
|
+
# active :boolean default(TRUE)
|
|
14
|
+
# lang_id :integer
|
|
15
|
+
# gallery_type :string(255)
|
|
16
|
+
# editable :boolean default(TRUE)
|
|
17
|
+
# deletable :boolean default(TRUE)
|
|
18
|
+
# display_from :date
|
|
19
|
+
# display_to :date
|
|
20
|
+
# created_at :datetime
|
|
21
|
+
# updated_at :datetime
|
|
22
|
+
# meta_id :integer
|
|
23
|
+
# gmap_id :integer
|
|
24
|
+
#
|
|
25
|
+
module Mokio
|
|
26
|
+
class BaseArticle < BaseContent
|
|
27
|
+
include Mokio::Concerns::Models::BaseArticle
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# == Schema Information
|
|
2
|
+
#
|
|
3
|
+
# Table name: contents
|
|
4
|
+
#
|
|
5
|
+
# id :integer not null, primary key
|
|
6
|
+
# title :string(255)
|
|
7
|
+
# subtitle :text
|
|
8
|
+
# intro :text
|
|
9
|
+
# content :text
|
|
10
|
+
# type :string(255)
|
|
11
|
+
# home_page :boolean
|
|
12
|
+
# tpl :string(255)
|
|
13
|
+
# contact :boolean
|
|
14
|
+
# active :boolean default(TRUE)
|
|
15
|
+
# lang_id :integer
|
|
16
|
+
# gallery_type :string(255)
|
|
17
|
+
# editable :boolean default(TRUE)
|
|
18
|
+
# deletable :boolean default(TRUE)
|
|
19
|
+
# display_from :date
|
|
20
|
+
# display_to :date
|
|
21
|
+
# created_at :datetime
|
|
22
|
+
# updated_at :datetime
|
|
23
|
+
# meta_id :integer
|
|
24
|
+
# gmap_id :integer
|
|
25
|
+
#
|
|
26
|
+
module Mokio
|
|
27
|
+
class BaseContact < BaseContent
|
|
28
|
+
include Mokio::Concerns::Models::BaseContact
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# == Schema Information
|
|
2
|
+
#
|
|
3
|
+
# Table name: contents
|
|
4
|
+
#
|
|
5
|
+
# id :integer not null, primary key
|
|
6
|
+
# title :string(255)
|
|
7
|
+
# subtitle :text
|
|
8
|
+
# intro :text
|
|
9
|
+
# content :text
|
|
10
|
+
# type :string(255)
|
|
11
|
+
# home_page :boolean
|
|
12
|
+
# tpl :string(255)
|
|
13
|
+
# contact :boolean
|
|
14
|
+
# active :boolean default(TRUE)
|
|
15
|
+
# lang_id :integer
|
|
16
|
+
# gallery_type :string(255)
|
|
17
|
+
# editable :boolean default(TRUE)
|
|
18
|
+
# deletable :boolean default(TRUE)
|
|
19
|
+
# display_from :date
|
|
20
|
+
# display_to :date
|
|
21
|
+
# created_at :datetime
|
|
22
|
+
# updated_at :datetime
|
|
23
|
+
# meta_id :integer
|
|
24
|
+
# gmap_id :integer
|
|
25
|
+
#
|
|
26
|
+
module Mokio
|
|
27
|
+
class BaseMovGallery < BaseContent
|
|
28
|
+
include Mokio::Concerns::Models::BaseMovGallery
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# == Schema Information
|
|
2
|
+
#
|
|
3
|
+
# Table name: contents
|
|
4
|
+
#
|
|
5
|
+
# id :integer not null, primary key
|
|
6
|
+
# title :string(255)
|
|
7
|
+
# subtitle :text
|
|
8
|
+
# intro :text
|
|
9
|
+
# content :text
|
|
10
|
+
# type :string(255)
|
|
11
|
+
# home_page :boolean
|
|
12
|
+
# tpl :string(255)
|
|
13
|
+
# contact :boolean
|
|
14
|
+
# active :boolean default(TRUE)
|
|
15
|
+
# lang_id :integer
|
|
16
|
+
# gallery_type :string(255)
|
|
17
|
+
# editable :boolean default(TRUE)
|
|
18
|
+
# deletable :boolean default(TRUE)
|
|
19
|
+
# display_from :date
|
|
20
|
+
# display_to :date
|
|
21
|
+
# created_at :datetime
|
|
22
|
+
# updated_at :datetime
|
|
23
|
+
# meta_id :integer
|
|
24
|
+
# gmap_id :integer
|
|
25
|
+
#
|
|
26
|
+
module Mokio
|
|
27
|
+
class BasePicGallery < BaseContent
|
|
28
|
+
include Mokio::Concerns::Models::BasePicGallery
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# == Schema Information
|
|
2
|
+
#
|
|
3
|
+
# Table name: contents
|
|
4
|
+
#
|
|
5
|
+
# id :integer not null, primary key
|
|
6
|
+
# title :string(255)
|
|
7
|
+
# intro :text
|
|
8
|
+
# content :text
|
|
9
|
+
# type :string(255)
|
|
10
|
+
# home_page :boolean
|
|
11
|
+
# tpl :string(255)
|
|
12
|
+
# contact :boolean
|
|
13
|
+
# active :boolean default(TRUE)
|
|
14
|
+
# lang_id :integer
|
|
15
|
+
# gallery_type :string(255)
|
|
16
|
+
# editable :boolean default(TRUE)
|
|
17
|
+
# deletable :boolean default(TRUE)
|
|
18
|
+
# display_from :date
|
|
19
|
+
# display_to :date
|
|
20
|
+
# created_at :datetime
|
|
21
|
+
# updated_at :datetime
|
|
22
|
+
# meta_id :integer
|
|
23
|
+
# gmap_id :integer
|
|
24
|
+
#
|
|
25
|
+
module Mokio
|
|
26
|
+
class Support < ActiveRecord::Base
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -31,6 +31,6 @@ class CkeditorAttachmentFileUploader < CarrierWave::Uploader::Base
|
|
|
31
31
|
# Add a white list of extensions which are allowed to be uploaded.
|
|
32
32
|
# For images you might use something like this:
|
|
33
33
|
def extension_white_list
|
|
34
|
-
Ckeditor.attachment_file_types
|
|
34
|
+
Ckeditor.attachment_file_types + Ckeditor.image_file_types
|
|
35
35
|
end
|
|
36
36
|
end
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
= render :partial => "mokio/common/main_pic", locals: {f:f}
|
|
2
|
+
= render :partial => "mokio/contents/common", locals: {f:f}
|
|
2
3
|
= 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')
|
|
3
4
|
= f.input :active, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('active')
|
|
4
5
|
= f.input :home_page, :wrapper => :active_checkbox, disabled: !obj.display_editable_field?('home_page')
|
|
5
6
|
= f.input :title, disabled: !obj.display_editable_field?('title')
|
|
6
7
|
= f.input :subtitle, disabled: !obj.display_editable_field?('subtitle'), :as => :string
|
|
7
|
-
= f.input :intro, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => '
|
|
8
|
-
= f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => '
|
|
8
|
+
= f.input :intro, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Full', :height => 150, :language => I18n.locale} }, disabled: !obj.display_editable_field?('intro')
|
|
9
|
+
= f.input :content, :wrapper => :ckeditor, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Full', :height => 400, :language => I18n.locale} }, disabled: !obj.display_editable_field?('content')
|
|
9
10
|
= 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')
|
|
10
11
|
= f.input :display_to, :wrapper => :date, :as => :string, :input_html => { :class => "mask-date display_to", :value => (localize(f.object.display_to, :format => :datepicker) if f.object.display_to) }, disabled: !obj.display_editable_field?('display_to')
|
|
11
12
|
.row-fluid
|