drg_cms 0.6.0.8 → 0.6.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -10
  3. data/app/assets/javascripts/drg_cms/drg_cms.js +208 -81
  4. data/app/assets/stylesheets/drg_cms/drg_cms.css +298 -93
  5. data/app/assets/stylesheets/drg_cms/select-multiple.css +1 -1
  6. data/app/controllers/cmsedit_controller.rb +174 -167
  7. data/app/controllers/dc_application_controller.rb +230 -196
  8. data/app/controllers/dc_common_controller.rb +88 -50
  9. data/app/controls/dc_help_control.rb +138 -0
  10. data/app/controls/dc_report.rb +12 -16
  11. data/app/forms/all_options.yml +14 -5
  12. data/app/forms/cms_menu.yml +7 -1
  13. data/app/forms/dc_big_table.yml +0 -2
  14. data/app/forms/dc_big_table_value.yml +0 -2
  15. data/app/forms/dc_category.yml +2 -1
  16. data/app/forms/dc_design.yml +2 -2
  17. data/app/forms/dc_folder_permission.yml +0 -2
  18. data/app/forms/dc_help_1.yml +110 -0
  19. data/app/forms/dc_journal.yml +3 -1
  20. data/app/forms/dc_json_ld.yml +0 -3
  21. data/app/forms/dc_link.yml +1 -1
  22. data/app/forms/dc_menu.yml +8 -12
  23. data/app/forms/dc_menu_item.yml +2 -3
  24. data/app/forms/dc_page.yml +7 -2
  25. data/app/forms/dc_part.yml +1 -0
  26. data/app/forms/dc_piece.yml +1 -0
  27. data/app/forms/dc_policy.yml +2 -5
  28. data/app/forms/dc_poll.yml +13 -16
  29. data/app/forms/dc_seo.yml +1 -2
  30. data/app/forms/dc_simple_menu.yml +3 -2
  31. data/app/forms/dc_site.yml +5 -8
  32. data/app/forms/dc_user.yml +27 -11
  33. data/app/forms/dc_user_role.yml +3 -0
  34. data/app/helpers/cms_common_helper.rb +68 -4
  35. data/app/helpers/cms_edit_helper.rb +73 -55
  36. data/app/helpers/cms_helper.rb +70 -32
  37. data/app/helpers/cms_index_helper.rb +155 -102
  38. data/app/helpers/dc_application_helper.rb +132 -109
  39. data/app/models/concerns/dc_page_concern.rb +14 -4
  40. data/app/models/concerns/dc_piece_concern.rb +1 -1
  41. data/app/models/concerns/dc_policy_rule_concern.rb +20 -8
  42. data/app/models/concerns/dc_site_concern.rb +56 -44
  43. data/app/models/concerns/dc_user_concern.rb +58 -19
  44. data/app/models/dc_big_table.rb +2 -2
  45. data/app/models/dc_design.rb +29 -19
  46. data/app/models/dc_filter.rb +28 -22
  47. data/app/models/dc_key_value_store.rb +1 -0
  48. data/app/models/dc_permission.rb +19 -9
  49. data/app/models/dc_policy.rb +25 -14
  50. data/app/models/dc_policy_role.rb +22 -11
  51. data/app/models/dc_temp.rb +8 -1
  52. data/app/models/dc_user_role.rb +2 -2
  53. data/app/models/drgcms_form_fields/comment.rb +11 -2
  54. data/app/models/drgcms_form_fields/date_picker.rb +2 -0
  55. data/app/models/drgcms_form_fields/drgcms_field.rb +2 -1
  56. data/app/models/drgcms_form_fields/embedded.rb +9 -10
  57. data/app/models/drgcms_form_fields/file_field.rb +1 -1
  58. data/app/models/drgcms_form_fields/file_select.rb +2 -2
  59. data/app/models/drgcms_form_fields/hash_field.rb +11 -7
  60. data/app/models/drgcms_form_fields/link_to.rb +2 -2
  61. data/app/models/drgcms_form_fields/method.rb +5 -4
  62. data/app/models/drgcms_form_fields/multitext_autocomplete.rb +1 -1
  63. data/app/models/drgcms_form_fields/number_field.rb +4 -3
  64. data/app/models/drgcms_form_fields/readonly.rb +13 -17
  65. data/app/models/drgcms_form_fields/select.rb +24 -25
  66. data/app/models/drgcms_form_fields/text_autocomplete.rb +22 -14
  67. data/app/renderers/dc_page_renderer.rb +7 -6
  68. data/app/renderers/dc_poll_renderer.rb +16 -20
  69. data/app/views/cmsedit/_edit_stuff.html.erb +5 -2
  70. data/app/views/cmsedit/_form.html.erb +3 -2
  71. data/app/views/cmsedit/_result.html.erb +21 -18
  72. data/app/views/cmsedit/edit.html.erb +4 -1
  73. data/app/views/cmsedit/index.html.erb +3 -2
  74. data/app/views/cmsedit/new.html.erb +5 -2
  75. data/app/views/dc_common/_help.html.erb +17 -0
  76. data/app/views/layouts/models.html.erb +2 -1
  77. data/config/locales/drgcms_en.yml +17 -2
  78. data/config/locales/drgcms_sl.yml +20 -2
  79. data/config/locales/models_en.yml +7 -5
  80. data/config/locales/models_sl.yml +12 -9
  81. data/drg_cms.gemspec +16 -16
  82. data/lib/drg_cms/version.rb +1 -1
  83. data/lib/drg_cms.rb +94 -2
  84. metadata +32 -30
  85. data/app/models/__dc_dummy.rb +0 -102
@@ -1,6 +1,9 @@
1
1
  <%= dc_head_for_form %>
2
2
  <%= dc_table_title dc_edit_title() %>
3
3
 
4
- <%= form_tag( @parms, method: :put, id: 'cmsform', multipart: @form['form']['multipart'] ) do %>
4
+ <%= form_tag( @parms, method: :put, id: params['form_name'] || params['table'],
5
+ class: 'cmsform', multipart: @form['form']['multipart'] ) do %>
5
6
  <%= render partial: 'form' %>
6
7
  <% end %>
8
+
9
+ <div id="popup" style="display: none;"></div>
@@ -1,5 +1,5 @@
1
- <div class="dc-form-frame">
2
- <%= dc_table_title_for_result @records %>
1
+ <div id="<%= params['form_name'] || params['table'] %>" class="dc-form-frame">
2
+ <%= dc_title_for_index @records %>
3
3
 
4
4
  <%= dc_actions_for_index %>
5
5
  <%= dc_div_filter %>
@@ -9,3 +9,4 @@
9
9
 
10
10
  <%= javascript_tag(@js) unless @js.blank? %>
11
11
  <% unless @css.blank? %><style type="text/css"><%= @css %></style><% end %>
12
+ <div id="popup" style="display: none;"></div>
@@ -1,5 +1,8 @@
1
- <%= dc_table_title dc_new_title() %>
1
+ <%= dc_table_title dc_new_title %>
2
2
 
3
- <%= form_tag( @parms, method: :post, id: 'cmsform', multipart: @form['form']['multipart'] ) do %>
3
+ <%= form_tag(@parms, method: :post, id: params['form_name'] || params['table'],
4
+ class: 'cmsform', multipart: @form['form']['multipart']) do %>
4
5
  <%= render partial: 'form' %>
5
6
  <% end %>
7
+
8
+ <div id="popup" style="display: none;"></div>
@@ -0,0 +1,17 @@
1
+
2
+ <div class="dc-help"><a id="help-top"></a>
3
+ <h1><%= t('drgcms.dc_help.help') %>: <%= dc_form_title %></h1>
4
+ <div class="help-buttons">
5
+ <% if params[:type] == 'form' %>
6
+ <button onclick="location.href='#fields'; return false;"><%= t('drgcms.dc_help.fields_button') %></button>
7
+ <% end %>
8
+ <% if @commnets %>
9
+ <button onclick="location.href='#comments'; return false;"><%= t('drgcms.dc_help.comments_button') %></button>
10
+ <% end %>
11
+ </div>
12
+
13
+ <div class="help-body"><%= dc_help_body if @help %></div>
14
+ <div class="help-fields"><%= dc_help_fields if params[:type] == 'form' %></div>
15
+
16
+ <div class="help-top" onclick="location.href='#help-top'; return false;"><%= fa_icon('arrow-up') %></div>
17
+ </div>
@@ -3,8 +3,9 @@
3
3
  <head>
4
4
  <title>Models dump</title>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+
6
7
  <%= stylesheet_link_tag "cms", media: 'all' %>
7
- <%= javascript_include_tag "cms" %>
8
+ <%= javascript_include_tag "cms" %>
8
9
  </head>
9
10
  <body>
10
11
 
@@ -60,9 +60,10 @@ en:
60
60
  login: Login into CMS
61
61
  username: User name
62
62
  password: Password
63
- form_error: Error loading form #{form_name}
63
+ form_error: Error loading form %{form_name}
64
64
  img_large: Click for larger image
65
- no_class: Class %{class} not defined!
65
+ no_class: Class [%{class}] not defined!
66
+ no_method: Method (helper) [%{method}] not defined!
66
67
  img_alt_not_present: All images in body must have alternative text entered
67
68
 
68
69
  toggle_cms: Toggle CMS edit/view mode
@@ -118,3 +119,17 @@ en:
118
119
  filters:
119
120
  this_site_only: Documents for currently selected site only
120
121
 
122
+ dc_help:
123
+ help: HELP
124
+ fields_button: Data description
125
+ comments_button: Comments
126
+ title: Manage help documents
127
+ project: Project
128
+ lang: Locale
129
+ project_refresh: Refresh
130
+ project_refresh_title: Refresh list of available documents
131
+ form_name: Form
132
+ updated_at: Updated
133
+ 1basic: Basic
134
+ 2index: Index
135
+ 3form: Form
@@ -60,9 +60,10 @@ sl:
60
60
  login: Prijava v CMS
61
61
  username: Uporabnik
62
62
  password: Geslo
63
- form_error: Napaka pri branju forme #{form_name}
63
+ form_error: Napaka pri branju forme %{form_name}
64
64
  img_large: Klik za večjo sliko
65
- no_class: Class %{class} ni definiran!
65
+ no_class: Razred (class) [%{class}] ni definiran!
66
+ no_method: Metoda (helper) [%{method}] ne obstaja!
66
67
  img_alt_not_present: Vse slike v vsebini morajo imeti vpisano nadomestno besedilo
67
68
 
68
69
  toggle_cms: Preklopi med CMS urejanjem in prikazom
@@ -114,3 +115,20 @@ sl:
114
115
 
115
116
  filters:
116
117
  this_site_only: Dokumenti samo trenutno izbrane strani
118
+
119
+ dc_help:
120
+ help: POMOČ
121
+ fields_button: Opis podatkov
122
+ comments_button: Opombe
123
+ title: Urejanje dokumentov pomoči
124
+ project: Projekt
125
+ lang: Jezik
126
+ project_refresh: Osveži
127
+ project_refresh_title: Osveži seznam že pripravljenih dokumentov
128
+ form_name: Forma
129
+ updated_at: Spremenjeno
130
+ 1basic: Osnovno
131
+ 2index: Index
132
+ 3form: Forma
133
+
134
+
@@ -94,7 +94,7 @@ en:
94
94
 
95
95
  dc_user:
96
96
  tabletitle: Users
97
- tab1: Base
97
+ 1base: Base
98
98
 
99
99
  id: Id
100
100
  username: Username
@@ -116,8 +116,8 @@ en:
116
116
  valid_from: Valid from
117
117
  valid_to: Valid to
118
118
  updated_by: Updated by
119
- type: Type
120
- members: Members
119
+ group: Is group
120
+ member: Member in groups
121
121
  dc_user_roles: Roles
122
122
  password: Password
123
123
  password_confirmation: Confirm password
@@ -302,6 +302,7 @@ en:
302
302
  if_id: CSS id
303
303
  if_class: CSS class
304
304
  _update_menu: Update menu
305
+ div_class: DIV class
305
306
 
306
307
  dc_seo:
307
308
  seo: SEO
@@ -620,8 +621,8 @@ en:
620
621
  valid_from: Account is valid from
621
622
  valid_to: Account is valid until
622
623
  updated_by: Account last updated by
623
- type: Type of user account
624
- members: Members (if type is group)
624
+ group: This is group account
625
+ member: User is member in selected groups
625
626
  dc_user_roles: Roles for this user
626
627
  password: Password
627
628
  password_confirmation: Password confirmation
@@ -780,6 +781,7 @@ en:
780
781
  if_id: CSS id of IFrame object
781
782
  if_class: CSS class of IFrame object
782
783
  _update_menu: Update link in selected menu to point to this document
784
+ div_class: Class name given to top level div
783
785
 
784
786
  dc_seo:
785
787
  title: SEO optimised page title
@@ -86,19 +86,20 @@ sl:
86
86
 
87
87
  dc_user:
88
88
  tabletitle: Uporabniki
89
- tab1: Osnova
89
+ 1base: Osnova
90
90
 
91
91
  id: Id
92
92
  username: Uporabnik
93
93
  title: Titula
94
94
  first_name: Ime
95
+ middle_name: Srednje ime
95
96
  last_name: Priimek
96
97
  name: Naziv
97
98
  address: Naslov
98
99
  post: Pošta
99
100
  country: Država
100
101
  phone: Telefon
101
- email: e-Pošta
102
+ email: e-Naslov
102
103
  picture: Slika
103
104
  birthdate: Datum rojstva
104
105
  about: Več o
@@ -107,8 +108,8 @@ sl:
107
108
  valid_from: Velja od
108
109
  valid_to: Velja do
109
110
  updated_by: Spremenil
110
- type: Vrsta
111
- members: Člani
111
+ group: Je skupina
112
+ member: Član v skupinah
112
113
  dc_user_roles: Uporabniške vloge
113
114
  password: Geslo
114
115
  password_confirmation: Potrdi geslo
@@ -332,7 +333,8 @@ sl:
332
333
  if_id: CSS id
333
334
  if_class: CSS class
334
335
  _update_menu: Spremeni meni
335
-
336
+ div_class: DIV class
337
+
336
338
  dc_seo:
337
339
  seo: SEO
338
340
  title: Naslov za brskalnik
@@ -639,8 +641,8 @@ sl:
639
641
  valid_from: Začetni datum veljavnosti
640
642
  valid_to: Končni datum veljavnosti
641
643
  updated_by: Spremenil
642
- type: Vrsta uporabniškega računa
643
- members: Člani (če skupina uporabnikov)
644
+ group: Račun predstavlja uporabniško skupino
645
+ member: Seznam skupin za uporabnika
644
646
  dc_user_roles: Vloge, ki pripadajo temu uporabniku
645
647
  password: Geslo
646
648
  password_confirmation: Še enkrat vpišite geslo
@@ -778,7 +780,6 @@ sl:
778
780
  subject_link: Povezava (link) do sestavka
779
781
  sub_subject: Povzetek, kratek opis vsebine
780
782
  alt_link: Alternativna povezava do sestavka
781
- picture: Slika v povezavi s stranjo
782
783
  gallery: Dokument vsebuje slikovno galerijo.
783
784
  css: CSS
784
785
  script: Skript
@@ -799,7 +800,7 @@ sl:
799
800
  dc_design_id: Dizajn, mu pripada sestavek
800
801
  dc_site_id: Spletišče. ki mu pripada stran
801
802
  kats: Kategorije, ki jim pripada članek
802
- picture: Slika uporabljena za prikaz sestavka
803
+ picture: Slika uporabljena v zvezi s sestavkom
803
804
  dc_poll_id: Anketa, če sestavek vsebuje tudi anketo
804
805
  if_url: URL naslov od koder bo naložena vsebina IFrame-a
805
806
  if_width: Širina IFrame področja
@@ -810,6 +811,7 @@ sl:
810
811
  if_id: CSS id IFrame objekta
811
812
  if_class: CSS class IFrame objekta
812
813
  _update_menu: Popravi tudi povezavo do dokumenta v menuju
814
+ div_class: Class, ki bo določen na vrhnem razdelku (DIV)
813
815
 
814
816
  dc_seo:
815
817
  title: Naslov, ki se izpiše v gornji vrstici brskalnika. Optimiziraj za SEO.
@@ -982,3 +984,4 @@ sl:
982
984
  active: Podatki so aktivni
983
985
  add_schema: Dodaj strukturo
984
986
  add_error: Element %{schema} že obstaja!
987
+
data/drg_cms.gemspec CHANGED
@@ -1,26 +1,26 @@
1
- # Copyright 2012-2016 Damjan Rems
1
+ # Copyright 2012-2021 Damjan Rems
2
2
 
3
- $:.push File.expand_path("../lib", __FILE__)
3
+ $:.push File.expand_path('../lib', __FILE__)
4
4
 
5
- # Maintain your gem's version:
6
- require "drg_cms/version"
5
+ # Maintain gem's version:
6
+ require 'drg_cms/version'
7
7
 
8
- # Describe your gem and declare its dependencies:
8
+ # Describe gem and declare its dependencies:
9
9
  Gem::Specification.new do |s|
10
- s.name = "drg_cms"
10
+ s.name = 'drg_cms'
11
11
  s.version = DrgCms::VERSION
12
- s.authors = ["Damjan Rems"]
13
- s.email = ["damjan.rems@gmail.com"]
14
- s.homepage = "http://www.drgcms.org"
15
- s.summary = "DRG: Rapid web application development tool and CMS for Ruby, Rails and MongoDB"
16
- s.description = "DRG, development tool for rapid building of in-house (Intranet, private cloud) applications as well as CMS for creating complex, data-entry intensive web sites."
17
- s.license = "MIT"
18
- s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md", "History.log", "drg_cms.gemspec"]
19
- s.test_files = Dir["test/**/*"]
12
+ s.authors = ['Damjan Rems']
13
+ s.email = ['damjan.rems@gmail.com']
14
+ s.homepage = 'https://www.drgcms.org'
15
+ s.summary = 'DRG: Rapid web application development tool and CMS for Ruby, Rails and MongoDB'
16
+ s.description = 'DRG, development tool for rapid building of in-house (Intranet, private cloud) applications as well as CMS for creating complex, data-entry intensive web sites.'
17
+ s.license = 'MIT'
18
+ s.files = Dir['{app,config,db,lib}/**/*'] + %w[MIT-LICENSE Rakefile README.md History.log drg_cms.gemspec]
19
+ s.test_files = Dir['test/**/*']
20
20
 
21
- s.required_ruby_version = '>= 2.5'
21
+ s.required_ruby_version = '>= 2.7'
22
22
 
23
- s.add_dependency 'rails', '~> 6'
23
+ s.add_dependency 'rails', '~> 6.1'
24
24
  s.add_dependency 'jquery-rails'
25
25
  s.add_dependency 'jquery-ui-rails'
26
26
  s.add_dependency 'non-stupid-digest-assets'
@@ -23,5 +23,5 @@
23
23
 
24
24
  # drg_cms gem version
25
25
  module DrgCms #:nodoc:
26
- VERSION = '0.6.0.8'.freeze
26
+ VERSION = '0.6.1.5'.freeze
27
27
  end
data/lib/drg_cms.rb CHANGED
@@ -118,6 +118,99 @@ def self.from_root(file=nil)
118
118
  File.expand_path("../../#{file}", __FILE__).to_s
119
119
  end
120
120
 
121
+ ####################################################################
122
+ # Checks if any errors exist on document and writes error log. It can also
123
+ # crash if requested. This is mostly usefull in development for debuging
124
+ # model errors or when updating multiple collections and each save must be
125
+ # checked if succesfull.
126
+ #
127
+ # @param [Document] Document object which will be checked
128
+ # @param [Boolean] If true method should end in runtime error. Default = false.
129
+ #
130
+ # @return [String] Error messages or empty string if everything is OK.
131
+ #
132
+ # @Example Check for error when data is saved.
133
+ # model.save
134
+ # if (msg = DrgCms.model_check(model) ).size > 0
135
+ # p msg
136
+ # error process ......
137
+ # end
138
+ #
139
+ ####################################################################
140
+ def self.model_check(document, crash = false)
141
+ return nil unless document.errors.any?
142
+
143
+ msg = document.errors.inject('') { |r, error| r << "#{error.attribute}: #{error.message}\n" }
144
+ if crash && msg.size > 0
145
+ msg = "Validation errors in #{document.class}:\n" + msg
146
+ pp msg
147
+ Rails.logger.error(msg)
148
+ raise "Validation error. See log for more information."
149
+ end
150
+ msg
151
+ end
152
+
153
+ ########################################################################
154
+ # Determines if redis cache store is active
155
+ #
156
+ # @return [Boolean] : True if redis cache store is active
157
+ ########################################################################
158
+ def self.redis_cache_store?
159
+ (Rails.application.config.cache_store.first == :redis_cache_store) rescue false
160
+ end
161
+
162
+ ####################################################################
163
+ # Clear cache. If key is specified only this key will be deleted.
164
+ #
165
+ # @param [String] Optional key to be deleted
166
+ ####################################################################
167
+ def self.cache_clear(key = nil)
168
+ return Rails.cache.clear if key.nil?
169
+
170
+ if redis_cache_store?
171
+ Rails.cache.redis.del(key)
172
+ else
173
+ Rails.cache.delete_matched("#{key}*")
174
+ end
175
+ end
176
+
177
+ ####################################################################
178
+ # Read from cache
179
+ #
180
+ # @keys [Array] Array of keys
181
+ #
182
+ # @return [Object] Data returned from cache
183
+ ####################################################################
184
+ def self.cache_read(keys)
185
+ if redis_cache_store?
186
+ keys = keys.dup
187
+ first = keys.shift
188
+ data = Rails.cache.redis.hget(first, keys.join(''))
189
+ data ? Marshal.load(data) : nil
190
+ else
191
+ Rails.cache.read(keys.join(''))
192
+ end
193
+ end
194
+
195
+ ####################################################################
196
+ # Write data to cache
197
+ #
198
+ # @param [Array] keys : array of keys
199
+ # @param [Object] data : Document object
200
+ #
201
+ # @return [Object] data so dc_cache_write can be used as last statement in method.
202
+ ####################################################################
203
+ def self.cache_write(keys, data)
204
+ if redis_cache_store?
205
+ keys = keys.dup
206
+ first = keys.shift
207
+ Rails.cache.redis.hset(first, keys.join(''), Marshal.dump(data))
208
+ else
209
+ Rails.cache.write(keys.join(''), data)
210
+ end
211
+ data
212
+ end
213
+
121
214
  ###############################################################################
122
215
  # All Routes required by DrgCms.
123
216
  #
@@ -138,6 +231,7 @@ def self.routes
138
231
  match 'dc_common/paste_clipboard' => :paste_clipboard, via: [:get, :post]
139
232
  put 'dc_common/restore_from_journal' => :restore_from_journal
140
233
  get 'dc_common/add_json_ld_schema' => :add_json_ld_schema
234
+ get 'dc_common/help' => :help
141
235
  end
142
236
  match 'elfinder' => 'dc_elfinder#connector', via: [:get, :post]
143
237
  match 'cmsedit/run' => 'cmsedit#run', via: [:get, :put, :post]
@@ -147,5 +241,3 @@ def self.routes
147
241
  end
148
242
 
149
243
  end
150
-
151
- DrgCms.add_patches_path(File.dirname(__FILE__) + '../app/models/drgcms_form_fields/patches')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drg_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.8
4
+ version: 0.6.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damjan Rems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-20 00:00:00.000000000 Z
11
+ date: 2021-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6'
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '6'
26
+ version: '6.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -210,6 +210,7 @@ files:
210
210
  - app/controllers/dc_common_controller.rb
211
211
  - app/controllers/dc_main_controller.rb
212
212
  - app/controls/browse_models_control.rb
213
+ - app/controls/dc_help_control.rb
213
214
  - app/controls/dc_page_control.rb
214
215
  - app/controls/dc_poll_result_control.rb
215
216
  - app/controls/dc_report.rb
@@ -228,6 +229,7 @@ files:
228
229
  - app/forms/dc_filter.yml
229
230
  - app/forms/dc_folder_permission.yml
230
231
  - app/forms/dc_gallery.yml
232
+ - app/forms/dc_help_1.yml
231
233
  - app/forms/dc_ident.yml
232
234
  - app/forms/dc_journal.yml
233
235
  - app/forms/dc_json_ld.yml
@@ -262,7 +264,6 @@ files:
262
264
  - app/helpers/cms_helper.rb
263
265
  - app/helpers/cms_index_helper.rb
264
266
  - app/helpers/dc_application_helper.rb
265
- - app/models/__dc_dummy.rb
266
267
  - app/models/concerns/dc_page_concern.rb
267
268
  - app/models/concerns/dc_piece_concern.rb
268
269
  - app/models/concerns/dc_policy_rule_concern.rb
@@ -361,6 +362,7 @@ files:
361
362
  - app/views/cmsedit/index.html.erb
362
363
  - app/views/cmsedit/login.html.erb
363
364
  - app/views/cmsedit/new.html.erb
365
+ - app/views/dc_common/_help.html.erb
364
366
  - app/views/dc_common/_iframe_edit.html.erb
365
367
  - app/views/dc_common/paste_clipboard.html.erb
366
368
  - app/views/layouts/__cmsedit.html.erb
@@ -423,7 +425,7 @@ files:
423
425
  - test/dummy/script/rails
424
426
  - test/integration/navigation_test.rb
425
427
  - test/lib/generators/new_drg_form_generator_test.rb
426
- homepage: http://www.drgcms.org
428
+ homepage: https://www.drgcms.org
427
429
  licenses:
428
430
  - MIT
429
431
  metadata: {}
@@ -435,47 +437,47 @@ required_ruby_version: !ruby/object:Gem::Requirement
435
437
  requirements:
436
438
  - - ">="
437
439
  - !ruby/object:Gem::Version
438
- version: '2.5'
440
+ version: '2.7'
439
441
  required_rubygems_version: !ruby/object:Gem::Requirement
440
442
  requirements:
441
443
  - - ">="
442
444
  - !ruby/object:Gem::Version
443
445
  version: '0'
444
446
  requirements: []
445
- rubygems_version: 3.1.2
447
+ rubygems_version: 3.2.22
446
448
  signing_key:
447
449
  specification_version: 4
448
450
  summary: 'DRG: Rapid web application development tool and CMS for Ruby, Rails and
449
451
  MongoDB'
450
452
  test_files:
451
453
  - test/drg_cms_test.rb
452
- - test/integration/navigation_test.rb
453
- - test/lib/generators/new_drg_form_generator_test.rb
454
- - test/dummy/script/rails
455
454
  - test/dummy/README.rdoc
456
- - test/dummy/app/views/layouts/application.html.erb
457
- - test/dummy/app/helpers/application_helper.rb
458
- - test/dummy/app/controllers/application_controller.rb
459
- - test/dummy/app/assets/stylesheets/application.css
460
- - test/dummy/app/assets/javascripts/application.js
461
- - test/dummy/public/422.html
462
- - test/dummy/public/404.html
463
- - test/dummy/public/favicon.ico
464
- - test/dummy/public/500.html
465
455
  - test/dummy/Rakefile
466
- - test/dummy/config.ru
467
- - test/dummy/config/environment.rb
468
- - test/dummy/config/boot.rb
469
- - test/dummy/config/routes.rb
456
+ - test/dummy/app/assets/javascripts/application.js
457
+ - test/dummy/app/assets/stylesheets/application.css
458
+ - test/dummy/app/controllers/application_controller.rb
459
+ - test/dummy/app/helpers/application_helper.rb
460
+ - test/dummy/app/views/layouts/application.html.erb
470
461
  - test/dummy/config/application.rb
462
+ - test/dummy/config/boot.rb
471
463
  - test/dummy/config/database.yml
472
- - test/dummy/config/environments/test.rb
473
- - test/dummy/config/environments/production.rb
464
+ - test/dummy/config/environment.rb
474
465
  - test/dummy/config/environments/development.rb
475
- - test/dummy/config/locales/en.yml
476
- - test/dummy/config/initializers/secret_token.rb
466
+ - test/dummy/config/environments/production.rb
467
+ - test/dummy/config/environments/test.rb
468
+ - test/dummy/config/initializers/backtrace_silencers.rb
477
469
  - test/dummy/config/initializers/inflections.rb
478
470
  - test/dummy/config/initializers/mime_types.rb
479
- - test/dummy/config/initializers/backtrace_silencers.rb
480
- - test/dummy/config/initializers/wrap_parameters.rb
471
+ - test/dummy/config/initializers/secret_token.rb
481
472
  - test/dummy/config/initializers/session_store.rb
473
+ - test/dummy/config/initializers/wrap_parameters.rb
474
+ - test/dummy/config/locales/en.yml
475
+ - test/dummy/config/routes.rb
476
+ - test/dummy/config.ru
477
+ - test/dummy/public/404.html
478
+ - test/dummy/public/422.html
479
+ - test/dummy/public/500.html
480
+ - test/dummy/public/favicon.ico
481
+ - test/dummy/script/rails
482
+ - test/integration/navigation_test.rb
483
+ - test/lib/generators/new_drg_form_generator_test.rb
@@ -1,102 +0,0 @@
1
- #--
2
- # Copyright (c) 2012+ Damjan Rems
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining
5
- # a copy of this software and associated documentation files (the
6
- # "Software"), to deal in the Software without restriction, including
7
- # without limitation the rights to use, copy, modify, merge, publish,
8
- # distribute, sublicense, and/or sell copies of the Software, and to
9
- # permit persons to whom the Software is furnished to do so, subject to
10
- # the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be
13
- # included in all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
- # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
- # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
- # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
- #++
23
-
24
- ########################################################################
25
- # == Schema information
26
- #
27
- # Collection name: dc_dummy : Collection name used when form does not belong to database model.
28
- #
29
- # _id BSON::ObjectId _id
30
- #
31
- # Which is not collection at all. DcDummy model is used for entering data on forms
32
- # where data will not be saved to database but will instead be processed by custom
33
- # made routine. For example entering begin and end date on report.
34
- #
35
- # Example (as used in forms):
36
- #
37
- # table: dc_dummy
38
- # title: Enter time period
39
- #
40
- # form:
41
- # actions:
42
- # 1:
43
- # type: ajax
44
- # method: post
45
- # controller: reports
46
- # action: do_some_report
47
- # caption: Run report
48
- #
49
- # fields:
50
- # 10:
51
- # name: date_start
52
- # type: date_picker
53
- # caption: Start date
54
- # 20:
55
- # name: date_end
56
- # type: date_picker
57
- # caption: End date
58
- #
59
- # And suppose your report saved data to file named public/report.pdf.
60
- # Put this line at the end of do_some_report method:
61
- #
62
- # render inline: { :window_report => '/report.pdf' }.to_json, formats: 'js'
63
- #
64
- # As result report.pdf file will be opened in new browser window.
65
- ########################################################################
66
- class DcDummy
67
- include Mongoid::Document
68
-
69
- ########################################################################
70
- # Respond_to should always return true.
71
- ########################################################################
72
- def respond_to?(m)
73
- true
74
- end
75
-
76
- ########################################################################
77
- # Redefine send method. Send is used to assign value by cmsedit controller.
78
- ########################################################################
79
- def send(field,value=nil)
80
- if field.to_s.match('=')
81
- field.chomp!('=')
82
- @internals ||= {}
83
- @internals[field] = value
84
- end
85
- end
86
-
87
- ########################################################################
88
- # Method missing will return value if value defined by m parameter is saved to
89
- # @internals array or will assign new value to @internals hash if m matches '='.
90
- ########################################################################
91
- def method_missing(m, *args, &block) #:nodoc:
92
- @internals ||= {}
93
- m = m.to_s
94
- if m.match('=')
95
- m.chomp!('=')
96
- @internals[m] = args.first
97
- else
98
- @internals[m]
99
- end
100
- end
101
-
102
- end