knitkit 3.0.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/{public → app/assets}/images/check.png +0 -0
  3. data/{public → app/assets}/images/credit_card.png +0 -0
  4. data/{public → app/assets}/images/inline_edit/close.png +0 -0
  5. data/{public → app/assets}/images/knitkit/icons/document.png +0 -0
  6. data/{public → app/assets}/images/knitkit/icons/multi_doc.png +0 -0
  7. data/{public → app/assets}/images/knitkit/logo.png +0 -0
  8. data/{public → app/assets}/images/knitkit/splash/images/add-site.png +0 -0
  9. data/app/assets/images/knitkit/splash/images/add_website_105x105-active.png +0 -0
  10. data/app/assets/images/knitkit/splash/images/add_website_105x105.png +0 -0
  11. data/{public → app/assets}/images/knitkit/splash/images/adjust-site.png +0 -0
  12. data/{public → app/assets}/images/knitkit/splash/images/browse-site.png +0 -0
  13. data/app/assets/images/knitkit/splash/images/browse_db_105x105-active.png +0 -0
  14. data/app/assets/images/knitkit/splash/images/browse_db_105x105.png +0 -0
  15. data/app/assets/images/knitkit/splash/images/console_105x105-active.png +0 -0
  16. data/app/assets/images/knitkit/splash/images/console_105x105.png +0 -0
  17. data/{public → app/assets}/images/knitkit/splash/images/find-themes.png +0 -0
  18. data/app/assets/images/knitkit/splash/images/find_themes_105x105-active.png +0 -0
  19. data/app/assets/images/knitkit/splash/images/find_themes_105x105.png +0 -0
  20. data/app/assets/images/knitkit/splash/images/learn_more_105x105-active.png +0 -0
  21. data/app/assets/images/knitkit/splash/images/learn_more_105x105.png +0 -0
  22. data/{public → app/assets}/images/knitkit/splash/images/settings.png +0 -0
  23. data/{public → app/assets}/images/knitkit/splash/images/tutorials.png +0 -0
  24. data/app/assets/images/knitkit/splash/splash.png +0 -0
  25. data/app/assets/images/widgets/manage_profile/contact_information.png +0 -0
  26. data/app/assets/images/widgets/manage_profile/password.png +0 -0
  27. data/app/assets/images/widgets/manage_profile/user_information.png +0 -0
  28. data/app/assets/javascripts/erp_app/desktop/applications/knitkit/app.js +24 -0
  29. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/articles_grid_panel.js +15 -12
  30. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/center_region.js +69 -48
  31. data/app/assets/javascripts/erp_app/desktop/applications/knitkit/comments_grid_panel.js +214 -0
  32. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/east_region.js +0 -0
  33. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/file_assets_panel.js +17 -19
  34. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/image_assets_data_view.js +13 -3
  35. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/image_assets_panel.js +59 -48
  36. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/east_region/widgets_panel.js +0 -0
  37. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/inquiries_grid_panel.js +2 -2
  38. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/module.js +2 -2
  39. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/publish_window.js +0 -0
  40. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/published_grid_panel.js +1 -1
  41. data/app/assets/javascripts/erp_app/desktop/applications/knitkit/splash_screen.js +268 -0
  42. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/top_menu/main_menu.js +85 -33
  43. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/top_menu/websites_combo.js +0 -0
  44. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/versions_grid_panel.js +5 -28
  45. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/article.js +22 -8
  46. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/document.js +143 -25
  47. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/host.js +5 -1
  48. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/menu.js +2 -0
  49. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/section.js +181 -65
  50. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/website_nav_items.js +0 -0
  51. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/hosts_tree_panel.js +0 -0
  52. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/menu_tree_panel.js +0 -0
  53. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/site_contents_tree_panel.js +121 -116
  54. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/themes_tree_panel.js +101 -10
  55. data/{public → app/assets}/javascripts/erp_app/desktop/applications/knitkit/west_region/west_region.js +9 -5
  56. data/app/assets/javascripts/knitkit-web.js +22 -0
  57. data/app/assets/javascripts/knitkit/additional-methods.min.js +4 -0
  58. data/app/assets/javascripts/knitkit/bootstrap.min.js +7 -0
  59. data/app/assets/javascripts/knitkit/captcha.js +154 -0
  60. data/{public → app/assets}/javascripts/knitkit/confirm-bootstrap.js +1 -1
  61. data/{public → app/assets}/javascripts/knitkit/inline_editing.js +1 -1
  62. data/{public → app/assets}/javascripts/knitkit/jquery.maskedinput.min.js +0 -0
  63. data/app/assets/javascripts/knitkit/jquery.validate.min.js +4 -0
  64. data/app/assets/javascripts/knitkit/js.cookie.js +145 -0
  65. data/{public → app/assets}/javascripts/knitkit/theme.js +0 -0
  66. data/app/assets/stylesheets/erp_app/desktop/applications/knitkit/app.css +12 -0
  67. data/{public → app/assets}/stylesheets/erp_app/desktop/applications/knitkit/knitkit.css +23 -33
  68. data/app/assets/stylesheets/erp_app/shared/knitkit_shared.css +21 -0
  69. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.eot +0 -0
  70. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.svg +288 -0
  71. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.ttf +0 -0
  72. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff +0 -0
  73. data/app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  74. data/app/assets/stylesheets/knitkit-web.css +16 -0
  75. data/app/assets/stylesheets/knitkit/bootstrap.min.css +5 -0
  76. data/app/assets/stylesheets/knitkit/captcha.css +59 -0
  77. data/app/assets/stylesheets/knitkit/custom.css +144 -0
  78. data/{public → app/assets}/stylesheets/knitkit/inline_editing.css +0 -0
  79. data/app/assets/stylesheets/knitkit/submenu.css +93 -0
  80. data/app/controllers/api/v1/websites_controller.rb +14 -0
  81. data/app/controllers/captcha_controller.rb +53 -0
  82. data/app/controllers/knitkit/base_controller.rb +1 -5
  83. data/app/controllers/knitkit/erp_app/desktop/app_controller.rb +2 -9
  84. data/app/controllers/knitkit/erp_app/desktop/articles_controller.rb +20 -7
  85. data/app/controllers/knitkit/erp_app/desktop/file_assets_controller.rb +38 -28
  86. data/app/controllers/knitkit/erp_app/desktop/image_assets_controller.rb +16 -9
  87. data/app/controllers/knitkit/erp_app/desktop/online_document_sections_controller.rb +69 -15
  88. data/app/controllers/knitkit/erp_app/desktop/position_controller.rb +45 -58
  89. data/app/controllers/knitkit/erp_app/desktop/theme_controller.rb +64 -29
  90. data/app/controllers/knitkit/erp_app/desktop/website_controller.rb +36 -13
  91. data/app/controllers/knitkit/erp_app/desktop/website_host_controller.rb +12 -0
  92. data/app/controllers/knitkit/erp_app/desktop/website_nav_controller.rb +4 -11
  93. data/app/controllers/knitkit/erp_app/desktop/website_nav_item_controller.rb +2 -9
  94. data/app/controllers/knitkit/erp_app/desktop/website_section_controller.rb +56 -20
  95. data/app/controllers/knitkit/online_document_sections_controller.rb +9 -3
  96. data/app/mailers/website_inquiry_mailer.rb +11 -3
  97. data/app/models/content.rb +16 -6
  98. data/app/models/documented_item.rb +12 -1
  99. data/app/models/online_document_section.rb +54 -20
  100. data/app/models/published_website.rb +16 -0
  101. data/app/models/theme.rb +53 -47
  102. data/app/models/website.rb +172 -191
  103. data/app/models/website_section.rb +64 -30
  104. data/app/views/knitkit/blogs/show.html.erb +5 -2
  105. data/app/views/layouts/knitkit/base.html.erb +54 -51
  106. data/app/views/menus/knitkit/_default_menu.html.erb +11 -11
  107. data/app/views/menus/knitkit/_default_section_menu.html.erb +2 -2
  108. data/app/views/menus/knitkit/_default_sub_menu.erb +27 -0
  109. data/app/views/menus/knitkit/_default_sub_section_menu.html.erb +30 -0
  110. data/app/views/website_inquiry_mailer/inquiry.html.erb +266 -0
  111. data/app/widgets/contact_us/base.rb +26 -16
  112. data/app/widgets/contact_us/javascript/contact_us.js +1 -1
  113. data/app/widgets/contact_us/views/error.html.erb +7 -3
  114. data/app/widgets/contact_us/views/index.html.erb +36 -28
  115. data/app/widgets/google_map/javascript/google_map.js +1 -1
  116. data/app/widgets/google_map/views/index.html.erb +1 -1
  117. data/app/widgets/login/javascript/login.js +1 -1
  118. data/app/widgets/login/views/index.html.erb +1 -1
  119. data/app/widgets/manage_profile/base.rb +141 -112
  120. data/app/widgets/manage_profile/javascript/manage_profile.js +2 -2
  121. data/app/widgets/manage_profile/views/_password_form.html.erb +1 -1
  122. data/app/widgets/manage_profile/views/_user_information_form.html.erb +1 -30
  123. data/app/widgets/manage_profile/views/index.html.erb +42 -40
  124. data/app/widgets/reset_password/base.rb +39 -8
  125. data/app/widgets/reset_password/javascript/reset_password.js +1 -1
  126. data/app/widgets/reset_password/views/index.html.erb +3 -3
  127. data/app/widgets/reset_password/views/invalid_reset_token.html.erb +7 -0
  128. data/app/widgets/reset_password/views/layouts/base.html.erb +1 -1
  129. data/app/widgets/reset_password/views/reset_password.html.erb +39 -0
  130. data/app/widgets/reset_password/views/reset_success.html.erb +5 -0
  131. data/app/widgets/search/base.rb +5 -5
  132. data/app/widgets/search/javascript/search.js +6 -6
  133. data/app/widgets/search/views/_inline_search_form.html.erb +23 -12
  134. data/app/widgets/search/views/_search_form.html.erb +34 -30
  135. data/app/widgets/search/views/layouts/base.html.erb +6 -1
  136. data/app/widgets/signup/base.rb +73 -30
  137. data/app/widgets/signup/javascript/signup.js +1 -1
  138. data/app/widgets/signup/views/_signup_form.html.erb +2 -1
  139. data/app/widgets/signup/views/layouts/base.html.erb +1 -1
  140. data/app/widgets/signup/views/success.html.erb +2 -3
  141. data/config/routes.rb +25 -4
  142. data/db/data_migrations/20110509223702_add_publisher_role.rb +0 -2
  143. data/db/data_migrations/20110816153456_add_knitkit_application.rb +7 -15
  144. data/db/data_migrations/20120127150505_create_website_default_configuration.rb +63 -3
  145. data/db/data_migrations/20150118180450_add_website_member_roles.rb +12 -0
  146. data/db/data_migrations/20150414150359_nest_knitkit_security_roles.rb +35 -0
  147. data/db/data_migrations/20150414173437_move_website_roles_under_website_builder.rb +19 -0
  148. data/db/migrate/20110211002317_setup_knitkit.rb +86 -39
  149. data/lib/knitkit.rb +8 -2
  150. data/lib/knitkit/config.rb +2 -3
  151. data/lib/knitkit/engine.rb +35 -4
  152. data/lib/knitkit/extensions.rb +2 -1
  153. data/lib/knitkit/extensions/action_controller/theme_support/acts_as_themed_controller.rb +1 -1
  154. data/lib/knitkit/extensions/action_mailer/theme_support/acts_as_themed_mailer.rb +1 -1
  155. data/lib/knitkit/extensions/compass_ae/mailers/user_mailer.rb +31 -0
  156. data/lib/knitkit/extensions/compass_ae/widgets/base.rb +1 -1
  157. data/lib/knitkit/extensions/railties/action_controller/captcha_helper.rb +43 -0
  158. data/lib/knitkit/extensions/railties/action_view/helpers/content_helper.rb +1 -1
  159. data/lib/knitkit/extensions/railties/action_view/helpers/menu_helper.rb +11 -1
  160. data/lib/knitkit/extensions/railties/theme_support/asset_tag_helper.rb +83 -0
  161. data/lib/knitkit/routing_filter/section_router.rb +24 -14
  162. data/lib/knitkit/version.rb +1 -1
  163. data/lib/tasks/knitkit_tasks.rake +89 -4
  164. data/lib/tasks/theme_parser.rake +85 -0
  165. data/public/fonts/glyphicons-halflings-regular.eot +0 -0
  166. data/public/fonts/glyphicons-halflings-regular.svg +288 -0
  167. data/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  168. data/public/fonts/glyphicons-halflings-regular.woff +0 -0
  169. data/public/fonts/glyphicons-halflings-regular.woff2 +0 -0
  170. data/public/paypal-button.min.js +7 -0
  171. metadata +161 -82
  172. data/app/assets/javascripts/knitkit/application.js +0 -9
  173. data/app/assets/stylesheets/knitkit/application.css +0 -7
  174. data/app/mailers/document_mailer.rb +0 -10
  175. data/app/views/document_mailer/email_document.html.erb +0 -12
  176. data/app/views/knitkit/mobile/index.html.erb +0 -162
  177. data/app/views/knitkit/online_document_sections/index.html.erb +0 -279
  178. data/app/views/layouts/knitkit/online_document_sections.html.erb +0 -80
  179. data/app/views/website_inquiry_mailer/inquiry.erb +0 -24
  180. data/db/data_migrations/20120127150506_add_primary_host_to_website_configuration.rb +0 -33
  181. data/db/data_migrations/20120316150424_add_is_template_to_default_website_config.rb +0 -16
  182. data/db/data_migrations/20120809020508_update_website_and_configuration.rb +0 -82
  183. data/db/data_migrations/20121129185611_upgrade_website_role_iid.rb +0 -20
  184. data/db/migrate/20130405184234_add_use_markdown_to_section.rb +0 -19
  185. data/db/migrate/20131112013052_add_knitkit_missing_indexes.rb +0 -33
  186. data/db/migrate/20140622212723_update_website_inquiries.rb +0 -22
  187. data/db/migrate/20140911185022_add_publishing_to_website.rb +0 -5
  188. data/db/migrate/20141013073349_add_custom_fields_to_documents.rb +0 -12
  189. data/db/migrate/20141016101936_upgrade_remove_dynamic_attributes.rb +0 -13
  190. data/lib/knitkit/extensions/railties/theme_support/theme_file_resolver.rb +0 -49
  191. data/public/images/knitkit/close_window.png +0 -0
  192. data/public/images/knitkit/splash/splash.png +0 -0
  193. data/public/javascripts/erp_app/desktop/applications/knitkit/comments_grid_panel.js +0 -215
  194. data/public/javascripts/erp_app/desktop/applications/knitkit/select_roles_window.js +0 -108
  195. data/public/javascripts/erp_app/desktop/applications/knitkit/splash_screen.js +0 -170
  196. data/public/javascripts/knitkit/bootstrap-datepicker.js +0 -474
  197. data/public/javascripts/knitkit/bootstrap.min.js +0 -7
  198. data/public/javascripts/knitkit/mobile/app/view/Main.js +0 -108
  199. data/public/javascripts/knitkit/mobile/ux/slidenavigation/View.js +0 -734
  200. data/public/stylesheets/knitkit/bootstrap-responsive.min.css +0 -10
  201. data/public/stylesheets/knitkit/bootstrap.min.css +0 -7
  202. data/public/stylesheets/knitkit/custom.css +0 -122
  203. data/public/stylesheets/knitkit/datepicker.css +0 -182
@@ -1,279 +0,0 @@
1
- <div style="margin-top:10px;" class="container">
2
- <div id="document_content">
3
- </div>
4
- </div>
5
-
6
- <script type="text/javascript" charset="utf-8">
7
- var selectedNode = null;
8
-
9
- function showContent(record) {
10
- var tab = Ext.getCmp(record.data['id']), path = record.getPath(),
11
- tabPanel = Ext.getCmp("fittedPanelDiv").down('tabpanel');
12
- selectedNode = record;
13
- window.history.pushState("path", selectedNode.get('title'), path);
14
-
15
- Ext.Ajax.request({
16
- url: '/online_document_sections/get_content',
17
- params: {
18
- document_section_id: record.data['id'],
19
- section_id:<%= @root.id %>
20
- },
21
- success: function (response) {
22
- var responseObj = Ext.JSON.decode(response.responseText);
23
- if (responseObj.success) {
24
- if (Ext.isEmpty(tab)) {
25
- tabPanel.add({
26
- id: record.data['id'],
27
- title: record.data['title'],
28
- html: responseObj.html,
29
- closable: true
30
- }).show();
31
- }
32
- else {
33
- tabPanel.setActiveTab(tab);
34
- tab.update(responseObj.html)
35
- }
36
- }
37
- else {
38
- Ext.Msg.alert('Error', 'Could not load content');
39
- }
40
- },
41
- failure: function (response) {
42
- Ext.Msg.alert('Error', 'Could not load content');
43
- }
44
- });
45
- }
46
-
47
- function findShowAndExpandNode(internalId) {
48
- var tree = Ext.getCmp("fittedPanelDiv").down('treepanel'),
49
- rootNode = tree.getRootNode(),
50
- documentNode = rootNode.findChild('id', internalId, true),
51
- documentRootParentNode = documentNode.parentNode;
52
-
53
- while (documentRootParentNode.id != rootNode.id) {
54
- documentRootParentNode.expand();
55
- documentRootParentNode = documentRootParentNode.parentNode;
56
- }
57
-
58
- tree.getSelectionModel().select(documentNode);
59
-
60
- showContent(documentNode);
61
- }
62
-
63
- function searchDocs(btn) {
64
- var toolbar = btn.up('toolbar'),
65
- query = toolbar.down('textfield').getValue(),
66
- fittedPanel = toolbar.up('#fittedPanelDiv'),
67
- tabPanel = fittedPanel.down('tabpanel'),
68
- searchResults = tabPanel.down('#searchResults');
69
-
70
- Ext.Ajax.request({
71
- url: '/online_document_sections/search',
72
- params: {
73
- query: query,
74
- section_id: <%= @root.id %>
75
- },
76
- success: function (response) {
77
- var responseObj = Ext.JSON.decode(response.responseText);
78
- if (responseObj.success) {
79
- if (searchResults) {
80
- searchResults.update(responseObj.html);
81
- tabPanel.setActiveTab(searchResults);
82
- }
83
- else {
84
- tabPanel.add({
85
- id: 'searchResults',
86
- title: 'Search Results',
87
- html: responseObj.html,
88
- closable: true
89
- }).show();
90
- }
91
- }
92
- else {
93
- Ext.Msg.alert('Error', 'Could not search documents');
94
- }
95
-
96
- },
97
- failure: function (response) {
98
- Ext.Msg.alert('Error', 'Could not search documents');
99
- }
100
- });
101
- }
102
-
103
- function resize_windows() {
104
- window_height = Ext.getBody().getViewSize().height;
105
- header_height = Ext.get("header").getHeight();
106
- footer_height = Ext.get("footer").getHeight();
107
- document_content_height = window_height - header_height - footer_height;
108
- Ext.get("document_content").setHeight(document_content_height);
109
- Ext.getCmp("fittedPanelDiv").setHeight(document_content_height);
110
- }
111
-
112
- Ext.onReady(function () {
113
- var currentItem, treePanel, tabPanel;
114
-
115
- treePanel = Ext.createWidget('treepanel', {
116
- xtype: 'tree',
117
- region: 'west',
118
- store: Ext.create('Ext.data.TreeStore', {
119
- preloadChildren: true,
120
- proxy: {
121
- type: 'ajax',
122
- url: '/online_document_sections/build_tree',
123
- extraParams: { section_id: <%= params[:section_id] %> },
124
- format: 'json'
125
- },
126
- root: {
127
- text: '<%= @root.title %>',
128
- id: '<%= @root.internal_identifier %>',
129
- expanded: true
130
- },
131
- fields: [
132
- 'id',
133
- 'title',
134
- 'iconCls',
135
- 'internalIdentifier',
136
- 'leaf'
137
- ]
138
- }),
139
- collapsible: true,
140
- dockedItems: {
141
- xtype: 'toolbar',
142
- docked: 'top',
143
- items: [
144
- {
145
- xtype: 'textfield',
146
- emptyText: 'Search',
147
- flex: 5,
148
- allowBlank: true
149
- },
150
- {
151
- flex: 1,
152
- iconCls: 'icon-search',
153
- handler: searchDocs
154
- }
155
- ]
156
- },
157
- header: false,
158
- autoScroll: true,
159
- bodyBorder: false,
160
- rootVisible: false,
161
- width: 200,
162
- displayField: 'title',
163
- valueField: 'id',
164
- title: '<%= @root.title %>',
165
- listeners: {
166
- 'itemclick': function (view, record, htmlItem, index, e) {
167
- showContent(record);
168
- }
169
- }
170
- });
171
-
172
- tabPanel = Ext.createWidget('tabpanel', {
173
- xtype: 'tabpanel',
174
- region: 'center',
175
- plain: true,
176
- bodyBorder: true,
177
- defaults: {
178
- autoScroll: true,
179
- bodyPadding: 10
180
- },
181
- items: [],
182
- listeners: {
183
- tabchange: function (tabPanel, newCard, oldCard) {
184
- window.history.pushState("path", selectedNode.get('title'), selectedNode.getPath());
185
- }
186
- },
187
- plugins: Ext.create('Ext.ux.TabCloseMenu', {
188
- extraItemsTail: [
189
- '-',
190
- {
191
- text: 'Closable',
192
- checked: true,
193
- hideOnClick: true,
194
- handler: function (item) {
195
- currentItem.tab.setClosable(item.checked);
196
- }
197
- }
198
- ],
199
- listeners: {
200
- aftermenu: function () {
201
- currentItem = null;
202
- },
203
- beforemenu: function (menu, item) {
204
- var menuitem = menu.child('*[text="Closable"]');
205
- currentItem = item;
206
- menuitem.setChecked(item.closable);
207
- }
208
- }
209
- })
210
- });
211
-
212
- Ext.createWidget('panel', {
213
- id: 'fittedPanelDiv',
214
- layout: 'border',
215
- //width: 800,
216
- header: false,
217
- defaults: {
218
- split: true
219
- },
220
- renderTo: 'document_content',
221
- items: [
222
- treePanel,
223
- tabPanel
224
- ]
225
- });
226
-
227
- resize_windows();
228
-
229
- // Load root page
230
- Ext.Ajax.request({
231
- url: '/online_document_sections/get_content',
232
- params: {
233
- document_section_id: '<%= @root.internal_identifier %>',
234
- section_id:<%= @root.id %>
235
- },
236
- success: function (response) {
237
- var responseObj = Ext.JSON.decode(response.responseText);
238
- if (responseObj.success) {
239
- var panel = Ext.create('widget.panel', {
240
- id: '<%= @root.internal_identifier %>',
241
- title: '<%= @root.title %>',
242
- html: responseObj.html,
243
- closable: false
244
- });
245
-
246
- tabPanel.add(panel).show();
247
- tabPanel.setActiveTab(panel);
248
- }
249
- else {
250
- Ext.Msg.alert('Error', 'Could not load content');
251
- }
252
- },
253
- failure: function (response) {
254
- Ext.Msg.alert('Error', 'Could not load content');
255
- }
256
- });
257
-
258
- // Check for deep linking
259
-
260
- <% if @online_document %>
261
-
262
- var task = new Ext.util.DelayedTask(function () {
263
- if (!treePanel.getRootNode().isLoading()) {
264
- findShowAndExpandNode('<%= @online_document.internal_identifier %>');
265
- }
266
- else {
267
- task.delay(200);
268
- }
269
- });
270
- task.delay(200);
271
-
272
- <% end %>
273
- });
274
-
275
- window.onresize = function () {
276
- resize_windows();
277
- }
278
-
279
- </script>
@@ -1,80 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
5
- <meta name="generator" content="Knitkit - Compass AE Open source content management platform"/>
6
-
7
- <meta name="description" content=""/>
8
- <meta name="keywords" content=""/>
9
- <meta name="copyright" content="&copy;"/>
10
- <meta name="robots" content="ALL"/>
11
- <meta name="language" content="English"/>
12
-
13
- <title><%= @website.title %></title>
14
-
15
- <%= javascript_include_tag :application %>
16
-
17
- <%= include_extjs :theme => 'extjs:ext-all-gray' %>
18
-
19
- <!-- bootstrap -->
20
- <%= static_javascript_include_tag 'knitkit/bootstrap.min.js' %>
21
- <%= static_javascript_include_tag 'knitkit/theme.js' %>
22
- <%= static_javascript_include_tag 'knitkit/bootstrap-datepicker.js' %>
23
- <%= static_javascript_include_tag 'knitkit/confirm-bootstrap.js' %>
24
-
25
- <%= static_stylesheet_link_tag 'knitkit/bootstrap.min.css' %>
26
- <%= static_stylesheet_link_tag 'knitkit/bootstrap-responsive.min.css' %>
27
- <%= static_stylesheet_link_tag 'knitkit/custom.css' %>
28
- <%= static_stylesheet_link_tag 'knitkit/datepicker.css' %>
29
- <!-- end bootstrap -->
30
-
31
- <%= static_javascript_include_tag('erp_app/utility.js') %>
32
- <%= static_javascript_include_tag('erp_app/jquery_support.js') %>
33
- <%= static_javascript_include_tag('erp_app/widgets.js') %>
34
-
35
- </head>
36
-
37
- <div id="wrap">
38
-
39
- <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
40
- <div class="navbar-header pull-left">
41
- <a class="navbar-brand" href="/home"><img src="/images/knitkit/logo.png" alt="Logo"/></a>
42
- </div>
43
-
44
- <div class="navbar-header pull-right">
45
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
46
- <span class="icon-bar"></span>
47
- <span class="icon-bar"></span>
48
- <span class="icon-bar"></span>
49
- </button>
50
- </div>
51
-
52
- <%= render_widget :login,
53
- :action => :login_header,
54
- :params => {:login_url => '/login', :signup_url => '/sign-up'} %>
55
-
56
- <div class="container" id="header">
57
- <div class="navbar-collapse collapse">
58
- <ul class="nav navbar-nav">
59
- <%= content_for?(:menu) ? yield(:menu) : render_menu(@contents) %>
60
- </ul>
61
- </div>
62
- </div>
63
- </nav>
64
-
65
- <!-- Wrap all page content here -->
66
-
67
- <div class="content-area">
68
- <%= yield %>
69
- </div>
70
-
71
- </div>
72
-
73
- <div id="footer" class="footer">
74
- <%= content_for?(:footer) ? yield(:footer) : (render :partial => 'shared/knitkit/footer') %>
75
- <%= yield :foot %>
76
- </div>
77
-
78
- </body>
79
- </html>
80
-
@@ -1,24 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
5
- </head>
6
- <body>
7
- <h1><%= @website_inquiry.website.title %> Inquiry</h1>
8
- <h3>
9
- There has been an inquiry.
10
- </h3>
11
- <span>First Name: </span><span><%= @website_inquiry.first_name %></span>
12
- <br/>
13
- <span>Last Name: </span><span><%= @website_inquiry.last_name %></span>
14
- <br/>
15
- <span>Email: </span><span><%= @website_inquiry.email %></span>
16
- <% if @website_inquiry.created_by %>
17
- <br/>
18
- <span>Username: </span><span><%= @website_inquiry.created_by.username %></span>
19
- <% end %>
20
- <br/>
21
- <br/>
22
- <p><%= @website_inquiry.message %></p>
23
- </body>
24
- </html>
@@ -1,33 +0,0 @@
1
- class AddPrimaryHostToWebsiteConfiguration
2
-
3
- def self.up
4
- unless ConfigurationItemType.find_by_internal_identifier('primary_host')
5
- website_setup_category = Category.find_by_internal_identifier('website_setup')
6
- configuration = ::Configuration.find_template('default_website_configuration')
7
-
8
- primary_host_config_item_type = ConfigurationItemType.create(
9
- :description => 'Primary Host',
10
- :internal_identifier => 'primary_host',
11
- :allow_user_defined_options => true
12
- )
13
- CategoryClassification.create(:category => website_setup_category, :classification => primary_host_config_item_type)
14
- configuration.configuration_item_types << primary_host_config_item_type
15
- configuration.save
16
-
17
- #update existing websites
18
- Website.all.each do |website|
19
- website_config = website.configurations.first
20
- if(website_config.internal_identifier == 'default_website_configuration')
21
- website_config.configuration_item_types << primary_host_config_item_type
22
- website_config.add_configuration_item(primary_host_config_item_type, website.hosts.first.host)
23
- website_config.save
24
- end
25
- end
26
- end
27
- end
28
-
29
- def self.down
30
- #remove data here
31
- end
32
-
33
- end
@@ -1,16 +0,0 @@
1
- class AddIsTemplateToDefaultWebsiteConfig
2
-
3
- def self.up
4
- default_website_config = Configuration.where('internal_identifier = ?', 'default_website_configuration').all
5
- unless default_website_config.empty?
6
- config = default_website_config.find{|config| config.websites.empty?}
7
- config.is_template = true
8
- config.save
9
- end
10
- end
11
-
12
- def self.down
13
- #remove data here
14
- end
15
-
16
- end
@@ -1,82 +0,0 @@
1
- class UpdateWebsiteAndConfiguration < ActiveRecord::Migration
2
- def self.up
3
- if Category.find_by_internal_identifier('content_workflow').nil?
4
- content_work_flow_category = Category.create(:description => 'Content Workflow', :internal_identifier => 'content_workflow')
5
-
6
- website_setup_category = Category.find_by_internal_identifier('website_setup')
7
- configuration = ::Configuration.find_template('default_website_configuration')
8
-
9
- yes_option = ConfigurationOption.find_by_internal_identifier('yes')
10
- yes_option = ConfigurationOption.create(
11
- :description => 'Yes',
12
- :internal_identifier => 'yes',
13
- :value => 'yes'
14
- ) if yes_option.nil?
15
-
16
- no_option = ConfigurationOption.find_by_internal_identifier('no')
17
- no_option = ConfigurationOption.create(
18
- :description => 'No',
19
- :internal_identifier => 'no',
20
- :value => 'no'
21
- ) if no_option.nil?
22
-
23
- #add email inquiries config
24
- email_inquiries_config_item_type = ConfigurationItemType.create(
25
- :description => 'Email inquiries',
26
- :internal_identifier => 'email_inquiries'
27
- )
28
- email_inquiries_config_item_type.configuration_options << yes_option
29
- email_inquiries_config_item_type.add_default_option(no_option)
30
- CategoryClassification.create(:category => website_setup_category, :classification => email_inquiries_config_item_type)
31
-
32
- configuration.configuration_item_types << email_inquiries_config_item_type
33
-
34
- #add auto activate publications
35
- auto_activate_config_item_type = ConfigurationItemType.create(
36
- :description => 'Auto activate publications',
37
- :internal_identifier => 'auto_active_publications'
38
- )
39
- auto_activate_config_item_type.configuration_options << no_option
40
- auto_activate_config_item_type.add_default_option(yes_option)
41
- CategoryClassification.create(:category => content_work_flow_category, :classification => auto_activate_config_item_type)
42
-
43
- configuration.configuration_item_types << auto_activate_config_item_type
44
-
45
- #add auto publish on save
46
- publish_on_save_config_item_type = ConfigurationItemType.create(
47
- :description => 'Publish on save',
48
- :internal_identifier => 'publish_on_save'
49
- )
50
- publish_on_save_config_item_type.configuration_options << no_option
51
- publish_on_save_config_item_type.add_default_option(yes_option)
52
- CategoryClassification.create(:category => content_work_flow_category, :classification => publish_on_save_config_item_type)
53
-
54
- configuration.configuration_item_types << publish_on_save_config_item_type
55
-
56
- Website.all.each do |website|
57
- website_config = website.configurations.first
58
- #add types
59
- website_config.configuration_item_types << email_inquiries_config_item_type
60
- website_config.configuration_item_types << auto_activate_config_item_type
61
- website_config.configuration_item_types << publish_on_save_config_item_type
62
-
63
- website_config.add_configuration_item(email_inquiries_config_item_type, (website.email_inquiries ? :yes : :no))
64
- website_config.add_configuration_item(auto_activate_config_item_type, (website.auto_activate_publication ? :yes : :no))
65
- website_config.add_configuration_item(publish_on_save_config_item_type, (website.auto_activate_publication ? :no : :yes))
66
-
67
- website_config.save
68
- end
69
-
70
- remove_column(:websites, :email) if columns(:websites).collect {|c| c.name}.include?('email')
71
-
72
- remove_column(:websites, :auto_activate_publication) if columns(:websites).collect {|c| c.name}.include?('auto_activate_publication')
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
77
- end
78
- end
79
-
80
- def self.down
81
- end
82
- end