kirgudu_base 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/kirgudu_base/dynamicEvents.js +2 -1
  3. data/app/assets/javascripts/kirgudu_base/jquery.container-management.js +241 -0
  4. data/app/assets/javascripts/kirgudu_base/jquery.fancybox copia.js +2020 -0
  5. data/app/assets/javascripts/kirgudu_base/scripts_nrg.js +300 -383
  6. data/app/controllers/kirgudu_base/admin_controller.rb +1 -44
  7. data/app/controllers/kirgudu_base/application_controller.rb +135 -92
  8. data/app/controllers/kirgudu_base/cabinet_controller.rb +35 -35
  9. data/app/controllers/kirgudu_base/security/authentications_controller.rb +452 -0
  10. data/app/controllers/kirgudu_base/security/email_confirmations_controller.rb +46 -0
  11. data/app/helpers/kirgudu_base/application_helper.rb +25 -0
  12. data/app/helpers/kirgudu_base/authentication_form_builder.rb +76 -0
  13. data/app/helpers/kirgudu_base/controllers/{basic_actions_with_parent.rb → OLD_basic_actions.rb} +39 -54
  14. data/app/helpers/kirgudu_base/controllers/basic_actions.rb +967 -161
  15. data/app/helpers/kirgudu_base/controllers/container_items_management_actions.rb +118 -40
  16. data/app/helpers/kirgudu_base/controllers/container_items_sorting_actions.rb +2 -2
  17. data/app/helpers/kirgudu_base/controllers/dynamic_pages.rb +147 -11
  18. data/app/helpers/kirgudu_base/form_builder.rb +3 -1
  19. data/app/helpers/kirgudu_base/gui_helper.rb +10 -5
  20. data/app/helpers/kirgudu_base/models/exports.rb +122 -122
  21. data/app/helpers/kirgudu_base/models/scopes.rb +5 -0
  22. data/app/mailers/authentications_mailer.rb +53 -0
  23. data/app/models/kirgudu_base/base_model.rb +47 -14
  24. data/app/models/kirgudu_base/dynamic_pages/builder.rb +0 -8
  25. data/app/models/kirgudu_base/dynamic_pages/controller_link.rb +4 -1
  26. data/app/models/kirgudu_base/dynamic_pages/controller_link_builder.rb +2 -1
  27. data/app/models/kirgudu_base/dynamic_pages/controller_link_id.rb +6 -6
  28. data/app/models/kirgudu_base/dynamic_pages/controller_link_id_builder.rb +6 -6
  29. data/app/models/kirgudu_base/dynamic_pages/element.rb +4 -5
  30. data/app/models/kirgudu_base/dynamic_pages/entry_builder.rb +2 -2
  31. data/app/models/kirgudu_base/dynamic_pages/event_if_block_builder.rb +1 -1
  32. data/app/models/kirgudu_base/dynamic_pages/form_builder.rb +2 -2
  33. data/app/models/kirgudu_base/dynamic_pages/list.rb +2 -0
  34. data/app/models/kirgudu_base/dynamic_pages/list_builder.rb +7 -3
  35. data/app/models/kirgudu_base/dynamic_pages/management_settings.rb +30 -0
  36. data/app/models/kirgudu_base/dynamic_pages/management_settings_builder.rb +47 -0
  37. data/app/models/kirgudu_base/dynamic_pages/menu.rb +9 -5
  38. data/app/models/kirgudu_base/dynamic_pages/menu_builder.rb +8 -5
  39. data/app/models/kirgudu_base/dynamic_pages/menu_item.rb +22 -6
  40. data/app/models/kirgudu_base/dynamic_pages/menu_items_block_builder.rb +9 -4
  41. data/app/models/kirgudu_base/dynamic_pages/menu_section.rb +38 -0
  42. data/app/models/kirgudu_base/dynamic_pages/menu_section_builder.rb +36 -0
  43. data/app/models/kirgudu_base/dynamic_pages/page.rb +6 -2
  44. data/app/models/kirgudu_base/dynamic_pages/page_builder.rb +18 -0
  45. data/app/models/kirgudu_base/dynamic_pages/relation.rb +23 -0
  46. data/app/models/kirgudu_base/dynamic_pages/relation_builder.rb +35 -0
  47. data/app/models/kirgudu_base/dynamic_pages/sorting_settings.rb +31 -0
  48. data/app/models/kirgudu_base/dynamic_pages/sorting_settings_builder.rb +48 -0
  49. data/app/models/kirgudu_base/security/autheintication.rb +4 -0
  50. data/app/models/kirgudu_base/security/authentication.rb +6 -7
  51. data/app/models/kirgudu_base/security/email_confirmation.rb +7 -0
  52. data/app/models/kirgudu_base/security/restore_password_code.rb +5 -0
  53. data/app/models/kirgudu_base/security/user.rb +2 -0
  54. data/app/models/kirgudu_base/security.rb +6 -7
  55. data/app/models/kirgudu_base/settings/group.rb +22 -0
  56. data/app/models/kirgudu_base/settings/option.rb +44 -0
  57. data/app/models/kirgudu_base/settings/settings_manager.rb +69 -0
  58. data/app/models/kirgudu_base/settings/value.rb +36 -0
  59. data/app/views/admin_templates/default/admin/layouts/application.html.erb +6 -4
  60. data/app/views/admin_templates/default/admin/system/settings/groups/edit.html.erb +9 -9
  61. data/app/views/admin_templates/default/admin/system/settings/groups/new.html.erb +1 -1
  62. data/app/views/admin_templates/default/admin/system/settings/options/edit.html.erb +1 -1
  63. data/app/views/admin_templates/default/admin/system/settings/options/new.html.erb +1 -1
  64. data/app/views/admin_templates/default/admin/system/settings/values/edit.html.erb +1 -1
  65. data/app/views/admin_templates/default/admin/system/settings/values/new.html.erb +1 -1
  66. data/app/views/admin_templates/erp/admin/shared/_top_nav_bar.html.erb +1 -3
  67. data/app/views/admin_templates/erp/admin/shared/entry_edit_form_renderer.html.erb +1 -1
  68. data/app/views/admin_templates/erp/admin/shared/entry_new_form_renderer.html.erb +1 -1
  69. data/app/views/admin_templates/good/admin/layouts/OLD_application.html.erb +14 -14
  70. data/app/views/admin_templates/good/admin/layouts/application.html.erb +11 -113
  71. data/app/views/admin_templates/good/admin/shared/_left_menu.html.erb +74 -63
  72. data/app/views/admin_templates/good/{zapanel/files/New Adobe Photoshop Image 12.psd → admin/shared/_left_menu_item.html.erb} +0 -0
  73. data/app/views/admin_templates/good/admin/shared/_left_menu_section.html.erb +21 -0
  74. data/app/views/admin_templates/good/admin/shared/render_new_OLD.html.erb +90 -0
  75. data/app/views/admin_templates/good/admin/shared/renderer_edit.html.erb +44 -13
  76. data/app/views/admin_templates/good/admin/shared/renderer_edit_OLD.html.erb +106 -0
  77. data/app/views/admin_templates/good/admin/shared/renderer_entries_list.html.erb +39 -18
  78. data/app/views/admin_templates/good/admin/shared/renderer_entries_list_with_parent.html.erb +4 -4
  79. data/app/views/admin_templates/good/admin/shared/renderer_management.html.erb +164 -0
  80. data/app/views/admin_templates/good/admin/shared/renderer_new.html.erb +40 -10
  81. data/app/views/admin_templates/good/admin/shared/renderer_show.html.erb +170 -58
  82. data/app/views/admin_templates/good/admin/shared/renderer_show_OLD.html.erb +159 -0
  83. data/app/views/admin_templates/good/admin/shared/renderer_sorting.html.erb +30 -0
  84. data/app/views/admin_templates/good/kirgudu_base/authentications/login.html.erb +13 -13
  85. data/app/views/admin_templates/good/kirgudu_base/authentications/register.html.erb +1 -1
  86. data/app/views/admin_templates/good/kirgudu_base/old/login_page.html.erb +7 -7
  87. data/app/views/admin_templates/good_flexy/admin/layouts/application.html.erb +17 -16
  88. data/app/views/admin_templates/good_flexy/admin/shared/_left_menu.html.erb +7 -0
  89. data/app/views/admin_templates/good_flexy/admin/shared/renderer_entries_list.html.erb +25 -17
  90. data/app/views/admin_templates/good_flexy/admin/shared/renderer_form_edit.html.erb +34 -13
  91. data/app/views/admin_templates/good_flexy/admin/shared/renderer_form_new.html.erb +31 -10
  92. data/app/views/admin_templates/good_flexy/admin/shared/renderer_show.html.erb +67 -52
  93. data/config/locales/kirgudu_base.ru.yml +92 -0
  94. data/config/routes.rb +16 -16
  95. data/db/migrate/20140413134252_create_kirgudu_base_security_authentications.rb +15 -0
  96. data/db/migrate/20140413152144_create_kirgudu_base_security_email_confirmations.rb +17 -0
  97. data/db/migrate/20140413201121_add_confirmations_kirgudu_base_security_users.rb +14 -0
  98. data/db/migrate/20140415093106_create_kirgudu_base_security_restore_password_codes.rb +20 -0
  99. data/lib/kirgudu_base.rb +2 -2
  100. data/test/fixtures/kirgudu_base/kirgudu_base/security/autheintications.yml +11 -0
  101. data/test/fixtures/kirgudu_base/security/applications.yml +21 -0
  102. data/test/fixtures/kirgudu_base/security/autheintications.yml +11 -0
  103. data/test/fixtures/kirgudu_base/security/authentications.yml +11 -0
  104. data/test/fixtures/kirgudu_base/security/email_confirmations.yml +13 -0
  105. data/test/fixtures/kirgudu_base/security/restore_password_codes.yml +13 -0
  106. data/test/models/kirgudu_base/kirgudu_base/security/autheintication_test.rb +9 -0
  107. data/test/models/kirgudu_base/security/application_test.rb +9 -0
  108. data/test/models/kirgudu_base/security/autheintication_test.rb +9 -0
  109. data/test/models/kirgudu_base/security/authentication_test.rb +9 -0
  110. data/test/models/kirgudu_base/security/email_confirmation_test.rb +9 -0
  111. data/test/models/kirgudu_base/security/restore_password_code_test.rb +9 -0
  112. metadata +102 -79
  113. data/app/assets/javascripts/kirgudu_base/jquery.fancybox.pack.js +0 -45
  114. data/app/controllers/kirgudu_base/authentications_controller.rb +0 -157
  115. data/app/views/admin_templates/good/zapanel/404.html +0 -386
  116. data/app/views/admin_templates/good/zapanel/billing.html +0 -550
  117. data/app/views/admin_templates/good/zapanel/blank-page.html +0 -343
  118. data/app/views/admin_templates/good/zapanel/buttons.html +0 -1018
  119. data/app/views/admin_templates/good/zapanel/calendars.html +0 -451
  120. data/app/views/admin_templates/good/zapanel/cart.html +0 -522
  121. data/app/views/admin_templates/good/zapanel/charts.html +0 -611
  122. data/app/views/admin_templates/good/zapanel/collapse.html +0 -555
  123. data/app/views/admin_templates/good/zapanel/contact.php +0 -102
  124. data/app/views/admin_templates/good/zapanel/dashboard.html +0 -985
  125. data/app/views/admin_templates/good/zapanel/dashboard2.html +0 -1091
  126. data/app/views/admin_templates/good/zapanel/dashboard3.html +0 -1079
  127. data/app/views/admin_templates/good/zapanel/data/movies.json +0 -1
  128. data/app/views/admin_templates/good/zapanel/faq.html +0 -435
  129. data/app/views/admin_templates/good/zapanel/file-manager.html +0 -358
  130. data/app/views/admin_templates/good/zapanel/files/index.php +0 -0
  131. data/app/views/admin_templates/good/zapanel/font-awesome/less/bootstrap.less +0 -84
  132. data/app/views/admin_templates/good/zapanel/font-awesome/less/core.less +0 -129
  133. data/app/views/admin_templates/good/zapanel/font-awesome/less/extras.less +0 -93
  134. data/app/views/admin_templates/good/zapanel/font-awesome/less/font-awesome-ie7.less +0 -1953
  135. data/app/views/admin_templates/good/zapanel/font-awesome/less/font-awesome.less +0 -33
  136. data/app/views/admin_templates/good/zapanel/font-awesome/less/icons.less +0 -381
  137. data/app/views/admin_templates/good/zapanel/font-awesome/less/mixins.less +0 -48
  138. data/app/views/admin_templates/good/zapanel/font-awesome/less/path.less +0 -14
  139. data/app/views/admin_templates/good/zapanel/font-awesome/less/variables.less +0 -735
  140. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_bootstrap.scss +0 -84
  141. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_core.scss +0 -129
  142. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_extras.scss +0 -93
  143. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_icons.scss +0 -381
  144. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_mixins.scss +0 -48
  145. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_path.scss +0 -14
  146. data/app/views/admin_templates/good/zapanel/font-awesome/scss/_variables.scss +0 -734
  147. data/app/views/admin_templates/good/zapanel/font-awesome/scss/font-awesome-ie7.scss +0 -1953
  148. data/app/views/admin_templates/good/zapanel/font-awesome/scss/font-awesome.scss +0 -33
  149. data/app/views/admin_templates/good/zapanel/form.html +0 -790
  150. data/app/views/admin_templates/good/zapanel/gallery.html +0 -392
  151. data/app/views/admin_templates/good/zapanel/grids.html +0 -574
  152. data/app/views/admin_templates/good/zapanel/hosting-dashboard.html +0 -448
  153. data/app/views/admin_templates/good/zapanel/icon.html +0 -722
  154. data/app/views/admin_templates/good/zapanel/inbox.html +0 -375
  155. data/app/views/admin_templates/good/zapanel/index.html +0 -48
  156. data/app/views/admin_templates/good/zapanel/invoice.html +0 -423
  157. data/app/views/admin_templates/good/zapanel/js/proxy/elFinderSupportVer1.js +0 -338
  158. data/app/views/admin_templates/good/zapanel/js/skins/default/lightbox-close.png +0 -0
  159. data/app/views/admin_templates/good/zapanel/js/skins/default/lightbox-next.png +0 -0
  160. data/app/views/admin_templates/good/zapanel/js/skins/default/lightbox-prev.png +0 -0
  161. data/app/views/admin_templates/good/zapanel/notification.html +0 -400
  162. data/app/views/admin_templates/good/zapanel/order-recieved.html +0 -348
  163. data/app/views/admin_templates/good/zapanel/php/MySQLStorage.sql +0 -23
  164. data/app/views/admin_templates/good/zapanel/php/connector.php +0 -44
  165. data/app/views/admin_templates/good/zapanel/php/elFinder.class.php +0 -1103
  166. data/app/views/admin_templates/good/zapanel/php/elFinderConnector.class.php +0 -133
  167. data/app/views/admin_templates/good/zapanel/php/elFinderVolumeDriver.class.php +0 -3370
  168. data/app/views/admin_templates/good/zapanel/php/elFinderVolumeLocalFileSystem.class.php +0 -835
  169. data/app/views/admin_templates/good/zapanel/php/elFinderVolumeMySQL.class.php +0 -896
  170. data/app/views/admin_templates/good/zapanel/php/mime.types +0 -512
  171. data/app/views/admin_templates/good/zapanel/price-table.html +0 -400
  172. data/app/views/admin_templates/good/zapanel/profile.html +0 -387
  173. data/app/views/admin_templates/good/zapanel/progressbar.html +0 -555
  174. data/app/views/admin_templates/good/zapanel/range-slider.html +0 -440
  175. data/app/views/admin_templates/good/zapanel/ribbon-grids.html +0 -491
  176. data/app/views/admin_templates/good/zapanel/sale-purchase-dashboard.html +0 -803
  177. data/app/views/admin_templates/good/zapanel/search.html +0 -370
  178. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-close.png +0 -0
  179. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-loading.gif +0 -0
  180. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-next.png +0 -0
  181. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-pause.png +0 -0
  182. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-play.png +0 -0
  183. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-playvideo.png +0 -0
  184. data/app/views/admin_templates/good/zapanel/skins/default/lightbox-prev.png +0 -0
  185. data/app/views/admin_templates/good/zapanel/slider.html +0 -453
  186. data/app/views/admin_templates/good/zapanel/tables.html +0 -470
  187. data/app/views/admin_templates/good/zapanel/typography.html +0 -746
@@ -2,7 +2,7 @@
2
2
 
3
3
  module KirguduBase
4
4
  module Controllers
5
- module BasicActionsWithParent
5
+ module BasicActions
6
6
 
7
7
  ################################################################################################################
8
8
  ######################################### Base and Ajax Modules ######################################
@@ -21,57 +21,48 @@ module KirguduBase
21
21
  end
22
22
 
23
23
  local_data = {}
24
-
24
+ #getting page info
25
25
  local_page = self.class.get_kb_page(:index)
26
-
27
26
  unless local_page
28
27
  respond_to do |format|
29
- format.html { render_html1 self.get_view_path_for_page_404 }
28
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :page_404) }
30
29
  format.json { render_json_page_404 }
31
30
  end
32
31
  return
33
32
  end
34
-
35
33
  local_data[:page] = local_page
36
34
 
35
+
37
36
  filters = self.get_filters_for_list(local_page.lists[:entries_list], params)
37
+ filters[:page] = params[:page]
38
38
 
39
- self.fill_obligatory_filters(filters)
39
+ begin
40
+ filters[:per_page] = params[:per_page].to_i
41
+ rescue
42
+ end
40
43
 
44
+ logger.info("PER PAGE: #{filters[:per_page]}")
45
+ filters[:per_page] = 30 if filters[:per_page] == 0
46
+ filters[:per_page] ||= 30
47
+ self.fill_obligatory_filters(filters)
41
48
  options = {
42
49
  logger: string_logger
43
50
  }
51
+ # filling fitters data
52
+ page_filters = self.load_data_for_filters_controls(local_page.lists[:entries_list], params)
53
+ local_data[:filters_data] = page_filters
54
+ # filling entries list
55
+ local_entries_list = self.entry_class.get_entries(nil, filters, options)
56
+ local_data[:entries] = local_entries_list
44
57
 
45
- local_filters_data = self.load_data_for_filters_controls(local_page.lists[:entries_list], params)
46
-
47
- local_data[:filters_data] = local_filters_data
48
-
49
- local_data[:parent_elements] = {}
50
-
51
- controllers_hierarchy = ::ChupakabraTools::ClassHelper.get_controller_hierarchy(self.class)
52
-
53
- controllers_hierarchy.each do |ctrler|
54
- if ctrler.respond_to?(:get_kb_option)
55
- parent_controller_class = ctrler.get_kb_option(:parent_controller)
56
- parent_id = ctrler.get_kb_option(:parent_id)
57
- if parent_controller_class && parent_id
58
- local_data[:parent_elements][parent_id] = parent_controller_class.entry_class.get_entry_by_id(params[parent_id], filters, {logger: string_logger})
59
- else
60
- break
61
- end
62
- else
63
- break
64
- end
65
- end
66
-
67
- local_data[:entries_list] = self.entry_class.get_entries(nil, filters, options)
68
-
58
+ view_path = self.class.get_method_latest_result(:get_kb_view_path, :index)
69
59
 
70
60
  respond_to do |format|
71
- format.html { render_html1 self.get_view_path_for_page_index, locals: {data: local_data} }
61
+ format.html { render_html1 view_path , locals: {data: local_data} }
72
62
  format.json { render_json_ok(local_entries_list) }
73
63
  end
74
64
  end
65
+
75
66
  end
76
67
 
77
68
  module ShowActions
@@ -86,7 +77,7 @@ module KirguduBase
86
77
 
87
78
  if local_page.nil?
88
79
  respond_to do |format|
89
- format.html { render_html1 self.get_view_path_for_page_404 }
80
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :page_404) }
90
81
  format.json { render_json_page_404 }
91
82
  end
92
83
  return
@@ -94,24 +85,18 @@ module KirguduBase
94
85
 
95
86
  filters = {}
96
87
  self.fill_obligatory_filters(filters)
97
-
98
- local_entry = self.entry_class.get_entry_by_id(self, params[:id], filters, {logger: string_logger})
99
-
88
+ local_entry = self.entry_class.get_entry_by_id(params[:id], filters, {logger: string_logger})
100
89
 
101
90
  unless local_entry
102
91
  respond_to do |format|
103
92
  flash[:error] = I18n.t("#{self.to_i18n}.messages.not_found", entry_id: params[:id])
104
- format.html { render_html1 get_not_found_view_path,
105
- locals: {
106
- entry: local_entry
107
- }
108
- }
93
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :entry_not_found), locals: { entry: local_entry } }
109
94
  format.json { render json: local_entry.errors, status: :unprocessable_entity }
110
95
  end
111
96
  return
112
97
  end
113
98
  respond_to do |format|
114
- format.html { render_html1 self.get_view_path_for_page_show, locals: {entry: local_entry, page: local_page} }
99
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :show), locals: {entry: local_entry, page: local_page} }
115
100
  format.json { render json: local_entry }
116
101
  end
117
102
  end
@@ -127,7 +112,7 @@ module KirguduBase
127
112
  local_page = self.class.get_kb_page(:new)
128
113
  unless local_page
129
114
  respond_to do |format|
130
- format.html { render_html1 self.get_view_path_for_page_404 }
115
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :page_404) }
131
116
  format.json { render_json_page_404 }
132
117
  end
133
118
  return
@@ -138,7 +123,7 @@ module KirguduBase
138
123
  local_controls_data = self.load_data_for_entry_controls(local_page.forms[:changes], local_entry)
139
124
 
140
125
  respond_to do |format|
141
- format.html { render_html1 self.get_view_path_for_page_new,
126
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :new),
142
127
  locals:
143
128
  {
144
129
  entry: local_entry,
@@ -158,7 +143,7 @@ module KirguduBase
158
143
  local_page = self.class.get_kb_page(:new)
159
144
  unless local_page
160
145
  respond_to do |format|
161
- format.html { render_html1 self.get_view_path_for_page_404 }
146
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :page_404) }
162
147
  format.json { render_json_page_404 }
163
148
  end
164
149
  return
@@ -202,7 +187,7 @@ module KirguduBase
202
187
  # loading data for select-like controls
203
188
  local_controls_data = self.load_data_for_entry_controls(local_page.forms[:changes], local_entry)
204
189
  local_entry.errors[:form] << I18n.t("#{self.to_i18n}.messages.create_error")
205
- format.html { render_html1 self.get_view_path_for_page_new,
190
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :new),
206
191
  locals:
207
192
  {
208
193
  entry: local_entry,
@@ -229,7 +214,7 @@ module KirguduBase
229
214
 
230
215
  unless local_page
231
216
  respond_to do |format|
232
- format.html { render_html1 get_view_path_for_page_404 }
217
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :page_404) }
233
218
  format.json { render_json_page_404 }
234
219
  end
235
220
  return
@@ -238,12 +223,12 @@ module KirguduBase
238
223
  filters = {}
239
224
  self.fill_obligatory_filters(filters)
240
225
 
241
- local_entry = self.entry_class.get_entry_by_id(self, params[:id], filters, {logger: string_logger})
226
+ local_entry = self.entry_class.get_entry_by_id(params[:id], filters, {logger: string_logger})
242
227
 
243
228
  unless local_entry
244
229
  respond_to do |format|
245
230
  flash[:error] = I18n.t("#{self.to_i18n}.messages.not_found", entry_id: params[:id])
246
- format.html { render_html1 self.get_not_found_view_path, locals: {entry: local_entry} }
231
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :entry_not_found), locals: {entry: local_entry} }
247
232
  format.json { render json: local_entry.errors, status: :unprocessable_entity }
248
233
  end
249
234
  return
@@ -252,7 +237,7 @@ module KirguduBase
252
237
  local_controls_data = self.load_data_for_entry_controls(local_page.forms[:changes], local_entry)
253
238
 
254
239
  respond_to do |format|
255
- format.html { render_html1 self.get_view_path_for_page_edit,
240
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :edit),
256
241
  locals:
257
242
  {
258
243
  entry: local_entry,
@@ -275,20 +260,20 @@ module KirguduBase
275
260
 
276
261
  unless local_page
277
262
  respond_to do |format|
278
- format.html { render_html1 self.get_view_path_for_page_404 }
263
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :page_404) }
279
264
  format.json { render_json_page_404 }
280
265
  end
281
266
  return
282
267
  end
283
268
 
284
269
 
285
- local_entry = self.entry_class.get_entry_by_id(self, params[:id], nil, {logger: string_logger})
270
+ local_entry = self.entry_class.get_entry_by_id(params[:id], nil, {logger: string_logger})
286
271
 
287
272
  # Render NOT FOUND Form
288
273
  unless local_entry
289
274
  respond_to do |format|
290
275
  flash[:error] = I18n.t("#{self.to_i18n}.messages.not_found", entry_id: params[:id])
291
- format.html { render_html1 self.get_not_found_view_path, locals: {entry: local_entry} }
276
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :entry_not_found), locals: {entry: local_entry} }
292
277
  format.json { render json: nil, status: :unprocessable_entity }
293
278
  end
294
279
  return
@@ -331,7 +316,7 @@ module KirguduBase
331
316
  # loading data for select-like controls
332
317
  local_controls_data = self.load_data_for_entry_controls(local_page.forms[:changes], local_entry)
333
318
  local_entry.errors[:form] << I18n.t("#{self.to_i18n}.messages.update_error")
334
- format.html { render_html1 self.get_view_path_for_page_edit,
319
+ format.html { render_html1 self.class.get_method_latest_result(:get_kb_view_path, :edit),
335
320
  locals:
336
321
  {
337
322
  entry: local_entry,
@@ -428,7 +413,7 @@ module KirguduBase
428
413
  end
429
414
 
430
415
 
431
- local_entry = self.entry_class.get_entry_by_id(self, params[:id], nil, {logger: string_logger})
416
+ local_entry = self.entry_class.get_entry_by_id(params[:id], nil, {logger: string_logger})
432
417
  if local_entry
433
418
  result_string = ''
434
419
  begin