refinerycms-core 2.0.10 → 2.1.0
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/javascripts/refinery/admin.js.erb +126 -234
- data/app/assets/javascripts/refinery/ajaxy_pagination.js.coffee +1 -1
- data/app/assets/javascripts/refinery/boot_wym.js.erb +4 -8
- data/app/assets/javascripts/refinery/core.js +1 -1
- data/app/assets/javascripts/refinery/interface.js.coffee.erb +3 -16
- data/app/assets/javascripts/refinery/modal_dialogs.js.erb +0 -3
- data/app/assets/javascripts/refinery/nestedsortables.js +312 -312
- data/app/assets/javascripts/refinery/refinery.js.erb +14 -15
- data/app/assets/javascripts/refinery/site_bar.js +3 -9
- data/app/assets/javascripts/refinery/sortable_list.js +145 -0
- data/app/assets/javascripts/refinery/sortable_menu.js.coffee +3 -4
- data/app/assets/javascripts/refinery/submit_continue.js.coffee.erb +1 -2
- data/app/assets/javascripts/refinery/tree.js +3 -3
- data/app/assets/javascripts/refinery/wymeditor.js +6 -6
- data/{public → app/assets/javascripts}/wymeditor/GPL-license.txt +0 -0
- data/{public → app/assets/javascripts}/wymeditor/MIT-license.txt +0 -0
- data/{public → app/assets/javascripts}/wymeditor/README +0 -0
- data/app/assets/javascripts/wymeditor/browsers/mozilla.js.erb +10 -11
- data/app/assets/javascripts/wymeditor/browsers/webkit.js.erb +17 -18
- data/app/assets/javascripts/wymeditor/classes.js.erb +3 -5
- data/app/assets/javascripts/wymeditor/functions.js.erb +5 -1
- data/app/assets/javascripts/wymeditor/prototypes.js.erb +0 -3
- data/app/assets/javascripts/wymeditor/setup.js.erb +5 -5
- data/app/assets/javascripts/wymeditor/skins/refinery/skin.js +1 -4
- data/app/assets/javascripts/wymeditor/validators.js.erb +3 -2
- data/app/assets/stylesheets/{formatting.css.scss → refinery/formatting.css.scss} +0 -0
- data/app/assets/stylesheets/refinery/layout.css.scss +41 -11
- data/app/assets/stylesheets/{theme.css.scss → refinery/theme.css.scss} +0 -0
- data/app/controllers/refinery/sitemap_controller.rb +1 -5
- data/app/helpers/refinery/admin_helper.rb +6 -0
- data/app/helpers/refinery/image_helper.rb +2 -1
- data/app/helpers/refinery/menu_helper.rb +0 -49
- data/app/helpers/refinery/meta_helper.rb +7 -3
- data/app/helpers/refinery/site_bar_helper.rb +3 -15
- data/app/models/refinery/core/base_model.rb +2 -0
- data/{lib → app/presenters}/refinery/base_presenter.rb +1 -2
- data/app/views/layouts/application.html.erb +8 -7
- data/app/views/refinery/_content_page.html.erb +1 -1
- data/app/views/refinery/_google_analytics.html.erb +12 -5
- data/app/views/refinery/_head.html.erb +11 -15
- data/app/views/refinery/_header.html.erb +1 -4
- data/app/views/refinery/_javascripts.html.erb +14 -8
- data/app/views/refinery/_site_bar.html.erb +4 -4
- data/app/views/refinery/admin/_form_advanced_options_menu.html.erb +12 -0
- data/app/views/refinery/admin/_javascripts.html.erb +13 -1
- data/app/views/refinery/admin/_locale_picker.html.erb +11 -0
- data/app/views/refinery/admin/_make_sortable.html.erb +8 -5
- data/app/views/refinery/admin/_search.html.erb +1 -7
- data/app/views/refinery/admin/_search_header.html.erb +1 -0
- data/app/views/refinery/admin/_wysiwyg.html.erb +16 -0
- data/config/initializers/will_paginate_monkeypatch.rb +1 -1
- data/config/locales/bg.yml +5 -1
- data/config/locales/cs.yml +5 -1
- data/config/locales/da.yml +5 -1
- data/config/locales/de.yml +7 -3
- data/config/locales/el.yml +5 -1
- data/config/locales/en.yml +7 -1
- data/config/locales/es.yml +5 -1
- data/config/locales/fi.yml +5 -1
- data/config/locales/fr.yml +5 -1
- data/config/locales/hu.yml +82 -0
- data/config/locales/it.yml +38 -34
- data/config/locales/ja.yml +5 -1
- data/config/locales/ko.yml +5 -1
- data/config/locales/lt.yml +5 -1
- data/config/locales/lv.yml +5 -1
- data/config/locales/nb.yml +5 -1
- data/config/locales/nl.yml +36 -29
- data/config/locales/pl.yml +8 -1
- data/config/locales/pt-BR.yml +7 -3
- data/config/locales/pt.yml +82 -0
- data/config/locales/rs.yml +5 -1
- data/config/locales/ru.yml +5 -1
- data/config/locales/sk.yml +10 -3
- data/config/locales/sl.yml +5 -1
- data/config/locales/sv.yml +5 -1
- data/config/locales/tr.yml +82 -0
- data/config/locales/uk.yml +77 -0
- data/config/locales/vi.yml +5 -1
- data/config/locales/zh-CN.yml +5 -1
- data/config/locales/zh-TW.yml +5 -1
- data/config/routes.rb +3 -3
- data/lib/generators/refinery/cms/cms_generator.rb +29 -0
- data/lib/generators/refinery/cms/templates/.gitignore +1 -0
- data/lib/generators/refinery/cms/templates/app/views/sitemap/index.xml.builder +13 -13
- data/lib/generators/refinery/core/templates/config/initializers/refinery/core.rb.erb +8 -12
- data/lib/generators/refinery/dummy/templates/rails/database.yml +3 -3
- data/lib/generators/refinery/engine/engine_generator.rb +8 -12
- data/lib/generators/refinery/engine/templates/Gemfile +5 -39
- data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb.erb +4 -4
- data/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb.erb +2 -3
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_actions.html.erb +1 -1
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb +31 -33
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +1 -3
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_singular_name.html.erb +2 -2
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/index.html.erb +1 -1
- data/lib/generators/refinery/engine/templates/config/locales/cs.yml +28 -0
- data/lib/generators/refinery/engine/templates/config/locales/it.yml +28 -0
- data/lib/generators/refinery/engine/templates/config/locales/nl.yml +6 -6
- data/lib/generators/refinery/engine/templates/config/locales/tr.yml +28 -0
- data/lib/generators/refinery/engine/templates/config/routes.rb.erb +2 -2
- data/lib/generators/refinery/engine/templates/db/seeds.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/lib/refinery/plural_name/engine.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/spec/{requests → features}/refinery/namespace/admin/plural_name_spec.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/spec/spec_helper.rb +25 -49
- data/lib/generators/refinery/form/form_generator.rb +1 -13
- data/lib/generators/refinery/form/templates/app/models/refinery/namespace/singular_name.rb.erb +0 -4
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +2 -2
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/spam.html.erb +7 -6
- data/lib/generators/refinery/form/templates/config/locales/nl.yml +29 -29
- data/lib/generators/refinery/form/templates/config/locales/tr.yml +78 -0
- data/lib/generators/refinery/form/templates/config/routes.rb.erb +1 -1
- data/lib/generators/refinery/form/templates/db/migrate/1_create_plural_name.rb.erb +2 -6
- data/lib/generators/refinery/form/templates/db/seeds.rb.erb +1 -1
- data/lib/generators/refinery/form/templates/lib/refinery/plural_name/engine.rb.erb +1 -1
- data/lib/generators/refinery/form/templates/refinerycms-plural_name.gemspec +2 -5
- data/lib/refinery.rb +191 -0
- data/lib/refinery/admin/base_controller.rb +27 -16
- data/lib/refinery/application_controller.rb +15 -47
- data/lib/refinery/cli.rb +48 -27
- data/lib/refinery/core.rb +7 -183
- data/lib/refinery/core/configuration.rb +17 -9
- data/lib/refinery/core/engine.rb +11 -47
- data/lib/refinery/crud.rb +81 -66
- data/lib/refinery/engine.rb +52 -55
- data/lib/refinery/ext/action_view/helpers/form_builder.rb +2 -0
- data/lib/refinery/extension_generation.rb +208 -110
- data/lib/refinery/menu.rb +16 -7
- data/lib/refinery/menu_item.rb +56 -54
- data/lib/refinery/plugin.rb +11 -3
- data/lib/refinery/plugins.rb +14 -1
- data/lib/refinery/version.rb +3 -3
- data/refinerycms-core.gemspec +11 -10
- data/spec/controllers/refinery/admin/dummy_controller_spec.rb +57 -0
- data/spec/controllers/refinery/admin/refinery_core_controller_spec.rb +3 -4
- data/spec/controllers/refinery/sitemap_controller_spec.rb +1 -14
- data/spec/{requests → features}/refinery/admin/custom_assets_spec.rb +1 -1
- data/spec/{requests → features}/refinery/admin/dialogs_spec.rb +1 -1
- data/spec/features/refinery/admin/xhr_paging_spec.rb +55 -0
- data/spec/features/refinery/application_layout_spec.rb +19 -0
- data/spec/features/refinery/core_spec.rb +14 -0
- data/spec/{requests → features}/refinery/site_bar_spec.rb +1 -1
- data/spec/helpers/refinery/meta_helper_spec.rb +25 -0
- data/spec/lib/generators/refinery/cms/cms_generator_spec.rb +61 -0
- data/spec/lib/generators/refinery/engine/engine_generator_multiple_resources_spec.rb +28 -1
- data/spec/lib/generators/refinery/engine/engine_generator_sanity_check_spec.rb +7 -7
- data/spec/lib/generators/refinery/engine/engine_generator_spec.rb +69 -8
- data/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb +0 -2
- data/spec/lib/generators/refinery/form/form_generator_spec.rb +9 -1
- data/spec/lib/refinery/application_controller_spec.rb +48 -63
- data/spec/lib/refinery/cli_spec.rb +136 -0
- data/spec/lib/refinery/core/configuration_spec.rb +17 -0
- data/spec/lib/refinery/core_spec.rb +19 -13
- data/spec/lib/refinery/crud_spec.rb +0 -4
- data/spec/lib/refinery/menu_spec.rb +16 -26
- data/spec/support/refinery.rb +6 -1
- data/{app → vendor}/assets/javascripts/jquery/GPL-LICENSE.txt +0 -0
- data/{app → vendor}/assets/javascripts/jquery/MIT-LICENSE.txt +0 -0
- data/vendor/assets/javascripts/jquery/jquery.browser.js +49 -0
- data/{app → vendor}/assets/javascripts/jquery/jquery.html5-placeholder-shim.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery/jquery.jcarousel.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery/jquery.textTruncate.js +0 -0
- data/{app → vendor}/assets/javascripts/jquery/jquery.timers.js +0 -0
- data/{app → vendor}/assets/javascripts/modernizr-min.js +0 -0
- metadata +231 -78
- data/app/assets/images/refinery/resolve_digital_footer_logo.png +0 -0
- data/app/assets/javascripts/dd_belatedpng.js +0 -13
- data/app/assets/javascripts/jquery/jquery.corner.js +0 -345
- data/app/assets/stylesheets/application.css.scss +0 -55
- data/app/assets/stylesheets/home.css.scss +0 -3
- data/app/views/refinery/_ie6check.html.erb +0 -63
- data/app/views/refinery/_menu.html.erb +0 -20
- data/app/views/refinery/_menu_branch.html.erb +0 -19
- data/lib/generators/refinery/engine/templates/Guardfile +0 -27
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_locale_picker.html.erb +0 -11
- data/lib/refinery/catch_all_routes.rb +0 -3
- data/lib/tasks/yard.rake +0 -30
- data/spec/requests/refinery/admin/controller_restriction_spec.rb +0 -27
- data/spec/requests/refinery/search_spec.rb +0 -71
|
@@ -338,8 +338,9 @@ WYMeditor.XhtmlValidator = {
|
|
|
338
338
|
"readonly":/^(readonly)$/,
|
|
339
339
|
"size":/^(\d)+$/,
|
|
340
340
|
"3":"src",
|
|
341
|
-
"type":/^(button|checkbox|file|hidden|image|password|radio|reset|submit|text|tel|search|url|email|datetime|date|month|week|time|datetime-local|number|range|color
|
|
342
|
-
"4":"value"
|
|
341
|
+
"type":/^(button|checkbox|file|hidden|image|password|radio|reset|submit|text|tel|search|url|email|datetime|date|month|week|time|datetime-local|number|range|color)$/,
|
|
342
|
+
"4":"value",
|
|
343
|
+
"5":"placeholder"
|
|
343
344
|
},
|
|
344
345
|
"inside":"form"
|
|
345
346
|
},
|
|
File without changes
|
|
@@ -20,11 +20,6 @@
|
|
|
20
20
|
-webkit-border-bottom-left-radius: $radius;
|
|
21
21
|
-webkit-border-bottom-right-radius: $radius;
|
|
22
22
|
}
|
|
23
|
-
* {
|
|
24
|
-
color: #41403C;
|
|
25
|
-
font-family: Arial;
|
|
26
|
-
font-size: 13px;
|
|
27
|
-
}
|
|
28
23
|
p {
|
|
29
24
|
font-size: 14px;
|
|
30
25
|
line-height: 18px;
|
|
@@ -36,9 +31,10 @@ body {
|
|
|
36
31
|
min-height: 100%;
|
|
37
32
|
margin: 0;
|
|
38
33
|
padding: 0;
|
|
39
|
-
font-
|
|
40
|
-
font-
|
|
34
|
+
font-family: Arial, sans-serif;
|
|
35
|
+
font-size: 13px;
|
|
41
36
|
line-height: 1.5em;
|
|
37
|
+
color: #41403C;
|
|
42
38
|
background: #303030 image_url('refinery/page_bg.png') repeat;
|
|
43
39
|
}
|
|
44
40
|
acronym {
|
|
@@ -91,7 +87,7 @@ select.widest {
|
|
|
91
87
|
}
|
|
92
88
|
}
|
|
93
89
|
li {
|
|
94
|
-
margin-
|
|
90
|
+
margin-bottom: 10px;
|
|
95
91
|
a {
|
|
96
92
|
background-color: #dbedff;
|
|
97
93
|
background-position: 12px;
|
|
@@ -431,7 +427,7 @@ header {
|
|
|
431
427
|
}
|
|
432
428
|
a {
|
|
433
429
|
display: block;
|
|
434
|
-
padding:
|
|
430
|
+
padding: 7px 13px;
|
|
435
431
|
font-size: 13px;
|
|
436
432
|
background: image_url('refinery/nav_inactive_background.png') transparent repeat;
|
|
437
433
|
margin-top:4px;
|
|
@@ -445,7 +441,7 @@ header {
|
|
|
445
441
|
color: #ff5500;
|
|
446
442
|
}
|
|
447
443
|
&.active {
|
|
448
|
-
padding:
|
|
444
|
+
padding: 9px 13px;
|
|
449
445
|
margin-top: 0px;
|
|
450
446
|
}
|
|
451
447
|
}
|
|
@@ -494,6 +490,13 @@ pre {
|
|
|
494
490
|
#records > #recent_activity > ul li, #records > #recent_inquiries > ul li {
|
|
495
491
|
max-height: 35px;
|
|
496
492
|
}
|
|
493
|
+
#recent_activity li a, #recent_inquiries li a {
|
|
494
|
+
overflow: hidden;
|
|
495
|
+
white-space: nowrap;
|
|
496
|
+
-o-text-overflow: ellipsis;
|
|
497
|
+
-ms-text-overflow: ellipsis;
|
|
498
|
+
text-overflow: ellipsis;
|
|
499
|
+
}
|
|
497
500
|
#content #records > ul li .actions a, #content #records .pagination_container > ul li .actions a {
|
|
498
501
|
line-height: 29px;
|
|
499
502
|
}
|
|
@@ -1018,6 +1021,9 @@ ul#menu.reordering_menu li a {
|
|
|
1018
1021
|
font-size: 16px;
|
|
1019
1022
|
width: 180px;
|
|
1020
1023
|
}
|
|
1024
|
+
.cancel-search {
|
|
1025
|
+
float: right;
|
|
1026
|
+
}
|
|
1021
1027
|
.pt-BR #search {
|
|
1022
1028
|
width: 187px;
|
|
1023
1029
|
}
|
|
@@ -1355,7 +1361,7 @@ input.button.close_dialog:active, a.button.close_dialog:active, #content a.butto
|
|
|
1355
1361
|
.form-actions a.confirm-delete:active, #content .form-actions a.confirm-delete:active {
|
|
1356
1362
|
background: #bb0000;
|
|
1357
1363
|
}
|
|
1358
|
-
.field input[type=text], .field input[type=password], .field textarea {
|
|
1364
|
+
.field input[type=text], .field input[type=password], .field input[type=email], .field input[type=tel], .field input[type=number], .field textarea {
|
|
1359
1365
|
border: 1px solid #7f9db9;
|
|
1360
1366
|
padding: 0.4% 0.5%;
|
|
1361
1367
|
line-height: 20px;
|
|
@@ -1536,6 +1542,30 @@ a.information:hover {
|
|
|
1536
1542
|
.tooltip, .tooltip span {
|
|
1537
1543
|
@include rounded(6px);
|
|
1538
1544
|
}
|
|
1545
|
+
.label {
|
|
1546
|
+
padding: 1px 3px 2px;
|
|
1547
|
+
font-size: 9.75px;
|
|
1548
|
+
font-weight: bold;
|
|
1549
|
+
color: #ffffff;
|
|
1550
|
+
text-transform: uppercase;
|
|
1551
|
+
white-space: nowrap;
|
|
1552
|
+
background-color: #bfbfbf;
|
|
1553
|
+
-webkit-border-radius: 3px;
|
|
1554
|
+
-moz-border-radius: 3px;
|
|
1555
|
+
border-radius: 3px;
|
|
1556
|
+
}
|
|
1557
|
+
.label.important {
|
|
1558
|
+
background-color: #c43c35;
|
|
1559
|
+
}
|
|
1560
|
+
.label.warning {
|
|
1561
|
+
background-color: #f89406;
|
|
1562
|
+
}
|
|
1563
|
+
.label.success {
|
|
1564
|
+
background-color: #46a546;
|
|
1565
|
+
}
|
|
1566
|
+
.label.notice {
|
|
1567
|
+
background-color: #62cffc;
|
|
1568
|
+
}
|
|
1539
1569
|
|
|
1540
1570
|
.label {
|
|
1541
1571
|
padding: 1px 3px 2px;
|
|
File without changes
|
|
@@ -7,11 +7,7 @@ module ::Refinery
|
|
|
7
7
|
|
|
8
8
|
respond_to do |format|
|
|
9
9
|
format.xml do
|
|
10
|
-
@locales =
|
|
11
|
-
::Refinery::I18n.frontend_locales
|
|
12
|
-
else
|
|
13
|
-
[::I18n.locale]
|
|
14
|
-
end
|
|
10
|
+
@locales = Refinery::I18n.frontend_locales
|
|
15
11
|
end
|
|
16
12
|
end
|
|
17
13
|
end
|
|
@@ -24,7 +24,8 @@ module Refinery
|
|
|
24
24
|
if image.present?
|
|
25
25
|
dimensions = (image.thumbnail_dimensions(geometry) rescue {})
|
|
26
26
|
|
|
27
|
-
image_tag(image.thumbnail(geometry
|
|
27
|
+
image_tag(image.thumbnail(:geometry => geometry,
|
|
28
|
+
:strip => options[:strip]).url, {
|
|
28
29
|
:alt => image.respond_to?(:title) ? image.title : image.image_name,
|
|
29
30
|
}.merge(dimensions).merge(options))
|
|
30
31
|
end
|
|
@@ -13,54 +13,5 @@ module Refinery
|
|
|
13
13
|
nil
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
# This was extracted from app/views/refinery/_menu_branch.html.erb
|
|
17
|
-
# to remove the complexity of that template by reducing logic in the view.
|
|
18
|
-
def menu_branch_css(local_assigns)
|
|
19
|
-
options = local_assigns.dup
|
|
20
|
-
options.update(:sibling_count => options[:menu_branch].shown_siblings.length) unless options[:sibling_count]
|
|
21
|
-
|
|
22
|
-
css = []
|
|
23
|
-
css << Refinery::Core.menu_css[:selected] if selected_page_or_descendant_page_selected?(local_assigns[:menu_branch]) unless Refinery::Core.menu_css[:selected].nil?
|
|
24
|
-
css << Refinery::Core.menu_css[:first] if options[:menu_branch_counter] == 0 unless Refinery::Core.menu_css[:first].nil?
|
|
25
|
-
css << Refinery::Core.menu_css[:last] if options[:menu_branch_counter] == options[:sibling_count] unless Refinery::Core.menu_css[:last].nil?
|
|
26
|
-
css
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# Determines whether any page underneath the supplied page is the current page according to rails.
|
|
30
|
-
# Just calls selected_page? for each descendant of the supplied page
|
|
31
|
-
# unless it first quickly determines that there are no descendants.
|
|
32
|
-
def descendant_page_selected?(page)
|
|
33
|
-
(page.rgt != page.lft + 1) && page.descendants.any? { |descendant| selected_page?(descendant) }
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def selected_page_or_descendant_page_selected?(page)
|
|
37
|
-
selected_page?(page) || descendant_page_selected?(page)
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# Determine whether the supplied page is the currently open page according to Refinery.
|
|
41
|
-
# Also checks whether Rails thinks it is selected after that using current_page?
|
|
42
|
-
def selected_page?(page)
|
|
43
|
-
path = request.path.sub("//", "/")
|
|
44
|
-
path = path.force_encoding('utf-8') if path.respond_to?(:force_encoding)
|
|
45
|
-
|
|
46
|
-
# Ensure we match the path without the locale, if present.
|
|
47
|
-
if ::Refinery.i18n_enabled? and path =~ %r{^/#{::I18n.locale}/}
|
|
48
|
-
path = path.split(%r{^/#{::I18n.locale}}).last
|
|
49
|
-
path = "/" if path.blank?
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# First try to match against a "menu match" value, if available.
|
|
53
|
-
return true if page.try(:menu_match).present? && path =~ Regexp.new(page.menu_match)
|
|
54
|
-
|
|
55
|
-
# Find the first url that is a string.
|
|
56
|
-
url = [page.url]
|
|
57
|
-
url << ['', page.url[:path]].compact.flatten.join('/') if page.url.respond_to?(:keys)
|
|
58
|
-
url = url.last.match(%r{^/#{::I18n.locale.to_s}(/.*)}) ? $1 : url.detect{|u| u.is_a?(String)}
|
|
59
|
-
|
|
60
|
-
# Now use all possible vectors to try to find a valid match,
|
|
61
|
-
# finally passing to rails' "current_page?" method.
|
|
62
|
-
[path, URI.decode(path)].include?(url) || path == "/#{page.original_id}"
|
|
63
|
-
end
|
|
64
|
-
|
|
65
16
|
end
|
|
66
17
|
end
|
|
@@ -5,10 +5,10 @@ module Refinery
|
|
|
5
5
|
#
|
|
6
6
|
def browser_title(yield_title=nil)
|
|
7
7
|
[
|
|
8
|
-
|
|
9
|
-
@meta.browser_title.
|
|
8
|
+
yield_title,
|
|
9
|
+
@meta.browser_title.presence || @meta.path,
|
|
10
10
|
Refinery::Core.site_name
|
|
11
|
-
].
|
|
11
|
+
].reject(&:blank?).join(" - ")
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# you can override the object used for the title by supplying options[:object]
|
|
@@ -48,5 +48,9 @@ module Refinery
|
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
+
def canonical_id(page)
|
|
52
|
+
"#{page.canonical_slug}-page" if page
|
|
53
|
+
end
|
|
54
|
+
|
|
51
55
|
end
|
|
52
56
|
end
|
|
@@ -4,26 +4,14 @@ module Refinery
|
|
|
4
4
|
# Generates the link to determine where the site bar switch button returns to.
|
|
5
5
|
def site_bar_switch_link
|
|
6
6
|
link_to_if(admin?, t('.switch_to_your_website', site_bar_translate_locale_args),
|
|
7
|
-
|
|
8
|
-
session[:website_return_to]
|
|
9
|
-
else
|
|
10
|
-
refinery.root_path(:locale => (Refinery::I18n.default_frontend_locale if Refinery.i18n_enabled?))
|
|
11
|
-
end)) do
|
|
7
|
+
refinery.root_path(site_bar_translate_locale_args)) do
|
|
12
8
|
link_to t('.switch_to_your_website_editor', site_bar_translate_locale_args),
|
|
13
|
-
|
|
14
|
-
session[:refinery_return_to]
|
|
15
|
-
else
|
|
16
|
-
refinery.admin_root_path
|
|
17
|
-
end rescue refinery.admin_root_path)
|
|
9
|
+
refinery.admin_root_path
|
|
18
10
|
end
|
|
19
11
|
end
|
|
20
12
|
|
|
21
13
|
def site_bar_translate_locale_args
|
|
22
|
-
|
|
23
|
-
{ :locale => Refinery::I18n.current_locale }
|
|
24
|
-
else
|
|
25
|
-
{}
|
|
26
|
-
end
|
|
14
|
+
{ :locale => Refinery::I18n.current_locale }
|
|
27
15
|
end
|
|
28
16
|
|
|
29
17
|
end
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<%= render
|
|
2
|
+
<%= render "/refinery/html_tag" %>
|
|
3
3
|
<% site_bar = render('/refinery/site_bar', :head => true) -%>
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
<head>
|
|
5
|
+
<%= render "/refinery/head" %>
|
|
6
|
+
</head>
|
|
7
|
+
<body id="<%= canonical_id @page %>">
|
|
6
8
|
<%= site_bar -%>
|
|
7
|
-
<%= render '/refinery/ie6check' if request.env['HTTP_USER_AGENT'] =~ /MSIE/ -%>
|
|
8
9
|
<div id="page_container">
|
|
9
10
|
<header id="header">
|
|
10
|
-
<%= render
|
|
11
|
+
<%= render "/refinery/header" -%>
|
|
11
12
|
</header>
|
|
12
13
|
<section id="page">
|
|
13
14
|
<%= yield %>
|
|
14
15
|
</section>
|
|
15
16
|
<footer>
|
|
16
|
-
<%= render
|
|
17
|
+
<%= render "/refinery/footer" -%>
|
|
17
18
|
</footer>
|
|
18
19
|
</div>
|
|
19
|
-
<%= render
|
|
20
|
+
<%= render "/refinery/javascripts" %>
|
|
20
21
|
</body>
|
|
21
22
|
</html>
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
:hide_sections => local_assigns[:hide_sections],
|
|
3
3
|
:can_use_fallback => !local_assigns[:show_empty_sections] && !local_assigns[:remove_automatic_sections]
|
|
4
4
|
}) %>
|
|
5
|
-
<%= render '/refinery/draft_page_message' unless @page.
|
|
5
|
+
<%= render '/refinery/draft_page_message' unless @page.try(:live?) -%>
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
<% page_code = Refinery::Core.google_analytics_page_code.to_s.strip %>
|
|
2
2
|
<% unless local_request? or refinery_user? or page_code =~ /^(UA-xxxxxx-x)?$/ -%>
|
|
3
|
-
<!-- asynchronous google analytics
|
|
4
|
-
<script
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
<!-- asynchronous google analytics snippet -->
|
|
4
|
+
<script type="text/javascript">
|
|
5
|
+
var _gaq = _gaq || [];
|
|
6
|
+
_gaq.push(['_setAccount', '<%= page_code %>']);
|
|
7
|
+
_gaq.push(['_trackPageview']);
|
|
8
|
+
|
|
9
|
+
(function() {
|
|
10
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
11
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
12
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
13
|
+
})();
|
|
14
|
+
</script>
|
|
8
15
|
<% end -%>
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<%= csrf_meta_tags if Refinery::Core.authenticity_token_on_frontend -%>
|
|
9
|
-
<%= yield :meta %>
|
|
1
|
+
<meta charset='<%= Rails.application.config.encoding %>' />
|
|
2
|
+
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
|
|
3
|
+
<title><%= browser_title(yield(:title)) %></title>
|
|
4
|
+
<%= raw %(<meta name="description" content="#{@meta.meta_description}" />) if @meta.meta_description.present? -%>
|
|
5
|
+
<%= raw %(<link rel="canonical" content="#{@canonical}" />) if @canonical.present? -%>
|
|
6
|
+
<%= csrf_meta_tags if Refinery::Core.authenticity_token_on_frontend -%>
|
|
7
|
+
<%= yield :meta %>
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<%= yield :stylesheets %>
|
|
9
|
+
<%= stylesheet_link_tag "application" %>
|
|
10
|
+
<%= yield :stylesheets %>
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
<%= render '/refinery/google_analytics' %>
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
</head>
|
|
14
|
+
<%= javascript_include_tag 'modernizr-min' %>
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<% if request.env['HTTP_USER_AGENT'] =~ /MSIE/ %>
|
|
5
|
-
<!--[if lt IE 7 ]>
|
|
6
|
-
<%= javascript_include_tag 'dd_belatedpng' %>
|
|
7
|
-
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
|
|
8
|
-
<![endif]-->
|
|
1
|
+
<% if content_for? :before_javascript_libraries %>
|
|
2
|
+
<% Refinery.deprecate "content_for :before_javascript_libraries", :when => '2.2', :replacement => "content_for :javascripts" %>
|
|
3
|
+
<% content_for :javascripts, yield(:before_javascript_libraries) %>
|
|
9
4
|
<% end %>
|
|
5
|
+
|
|
6
|
+
<% if content_for? :javascript_libraries %>
|
|
7
|
+
<% Refinery.deprecate "content_for :javascript_libraries", :when => '2.2', :replacement => "content_for :javascripts" %>
|
|
8
|
+
<% content_for :javascripts, yield(:javascript_libraries) %>
|
|
9
|
+
<% end %>
|
|
10
|
+
|
|
11
|
+
<% if content_for? :after_javascript_libraries %>
|
|
12
|
+
<% Refinery.deprecate "content_for :after_javascript_libraries", :when => '2.2', :replacement => "content_for :javascripts" %>
|
|
13
|
+
<% content_for :javascripts, yield(:after_javascript_libraries) %>
|
|
14
|
+
<% end %>
|
|
15
|
+
|
|
10
16
|
<%= javascript_include_tag 'application' %>
|
|
11
17
|
<%= yield :javascripts -%>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<% if refinery_user? && "#{controller_name}##{action_name}"
|
|
1
|
+
<% if refinery_user? && "#{controller_name}##{action_name}" !~ %r{preview#show} %>
|
|
2
2
|
<% unless admin? # all required JS included by backend. %>
|
|
3
3
|
<% content_for :stylesheets, stylesheet_link_tag('refinery/site_bar') unless !!local_assigns[:exclude_css] %>
|
|
4
|
-
<%= yield(:stylesheets) unless local_assigns[:head]
|
|
4
|
+
<%= yield(:stylesheets) unless local_assigns[:head] || local_assigns[:exclude_css] %>
|
|
5
5
|
<% end -%>
|
|
6
6
|
<div id='site_bar'>
|
|
7
7
|
<div id='site_bar_content' class='clearfix'>
|
|
8
8
|
<div id='editor_switch'>
|
|
9
9
|
<%= site_bar_switch_link -%>
|
|
10
10
|
</div>
|
|
11
|
-
<%= link_to image_tag("#{"http://refinerycms.com/images/" unless local_request?}refinery/logo-site-bar.png", :alt => "Refinery (tm) Content Manager"),
|
|
11
|
+
<%= link_to image_tag("#{"http://refinerycms.com/images/" unless local_request? || request.ssl? }refinery/logo-site-bar.png", :alt => "Refinery (tm) Content Manager"),
|
|
12
12
|
'http://refinerycms.com',
|
|
13
13
|
:target => '_blank',
|
|
14
14
|
:id => 'site_bar_refinery_cms_logo' %>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</span>
|
|
20
20
|
|
|
21
21
|
<%= link_to t('.log_out', site_bar_translate_locale_args),
|
|
22
|
-
refinery.
|
|
22
|
+
refinery.logout_path, :id => 'logout' %>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|