knitkit 2.1.15 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/controllers/knitkit/base_controller.rb +1 -1
- data/app/controllers/knitkit/comments_controller.rb +7 -2
- data/app/controllers/knitkit/erp_app/desktop/app_controller.rb +78 -98
- data/app/controllers/knitkit/erp_app/desktop/articles_controller.rb +65 -45
- data/app/controllers/knitkit/erp_app/desktop/content_controller.rb +22 -12
- data/app/controllers/knitkit/erp_app/desktop/file_assets_controller.rb +1 -1
- data/app/controllers/knitkit/erp_app/desktop/image_assets_controller.rb +28 -16
- data/app/controllers/knitkit/erp_app/desktop/inquiries_controller.rb +15 -49
- data/app/controllers/knitkit/erp_app/desktop/online_document_sections_controller.rb +4 -3
- data/app/controllers/knitkit/erp_app/desktop/position_controller.rb +69 -11
- data/app/controllers/knitkit/erp_app/desktop/theme_controller.rb +63 -60
- data/app/controllers/knitkit/erp_app/desktop/website_controller.rb +98 -82
- data/app/controllers/knitkit/erp_app/desktop/website_host_controller.rb +77 -0
- data/app/controllers/knitkit/erp_app/desktop/website_nav_controller.rb +64 -44
- data/app/controllers/knitkit/erp_app/desktop/website_nav_item_controller.rb +147 -0
- data/app/controllers/knitkit/erp_app/desktop/website_section_controller.rb +81 -45
- data/app/controllers/knitkit/mobile_controller.rb +15 -0
- data/app/controllers/knitkit/online_document_sections_controller.rb +2 -1
- data/app/controllers/knitkit/unauthorized_controller.rb +0 -1
- data/app/controllers/knitkit/website_sections_controller.rb +7 -4
- data/app/mailers/website_inquiry_mailer.rb +8 -7
- data/app/models/content.rb +11 -2
- data/app/models/document.rb +2 -17
- data/app/models/published_website.rb +96 -59
- data/app/models/theme.rb +100 -14
- data/app/models/website.rb +260 -28
- data/app/models/website_inquiry.rb +5 -12
- data/app/models/website_section.rb +9 -1
- data/app/views/knitkit/blogs/_add_comment.html.erb +44 -23
- data/app/views/knitkit/blogs/_comment.html.erb +4 -6
- data/app/views/knitkit/blogs/index.html.erb +63 -49
- data/app/views/knitkit/blogs/show.html.erb +17 -12
- data/app/views/knitkit/mobile/index.html.erb +162 -0
- data/app/views/knitkit/online_document_sections/index.html.erb +7 -5
- data/app/views/knitkit/unauthorized/index.html.erb +8 -4
- data/app/views/knitkit/website_sections/index.html.erb +8 -4
- data/app/views/layouts/knitkit/base.html.erb +79 -63
- data/app/views/layouts/knitkit/online_document_sections.html.erb +74 -52
- data/app/views/menus/knitkit/_default_menu.html.erb +4 -4
- data/app/views/menus/knitkit/_default_section_menu.html.erb +22 -23
- data/app/views/shared/knitkit/_bread_crumb.html.erb +10 -7
- data/app/views/shared/knitkit/_footer.html.erb +2 -2
- data/app/views/website_inquiry_mailer/inquiry.erb +23 -2
- data/app/widgets/contact_us/base.rb +25 -50
- data/app/widgets/contact_us/javascript/contact_us.js +7 -7
- data/app/widgets/contact_us/views/error.html.erb +6 -8
- data/app/widgets/contact_us/views/index.html.erb +28 -1
- data/app/widgets/contact_us/views/layouts/base.html.erb +9 -6
- data/app/widgets/contact_us/views/success.html.erb +3 -3
- data/app/widgets/google_map/views/index.html.erb +36 -36
- data/app/widgets/login/base.rb +1 -0
- data/app/widgets/login/javascript/login.js +3 -3
- data/app/widgets/login/views/index.html.erb +46 -26
- data/app/widgets/login/views/layouts/base.html.erb +15 -13
- data/app/widgets/login/views/login_header.html.erb +7 -9
- data/app/widgets/manage_profile/base.rb +116 -164
- data/app/widgets/manage_profile/views/_address.html.erb +184 -0
- data/app/widgets/manage_profile/views/_contact_information_form.html.erb +23 -192
- data/app/widgets/manage_profile/views/_email_address.html.erb +163 -0
- data/app/widgets/manage_profile/views/_password_form.html.erb +23 -20
- data/app/widgets/manage_profile/views/_phone_number.html.erb +165 -0
- data/app/widgets/manage_profile/views/_user_information_form.html.erb +49 -33
- data/app/widgets/manage_profile/views/error.html.erb +6 -0
- data/app/widgets/manage_profile/views/index.html.erb +44 -46
- data/app/widgets/manage_profile/views/layouts/base.html.erb +3 -1
- data/app/widgets/manage_profile/views/success.html.erb +5 -0
- data/app/widgets/reset_password/views/index.html.erb +33 -28
- data/app/widgets/reset_password/views/layouts/base.html.erb +10 -1
- data/app/widgets/search/base.rb +37 -25
- data/app/widgets/search/views/_inline_search_form.html.erb +12 -0
- data/app/widgets/search/views/_search_form.html.erb +41 -0
- data/app/widgets/search/views/index.html.erb +5 -3
- data/app/widgets/search/views/layouts/base.html.erb +13 -23
- data/app/widgets/search/views/show.html.erb +32 -47
- data/app/widgets/signup/base.rb +1 -1
- data/app/widgets/signup/javascript/signup.js +7 -9
- data/app/widgets/signup/views/_signup_form.html.erb +34 -29
- data/app/widgets/signup/views/error.html.erb +11 -11
- data/app/widgets/signup/views/index.html.erb +3 -2
- data/app/widgets/signup/views/layouts/base.html.erb +8 -5
- data/app/widgets/signup/views/success.html.erb +5 -4
- data/config/routes.rb +39 -28
- data/db/data_migrations/20120809020508_update_website_and_configuration.rb +3 -0
- data/db/migrate/20110211002317_setup_knitkit.rb +0 -1
- data/db/migrate/20131112013052_add_knitkit_missing_indexes.rb +33 -0
- data/db/migrate/20140622212723_update_website_inquiries.rb +22 -0
- data/db/migrate/20140911185022_add_publishing_to_website.rb +5 -0
- data/db/migrate/20141013073349_add_custom_fields_to_documents.rb +12 -0
- data/db/migrate/20141016101936_upgrade_remove_dynamic_attributes.rb +13 -0
- data/lib/knitkit.rb +0 -1
- data/lib/knitkit/engine.rb +1 -0
- data/lib/knitkit/extensions.rb +4 -0
- data/lib/knitkit/extensions/active_record/acts_as_commentable.rb +33 -0
- data/lib/knitkit/extensions/active_record/acts_as_document.rb +0 -12
- data/lib/knitkit/extensions/active_record/acts_as_publishable.rb +7 -10
- data/lib/knitkit/extensions/compass_ae/widgets/base.rb +2 -4
- data/lib/knitkit/extensions/compass_ae/widgets/widget_proxy_controller.rb +4 -1
- data/lib/knitkit/extensions/railties/action_view/helpers/blog_helper.rb +16 -13
- data/lib/knitkit/extensions/railties/action_view/helpers/content_helper.rb +10 -8
- data/lib/knitkit/extensions/railties/theme_support/asset_tag_helper.rb +123 -108
- data/lib/knitkit/extensions/will_paginate/link_renderer.rb +67 -0
- data/lib/knitkit/routing_filter/section_router.rb +10 -8
- data/lib/knitkit/syntax_validator.rb +2 -2
- data/lib/knitkit/version.rb +7 -3
- data/public/images/inline_edit/close.png +0 -0
- data/public/images/knitkit/close_window.png +0 -0
- data/public/images/knitkit/logo.png +0 -0
- data/public/images/knitkit/splash/images/add-site.png +0 -0
- data/public/images/knitkit/splash/images/adjust-site.png +0 -0
- data/public/images/knitkit/splash/images/browse-site.png +0 -0
- data/public/images/knitkit/splash/images/find-themes.png +0 -0
- data/public/images/knitkit/splash/images/settings.png +0 -0
- data/public/images/knitkit/splash/images/tutorials.png +0 -0
- data/public/images/knitkit/splash/splash.png +0 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/articles_grid_panel.js +656 -627
- data/public/javascripts/erp_app/desktop/applications/knitkit/center_region.js +444 -333
- data/public/javascripts/erp_app/desktop/applications/knitkit/{east_region.js → east_region/east_region.js} +33 -33
- data/public/javascripts/erp_app/desktop/applications/knitkit/east_region/file_assets_panel.js +332 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/east_region/image_assets_data_view.js +144 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/east_region/image_assets_panel.js +335 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/{widgets_panel.js → east_region/widgets_panel.js} +55 -55
- data/public/javascripts/erp_app/desktop/applications/knitkit/inquiries_grid_panel.js +150 -37
- data/public/javascripts/erp_app/desktop/applications/knitkit/module.js +228 -96
- data/public/javascripts/erp_app/desktop/applications/knitkit/publish_window.js +89 -85
- data/public/javascripts/erp_app/desktop/applications/knitkit/published_grid_panel.js +238 -217
- data/public/javascripts/erp_app/desktop/applications/knitkit/select_roles_window.js +59 -54
- data/public/javascripts/erp_app/desktop/applications/knitkit/splash_screen.js +170 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/top_menu/main_menu.js +1168 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/top_menu/websites_combo.js +71 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/versions_grid_panel.js +301 -306
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/article.js +216 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/document.js +182 -153
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/host.js +48 -65
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/menu.js +93 -94
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/section.js +523 -197
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/website_nav_items.js +20 -34
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/hosts_tree_panel.js +74 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/menu_tree_panel.js +245 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/site_contents_tree_panel.js +360 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/themes_tree_panel.js +348 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/west_region.js +106 -1132
- data/public/javascripts/knitkit/bootstrap-datepicker.js +474 -0
- data/public/javascripts/knitkit/bootstrap.min.js +7 -0
- data/public/javascripts/knitkit/confirm-bootstrap.js +110 -0
- data/public/javascripts/knitkit/inline_editing.js +73 -50
- data/public/javascripts/knitkit/jquery.maskedinput.min.js +7 -0
- data/public/javascripts/knitkit/mobile/app/view/Main.js +108 -0
- data/public/javascripts/knitkit/mobile/ux/slidenavigation/View.js +734 -0
- data/public/javascripts/knitkit/theme.js +76 -0
- data/public/stylesheets/erp_app/desktop/applications/knitkit/knitkit.css +95 -35
- data/public/stylesheets/knitkit/bootstrap-responsive.min.css +10 -0
- data/public/stylesheets/knitkit/bootstrap.min.css +7 -0
- data/public/stylesheets/knitkit/custom.css +122 -0
- data/public/stylesheets/knitkit/datepicker.css +182 -0
- data/public/stylesheets/knitkit/inline_editing.css +58 -58
- data/spec/controllers/knitkit/erp_app/desktop/website_section_controller_spec.rb +1 -1
- data/spec/dummy/config/application.rb +1 -1
- data/spec/models/article_spec.rb +3 -3
- data/spec/models/content_spec.rb +9 -9
- data/spec/models/website_spec.rb +1 -1
- metadata +100 -114
- data/app/helpers/application_helper.rb +0 -134
- data/app/views/knitkit/articles/index.html.erb +0 -3
- data/app/views/knitkit/articles/show.html.erb +0 -4
- data/app/views/menus/knitkit/_default_sub_menu.html.erb +0 -43
- data/app/views/menus/knitkit/_default_sub_section_menu.html.erb +0 -47
- data/app/widgets/contact_us/views/_contact_form.html.erb +0 -36
- data/app/widgets/dynamic_forms/base.rb +0 -139
- data/app/widgets/dynamic_forms/javascript/dynamic_forms.js +0 -110
- data/app/widgets/dynamic_forms/views/error.html.erb +0 -5
- data/app/widgets/dynamic_forms/views/index.html.erb +0 -8
- data/app/widgets/dynamic_forms/views/success.html.erb +0 -4
- data/app/widgets/dynamic_grid/base.rb +0 -130
- data/app/widgets/dynamic_grid/helpers/controller/dynamic_grid_controller_helper.rb +0 -3
- data/app/widgets/dynamic_grid/helpers/view/dynamic_grid_view_helper.rb +0 -3
- data/app/widgets/dynamic_grid/javascript/dynamic_grid.js +0 -177
- data/app/widgets/dynamic_grid/views/index.html.erb +0 -14
- data/app/widgets/login/views/reset_password.html.erb +0 -26
- data/app/widgets/manage_profile/views/default_type_error.html.erb +0 -5
- data/app/widgets/scaffold/base.rb +0 -87
- data/app/widgets/scaffold/helpers/controller/scaffold_controller_helper.rb +0 -3
- data/app/widgets/scaffold/helpers/view/scaffold_view_helper.rb +0 -3
- data/app/widgets/scaffold/javascript/scaffold.js +0 -337
- data/app/widgets/scaffold/views/index.html.erb +0 -15
- data/app/widgets/search/views/_search.html.erb +0 -39
- data/public/images/knitkit/bullet.png +0 -0
- data/public/images/knitkit/close.png +0 -0
- data/public/images/knitkit/content.png +0 -0
- data/public/images/knitkit/footer.png +0 -0
- data/public/images/knitkit/graphic.png +0 -0
- data/public/images/knitkit/greyFadeDown.png +0 -0
- data/public/images/knitkit/link.png +0 -0
- data/public/images/knitkit/menu.png +0 -0
- data/public/images/knitkit/menu_select.png +0 -0
- data/public/images/knitkit/search.png +0 -0
- data/public/images/knitkit/tooltip.gif +0 -0
- data/public/javascripts/ajax_pagination.js +0 -33
- data/public/javascripts/datepicker.js +0 -445
- data/public/javascripts/erp_app/desktop/applications/knitkit/file_assets_panel.js +0 -341
- data/public/javascripts/erp_app/desktop/applications/knitkit/image_assets_data_view.js +0 -31
- data/public/javascripts/erp_app/desktop/applications/knitkit/image_assets_panel.js +0 -263
- data/public/javascripts/erp_app/desktop/applications/knitkit/section_articles_grid_panel.js +0 -722
- data/public/javascripts/erp_app/desktop/applications/knitkit/themes_tree_panel.js +0 -585
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/website.js +0 -155
- data/public/javascripts/knitkit/helpers.js +0 -26
- data/public/stylesheets/datepicker.css +0 -121
- data/public/stylesheets/extjs/resources/css/knitkit_extjs_4.css +0 -233
- data/public/stylesheets/knitkit/style.css +0 -426
@@ -1,48 +1,33 @@
|
|
1
|
-
<%
|
2
|
-
<
|
3
|
-
<%=render :partial => '/search' %>
|
4
|
-
</p>
|
5
|
-
<% end %>
|
6
|
-
|
7
|
-
<% @results.each do |r| %>
|
8
|
-
<p>
|
9
|
-
<a href="<%=r[:link] %>"><%= r[:title] %></a><br />
|
10
|
-
<%= raw r[:content].body_html[0..100] unless r[:content].body_html.nil? %><br />
|
11
|
-
</p>
|
12
|
-
<% end %>
|
13
|
-
|
14
|
-
<% if @ajax_results %>
|
15
|
-
<p>
|
16
|
-
<%= will_paginate @results, :class => 'pagination ajax', :params => { :widget_name => 'search',
|
17
|
-
:widget_action => 'new',
|
18
|
-
:uuid => @uuid,
|
19
|
-
:query => params[:query],
|
20
|
-
:content_type => params[:content_type],
|
21
|
-
:section_permalink => params[:section_permalink],
|
22
|
-
:per_page => params[:per_page],
|
23
|
-
:only_path => true,
|
24
|
-
:use_route => :widget,
|
25
|
-
:scope => erp_app
|
26
|
-
} %>
|
27
|
-
</p>
|
1
|
+
<% if @results.count == 0 %>
|
2
|
+
<h2>No Results</h2>
|
28
3
|
<% else %>
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
4
|
+
<% @results.each do |r| %>
|
5
|
+
<p>
|
6
|
+
<a href="<%= r[:link] %>"><%= r[:title] %></a>
|
7
|
+
<br/>
|
8
|
+
<%= sanitize(r[:content].body_html[0..500], :tags => []) unless r[:content].body_html.nil? %>
|
9
|
+
<br/>
|
10
|
+
</p>
|
11
|
+
<% end %>
|
12
|
+
<%=
|
13
|
+
will_paginate @results,
|
14
|
+
:renderer => Knitkit::Extensions::WillPaginate::LinkRenderer,
|
15
|
+
:params => {
|
16
|
+
:widget_name => 'search',
|
17
|
+
:widget_action => 'search',
|
18
|
+
:uuid => @uuid,
|
19
|
+
:query => @query,
|
20
|
+
:content_type => @content_type,
|
21
|
+
:section_unique_name => @section_unique_name,
|
22
|
+
:per_page => @per_page,
|
23
|
+
:controller => 'erp_app/widget_proxy',
|
24
|
+
:only_path => true,
|
25
|
+
:scope => erp_app
|
26
|
+
}
|
27
|
+
%>
|
28
|
+
<script type="text/javascript">
|
29
|
+
$(function () {
|
30
|
+
jQuery('.pagination a').attr('data-remote', 'true');
|
31
|
+
});
|
32
|
+
</script>
|
33
|
+
<% end %>
|
data/app/widgets/signup/base.rb
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
Compass.ErpApp.Widgets.Signup = {
|
2
2
|
template: new Ext.Template('<%= render_widget :signup, :params => {:login_url => "/login"}%>'),
|
3
|
-
addSignup:function(){
|
3
|
+
addSignup: function () {
|
4
4
|
Ext.getCmp('knitkitCenterRegion').addContentToActiveCodeMirror(Compass.ErpApp.Widgets.Signup.template.apply());
|
5
5
|
}
|
6
|
-
}
|
6
|
+
};
|
7
7
|
|
8
8
|
Compass.ErpApp.Widgets.AvailableWidgets.push({
|
9
|
-
name:'Signup',
|
10
|
-
iconUrl:'/images/icons/
|
11
|
-
onClick:Compass.ErpApp.Widgets.Signup.addSignup,
|
12
|
-
about:'This widget allows
|
13
|
-
});
|
14
|
-
|
15
|
-
|
9
|
+
name: 'Signup',
|
10
|
+
iconUrl: '/images/icons/sign_up/sign_up_48x48.png',
|
11
|
+
onClick: Compass.ErpApp.Widgets.Signup.addSignup,
|
12
|
+
about: 'This widget allows users to sign up.'
|
13
|
+
});
|
@@ -1,34 +1,39 @@
|
|
1
|
-
<%= form_remote_tag build_widget_url(:new), :
|
1
|
+
<%= form_remote_tag build_widget_url(:new), :class => "form-signin", :style => 'max-width: 500px;' do %>
|
2
2
|
<div class="form_settings">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<
|
24
|
-
<
|
25
|
-
<%= password_field_tag :
|
26
|
-
</
|
27
|
-
|
28
|
-
|
29
|
-
|
3
|
+
|
4
|
+
<div class="form-group">
|
5
|
+
<label for="first_name">Enter your name</label>
|
6
|
+
<%= text_field_tag :first_name, nil, :class => "form-control", :placeholder => "First Name", :required => true %>
|
7
|
+
</div>
|
8
|
+
<div class="form-group">
|
9
|
+
|
10
|
+
<%= text_field_tag :last_name, nil, :class => "form-control", :placeholder => "Last Name", :required => true %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="form-group">
|
14
|
+
<label for="email">Email</label>
|
15
|
+
<%= text_field_tag :email, params[:email], :class => "form-control", :placeholder => "Enter a valid email address", :required => true, :type => 'email' %>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="form-group">
|
19
|
+
<label for="email">Create a user name to log on to the system</label>
|
20
|
+
<%= text_field_tag :username, params[:username], :class => "form-control", :placeholder => "Enter a username", :required => true %>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="form-group">
|
24
|
+
<label for="password">Enter a password</label>
|
25
|
+
<%= password_field_tag :password, nil, :class => "form-control", :placeholder => "", :required => true %>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="form-group">
|
29
|
+
<label for="password_confirmation">Confirm your password</label>
|
30
|
+
<%= password_field_tag :password_confirmation, nil, :class => "form-control", :placeholder => "", :required => true %>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<p class="text-center">
|
34
|
+
<%= submit_tag "Sign up", :disable_with => "Please wait...", :class => "btn btn-primary submit", :style => ''%>
|
30
35
|
</p>
|
36
|
+
|
31
37
|
</div>
|
32
38
|
<input type="hidden" value="<%=@login_url%>" name="login_url" />
|
33
39
|
<% end %>
|
34
|
-
|
@@ -1,15 +1,15 @@
|
|
1
|
-
<div class="
|
1
|
+
<div class="alert alert-danger">
|
2
2
|
<h2>There was an error.</h2>
|
3
|
-
<%if !@user.errors.empty
|
4
|
-
|
5
|
-
<hr>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<%end%>
|
3
|
+
<% if !@user.errors.empty? %>
|
4
|
+
<h3>Please address the following issues</h3>
|
5
|
+
<hr>
|
6
|
+
<ul>
|
7
|
+
<% @user.errors.each do |attribute, error| %>
|
8
|
+
<li class="error_text"><%= attribute.to_s.capitalize %> : <%= error %> </li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
<% end %>
|
12
12
|
</div>
|
13
|
-
<br
|
13
|
+
<br/>
|
14
14
|
<%= render "/signup_form" %>
|
15
15
|
|
@@ -1,7 +1,10 @@
|
|
1
|
-
<
|
1
|
+
<div style="margin-top:10px;" class="container">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-md-6 col-md-offset-3" style="margin: 0 auto;float:none;">
|
4
|
+
<h2><%= @website_section.title %></h2>
|
2
5
|
|
3
|
-
|
4
|
-
<%=content.body_html %>
|
5
|
-
<% end %>
|
6
|
+
<%= render_widget :signup, :params => {:login_url => "/login"} %>
|
6
7
|
|
7
|
-
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
@@ -1,4 +1,5 @@
|
|
1
|
-
<div class="
|
2
|
-
<
|
3
|
-
|
4
|
-
</
|
1
|
+
<div class="alert alert-success">
|
2
|
+
<h2>Sign up Successful</h2>
|
3
|
+
|
4
|
+
<p>You will receive an email at <%= @email %> to activate your account</p>
|
5
|
+
</div>
|
data/config/routes.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
2
|
filter :section_router
|
3
|
-
|
4
|
-
get '
|
3
|
+
|
4
|
+
get 'knitkit_mobile' => 'knitkit/mobile#index'
|
5
|
+
match 'pages/:section_id' => 'knitkit/website_sections#index', :as => 'page'
|
5
6
|
get 'onlinedocumentsections/:section_id' => 'knitkit/online_document_sections#index', :as => 'document'
|
6
7
|
#get 'onlinedocumentsections/:section_id/:id' => 'knitkit/online_document_sections#show', :as => 'document'
|
7
8
|
get 'blogs/:section_id(.:format)' => 'knitkit/blogs#index', :as => 'blogs'
|
8
9
|
get 'blogs/:section_id/:id' => 'knitkit/blogs#show', :as => 'blog_article'
|
9
10
|
get 'blogs/:section_id/tag/:tag_id(.:format)' => 'knitkit/blogs#tag', :as => 'blog_tag'
|
10
|
-
|
11
|
+
|
11
12
|
match '/comments/add' => 'knitkit/comments#add', :as => 'comments'
|
12
13
|
match '/unauthorized' => 'knitkit/unauthorized#index', :as => 'knitkit/unauthorized'
|
13
14
|
match '/view_current_publication' => 'knitkit/base#view_current_publication'
|
@@ -17,29 +18,39 @@ end
|
|
17
18
|
Knitkit::Engine.routes.draw do
|
18
19
|
#Desktop Applications
|
19
20
|
#knitkit
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
21
|
+
namespace :erp_app do
|
22
|
+
namespace :desktop do
|
23
|
+
|
24
|
+
resources :inquiries
|
25
|
+
resources :website_nav
|
26
|
+
resources :website_nav_item do
|
27
|
+
member do
|
28
|
+
post :update_security
|
29
|
+
end
|
30
|
+
end
|
31
|
+
resources :website_host
|
32
|
+
|
33
|
+
match '/:action' => 'app'
|
34
|
+
match '/image_assets/:context/:action' => 'image_assets'
|
35
|
+
match '/file_assets/:context/:action' => 'file_assets'
|
36
|
+
#article
|
37
|
+
match '/articles/:action(/:section_id)' => 'articles'
|
38
|
+
#content
|
39
|
+
match '/content/:action' => 'content'
|
40
|
+
#websit
|
41
|
+
match '/site(/:action)' => 'website'
|
42
|
+
#section
|
43
|
+
match '/section/:action' => 'website_section'
|
44
|
+
#document
|
45
|
+
match '/online_document_sections/:action' => 'online_document_sections'
|
46
|
+
#theme
|
47
|
+
match '/theme/:action' => 'theme'
|
48
|
+
#version
|
49
|
+
match '/versions/:action' => 'versions'
|
50
|
+
#comment
|
51
|
+
match '/comments/:action(/:content_id)' => 'comments'
|
52
|
+
#position
|
53
|
+
match '/position/:action' => 'position'
|
54
|
+
end
|
55
|
+
end
|
45
56
|
end
|
@@ -71,6 +71,9 @@ class UpdateWebsiteAndConfiguration < ActiveRecord::Migration
|
|
71
71
|
|
72
72
|
remove_column(:websites, :auto_activate_publication) if columns(:websites).collect {|c| c.name}.include?('auto_activate_publication')
|
73
73
|
remove_column(:websites, :email_inquiries) if columns(:websites).collect {|c| c.name}.include?('email_inquiries')
|
74
|
+
|
75
|
+
# Added this to reload website columns into memory
|
76
|
+
Website.reset_column_information
|
74
77
|
end
|
75
78
|
end
|
76
79
|
|
@@ -271,7 +271,6 @@ class SetupKnitkit < ActiveRecord::Migration
|
|
271
271
|
t.string :internal_identifier
|
272
272
|
t.string :description
|
273
273
|
t.datetime :document_date
|
274
|
-
t.text :dynamic_attributes
|
275
274
|
|
276
275
|
t.references :document_record, :polymorphic => true
|
277
276
|
t.references :document_type
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class AddKnitkitMissingIndexes < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
if indexes(:websites).select { |index| index.name == 'websites_internal_identifier_idx' }.empty?
|
4
|
+
add_index :websites, :internal_identifier, :name => 'websites_internal_identifier_idx'
|
5
|
+
add_index :website_section_versions, :website_id, :name => 'website_section_versions_website_id_idx'
|
6
|
+
add_index :website_section_versions, :internal_identifier, :name => 'website_section_versions_internal_identifier_idx'
|
7
|
+
add_index :content_versions, :created_by_id, :name => 'content_versions_created_by_id_idx'
|
8
|
+
add_index :content_versions, :updated_by_id, :name => 'content_versions_updated_by_id_idx'
|
9
|
+
add_index :content_versions, :internal_identifier, :name => 'content_versions_internal_identifier_idx'
|
10
|
+
add_index :themes, :theme_id, :name => 'themes_theme_id_idx'
|
11
|
+
add_index :documented_items, :documented_content_id, :name => 'documented_items_documented_content_id_idx'
|
12
|
+
add_index :documented_items, :online_document_section_id, :name => 'documented_items_online_document_section_id_idx'
|
13
|
+
add_index :documents, :internal_identifier, :name => 'documents_internal_identifier_idx'
|
14
|
+
add_index :document_types, :internal_identifier, :name => 'document_types_internal_identifier_idx'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def down
|
19
|
+
unless indexes(:websites).select { |index| index.name == 'websites_internal_identifier_idx' }.empty?
|
20
|
+
remove_index :websites, :internal_identifier
|
21
|
+
remove_index :website_section_versions, :website_id
|
22
|
+
remove_index :website_section_versions, :internal_identifier
|
23
|
+
remove_index :content_versions, :created_by_id
|
24
|
+
remove_index :content_versions, :updated_by_id
|
25
|
+
remove_index :content_versions, :internal_identifier
|
26
|
+
remove_index :themes, :theme_id
|
27
|
+
remove_index :documented_items, :documented_content_id
|
28
|
+
remove_index :documented_items, :online_document_section_id
|
29
|
+
remove_index :documents, :internal_identifier
|
30
|
+
remove_index :document_types, :internal_identifier
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class UpdateWebsiteInquiries < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
|
4
|
+
add_column :website_inquiries, :first_name, :string
|
5
|
+
add_column :website_inquiries, :last_name, :string
|
6
|
+
add_column :website_inquiries, :email, :string
|
7
|
+
add_column :website_inquiries, :message, :text
|
8
|
+
add_column :website_inquiries, :created_by_id, :integer
|
9
|
+
|
10
|
+
add_index :website_inquiries, :created_by_id, :name => 'inquiry_created_by_idx'
|
11
|
+
end
|
12
|
+
|
13
|
+
def down
|
14
|
+
|
15
|
+
remove_column :website_inquiries, :first_name
|
16
|
+
remove_column :website_inquiries, :last_name
|
17
|
+
remove_column :website_inquiries, :email
|
18
|
+
remove_column :website_inquiries, :message
|
19
|
+
remove_column :website_inquiries, :created_by_id
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class AddCustomFieldsToDocuments < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
if ::ActiveRecord::Base.connection.instance_values["config"][:adapter] == 'postgresql'
|
4
|
+
execute('CREATE EXTENSION IF NOT EXISTS hstore;')
|
5
|
+
|
6
|
+
add_column :documents, :custom_fields, :hstore
|
7
|
+
add_hstore_index :documents, :custom_fields
|
8
|
+
else
|
9
|
+
add_column :documents, :custom_fields, :text
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# This migration is for removing dynamic attributes column from documents table.
|
2
|
+
class UpgradeRemoveDynamicAttributes < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
if table_exists?(:documents)
|
5
|
+
if column_exists?(:documents, :dynamic_attributes)
|
6
|
+
remove_column :documents, :dynamic_attributes
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def down
|
12
|
+
end
|
13
|
+
end
|