caboose-cms 0.9.229 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/assets/javascripts/caboose/admin.js +1 -1
- data/app/assets/javascripts/caboose/admin/application.js +20 -0
- data/app/assets/javascripts/caboose/admin_main.js +13 -3
- data/app/assets/javascripts/caboose/admin_media_index.js +158 -161
- data/app/assets/javascripts/caboose/application.js +7 -8
- data/app/assets/javascripts/caboose/block_content_controller_dragdrop.js +4 -60
- data/app/assets/javascripts/caboose/block_modal_controllers/block_dd_modal_controller.js +2 -3
- data/app/assets/javascripts/caboose/block_modal_controllers/media_modal_controller.js +6 -17
- data/app/assets/javascripts/caboose/model/all.js +1 -5
- data/app/assets/stylesheets/caboose/admin/_config.scss +102 -0
- data/app/assets/stylesheets/caboose/admin/application.css +11 -0
- data/app/assets/stylesheets/caboose/admin/component.css +183 -0
- data/app/assets/stylesheets/caboose/admin/froala.min.css +91 -0
- data/app/assets/stylesheets/caboose/admin/ie.scss +67 -0
- data/app/assets/stylesheets/caboose/admin/integrations/main.scss +6 -0
- data/app/assets/stylesheets/caboose/admin/integrations/shopify.scss +128 -0
- data/app/assets/stylesheets/caboose/admin/jquery-ui-subnav-theme.min.css +5 -0
- data/app/assets/stylesheets/caboose/admin/layout.scss +150 -0
- data/app/assets/stylesheets/caboose/admin/main.scss +34 -0
- data/app/assets/stylesheets/caboose/admin/modules/body.scss +176 -0
- data/app/assets/stylesheets/caboose/admin/modules/buttons.scss +120 -0
- data/app/assets/stylesheets/caboose/admin/modules/countdown.css +21 -0
- data/app/assets/stylesheets/caboose/admin/modules/crumbtrail.scss +80 -0
- data/app/assets/stylesheets/caboose/admin/modules/data_table.scss +92 -0
- data/app/assets/stylesheets/caboose/admin/modules/footer.scss +62 -0
- data/app/assets/stylesheets/caboose/admin/modules/forms.scss +72 -0
- data/app/assets/stylesheets/caboose/admin/modules/functions.scss +31 -0
- data/app/assets/stylesheets/caboose/admin/modules/grid.scss +108 -0
- data/app/assets/stylesheets/caboose/admin/modules/header.scss +77 -0
- data/app/assets/stylesheets/caboose/admin/modules/headings.scss +38 -0
- data/app/assets/stylesheets/caboose/admin/modules/main_nav.scss +73 -0
- data/app/assets/stylesheets/caboose/admin/modules/message_boxes.scss +55 -0
- data/app/assets/stylesheets/caboose/admin/modules/model_binder.scss +189 -0
- data/app/assets/stylesheets/caboose/admin/modules/navigation.scss +261 -0
- data/app/assets/stylesheets/caboose/admin/modules/order_bumps.scss +57 -0
- data/app/assets/stylesheets/caboose/admin/modules/pager.scss +34 -0
- data/app/assets/stylesheets/caboose/admin/modules/product_images.scss +21 -0
- data/app/assets/stylesheets/caboose/admin/modules/products.css +86 -0
- data/app/assets/stylesheets/caboose/admin/modules/search.scss +49 -0
- data/app/assets/stylesheets/caboose/admin/modules/selects.scss +12 -0
- data/app/assets/stylesheets/caboose/admin/modules/subnav_tabs.scss +34 -0
- data/app/assets/stylesheets/caboose/admin/modules/tabs.scss +140 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/block_anchors.scss +48 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/block_overlays.scss +182 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/device_selector.scss +65 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/froala.scss +81 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/group_overlay.scss +115 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/layout.scss +128 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/main.scss +18 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/modal.scss +11 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/preview.scss +25 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/publish.scss +25 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/revisions.scss +58 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/subnav.scss +273 -0
- data/app/assets/stylesheets/caboose/admin/page_edit/top_nav.scss +109 -0
- data/app/assets/stylesheets/caboose/admin/pages/assets_index.css +48 -0
- data/app/assets/stylesheets/caboose/admin/pages/block_edit_image.css.scss +386 -0
- data/app/assets/stylesheets/caboose/admin/pages/media_index.css.scss +300 -0
- data/app/assets/stylesheets/caboose/admin/pages/new_block.css +9 -0
- data/app/assets/stylesheets/caboose/admin/pages/page_edit.scss +960 -0
- data/app/assets/stylesheets/caboose/admin/pages/page_edit_content.scss +103 -0
- data/app/assets/stylesheets/caboose/admin/pages/pages_index.scss +79 -0
- data/app/assets/stylesheets/caboose/admin/pages/post_edit_content.css +46 -0
- data/app/assets/stylesheets/caboose/admin/print.css +3 -0
- data/app/assets/stylesheets/caboose/admin/slack.scss +51 -0
- data/app/assets/stylesheets/caboose/admin_block_edit_image.css.scss +1 -2
- data/app/assets/stylesheets/caboose/admin_edit_page_content_dragdrop.scss +15 -71
- data/app/assets/stylesheets/caboose/admin_main.css.scss +29 -25
- data/app/assets/stylesheets/caboose/admin_media_index.css.scss +5 -26
- data/app/assets/stylesheets/caboose/application.css +5 -11
- data/app/assets/stylesheets/caboose/login.scss +0 -1
- data/app/assets/stylesheets/caboose/modal_main.css +19 -21
- data/app/assets/stylesheets/caboose/model_binder.css +4 -13
- data/app/assets/stylesheets/caboose/page_bar_generator.css +1 -2
- data/app/controllers/caboose/admin_controller.rb +4 -3
- data/app/controllers/caboose/application_controller.rb +19 -16
- data/app/controllers/caboose/assets_controller.rb +65 -0
- data/app/controllers/caboose/block_types_controller.rb +6 -8
- data/app/controllers/caboose/cart_controller.rb +2 -2
- data/app/controllers/caboose/fonts_controller.rb +2 -139
- data/app/controllers/caboose/invoices_controller.rb +4 -5
- data/app/controllers/caboose/login_logs_controller.rb +7 -5
- data/app/controllers/caboose/media_categories_controller.rb +2 -16
- data/app/controllers/caboose/media_controller.rb +11 -14
- data/app/controllers/caboose/pages_controller.rb +42 -104
- data/app/controllers/caboose/posts_controller.rb +7 -53
- data/app/controllers/caboose/products_controller.rb +1 -1
- data/app/controllers/caboose/sites_controller.rb +6 -25
- data/app/controllers/caboose/sns_controller.rb +3 -3
- data/app/controllers/caboose/themes_controller.rb +0 -30
- data/app/controllers/caboose/users_controller.rb +10 -17
- data/app/controllers/caboose/variants_controller.rb +9 -9
- data/app/models/caboose/ab_variant.rb +1 -1
- data/app/models/caboose/asset.rb +23 -0
- data/app/models/caboose/asset_manager.rb +92 -0
- data/app/models/caboose/asset_manifest.rb +91 -0
- data/app/models/caboose/block.rb +24 -100
- data/app/models/caboose/block_cache.rb +105 -0
- data/app/models/caboose/block_cache_file.rb +22 -0
- data/app/models/caboose/block_cache_image.rb +53 -0
- data/app/models/caboose/block_type.rb +3 -4
- data/app/models/caboose/block_type_category.rb +2 -2
- data/app/models/caboose/block_type_parser.rb +1 -1
- data/app/models/caboose/block_type_source.rb +2 -2
- data/app/models/caboose/calendar_event_group.rb +2 -2
- data/app/models/caboose/category.rb +2 -2
- data/app/models/caboose/comment_routes.rb +8 -7
- data/app/models/caboose/core_plugin.rb +3 -4
- data/app/models/caboose/export.rb +1 -1
- data/app/models/caboose/font.rb +2 -7
- data/app/models/caboose/font_variant.rb +0 -12
- data/app/models/caboose/invoice.rb +14 -14
- data/app/models/caboose/line_item.rb +4 -4
- data/app/models/caboose/media.rb +4 -15
- data/app/models/caboose/media_category.rb +7 -5
- data/app/models/caboose/modification.rb +2 -2
- data/app/models/caboose/page.rb +54 -325
- data/app/models/caboose/page_bar_generator.rb +10 -20
- data/app/models/caboose/page_cache.rb +12 -0
- data/app/models/caboose/page_cacher.rb +137 -0
- data/app/models/caboose/post.rb +8 -108
- data/app/models/caboose/product.rb +5 -5
- data/app/models/caboose/product_image.rb +1 -1
- data/app/models/caboose/role.rb +2 -2
- data/app/models/caboose/schema.rb +72 -73
- data/app/models/caboose/site.rb +1 -203
- data/app/models/caboose/theme.rb +5 -70
- data/app/views/caboose/admin/_content.html.erb +44 -0
- data/app/views/caboose/admin/_fonts.html.erb +47 -0
- data/app/views/caboose/admin/_footer.html.erb +1 -0
- data/app/views/caboose/admin/_header.html.erb +12 -0
- data/app/views/caboose/admin/_icons.html.erb +6 -0
- data/app/views/caboose/admin/_mobile_navigation.html.erb +22 -0
- data/app/views/caboose/admin/_post.html.erb +74 -0
- data/app/views/caboose/admin/index.html.erb +33 -36
- data/app/views/caboose/block_types/admin_edit.html.erb +8 -6
- data/app/views/caboose/blocks/_file.html.erb +2 -2
- data/app/views/caboose/blocks/_ga.html.erb +2 -1
- data/app/views/caboose/blocks/_image.html.erb +0 -4
- data/app/views/caboose/blocks/_render_function.html.erb +4 -9
- data/app/views/caboose/fonts/admin_index.html.erb +10 -55
- data/app/views/caboose/invoices_mailer/customer_status_updated.html.erb +14 -5
- data/app/views/caboose/login_logs/admin_index_for_user.html.erb +1 -1
- data/app/views/caboose/media/admin_index.html.erb +24 -14
- data/app/views/caboose/my_account/index.html.erb +0 -1
- data/app/views/caboose/pages/_admin_header.html.erb +0 -5
- data/app/views/caboose/pages/admin_edit_content.html.erb +2 -6
- data/app/views/caboose/pages/admin_edit_general.html.erb +4 -32
- data/app/views/caboose/pages/admin_new_old.html.erb +46 -0
- data/app/views/caboose/pages/test.html.erb +64 -0
- data/app/views/caboose/posts/_admin_header.html.erb +0 -5
- data/app/views/caboose/posts/admin_delete_form.html.erb +1 -1
- data/app/views/caboose/posts/admin_edit_content.html.erb +2 -6
- data/app/views/caboose/products/admin_group_variants.html.erb +1 -1
- data/app/views/caboose/products/admin_sort.html copy.erb +1 -1
- data/app/views/caboose/sites/admin_edit.html.erb +0 -21
- data/app/views/caboose/themes/admin_edit.html.erb +3 -7
- data/app/views/caboose/users/_admin_header.html.erb +0 -4
- data/app/views/caboose/users/admin_edit_roles.html.erb +0 -1
- data/app/views/caboose/variants/admin_group.html.erb +1 -1
- data/app/views/layouts/caboose/admin.html.erb +2 -9
- data/app/views/layouts/caboose/application.html.erb +92 -62
- data/config/routes.rb +1 -4
- data/lib/caboose/version.rb +1 -1
- data/lib/tasks/caboose.rake +14 -3
- metadata +238 -57
- data/app/controllers/caboose/change_logs_controller.rb +0 -13
- data/app/models/caboose/change_log.rb +0 -97
- data/app/views/caboose/blocks/_cached_block.html.erb +0 -28
- data/app/views/caboose/change_logs/admin_index.html.erb +0 -65
- data/app/views/caboose/fonts/admin_family_edit.html.erb +0 -63
- data/app/views/caboose/fonts/admin_family_index.html.erb +0 -42
- data/app/views/caboose/fonts/admin_variant_edit.html.erb +0 -84
- data/app/views/caboose/pages/admin_change_logs.html.erb +0 -56
- data/app/views/caboose/pages/compiled_asset.css.erb +0 -0
- data/app/views/caboose/pages/compiled_asset.js.erb +0 -0
- data/app/views/caboose/posts/admin_change_logs.html.erb +0 -56
- data/app/views/caboose/sites/compiled_asset.css.erb +0 -0
- data/app/views/caboose/sites/compiled_asset.js.erb +0 -0
- data/app/views/caboose/themes/admin_error_log.html.erb +0 -9
- data/app/views/caboose/themes/admin_js.html.erb +0 -131
- data/app/views/caboose/users/admin_change_logs.html.erb +0 -63
- data/app/views/layouts/caboose/css.css.erb +0 -44
- data/app/views/layouts/caboose/footer_css.css.erb +0 -41
- data/app/views/layouts/caboose/footer_js.js.erb +0 -31
- data/app/views/layouts/caboose/js.js.erb +0 -34
@@ -5,15 +5,16 @@ logo = logo.gsub('//','https://') if !logo.nil?
|
|
5
5
|
|
6
6
|
<p><img src='<%= logo %>' /></p>
|
7
7
|
|
8
|
-
<h1>Your
|
8
|
+
<h1>Your invoice has been updated</h1>
|
9
9
|
|
10
|
-
<h2>
|
10
|
+
<h2>Invoice Details</h2>
|
11
11
|
|
12
12
|
<p>Invoice #<%= @invoice.invoice_number %></p>
|
13
13
|
<p>Status: <%= @invoice.status %></p>
|
14
14
|
|
15
15
|
<table border='1' style='border-collapse: collapse;'>
|
16
16
|
<tr>
|
17
|
+
<th>Package</th>
|
17
18
|
<th>Line Item</th>
|
18
19
|
<th>Unit Price</th>
|
19
20
|
<th>Quantity</th>
|
@@ -24,6 +25,13 @@ logo = logo.gsub('//','https://') if !logo.nil?
|
|
24
25
|
<% v = li.variant %>
|
25
26
|
<% p = v.product %>
|
26
27
|
<tr>
|
28
|
+
<% if i == 0 %>
|
29
|
+
<td rowspan="<%= op.line_items.count %>">
|
30
|
+
<div><%= op.shipping_method.service_name %></div>
|
31
|
+
<div><%= op.status %></div>
|
32
|
+
<% if op.tracking_number %><div><%= op.tracking_number %></div><% end %>
|
33
|
+
</td>
|
34
|
+
<% end %>
|
27
35
|
<td>
|
28
36
|
<%= p.title %>
|
29
37
|
<% if li.is_gift %>
|
@@ -45,7 +53,8 @@ logo = logo.gsub('//','https://') if !logo.nil?
|
|
45
53
|
<% next if li.invoice_package_id %>
|
46
54
|
<% v = li.variant %>
|
47
55
|
<% p = v.product %>
|
48
|
-
<tr>
|
56
|
+
<tr>
|
57
|
+
<td>Not assigned to a package</td>
|
49
58
|
<td><%= p.title %></td></td>
|
50
59
|
<td align='right'><%= number_to_currency(li.unit_price) %></td>
|
51
60
|
<td align='right'><%= li.quantity %></td>
|
@@ -69,7 +78,7 @@ logo = logo.gsub('//','https://') if !logo.nil?
|
|
69
78
|
<tr><td colspan="4" align='right'>Total: </td><td align='right'><%= number_to_currency(@invoice.total) %></td></tr>
|
70
79
|
</table>
|
71
80
|
|
72
|
-
<% if @invoice.shipping_address
|
81
|
+
<% if @invoice.shipping_address %>
|
73
82
|
<% sa = @invoice.shipping_address %>
|
74
83
|
<h2>Shipping Address</h2>
|
75
84
|
<p>
|
@@ -80,7 +89,7 @@ logo = logo.gsub('//','https://') if !logo.nil?
|
|
80
89
|
</p>
|
81
90
|
<% end %>
|
82
91
|
|
83
|
-
<% if @invoice.billing_address
|
92
|
+
<% if @invoice.billing_address %>
|
84
93
|
<% ba = @invoice.billing_address %>
|
85
94
|
<h2>Billing Address</h2>
|
86
95
|
<p>
|
@@ -11,7 +11,7 @@ $(document).ready(function() {
|
|
11
11
|
var table = new IndexTable({
|
12
12
|
form_authenticity_token: '<%= form_authenticity_token %>',
|
13
13
|
container: 'login_logs',
|
14
|
-
base_url: '/admin/login-logs
|
14
|
+
base_url: '/admin/login-logs',
|
15
15
|
allow_add: false,
|
16
16
|
allow_bulk_import: false,
|
17
17
|
allow_bulk_edit: false,
|
@@ -18,23 +18,33 @@
|
|
18
18
|
<%= javascript_include_tag 'caboose/model/all' %>
|
19
19
|
<%= javascript_include_tag 'caboose/admin_media_index.js' %>
|
20
20
|
<%= javascript_include_tag 'caboose/jquery-ui.drag-multiple.min.js' %>
|
21
|
+
|
21
22
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/plupload/2.1.3/plupload.full.min.js"></script>
|
22
23
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/plupload/2.1.3/jquery.ui.plupload/jquery.ui.plupload.min.js"></script>
|
23
24
|
|
25
|
+
<script type="text/javascript" src="http://feather.aviary.com/imaging/v2/editor.js"></script>
|
24
26
|
<script type="text/javascript">
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
27
|
+
|
28
|
+
var controller = false;
|
29
|
+
$(document).ready(function() {
|
30
|
+
controller = new MediaController({
|
31
|
+
top_cat_id: <%= raw Caboose.json(@media_category ? @top_media_category.id : false) %>,
|
32
|
+
cat_id: <%= raw Caboose.json(@media_category ? @media_category.id : false) %>,
|
33
|
+
s3_upload_url: '<%= raw @s3_upload_url %>',
|
34
|
+
aws_access_key_id: '<%= raw @aws_access_key_id %>',
|
35
|
+
policy: '<%= raw @policy %>',
|
36
|
+
signature: '<%= raw @signature %>',
|
37
|
+
refresh_unprocessed_images: true,
|
38
|
+
allow_edit: true,
|
39
|
+
assets_path: "<%= Rails.env.production? ? ('https://' + Caboose::cdn_domain + '/assets/') : '/assets/' %>"
|
38
40
|
});
|
41
|
+
});
|
42
|
+
|
39
43
|
</script>
|
40
|
-
<% end %>
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<%
|
47
|
+
# Adobe Image Editor SDK Credentials
|
48
|
+
# CLIENT SECRETf42be039-1af0-41d8-89bb-fdebdb557d3d
|
49
|
+
# CLIENT ID (DEVELOPMENT MODE)*933414ee42934e8b81d8cd2226a5a13b
|
50
|
+
%>
|
@@ -250,6 +250,5 @@ function reset_user_password(pass1, pass2)
|
|
250
250
|
</script>
|
251
251
|
<% end %>
|
252
252
|
<%= content_for :caboose_css do %>
|
253
|
-
<%= stylesheet_link_tag "caboose/model_binder", :media => "all" %>
|
254
253
|
<%= stylesheet_link_tag "caboose/my_account", :media => "all" %>
|
255
254
|
<% end %>
|
@@ -49,11 +49,6 @@ tabs = {
|
|
49
49
|
'Delete Page' => "/admin/pages/#{@page.id}/delete"
|
50
50
|
}
|
51
51
|
|
52
|
-
if @site.use_change_logs && Caboose::ChangeLog.where(:page_id => @page.id).exists? && @logged_in_user.is_allowed('logs','view')
|
53
|
-
arr = tabs.to_a.insert(8, ['Change Logs', "/admin/pages/#{@page.id}/logs"])
|
54
|
-
tabs = Hash[arr]
|
55
|
-
end
|
56
|
-
|
57
52
|
%>
|
58
53
|
<% tabs.each do |text, href| %>
|
59
54
|
<li<%= raw request.fullpath == href ? " class='selected'" : '' %>><a href='<%= href %>'><%= raw text %></a></li>
|
@@ -1,8 +1,6 @@
|
|
1
1
|
<% content_for :caboose_css do %>
|
2
2
|
<%= stylesheet_link_tag 'jquery-ui' %>
|
3
3
|
<%= stylesheet_link_tag 'caboose/admin_block_edit_image' %>
|
4
|
-
<%= stylesheet_link_tag "colorbox-rails" %>
|
5
|
-
<%= stylesheet_link_tag 'caboose/model_binder' %>
|
6
4
|
<% if @site && @site.use_dragdrop %>
|
7
5
|
<%= stylesheet_link_tag 'caboose/admin_edit_page_content_dragdrop' %>
|
8
6
|
<% else %>
|
@@ -13,11 +11,9 @@
|
|
13
11
|
<% end %>
|
14
12
|
<% content_for :caboose_js do %>
|
15
13
|
<%= javascript_include_tag 'jquery-ui' %>
|
16
|
-
<%= javascript_include_tag 'colorbox-rails' %>
|
17
|
-
<%= javascript_include_tag 'caboose/modal_integration' %>
|
18
14
|
<%= javascript_include_tag 'caboose/model/all' %>
|
19
15
|
<%= javascript_include_tag 'caboose/jquery-ui.drag-multiple.min.js' %>
|
20
|
-
|
16
|
+
<%= javascript_include_tag "caboose/clipboard" %>
|
21
17
|
<%= javascript_include_tag "caboose/class" %>
|
22
18
|
<%= javascript_include_tag "caboose/modal_controller" %>
|
23
19
|
<% if @site && @site.use_dragdrop %>
|
@@ -50,7 +46,7 @@ $(document).ready(function() {
|
|
50
46
|
.append($('<a/>').attr('href', '/admin/pages').html("< Back"))
|
51
47
|
.append($('<a/>').attr('href', '/admin/pages/<%= @page.id %>/revert').html("Revert"))
|
52
48
|
.append($('<a/>').attr('href', '/pages/preview/<%= @page.id %>').attr('target','_blank').html("Preview"))
|
53
|
-
.append($('<a/>').attr('href', '
|
49
|
+
.append($('<a/>').attr('href', '/admin/pages/<%= @page.id %>/publish').html("Publish"))
|
54
50
|
<% if @page.page_custom_field_values.count > 0 %>
|
55
51
|
.append($('<a/>').attr('href', '#').html('Custom Fields').click(function(e) { e.preventDefault(); caboose_modal_url('/admin/pages/<%= @page.id %>/custom-fields'); }))
|
56
52
|
<% end %>
|
@@ -22,25 +22,18 @@
|
|
22
22
|
</div>
|
23
23
|
<% end %>
|
24
24
|
|
25
|
-
<% if @site.use_caching %>
|
26
|
-
<div class='field_with_explanation'>
|
27
|
-
<a href="#" onclick="refresh_cache(<%= @page.id %>, false);return false;" id="refresh">Refresh cache for this page</a>
|
28
|
-
<div id="cmessage"></div>
|
29
|
-
</div>
|
30
|
-
<% end %>
|
31
|
-
|
32
25
|
<%= render :partial => 'caboose/pages/admin_footer' %>
|
33
26
|
|
34
27
|
<% content_for :caboose_css do %>
|
35
28
|
<style>
|
36
|
-
a#promote
|
29
|
+
a#promote {
|
37
30
|
color: #565daa;
|
38
31
|
font-size: 13px;
|
39
32
|
text-decoration: none;
|
40
33
|
display: inline-block;
|
41
34
|
margin-bottom: 7px;
|
42
35
|
}
|
43
|
-
a#promote:hover
|
36
|
+
a#promote:hover {
|
44
37
|
text-decoration: underline;
|
45
38
|
}
|
46
39
|
</style>
|
@@ -93,13 +86,13 @@ function promote_page(page_id, confirm)
|
|
93
86
|
if (!confirm)
|
94
87
|
{
|
95
88
|
var p = $('<p/>').addClass('note warning')
|
96
|
-
.append("Are you sure you want to do this? This page will replace the existing homepage. The existing homepage will be hidden but not deleted.
|
89
|
+
.append("Are you sure you want to do this? This page will replace the existing homepage. The existing homepage will be hidden but not deleted.")
|
97
90
|
.append($('<input/>').attr('type','button').val('Yes').click(function() { promote_page(page_id, true); })).append(' ')
|
98
91
|
.append($('<input/>').attr('type','button').val('No').click(function() { $('#pmessage').empty(); }));
|
99
92
|
$('#pmessage').empty().append(p);
|
100
93
|
return;
|
101
94
|
}
|
102
|
-
$('#pmessage').empty().html($('<p/>').addClass('
|
95
|
+
$('#pmessage').empty().html($('<p/>').addClass('loading').html("Promoting page..."));
|
103
96
|
$.ajax({
|
104
97
|
url: '/admin/pages/' + page_id + '/promote',
|
105
98
|
type: 'put',
|
@@ -110,26 +103,5 @@ function promote_page(page_id, confirm)
|
|
110
103
|
});
|
111
104
|
}
|
112
105
|
|
113
|
-
function refresh_cache(page_id, confirm)
|
114
|
-
{
|
115
|
-
if (!confirm)
|
116
|
-
{
|
117
|
-
var p = $('<p/>').addClass('note warning')
|
118
|
-
.append("Are you sure? ")
|
119
|
-
.append($('<input/>').attr('type','button').val('Yes').click(function() { refresh_cache(page_id, true); })).append(' ')
|
120
|
-
.append($('<input/>').attr('type','button').val('No').click(function() { $('#cmessage').empty(); }));
|
121
|
-
$('#cmessage').empty().append(p);
|
122
|
-
return;
|
123
|
-
}
|
124
|
-
$('#cmessage').empty().html($('<p/>').addClass('note loading').html("Finding blocks to cache..."));
|
125
|
-
$.ajax({
|
126
|
-
url: '/api/pages/' + page_id + '/refresh-cache',
|
127
|
-
type: 'get',
|
128
|
-
success: function(resp) {
|
129
|
-
if (resp.success) $('#cmessage').html("<p class='note success'>Page cache will be refreshed.</p>");
|
130
|
-
}
|
131
|
-
});
|
132
|
-
}
|
133
|
-
|
134
106
|
</script>
|
135
107
|
<% end %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<h1>New Page</h1>
|
2
|
+
<p>Parent: <%= @parent ? @parent.title : "Home" %></p>
|
3
|
+
|
4
|
+
<form action='/admin/pages' method='post' id='new_page_form' onsubmit="add_page(); return false;">
|
5
|
+
<input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' />
|
6
|
+
<input type='hidden' name='parent_id' value='<%= @parent_id %>' />
|
7
|
+
<p><input type='text' name='title' placeholder='Title' style="width: 400px;" /></p>
|
8
|
+
<p><select name='block_type_id'>
|
9
|
+
<option value=''>-- Select a layout --</option>
|
10
|
+
<% cat_ids = Caboose::BlockTypeCategory.layouts.collect{ |cat| cat.id } %>
|
11
|
+
<% Caboose::BlockType.includes(:block_type_site_memberships).where("block_type_category_id in (?) and block_type_site_memberships.site_id = ?", cat_ids, @site.id).reorder(:description).all.each do |bt| %>
|
12
|
+
<option value="<%= bt.id %>"><%= bt.description %></option>
|
13
|
+
<% end %>
|
14
|
+
</select></p>
|
15
|
+
<div id='message'></div>
|
16
|
+
<p>
|
17
|
+
<input type='button' value='< Back' onclick="window.location='/admin/pages';" />
|
18
|
+
<input type='submit' value='Add Page' />
|
19
|
+
</p>
|
20
|
+
</form>
|
21
|
+
|
22
|
+
<% content_for :caboose_js do %>
|
23
|
+
<%= javascript_include_tag "caboose/model/all" %>
|
24
|
+
<script type='text/javascript'>
|
25
|
+
|
26
|
+
var modal = false;
|
27
|
+
$(document).ready(function() {
|
28
|
+
modal = new CabooseModal(420);
|
29
|
+
});
|
30
|
+
|
31
|
+
function add_page()
|
32
|
+
{
|
33
|
+
modal.autosize("<p class='loading'>Adding page...</p>");
|
34
|
+
$.ajax({
|
35
|
+
url: '/admin/pages',
|
36
|
+
type: 'post',
|
37
|
+
data: $('#new_page_form').serialize(),
|
38
|
+
success: function(resp) {
|
39
|
+
if (resp.error) modal.autosize("<p class='note error'>" + resp.error + "</p>");
|
40
|
+
if (resp.redirect) parent.window.location = resp.redirect
|
41
|
+
}
|
42
|
+
});
|
43
|
+
}
|
44
|
+
|
45
|
+
</script>
|
46
|
+
<% end %>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
|
2
|
+
<h1>Edit Workout</h1>
|
3
|
+
|
4
|
+
<p><select name='day' onchange="window.location='/workouts/'+this.value+'/edit';">
|
5
|
+
<% @workouts.each do |w| %>
|
6
|
+
<%
|
7
|
+
text = "Day #{w.day}" + (w.name.nil? ? "" : " - #{w.name}")
|
8
|
+
selected = w.day == @workout.day ? " selected='true'" : ''
|
9
|
+
%>
|
10
|
+
<option value="<%= w.day %>"<%= selected %>><%= text %></option>
|
11
|
+
<% end %>
|
12
|
+
</select></p>
|
13
|
+
<hr />
|
14
|
+
<div id='workout_<%= @workout.id %>_container'></div>
|
15
|
+
|
16
|
+
<h2>Sets</h2>
|
17
|
+
<div id='set_listing_container'></div>
|
18
|
+
<h2>New Set</h2>
|
19
|
+
<div id='set_new_container'></div>
|
20
|
+
|
21
|
+
<% content_for :css do %>
|
22
|
+
<%= stylesheet_link_tag "workouts", :media => "all" %>
|
23
|
+
<% end %>
|
24
|
+
<% content_for :js do %>
|
25
|
+
<%= javascript_include_tag "model.form.set" %>
|
26
|
+
<script type="text/javascript">
|
27
|
+
$(document).ready(function() {
|
28
|
+
|
29
|
+
new Controller({
|
30
|
+
|
31
|
+
init: function()
|
32
|
+
{
|
33
|
+
var workout = new Model({
|
34
|
+
name: 'Workout',
|
35
|
+
id: <%= @workout.id %>,
|
36
|
+
attributes: [
|
37
|
+
{ name: 'name' , type: 'text' , value: <%= raw @workout.name.to_json %> },
|
38
|
+
{ name: 'description' , type: 'textarea' , value: <%= raw @workout.description.to_json %>, width: 400, height: 200 }
|
39
|
+
]
|
40
|
+
});
|
41
|
+
|
42
|
+
var set = new Model({
|
43
|
+
name: 'Set',
|
44
|
+
id: 'new',
|
45
|
+
form: 'Model.Form.Set',
|
46
|
+
post_add: function() {
|
47
|
+
set.listing();
|
48
|
+
$('#'+set.message).empty();
|
49
|
+
},
|
50
|
+
listing_url: '/sets/listing?workout_id=<%= @workout.id %>',
|
51
|
+
attributes: [
|
52
|
+
{ name: 'workout_id' , type: 'hidden' , value: <%= @workout.id %> },
|
53
|
+
{ name: 'category_id' , type: 'select' , value: -1, options_url: '/workouts/category-options' },
|
54
|
+
{ name: 'movement_id' , type: 'select' , value: -1, options_url: '/movements/options' },
|
55
|
+
{ name: 'qty' , type: 'text' , value: 1, show_reminder: false, css: { width: 40, textAlign: 'right' } },
|
56
|
+
{ name: 'reps' , type: 'text' , value: 10, show_reminder: false, css: { width: 40, textAlign: 'right' } },
|
57
|
+
{ name: 'per_unit' , type: 'text' , value: '', show_reminder: false, css: { width: 40, textAlign: 'right' } },
|
58
|
+
{ name: 'hold_time' , type: 'text' , value: '', show_reminder: false, css: { width: 40, textAlign: 'right' } }
|
59
|
+
]
|
60
|
+
});
|
61
|
+
|
62
|
+
});
|
63
|
+
</script>
|
64
|
+
<% end %>
|
@@ -15,11 +15,6 @@ tabs = {
|
|
15
15
|
"/admin/posts/#{@post.id}/delete" => 'Delete Post'
|
16
16
|
}
|
17
17
|
|
18
|
-
if @site.use_change_logs && Caboose::ChangeLog.where(:post_id => @post.id).exists? && @logged_in_user.is_allowed('logs','view')
|
19
|
-
arr = tabs.to_a.insert(4, ["/admin/posts/#{@post.id}/logs", "Change Logs"])
|
20
|
-
tabs = Hash[arr]
|
21
|
-
end
|
22
|
-
|
23
18
|
%>
|
24
19
|
<% tabs.each do |href,text| %>
|
25
20
|
<li<%= raw request.fullpath == href ? " class='selected'" : '' %>><a href='<%= href %>'><%= raw text %></a></li>
|
@@ -1,8 +1,6 @@
|
|
1
1
|
<% content_for :caboose_css do %>
|
2
2
|
<%= stylesheet_link_tag 'jquery-ui' %>
|
3
3
|
<%= stylesheet_link_tag 'caboose/admin_block_edit_image' %>
|
4
|
-
<%= stylesheet_link_tag "colorbox-rails" %>
|
5
|
-
<%= stylesheet_link_tag 'caboose/model_binder' %>
|
6
4
|
<% if @site && @site.use_dragdrop %>
|
7
5
|
<%= stylesheet_link_tag 'caboose/admin_edit_page_content_dragdrop' %>
|
8
6
|
<% else %>
|
@@ -13,11 +11,9 @@
|
|
13
11
|
<% end %>
|
14
12
|
<% content_for :caboose_js do %>
|
15
13
|
<%= javascript_include_tag 'jquery-ui' %>
|
16
|
-
<%= javascript_include_tag 'colorbox-rails' %>
|
17
|
-
<%= javascript_include_tag 'caboose/modal_integration' %>
|
18
14
|
<%= javascript_include_tag 'caboose/model/all' %>
|
19
15
|
<%= javascript_include_tag 'caboose/jquery-ui.drag-multiple.min.js' %>
|
20
|
-
|
16
|
+
<%= javascript_include_tag "caboose/clipboard" %>
|
21
17
|
<%= javascript_include_tag "caboose/class" %>
|
22
18
|
<%= javascript_include_tag "caboose/modal_controller" %>
|
23
19
|
<% if @site && @site.use_dragdrop %>
|
@@ -50,7 +46,7 @@ $(document).ready(function() {
|
|
50
46
|
.append($('<a/>').attr('href', '/admin/posts').html("< Back"))
|
51
47
|
.append($('<a/>').attr('href', '/admin/posts/<%= @post.id %>/revert').html("Revert"))
|
52
48
|
.append($('<a/>').attr('href', '/admin/posts/<%= @post.id %>/preview-post').attr('target','_blank').html("Preview"))
|
53
|
-
.append($('<a/>').attr('href', '
|
49
|
+
.append($('<a/>').attr('href', '/admin/posts/<%= @post.id %>/publish').html("Publish"))
|
54
50
|
.append($('<a/>').attr('href', '/admin/posts/<%= @post.id %>').html("Post Settings"))
|
55
51
|
.append($('<a/>').attr('href', '<%= @post.uri %>').attr('target','_blank').text("View Post"))
|
56
52
|
);
|
@@ -199,7 +199,7 @@
|
|
199
199
|
<%= render partial: 'caboose/products/admin_footer' %>
|
200
200
|
|
201
201
|
<% content_for :caboose_js do %>
|
202
|
-
<%= javascript_include_tag '
|
202
|
+
<%= javascript_include_tag 'underscore' %>
|
203
203
|
|
204
204
|
<script>
|
205
205
|
window.count = <%= @variants.count %>;
|
@@ -33,7 +33,7 @@
|
|
33
33
|
</section>
|
34
34
|
|
35
35
|
<% content_for :caboose_js do %>
|
36
|
-
<%= javascript_include_tag('
|
36
|
+
<%= javascript_include_tag('underscore') %>
|
37
37
|
<%= javascript_include_tag('caboose/jquery-ui') %>
|
38
38
|
<%= javascript_include_tag('caboose/jquery-ui-multisortable') %>
|
39
39
|
|
@@ -13,21 +13,14 @@ user_ids = [] if user_ids.nil?
|
|
13
13
|
</p>
|
14
14
|
<p><div id='site_<%= @site.id %>_description' ></div></p>
|
15
15
|
<p><div id='site_<%= @site.id %>_under_construction_html' ></div></p>
|
16
|
-
<p><div id='site_<%= @site.id %>_use_change_logs' ></div></p>
|
17
16
|
<p><div id='site_<%= @site.id %>_use_store' ></div></p>
|
18
17
|
<p><div id='site_<%= @site.id %>_use_fonts' ></div></p>
|
19
18
|
<p><div id='site_<%= @site.id %>_use_dragdrop' ></div></p>
|
20
|
-
<p><div id='site_<%= @site.id %>_use_caching' ></div></p>
|
21
|
-
<% if @site.use_caching %>
|
22
|
-
<div class="cache"><a style="font-size:13px;color:#7373c3;text-decoration:none;" href="#" onclick="refresh_cache(<%= @site.id %>);return false;">Refresh all page caches</a></div>
|
23
|
-
<div id="c-message"></div>
|
24
|
-
<% end %>
|
25
19
|
<p><div id='site_<%= @site.id %>_allow_self_registration' ></div></p>
|
26
20
|
<% if @site.theme.nil? %>
|
27
21
|
<p><div id='site_<%= @site.id %>_theme_color' ></div></p>
|
28
22
|
<% end %>
|
29
23
|
<p><div id='site_<%= @site.id %>_assets_url' ></div></p>
|
30
|
-
<p><div id='site_<%= @site.id %>_google_api_key' ></div></p>
|
31
24
|
<p><div id='site_<%= @site.id %>_default_layout_id' ></div></p>
|
32
25
|
<p><div id='site_<%= @site.id %>_favicon' ></div></p>
|
33
26
|
<p><div id='site_<%= @site.id %>_recaptcha_threshold' ></div></p>
|
@@ -109,13 +102,10 @@ $(document).ready(function() {
|
|
109
102
|
{ name: 'description' , nice_name: 'Description' , type: 'text' , value: <%= raw Caboose.json(@site.description) %>, width: 600 },
|
110
103
|
{ name: 'theme_color' , nice_name: 'Theme Color' , type: 'text' , value: <%= raw Caboose.json(@site.theme_color) %>, width: 600 },
|
111
104
|
{ name: 'assets_url' , nice_name: 'Assets URL' , type: 'text' , value: <%= raw Caboose.json(@site.assets_url) %>, width: 600 },
|
112
|
-
{ name: 'google_api_key' , nice_name: 'Google Maps API Key' , type: 'text' , value: <%= raw Caboose.json(@site.google_api_key) %>, width: 600 },
|
113
105
|
{ name: 'under_construction_html' , nice_name: 'Under Construction HTML' , type: 'textarea' , value: <%= raw Caboose.json(@site.under_construction_html) %>, width: 600, height: 220 },
|
114
106
|
{ name: 'use_store' , nice_name: 'Enable Store' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_store ? true : false) %>, width: 400 },
|
115
|
-
{ name: 'use_change_logs' , nice_name: 'Enable Logs' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_change_logs ? true : false) %>, width: 400 },
|
116
107
|
{ name: 'use_fonts' , nice_name: 'Enable Fonts' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_fonts ? true : false) %>, width: 400 },
|
117
108
|
{ name: 'use_dragdrop' , nice_name: 'Enable Drag & Drop' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_dragdrop ? true : false) %>, width: 400 },
|
118
|
-
{ name: 'use_caching' , nice_name: 'Enable Caching' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_caching ? true : false) %>, width: 400 },
|
119
109
|
{ name: 'allow_self_registration' , nice_name: 'Allow Self Registration' , type: 'checkbox' , value: <%= raw Caboose.json(@site.allow_self_registration ? true : false) %>, width: 400 },
|
120
110
|
{ name: 'default_layout_id' , nice_name: 'Default Layout' , type: 'select' , value: <%= raw Caboose.json(@site.default_layout_id) %>, width: 600, options_url: "/admin/sites/<%= @site.id %>/default-layout-options" },
|
121
111
|
{ name: 'recaptcha_threshold' , nice_name: 'Recaptcha Threshold' , type: 'text' , value: <%= raw Caboose.json(@site.recaptcha_threshold) %>, width: 250 }
|
@@ -123,17 +113,6 @@ $(document).ready(function() {
|
|
123
113
|
});
|
124
114
|
});
|
125
115
|
|
126
|
-
function refresh_cache(site_id) {
|
127
|
-
$(".cache").hide();
|
128
|
-
$.ajax({
|
129
|
-
url: '/admin/sites/' + site_id + '/refresh-cache',
|
130
|
-
type: 'put',
|
131
|
-
success: function(resp) {
|
132
|
-
$("#c-message").html("<p class='note success'>Page caches are being refreshed now.</p>");
|
133
|
-
}
|
134
|
-
});
|
135
|
-
}
|
136
|
-
|
137
116
|
function set_under_construction(site_id, domain_id, checked)
|
138
117
|
{
|
139
118
|
$.ajax({
|