blueberry_cms 0.1.0 → 0.1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +34 -0
- data/app/assets/javascripts/blueberry_cms/multilingual-tabs.coffee +0 -0
- data/app/assets/javascripts/blueberry_cms/sortable-page-blocks.coffee +14 -0
- data/app/assets/javascripts/blueberry_cms/sortable-pages.coffee +17 -0
- data/app/assets/javascripts/blueberry_cms.coffee +3 -0
- data/app/assets/stylesheets/blueberry_cms/components.sass +39 -0
- data/app/assets/stylesheets/blueberry_cms/multilingual-tabs.sass +44 -0
- data/app/assets/stylesheets/blueberry_cms.sass +1 -0
- data/app/controllers/blueberry_cms/admin/menus_controller.rb +50 -0
- data/app/controllers/blueberry_cms/admin/pages_controller.rb +22 -16
- data/app/controllers/blueberry_cms/root_controller.rb +2 -1
- data/app/decorators/block_decorator.rb +13 -0
- data/app/decorators/blueberry_cms/link_decorator.rb +15 -0
- data/app/decorators/blueberry_cms/page_block_decorator.rb +46 -0
- data/app/decorators/blueberry_cms/page_decorator.rb +7 -0
- data/app/helpers/blueberry_cms/menus_helper.rb +27 -0
- data/app/helpers/blueberry_cms/pages_helper.rb +11 -0
- data/app/models/blueberry_cms/image.rb +19 -0
- data/app/models/blueberry_cms/link.rb +28 -0
- data/app/models/blueberry_cms/menu.rb +19 -0
- data/app/models/blueberry_cms/menu_link.rb +36 -0
- data/app/models/blueberry_cms/page.rb +62 -11
- data/app/models/blueberry_cms/page_block.rb +29 -8
- data/app/models/blueberry_cms/page_blocks/faq.rb +19 -0
- data/app/models/blueberry_cms/page_blocks/gallery.rb +12 -12
- data/app/models/blueberry_cms/page_blocks/links.rb +15 -0
- data/app/models/blueberry_cms/page_blocks/rich_text.rb +4 -15
- data/app/models/blueberry_cms/page_blocks/shared.rb +25 -0
- data/app/models/blueberry_cms/page_blocks/tabs.rb +17 -0
- data/app/models/blueberry_cms/page_blocks/video_gallery.rb +13 -0
- data/app/models/blueberry_cms/question.rb +11 -0
- data/app/models/blueberry_cms/tab.rb +13 -0
- data/app/models/blueberry_cms/video.rb +70 -0
- data/app/models/concerns/blueberry_cms/sortable.rb +25 -0
- data/app/models/custom_render.rb +3 -3
- data/app/views/blueberry_cms/admin/menus/_empty.html.slim +2 -0
- data/app/views/blueberry_cms/admin/menus/_form.html.slim +6 -0
- data/app/views/blueberry_cms/admin/menus/_link_fields.html.slim +30 -0
- data/app/views/blueberry_cms/admin/menus/_menu.html.slim +18 -0
- data/app/views/blueberry_cms/admin/menus/edit.html.slim +15 -0
- data/app/views/blueberry_cms/admin/menus/index.html.slim +26 -0
- data/app/views/blueberry_cms/admin/menus/new.html.slim +15 -0
- data/app/views/blueberry_cms/admin/page_blocks/_faq.html.slim +15 -0
- data/app/views/blueberry_cms/admin/page_blocks/_faq_questions_fields.slim +24 -0
- data/app/views/blueberry_cms/admin/page_blocks/_form.html.slim +18 -0
- data/app/views/blueberry_cms/admin/page_blocks/_gallery.html.slim +16 -0
- data/app/views/blueberry_cms/admin/page_blocks/_gallery_images_fields.html.slim +14 -0
- data/app/views/blueberry_cms/admin/page_blocks/_links.html.slim +25 -0
- data/app/views/blueberry_cms/admin/page_blocks/_links_links_fields.slim +23 -0
- data/app/views/blueberry_cms/admin/page_blocks/_richtext.html.slim +30 -0
- data/app/views/blueberry_cms/admin/page_blocks/_shared.html.slim +8 -0
- data/app/views/blueberry_cms/admin/page_blocks/_tabs.html.slim +11 -0
- data/app/views/blueberry_cms/admin/page_blocks/_tabs_tabs_fields.html.slim +24 -0
- data/app/views/blueberry_cms/admin/page_blocks/_videogallery.html.slim +15 -0
- data/app/views/blueberry_cms/admin/page_blocks/_videos_fields.slim +17 -0
- data/app/views/blueberry_cms/admin/pages/_block_fields.html.slim +53 -3
- data/app/views/blueberry_cms/admin/pages/_custom_fields.html.slim +0 -0
- data/app/views/blueberry_cms/admin/pages/_empty.html.slim +2 -0
- data/app/views/blueberry_cms/admin/pages/_form.html.slim +47 -11
- data/app/views/blueberry_cms/admin/pages/_page.html.slim +33 -0
- data/app/views/blueberry_cms/admin/pages/edit.html.slim +12 -3
- data/app/views/blueberry_cms/admin/pages/index.html.slim +6 -27
- data/app/views/blueberry_cms/admin/pages/new.html.slim +9 -1
- data/app/views/blueberry_cms/admin/partials/_form_errors.html.slim +5 -0
- data/app/views/blueberry_cms/page_blocks/_faq.html.slim +19 -0
- data/app/views/blueberry_cms/page_blocks/_form.html.slim +19 -0
- data/app/views/blueberry_cms/page_blocks/_gallery.html.slim +22 -0
- data/app/views/blueberry_cms/page_blocks/_links.html.slim +52 -0
- data/app/views/blueberry_cms/page_blocks/_richtext.html.slim +10 -0
- data/app/views/blueberry_cms/page_blocks/_tabs.html.slim +8 -0
- data/app/views/blueberry_cms/page_blocks/_videogallery.html.slim +27 -0
- data/app/views/blueberry_cms/pages/_blocks.html.slim +5 -0
- data/app/views/blueberry_cms/pages/show.html.slim +9 -8
- data/config/locales/cs.enum.yml +10 -0
- data/config/locales/cs.mongoid.yml +49 -0
- data/config/locales/cs.yml +79 -13
- data/config/routes.rb +6 -2
- data/lib/blueberry_cms/engine.rb +12 -0
- data/lib/blueberry_cms/liquid_tags/page_link.rb +3 -1
- data/lib/blueberry_cms/liquid_tags/page_url.rb +18 -0
- data/lib/blueberry_cms/version.rb +1 -1
- data/lib/blueberry_cms.rb +9 -3
- data/lib/generators/blueberry/templates/image_uploader.rb +31 -0
- data/lib/generators/blueberry/uploader_generator.rb +9 -0
- metadata +184 -10
- data/app/assets/javascripts/blueberry_cms.js +0 -1
- data/app/assets/stylesheets/blueberry_cms/application.css +0 -15
- data/app/models/blueberry_cms/page_blocks/text.rb +0 -21
@@ -0,0 +1,11 @@
|
|
1
|
+
- block_id = "block#{f.object_id}"
|
2
|
+
|
3
|
+
ul.list-inline.list-inline--full-width.sortable aria-dropeffect='move' data-handle='.move-handler' id=block_id
|
4
|
+
= f.simple_fields_for :tabs do |link|
|
5
|
+
= render 'blueberry_cms/admin/page_blocks/tabs_tabs_fields', f: link
|
6
|
+
|
7
|
+
.link
|
8
|
+
=< link_to_add_association t('.add'), f, :tabs,
|
9
|
+
class: 'btn btn-primary',
|
10
|
+
partial: 'blueberry_cms/admin/page_blocks/tabs_tabs_fields',
|
11
|
+
data: { 'association-insertion-node' => "##{block_id}", 'association-insertion-method' => 'append' }
|
@@ -0,0 +1,24 @@
|
|
1
|
+
li.nested-fields.tab class=('hidden' if f.object.marked_for_destruction?)
|
2
|
+
.panel.panel-default
|
3
|
+
- if f.object.persisted?
|
4
|
+
.panel-heading
|
5
|
+
.row
|
6
|
+
.col-sm-1
|
7
|
+
i.glyphicon.glyphicon-resize-vertical.move-handler
|
8
|
+
= f.input :position, as: :hidden
|
9
|
+
.col-sm-5
|
10
|
+
strong = truncate f.object.title
|
11
|
+
.col-sm-6.text-right
|
12
|
+
.panel-actions
|
13
|
+
= link_to "#toggle-#{f.object_id}", data: {toggle: 'collapse'}, aria: {expanded: 'true'}
|
14
|
+
i.glyphicon.glyphicon-resize-small title=t('blueberry_cms.admin.common.collapse')
|
15
|
+
|
16
|
+
.panel-body.collapse class=('in' if block_visible?(f.object)) id="toggle-#{f.object_id}"
|
17
|
+
= f.input :title
|
18
|
+
= f.input :content, as: :text, input_html: { class: 'redactor' }
|
19
|
+
|
20
|
+
hr
|
21
|
+
.form-group--no-label
|
22
|
+
= link_to_remove_association f, class: 'btn btn-danger btn-sm'
|
23
|
+
i.glyphicon.glyphicon-remove
|
24
|
+
=<t('.remove')
|
@@ -0,0 +1,15 @@
|
|
1
|
+
- block_id = "block#{f.object_id}"
|
2
|
+
|
3
|
+
.form-layout
|
4
|
+
- I18n.available_locales.each do |locale|
|
5
|
+
.tab-content class="#{locale}-content"
|
6
|
+
= f.input :content
|
7
|
+
= f.simple_fields_for :content_translations do |localized_field|
|
8
|
+
= localized_field.input locale, input_html: { value: videogallery.content_translations[locale], class: 'redactor' }, as: :text, label: false
|
9
|
+
|
10
|
+
ul.list-inline.videos.sortable aria-dropeffect='move' data-handle='.move-handler' id=block_id
|
11
|
+
= f.simple_fields_for :videos do |video|
|
12
|
+
= render 'blueberry_cms/admin/page_blocks/videos_fields', f: video
|
13
|
+
|
14
|
+
.link
|
15
|
+
=< link_to_add_association t('.add'), f, :videos, class: 'btn btn-primary', partial: 'blueberry_cms/admin/page_blocks/videos_fields', data: { association_insertion_node: "##{block_id}", association_insertion_method: 'append' }
|
@@ -0,0 +1,17 @@
|
|
1
|
+
li.nested-fields.video class=('hidden' if f.object.marked_for_destruction?)
|
2
|
+
.panel.panel-default
|
3
|
+
.panel-heading
|
4
|
+
- if f.object.persisted?
|
5
|
+
i.glyphicon.glyphicon-resize-horizontal.move-handler
|
6
|
+
= f.input :position, as: :hidden
|
7
|
+
|
8
|
+
.panel-body
|
9
|
+
= f.input :title
|
10
|
+
= f.input :job
|
11
|
+
= f.input :movie_url
|
12
|
+
|
13
|
+
hr
|
14
|
+
.form-group--no-label
|
15
|
+
= link_to_remove_association f, class: 'btn btn-danger btn-sm'
|
16
|
+
i.glyphicon.glyphicon-remove
|
17
|
+
=< t('.remove')
|
@@ -1,4 +1,54 @@
|
|
1
|
+
- cannot_destroy = f.object.shared? && f.object.used_for_sharing?
|
2
|
+
|
1
3
|
.nested-fields
|
2
|
-
|
3
|
-
|
4
|
-
|
4
|
+
.panel.panel-default
|
5
|
+
.panel-heading
|
6
|
+
.row
|
7
|
+
.col-sm-6
|
8
|
+
.dragger
|
9
|
+
- unless f.object.new_record?
|
10
|
+
i.glyphicon.glyphicon-resize-vertical
|
11
|
+
= f.input :position, as: :hidden
|
12
|
+
strong = f.object.decorate.label
|
13
|
+
.col-sm-6.text-right
|
14
|
+
.panel-actions
|
15
|
+
= f.input :active, as: :boolean, input_html: { checked: f.object.active == false ? false : true }
|
16
|
+
|
17
|
+
- unless f.object.new_record?
|
18
|
+
= link_to "#toggle-#{f.object_id}", data: { toggle: 'collapse' }, aria: { expanded: 'true' }
|
19
|
+
i.glyphicon.glyphicon-resize-small data-toggle="tooltip" data-placement="left" title=t('blueberry_cms.admin.common.collapse')
|
20
|
+
a aria-controls="collapse-#{f.object_id}" aria-expanded="false" data-toggle="collapse" href="#collapse-#{f.object_id}" role="button"
|
21
|
+
i.glyphicon.glyphicon-cog data-toggle="tooltip" data-placement="left" title=t('blueberry_cms.admin.common.settings')
|
22
|
+
= link_to_remove_association f, class: "#{'prevented' if cannot_destroy }"
|
23
|
+
i.glyphicon.glyphicon-trash data-toggle="tooltip" data-placement="left" title=t("#{'cannot_' if cannot_destroy}remove", scope: 'blueberry_cms.admin.common')
|
24
|
+
|
25
|
+
.collapse.block-collapse class=('in' if block_visible?(f.object)) id="toggle-#{f.object_id}"
|
26
|
+
.panel-body
|
27
|
+
.form-layout
|
28
|
+
= f.input :_type, as: :hidden
|
29
|
+
div.collapse.toggled-collapse id="collapse-#{f.object_id}"
|
30
|
+
- unless f.object.is_a?(BlueberryCMS::PageBlocks::Shared)
|
31
|
+
= f.input :shared, as: :boolean
|
32
|
+
|
33
|
+
= f.input :block_anchor, as: :string
|
34
|
+
.row
|
35
|
+
.col-md-6 = f.input :top_margin, collection: BlueberryCMS::PageBlock::MARGINS,
|
36
|
+
checked: f.object.top_margin || 'sm', as: :radio_buttons,
|
37
|
+
item_wrapper_class: 'radio-inline',
|
38
|
+
label_method: lambda { |label| label.upcase }
|
39
|
+
.col-md-6 = f.input :top_margin_xs, collection: BlueberryCMS::PageBlock::MARGINS,
|
40
|
+
checked: f.object.top_margin_xs || 'sm', as: :radio_buttons,
|
41
|
+
item_wrapper_class: 'radio-inline',
|
42
|
+
label_method: lambda { |label| label.upcase }
|
43
|
+
.row
|
44
|
+
.col-md-6 = f.input :bottom_margin, collection: BlueberryCMS::PageBlock::MARGINS,
|
45
|
+
checked: f.object.bottom_margin || 'sm', as: :radio_buttons,
|
46
|
+
item_wrapper_class: 'radio-inline',
|
47
|
+
label_method: lambda { |label| label.upcase }
|
48
|
+
.col-md-6 = f.input :bottom_margin_xs, collection: BlueberryCMS::PageBlock::MARGINS,
|
49
|
+
checked: f.object.bottom_margin_xs || 'sm', as: :radio_buttons,
|
50
|
+
item_wrapper_class: 'radio-inline',
|
51
|
+
label_method: lambda { |label| label.upcase }
|
52
|
+
hr
|
53
|
+
|
54
|
+
= render f.object, f: f
|
File without changes
|
@@ -1,10 +1,44 @@
|
|
1
|
-
=
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
= render 'blueberry_cms/admin/partials/form_errors', f: f
|
2
|
+
|
3
|
+
.form-layout
|
4
|
+
- I18n.available_locales.each do |locale|
|
5
|
+
.tab-content class="#{locale}-content"
|
6
|
+
= f.input :active
|
7
|
+
= f.simple_fields_for :active_translations do |localized_field|
|
8
|
+
= localized_field.input locale, input_html: { checked: f.object.active_translations[locale] }, as: :boolean, label: false
|
9
|
+
= f.input :name
|
10
|
+
= f.simple_fields_for :name_translations do |localized_field|
|
11
|
+
= localized_field.input locale, input_html: { value: f.object.name_translations[locale] }, label: false, hint: t('.name_hint')
|
12
|
+
- unless f.object.root?
|
13
|
+
= f.input :custom_slug
|
14
|
+
= f.simple_fields_for :custom_slug_translations do |localized_field|
|
15
|
+
= localized_field.input locale, input_html: { value: f.object.custom_slug_translations[locale], placeholder: I18n.with_locale(locale) { f.object.slug_builder.to_url } }, label: false
|
16
|
+
.well = I18n.with_locale(locale) { f.object.to_path}
|
17
|
+
= f.input :meta_title
|
18
|
+
= f.simple_fields_for :meta_title_translations do |localized_field|
|
19
|
+
= localized_field.input locale, input_html: { value: f.object.meta_title_translations[locale] }, label: false
|
20
|
+
= f.input :meta_description
|
21
|
+
= f.simple_fields_for :meta_description_translations do |localized_field|
|
22
|
+
= localized_field.input locale, input_html: { value: f.object.meta_description_translations[locale] }, label: false, as: :text
|
23
|
+
= f.input :meta_keywords
|
24
|
+
= f.simple_fields_for :meta_keywords_translations do |localized_field|
|
25
|
+
= localized_field.input locale, input_html: { value: f.object.meta_keywords_translations[locale] }, label: false
|
26
|
+
|
27
|
+
hr
|
28
|
+
|
29
|
+
.form-layout
|
30
|
+
- unless f.object.persisted? && f.object.root?
|
31
|
+
hr
|
32
|
+
= f.association :parent, collection: nested_set_options(BlueberryCMS::Page, f.object),
|
33
|
+
include_blank: false
|
34
|
+
|
35
|
+
hr
|
36
|
+
|
37
|
+
= f.input :show_in_menu, as: :boolean
|
38
|
+
= f.input :show_in_footer, as: :boolean
|
39
|
+
= render 'custom_fields', f: f
|
40
|
+
|
41
|
+
hr
|
8
42
|
|
9
43
|
h3 = t '.blocks'
|
10
44
|
#blocks
|
@@ -12,7 +46,9 @@ h3 = t '.blocks'
|
|
12
46
|
= render 'block_fields', f: block
|
13
47
|
|
14
48
|
.links
|
15
|
-
-
|
16
|
-
=
|
17
|
-
|
18
|
-
|
49
|
+
.btn-group role="group"
|
50
|
+
span.btn.btn-default = t('.add', type: 'blok')
|
51
|
+
- BlueberryCMS::PageBlock.types.each do |type|
|
52
|
+
=< link_to_add_association type.model_name.human, f, :blocks,
|
53
|
+
wrap_object: Proc.new { |block| block.becomes(type) },
|
54
|
+
class: 'btn btn-primary'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
li data-id=page.id
|
2
|
+
.pages-tree__row
|
3
|
+
.col-icon
|
4
|
+
i.glyphicon.glyphicon-resize-vertical
|
5
|
+
.col-name
|
6
|
+
=> link_to [:edit, :admin, page]
|
7
|
+
strong = page.decorate.name
|
8
|
+
span<
|
9
|
+
i.glyphicon.glyphicon-pencil
|
10
|
+
=< t('.edit')
|
11
|
+
.col-info
|
12
|
+
|
13
|
+
.col-actions
|
14
|
+
= link_to page.to_path, target: :_blank, class: 'btn btn-sm btn-secondary'
|
15
|
+
i.glyphicon.glyphicon-eye-open
|
16
|
+
= t('.preview')
|
17
|
+
'
|
18
|
+
= link_to [:new, :admin, :page, parent_id: page.id], class: 'btn btn-sm btn-default'
|
19
|
+
i.glyphicon.glyphicon-plus
|
20
|
+
= t('.new_child')
|
21
|
+
'
|
22
|
+
|
23
|
+
- if !page.root?
|
24
|
+
= link_to [:admin, page], method: :delete, class: 'btn btn-sm btn-default', data: { confirm: t('blueberry_cms.admin.common.you_sure') }
|
25
|
+
i.glyphicon.glyphicon-remove
|
26
|
+
= t('blueberry_cms.admin.common.destroy')
|
27
|
+
- else
|
28
|
+
= link_to '#', method: :delete, class: 'btn btn-sm btn-default', data: { confirm: t('blueberry_cms.admin.common.you_sure') }, disabled: true
|
29
|
+
i.glyphicon.glyphicon-remove
|
30
|
+
= t('blueberry_cms.admin.common.destroy')
|
31
|
+
|
32
|
+
- if page.children.any?
|
33
|
+
ul.pages = render partial: 'page', collection: page.children, as: :page
|
@@ -1,14 +1,23 @@
|
|
1
1
|
= simple_form_for [:admin, @page] do |f|
|
2
2
|
.content-header
|
3
3
|
h1
|
4
|
-
span.glyphicon.glyphicon-
|
4
|
+
span.glyphicon.glyphicon-file
|
5
5
|
span.text =< t '.title'
|
6
6
|
|
7
7
|
.content
|
8
8
|
.box
|
9
9
|
.box-content
|
10
|
-
|
11
|
-
|
10
|
+
.multilingual-tabs-section
|
11
|
+
- I18n.available_locales.each do |locale|
|
12
|
+
input type="radio" id="#{locale}-tab" class="#{locale}-tab" name="lang-tabs" checked=(locale == I18n.default_locale)
|
13
|
+
.multilingual-tabs-labels
|
14
|
+
- I18n.available_locales.each do |locale|
|
15
|
+
label.tab-label id="#{locale}-tab" for="#{locale}-tab" = locale
|
16
|
+
.multilingual-content-section
|
17
|
+
= render 'form', f: f
|
18
|
+
.box-footer.sticky data-sticky='bottom'
|
12
19
|
.for-horizontal-form
|
20
|
+
= link_to t('blueberry_cms.admin.common.preview'), @page.to_path, target: :_blank, class: 'btn btn-default'
|
13
21
|
= link_to t('blueberry_cms.admin.common.back'), [:admin, :pages], class: 'btn btn-default'
|
14
22
|
= f.button :submit, class: 'btn btn-primary'
|
23
|
+
= f.button :submit, t('blueberry_cms.admin.common.save_and_continue'), class: 'btn btn-success', name: :continue
|
@@ -1,10 +1,10 @@
|
|
1
1
|
.content-header
|
2
2
|
h1
|
3
|
-
span.glyphicon.glyphicon-
|
3
|
+
span.glyphicon.glyphicon-file
|
4
4
|
span.text =< t '.title'
|
5
5
|
|
6
6
|
ol.breadcrumb
|
7
|
-
li = link_to t('admin.common.home'), main_app.admin_root_path
|
7
|
+
li = link_to t('blueberry_cms.admin.common.home'), main_app.admin_root_path
|
8
8
|
li.active
|
9
9
|
strong =< t '.title'
|
10
10
|
|
@@ -19,28 +19,7 @@
|
|
19
19
|
= t('.new')
|
20
20
|
|
21
21
|
.box-content
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
th = BlueberryCMS::Page.human_attribute_name :slug
|
27
|
-
th = BlueberryCMS::Page.human_attribute_name :path
|
28
|
-
th
|
29
|
-
tbody
|
30
|
-
- @pages.each do |page|
|
31
|
-
tr
|
32
|
-
td = page.name
|
33
|
-
td = page.slug
|
34
|
-
td = page.path
|
35
|
-
td
|
36
|
-
= link_to [:new, :admin, :page, parent_id: page.id], class: 'btn btn-sm btn-primary'
|
37
|
-
i.glyphicon.glyphicon-plus
|
38
|
-
= t('.new_child')
|
39
|
-
'
|
40
|
-
= link_to [:edit, :admin, page], class: 'btn btn-sm btn-primary'
|
41
|
-
i.glyphicon.glyphicon-pencil
|
42
|
-
= t('blueberry_cms.admin.common.edit')
|
43
|
-
'
|
44
|
-
= link_to [:admin, page], method: :delete, class: 'btn btn-sm btn-warning'
|
45
|
-
i.glyphicon.glyphicon-remove
|
46
|
-
= t('blueberry_cms.admin.common.destroy')
|
22
|
+
- if @pages.any?
|
23
|
+
ul.pages.pages-tree data-url=admin_pages_path = render partial: 'page', collection: @pages, as: :page
|
24
|
+
- else
|
25
|
+
= render 'empty'
|
@@ -7,8 +7,16 @@
|
|
7
7
|
.content
|
8
8
|
.box
|
9
9
|
.box-content
|
10
|
-
|
10
|
+
.multilingual-tabs-section
|
11
|
+
- I18n.available_locales.each do |locale|
|
12
|
+
input type="radio" id="#{locale}-tab" class="#{locale}-tab" name="lang-tabs" checked=(locale == I18n.default_locale)
|
13
|
+
.multilingual-tabs-labels
|
14
|
+
- I18n.available_locales.each do |locale|
|
15
|
+
label.tab-label id="#{locale}-tab" for="#{locale}-tab" = locale
|
16
|
+
.multilingual-content-section
|
17
|
+
= render 'form', f: f
|
11
18
|
.box-footer
|
12
19
|
.for-horizontal-form
|
13
20
|
= link_to t('blueberry_cms.admin.common.back'), [:admin, :pages], class: 'btn btn-default'
|
14
21
|
= f.button :submit, class: 'btn btn-primary'
|
22
|
+
= f.button :submit, t('blueberry_cms.admin.common.save_and_continue'), class: 'btn btn-success', name: :continue
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- if faq.title.present?
|
2
|
+
h2.mb-60-mb.heading-breaking == faq.title
|
3
|
+
|
4
|
+
div data-controller='show-more'
|
5
|
+
.accordion#accordion-faq
|
6
|
+
- faq.questions.each_with_index do |question, index|
|
7
|
+
.accordion__wrapper data-target='show-more.item' style=('display:none' if index > 2)
|
8
|
+
a.accordion__card id="heading#{index}" href="collapse#{index}" aria-expanded='false' data={ target: "#collapse#{index}", toggle: 'collapse' }
|
9
|
+
h3.f20
|
10
|
+
svg.icon.icon-arrow-down-simple
|
11
|
+
= icon('arrow-down-simple')
|
12
|
+
= question.question
|
13
|
+
.accordion__content.collapse id="collapse#{index}" aria-labelledby="heading#{index}" data-parent='#accordion-faq'
|
14
|
+
.accordion__content__wrapper == question.answer
|
15
|
+
|
16
|
+
- if faq.questions.size > 3
|
17
|
+
p.mt-30.mt-60-md
|
18
|
+
a.btn.btn-primary href="#" data={ action: 'click->show-more#trigger', target: 'show-more.button', close_title: t('.show_less_faq') }
|
19
|
+
= t('.show_more_faq')
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.form-block
|
2
|
+
- if form.name.present?
|
3
|
+
|
4
|
+
- if form.kind == 'contact'
|
5
|
+
.mw-690.mcenter.mb-30.mb-60-md
|
6
|
+
h2.h2.tc.heading-breaking = form.name
|
7
|
+
- if form.description.present?
|
8
|
+
.tc == form.description
|
9
|
+
.contact-form
|
10
|
+
.contact-form__box = render 'contact_forms/form', mailing_group_ids: form.mailing_group_ids, button_text: form.button_text
|
11
|
+
|
12
|
+
- if form.kind == 'request'
|
13
|
+
h2.h2 = form.name
|
14
|
+
- if form.description.present?
|
15
|
+
== form.description
|
16
|
+
.request-form
|
17
|
+
.request-form__box = render 'request_forms/form', mailing_group_ids: form.mailing_group_ids, button_text: form.button_text
|
18
|
+
|
19
|
+
= render 'modal_terms'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.row.row--sm.align-items-center
|
2
|
+
- if gallery.images.length > 1
|
3
|
+
- if gallery.content.present?
|
4
|
+
.col-gallery-text
|
5
|
+
== gallery.content
|
6
|
+
.col-gallery-image.col-gallery-image--logos
|
7
|
+
- gallery.images.each do |image|
|
8
|
+
.col-logo
|
9
|
+
.logo
|
10
|
+
- if image.href.present?
|
11
|
+
= link_to image.href, target: '_blank'
|
12
|
+
= image_tag image.image.url(:logo), alt: image.name, class: 'gallery-image'
|
13
|
+
- else
|
14
|
+
= image_tag image.image.url(:logo), alt: image.name, class: 'gallery-image'
|
15
|
+
- else
|
16
|
+
- if gallery.content.present?
|
17
|
+
.col-gallery-text.col-gallery-text--single-image
|
18
|
+
== gallery.content
|
19
|
+
.col-gallery-image.col-gallery-image--single-image
|
20
|
+
.mt-30.mt-0-md
|
21
|
+
- gallery.images.each do |image|
|
22
|
+
= image_tag image.image.url(:gallery_block), alt: image.name, class: 'gallery-image gallery-image--single'
|
@@ -0,0 +1,52 @@
|
|
1
|
+
- if links.kind == 'basic'
|
2
|
+
- if links.title.present?
|
3
|
+
h2.h2.text-center.mb-20 = links.title.presence
|
4
|
+
- if links.content.present?
|
5
|
+
.mb-30.mb-50-md
|
6
|
+
.tc == Liquid::Template.parse(links.content).render('h' => liquid_view_context)
|
7
|
+
ul.navbar-sub
|
8
|
+
- links.links.decorate.each do |link|
|
9
|
+
- if link.link_background.present?
|
10
|
+
li.navbar-sub__item
|
11
|
+
= link_to link.link_url, class: "navbar-sub__link"
|
12
|
+
= icon('building')
|
13
|
+
- if link.title?
|
14
|
+
= link.title
|
15
|
+
- else
|
16
|
+
= link.link_title
|
17
|
+
- else
|
18
|
+
li.navbar-sub__item
|
19
|
+
= link_to link.link_url, class: "navbar-sub__link navbar-sub__link--hidden-arrow"
|
20
|
+
.navbar-sub__link-content
|
21
|
+
- if link.title?
|
22
|
+
h3.h6.fw7.mb-15 = link.title
|
23
|
+
- else
|
24
|
+
h3.h6.fw7.mb-15 = link.link_title
|
25
|
+
- if link.description?
|
26
|
+
p.gray-600 == link.description
|
27
|
+
= icon('arrow-right')
|
28
|
+
- elsif links.kind == 'graph'
|
29
|
+
.mw-690.mcenter
|
30
|
+
- if links.title.present?
|
31
|
+
h2.h3.tc.mb-60-md.heading-breaking = links.title.presence
|
32
|
+
- if links.content.present?
|
33
|
+
.tc == Liquid::Template.parse(links.content).render('h' => liquid_view_context)
|
34
|
+
.progres-boxes.mt-80
|
35
|
+
- links.links.decorate.each do |link|
|
36
|
+
.progres-box
|
37
|
+
.progres-box__header
|
38
|
+
.progres-box__percentage
|
39
|
+
h3.h5
|
40
|
+
= link.percentage
|
41
|
+
<span>%</span>
|
42
|
+
- if link.image.url
|
43
|
+
- if link.image.content_type == 'image/svg+xml'
|
44
|
+
= image_tag link.image.url, title: link.title, alt: link.title
|
45
|
+
- else
|
46
|
+
= image_tag link.image.url(:thumb), title: link.title, alt: link.title
|
47
|
+
.progres-box__content
|
48
|
+
h3.h5.mb-20 = link.title
|
49
|
+
== link.description
|
50
|
+
.progres-box__footer
|
51
|
+
p
|
52
|
+
= link_to 'Zobrazit více', link.link_url, class: 'link-underline'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- if richtext.image.present?
|
2
|
+
.row
|
3
|
+
.col-gallery-text.col-gallery-text--single-image
|
4
|
+
- output = Redcarpet::Markdown.new(Redcarpet::Render::HTML, tables: true, autolink: false, prettify: true).render(richtext.content)
|
5
|
+
== Liquid::Template.parse(output).render('h' => liquid_view_context)
|
6
|
+
.col-gallery-image.col-gallery-image--single-image
|
7
|
+
= image_tag richtext.image.url(:gallery_block), class: 'gallery-image gallery-image--single'
|
8
|
+
- else
|
9
|
+
- output = Redcarpet::Markdown.new(Redcarpet::Render::HTML, tables: true, autolink: false, prettify: true).render(richtext.content)
|
10
|
+
== Liquid::Template.parse(output).render('h' => liquid_view_context)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
ul.nav.nav-tabs id='myTab' role="tablist"
|
2
|
+
- tabs.tabs.each_with_index do |tab, i|
|
3
|
+
li.nav-item
|
4
|
+
a.nav-link class="#{'active' if i == 0}" href="#tab_#{tab.id}" data-toggle="tab" role="tab" aria-controls="tab_#{tab.id}" aria-selected="true" = tab.title
|
5
|
+
|
6
|
+
.tab-content
|
7
|
+
- tabs.tabs.each_with_index do |tab, i|
|
8
|
+
.tab-pane.fade class="#{'active show' if i == 0}" id="tab_#{tab.id}" role="tabpanel" aria-labelledby="tab_#{tab.id}" == tab.content
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.row
|
2
|
+
.col-lg-6
|
3
|
+
- if videogallery.content.present?
|
4
|
+
.mb-40.mb-80-md
|
5
|
+
== videogallery.content
|
6
|
+
|
7
|
+
#carouselAbsolvents.carousel.slide
|
8
|
+
.carousel-inner
|
9
|
+
- videogallery.videos.each_slice(4).with_index do |videos, index|
|
10
|
+
.carousel-item class=('active' if index.zero?)
|
11
|
+
.row.gallery
|
12
|
+
- videos.each do |video|
|
13
|
+
.col-6.col-md-3
|
14
|
+
.video-reference-preview
|
15
|
+
a.video-reference-preview__image.lightbox href=video.watch_link data-poster=video.preview_url
|
16
|
+
= image_tag video.preview_url, class: 'video-reference-preview__img'
|
17
|
+
= image_tag 'play.svg', class: 'video-reference-preview__play'
|
18
|
+
.video-reference-preview__name.tc
|
19
|
+
h3.h6.white.fw7.mb-5 = video.title
|
20
|
+
h4.h6.fw4.white = video.job
|
21
|
+
|
22
|
+
- if videogallery.videos.size > 4
|
23
|
+
a.carousel-control.carousel-control-prev href="#carouselAbsolvents" role="button" data-slide="prev"
|
24
|
+
= icon('arrow-left-simple')
|
25
|
+
|
26
|
+
a.carousel-control.carousel-control-next href="#carouselAbsolvents" role="button" data-slide="next"
|
27
|
+
= icon('arrow-right-simple')
|
@@ -1,9 +1,10 @@
|
|
1
|
-
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
- title @page.meta_title
|
2
|
+
- description @page.meta_description
|
3
|
+
.blocks
|
4
|
+
.block
|
5
|
+
.block__content
|
6
|
+
h1.h1.mb-5
|
7
|
+
= @page.decorate.name
|
8
|
+
= render 'breadcrumbs', page: @page
|
7
9
|
|
8
|
-
|
9
|
-
.block == block.render(liquid_view_context)
|
10
|
+
= render 'blocks', blocks: @page.blocks.active.decorate
|
@@ -0,0 +1,49 @@
|
|
1
|
+
cs:
|
2
|
+
attributes:
|
3
|
+
content: Obsah
|
4
|
+
title: Nadpis
|
5
|
+
mongoid:
|
6
|
+
attributes:
|
7
|
+
blueberry_cms/link:
|
8
|
+
css_class: CSS Bloku
|
9
|
+
description: Popis
|
10
|
+
image: Obrázek
|
11
|
+
page_id: Stránka
|
12
|
+
percentage: Procenta
|
13
|
+
blueberry_cms/page_block:
|
14
|
+
block_anchor: ID Bloku
|
15
|
+
bottom_margin: Dolní mezera
|
16
|
+
bottom_margin_xs: Dolní mezera mobil
|
17
|
+
css_class: CSS Bloku
|
18
|
+
description: Popis
|
19
|
+
images_files: Obrázky
|
20
|
+
kind: Typ
|
21
|
+
name: Název
|
22
|
+
orientation: Pozice textu
|
23
|
+
red_background: Červené pozadí
|
24
|
+
shared: Sdílený blok
|
25
|
+
shared_name: Název sdíleného bloku
|
26
|
+
top_margin: Horní mezera
|
27
|
+
top_margin_xs: Horní mezera mobil
|
28
|
+
blueberry_cms/page_blocks/rich_text:
|
29
|
+
remove_image: Odstranit obrázek
|
30
|
+
blueberry_cms/page_blocks/shared:
|
31
|
+
block_id: Blok
|
32
|
+
blueberry_cms/question:
|
33
|
+
answer: Odpověď
|
34
|
+
question: Otázka
|
35
|
+
blueberry_cms/video:
|
36
|
+
movie_url: Url videa
|
37
|
+
title: Název
|
38
|
+
errors:
|
39
|
+
messages:
|
40
|
+
restrict_dependent_destroy:
|
41
|
+
is_shared: Nemůžu smazat položku protože existuje závislý blok
|
42
|
+
models:
|
43
|
+
blueberry_cms/page_blocks/faq: FAQ
|
44
|
+
blueberry_cms/page_blocks/gallery: Galerie
|
45
|
+
blueberry_cms/page_blocks/links: Odkazy
|
46
|
+
blueberry_cms/page_blocks/rich_text: Textový blok
|
47
|
+
blueberry_cms/page_blocks/shared: Sdílený blok
|
48
|
+
blueberry_cms/page_blocks/tabs: Taby
|
49
|
+
blueberry_cms/page_blocks/video_gallery: Video galerie
|