drg_cms 0.6.1.11 → 0.7.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +260 -0
- data/MIT-LICENSE +1 -1
- data/README.md +9 -5
- data/app/assets/javascripts/drg_cms/drg_cms.js +35 -19
- data/app/assets/javascripts/drg_cms_application.js +0 -2
- data/app/assets/javascripts/drg_cms_cms.js +2 -3
- data/app/assets/stylesheets/drg_cms/jstree.css +32 -27
- data/app/assets/stylesheets/drg_cms/select-multiple.css +4 -2
- data/app/controllers/dc_application_controller.rb +3 -2
- data/app/controllers/dc_common_controller.rb +7 -7
- data/app/controls/dc_category_control.rb +61 -0
- data/app/forms/cms_menu.yml +3 -2
- data/app/forms/dc_category.yml +17 -8
- data/app/forms/dc_category_as_tree.yml +31 -0
- data/app/forms/help/dc_category_as_tree.en +4 -0
- data/app/forms/help/dc_category_as_tree.sl +5 -0
- data/app/helpers/cms_edit_helper.rb +2 -2
- data/app/helpers/dc_application_helper.rb +31 -49
- data/app/helpers/dc_category_helper.rb +129 -0
- data/app/models/dc_category.rb +50 -24
- data/app/models/drgcms_form_fields/date_picker.rb +10 -12
- data/app/models/drgcms_form_fields/datetime_picker.rb +10 -11
- data/app/models/drgcms_form_fields/drgcms_field.rb +46 -4
- data/app/models/drgcms_form_fields/tree_select.rb +20 -19
- data/app/views/layouts/content.html.erb +1 -1
- data/config/locales/drgcms_en.yml +2 -0
- data/config/locales/drgcms_sl.yml +2 -0
- data/drg_cms.gemspec +2 -2
- data/lib/drg_cms/version.rb +1 -1
- data/lib/tasks/dc_cleanup.rake +20 -42
- metadata +12 -7
- data/History.log +0 -109
@@ -30,12 +30,12 @@ module DrgcmsFormFields
|
|
30
30
|
# * +name:+ Field name (required)
|
31
31
|
# * +options:+ options which apply to date_picker field. All options can be found here http://xdsoft.net/jqplugins/datetimepicker/ .
|
32
32
|
# Options can be defined in single line like:
|
33
|
-
# * options: 'step: 15,inline: true,lang:
|
33
|
+
# * options: 'step: 15,inline: true,lang: sl' or
|
34
34
|
#
|
35
35
|
# * options:
|
36
36
|
# * step: 15
|
37
37
|
# * inline: true
|
38
|
-
# * lang:
|
38
|
+
# * lang: sl
|
39
39
|
#
|
40
40
|
# * +html:+ html options which apply to date_time_picker field (optional)
|
41
41
|
#
|
@@ -52,27 +52,26 @@ class DatetimePicker < DrgcmsField
|
|
52
52
|
###########################################################################
|
53
53
|
def render
|
54
54
|
value = @record.try(@yaml['name']) ? I18n.localize(@record[@yaml['name']].localtime) : nil
|
55
|
-
#return ro_standard( @parent.dc_format_value(value)) if @readonly
|
56
|
-
|
57
|
-
@yaml['options'] ||= {}
|
58
55
|
set_initial_value
|
56
|
+
|
59
57
|
@yaml['html']['size'] ||= @yaml['size'] || 14
|
60
58
|
@yaml['html']['value'] ||= value if @record[@yaml['name']]
|
61
59
|
@yaml['html']['autocomplete'] ||= 'off'
|
62
60
|
@yaml['html']['class'] = @yaml['html']['class'].to_s + ' date-picker'
|
63
61
|
|
64
|
-
@yaml['options']
|
65
|
-
|
62
|
+
options = options_to_hash(@yaml['options'])
|
63
|
+
options['lang'] ||= I18n.locale.to_s
|
64
|
+
options['format'] ||= t('datetimepicker.formats.datetime')
|
66
65
|
|
67
66
|
record = record_text_for(@yaml['name'])
|
68
67
|
@html << @parent.text_field(record, @yaml['name'], @yaml['html'])
|
69
|
-
@js << %
|
68
|
+
@js << %(
|
70
69
|
$(document).ready(function() {
|
71
|
-
$("##{record}_#{@yaml['name']}").datetimepicker(
|
72
|
-
#{hash_to_options(
|
70
|
+
$("##{record}_#{@yaml['name']}").datetimepicker({
|
71
|
+
#{hash_to_options(options)}
|
73
72
|
});
|
74
73
|
});
|
75
|
-
|
74
|
+
) unless @readonly
|
76
75
|
|
77
76
|
self
|
78
77
|
end
|
@@ -250,16 +250,58 @@ end
|
|
250
250
|
# options:
|
251
251
|
# height: 400
|
252
252
|
# width: 800
|
253
|
-
# toolbar: "
|
253
|
+
# toolbar: "basic"
|
254
254
|
#
|
255
|
-
# => "height:400, width:800, toolbar:'basic'"
|
255
|
+
# => "height:400, width:800, toolbar: 'basic'"
|
256
256
|
#
|
257
257
|
# Return:
|
258
258
|
# String: Options formated as javascript options.
|
259
259
|
#
|
260
260
|
####################################################################
|
261
|
-
def hash_to_options(
|
262
|
-
|
261
|
+
def hash_to_options(options)
|
262
|
+
c = ''
|
263
|
+
options.each do |key, option|
|
264
|
+
c << "#{key} : "
|
265
|
+
c << case
|
266
|
+
when option.to_s.match(/function/i) then option
|
267
|
+
when option.class == String then "\"#{option}\""
|
268
|
+
else option.to_s
|
269
|
+
end
|
270
|
+
c << ",\n"
|
271
|
+
end
|
272
|
+
c
|
273
|
+
end
|
274
|
+
|
275
|
+
####################################################################
|
276
|
+
# Options may be defined on form as hash or as string. This method will
|
277
|
+
# ensure conversion of options into hash.
|
278
|
+
#
|
279
|
+
# Parameters:
|
280
|
+
# [String or Hash] : Form options
|
281
|
+
#
|
282
|
+
# Form example: As used in forms
|
283
|
+
# options:
|
284
|
+
# height: 400
|
285
|
+
# width: 800
|
286
|
+
# toolbar: "'basic'"
|
287
|
+
# or
|
288
|
+
#
|
289
|
+
# options: "height:400, width:800, toolbar:'basic'"
|
290
|
+
#
|
291
|
+
# Return:
|
292
|
+
# Hash: Options as Hash
|
293
|
+
####################################################################
|
294
|
+
def options_to_hash(options)
|
295
|
+
return {} if options.nil?
|
296
|
+
return options unless options.class == String
|
297
|
+
|
298
|
+
options.chomp.split(',').inject({}) do |r, e|
|
299
|
+
key, value = e.chomp.split(':')
|
300
|
+
value.strip!
|
301
|
+
value = value[1..value.size - 2] if value[0] =~ /\'|\"/
|
302
|
+
r[key.strip] = value
|
303
|
+
r
|
304
|
+
end
|
263
305
|
end
|
264
306
|
|
265
307
|
####################################################################
|
@@ -59,6 +59,7 @@ class TreeSelect < Select
|
|
59
59
|
###########################################################################
|
60
60
|
def make_tree(parent)
|
61
61
|
return '' unless @choices[parent.to_s]
|
62
|
+
|
62
63
|
@html << '<ul>'
|
63
64
|
choices = if @choices[parent.to_s].first[3] != 0
|
64
65
|
@choices[parent.to_s].sort_by {|e| e[3].to_i } # sort by order if first is not 0
|
@@ -66,16 +67,16 @@ def make_tree(parent)
|
|
66
67
|
@choices[parent.to_s].sort_alphabetical_by(&:first) # use UTF-8 sort
|
67
68
|
end
|
68
69
|
choices.each do |choice|
|
69
|
-
data = [ %
|
70
|
+
data = [ %("selected" : #{choice.last ? 'true' : 'false'} ) ]
|
70
71
|
# only for parent objects
|
71
72
|
if @choices[ choice[1].to_s ]
|
72
|
-
|
73
|
+
# parent is not selectable
|
73
74
|
data << '"disabled" : true' unless @parent.dc_dont?(@yaml['parent_disabled'], true)
|
74
|
-
|
75
|
+
# parents are opened on start
|
75
76
|
data << '"opened" : true' unless @parent.dc_dont?(@yaml['parent_opened'], true)
|
76
77
|
end
|
77
78
|
# data-jstree must be singe quoted
|
78
|
-
@html << %
|
79
|
+
@html << %(<li data-id="#{choice[1]}" data-jstree='{#{data.join(' , ')}}'>#{choice.first}\n)
|
79
80
|
# call recursively for children
|
80
81
|
make_tree(choice[1]) if @choices[ choice[1].to_s ]
|
81
82
|
@html << "</li>"
|
@@ -87,25 +88,24 @@ end
|
|
87
88
|
# Render tree_select field html code
|
88
89
|
###########################################################################
|
89
90
|
def render
|
90
|
-
#return ro_standard if @readonly
|
91
91
|
set_initial_value('html','value')
|
92
92
|
require 'sort_alphabetical'
|
93
93
|
|
94
94
|
record = record_text_for(@yaml['name'])
|
95
95
|
clas = 'tree-select' + (@readonly ? ' dc-readonly' : '')
|
96
96
|
@html << "<div id=\"#{@yaml['name']}\" class=\"#{clas}\" #{set_style()} >"
|
97
|
-
# Fill @choices hash. The key is parent object id
|
97
|
+
# Fill @choices hash. The key is parent object id
|
98
98
|
@choices = {}
|
99
99
|
choices_in_eval(@yaml['eval']).each do |data|
|
100
100
|
@choices[ data[2].to_s ] ||= []
|
101
101
|
@choices[ data[2].to_s ] << (data << false)
|
102
102
|
end
|
103
|
-
# put current values hash with. To speed up selection when there is a lot of categories
|
103
|
+
# put current values hash with. To speed up selection when there is a lot of categories
|
104
104
|
current_values = {}
|
105
105
|
current = @record[@yaml['name']] || []
|
106
106
|
current = [current] unless current.class == Array # non array fields
|
107
|
-
current.each {|e| current_values[e.to_s] = true}
|
108
|
-
# set third element of @choices when selected
|
107
|
+
current.each { |e| current_values[e.to_s] = true }
|
108
|
+
# set third element of @choices when selected
|
109
109
|
@choices.keys.each do |key|
|
110
110
|
0.upto( @choices[key].size - 1 ) do |i|
|
111
111
|
choice = @choices[key][i]
|
@@ -114,16 +114,16 @@ def render
|
|
114
114
|
end
|
115
115
|
make_tree(nil)
|
116
116
|
@html << '</div>'
|
117
|
-
# add hidden communication field
|
117
|
+
# add hidden communication field
|
118
118
|
@html << @parent.hidden_field(record, @yaml['name'], value: current.join(','))
|
119
|
-
# save multiple indicator for data processing on return
|
119
|
+
# save multiple indicator for data processing on return
|
120
120
|
@html << @parent.hidden_field(record, "#{@yaml['name']}_multiple", value: 1) if @yaml['multiple']
|
121
|
-
# javascript to update hidden record field when tree looses focus
|
122
|
-
readonly_code = %
|
121
|
+
# javascript to update hidden record field when tree looses focus
|
122
|
+
readonly_code = %(
|
123
123
|
,
|
124
124
|
"conditionalselect" : function (node) {
|
125
125
|
return false; }
|
126
|
-
|
126
|
+
)
|
127
127
|
|
128
128
|
@js =<<EOJS
|
129
129
|
$(function(){
|
@@ -131,7 +131,7 @@ $(function(){
|
|
131
131
|
"checkbox" : {"three_state" : false},
|
132
132
|
"core" : { "themes" : { "icons": false },
|
133
133
|
"multiple" : #{@yaml['multiple'] ? 'true' : 'false'} },
|
134
|
-
"plugins" : ["checkbox","conditionalselect"]
|
134
|
+
"plugins" : ["checkbox", "conditionalselect"]
|
135
135
|
#{@readonly ? readonly_code : ''}
|
136
136
|
});
|
137
137
|
});
|
@@ -155,13 +155,14 @@ end
|
|
155
155
|
###########################################################################
|
156
156
|
def self.get_data(params, name)
|
157
157
|
return nil if params['record'][name].blank?
|
158
|
-
|
158
|
+
|
159
159
|
result = params['record'][name].split(',')
|
160
|
-
result.delete_if
|
160
|
+
result.delete_if(&:blank?)
|
161
161
|
return nil if result.size == 0
|
162
|
-
|
162
|
+
|
163
|
+
# convert to BSON objects if is BSON object ID
|
163
164
|
result = result.map{ |e| BSON::ObjectId.from_string(e) } if BSON::ObjectId.legal?(result.first)
|
164
|
-
# return only first element if multiple values select was not
|
165
|
+
# return only first element if multiple values select was not allowed
|
165
166
|
params['record']["#{name}_multiple"] == '1' ? result : result.first
|
166
167
|
end
|
167
168
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<title><%= @page_title %></title>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
6
6
|
<%= stylesheet_link_tag "application", media: 'all' %>
|
7
|
-
<style
|
7
|
+
<style media="all"><%= "#{@site.css if @site}#{@design.css if @design}\n#{@page.css if @page}".html_safe %></style>
|
8
8
|
<%= @site.header.html_safe %>
|
9
9
|
<%= javascript_include_tag "application" %>
|
10
10
|
<%= csrf_meta_tags %>
|
@@ -113,6 +113,8 @@ en:
|
|
113
113
|
choices4_filter_operators: 'Equal to:eq,Contains:like,Greater then:gt,Less then:lt,Is empty:empty'
|
114
114
|
|
115
115
|
browse_collections: Browse all collections
|
116
|
+
category_has_subs: Category can't be deleted, because it contains sub-elements.
|
117
|
+
category_as_tree: Edit in treeview
|
116
118
|
|
117
119
|
dc_journal:
|
118
120
|
zero_selected: No data selected!
|
@@ -113,6 +113,8 @@ sl:
|
|
113
113
|
choices4_filter_operators: 'Je enak:eq,Vsebuje:like,Je večji od:gt,Je manjši od:lt,Je prazen:empty'
|
114
114
|
|
115
115
|
browse_collections: Brskanje po definicijah zbirk
|
116
|
+
category_has_subs: Kategorije ni mogoče izbrisati, ker vsebuje podrejene elemente.
|
117
|
+
category_as_tree: Uredi v drevesnem pogledu
|
116
118
|
|
117
119
|
dc_journal:
|
118
120
|
zero_selected: Ni izbranih podatkov!
|
data/drg_cms.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.summary = 'DRG: Rapid web application development tool and CMS for Ruby, Rails and MongoDB'
|
16
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
17
|
s.license = 'MIT'
|
18
|
-
s.files = Dir['{app,config,db,lib}/**/*'] + %w[MIT-LICENSE Rakefile README.md
|
18
|
+
s.files = Dir['{app,config,db,lib}/**/*'] + %w[MIT-LICENSE Rakefile README.md CHANGELOG.md drg_cms.gemspec]
|
19
19
|
s.test_files = Dir['test/**/*']
|
20
20
|
|
21
21
|
s.required_ruby_version = '>= 2.7'
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_dependency 'non-stupid-digest-assets'
|
27
27
|
|
28
28
|
s.add_dependency 'bcrypt' #, '~> 3.0.0'
|
29
|
-
s.add_dependency 'mongoid'
|
29
|
+
s.add_dependency 'mongoid'#, '~> 7'
|
30
30
|
|
31
31
|
s.add_dependency 'kaminari-mongoid'
|
32
32
|
s.add_dependency 'kaminari-actionview'
|
data/lib/drg_cms/version.rb
CHANGED
data/lib/tasks/dc_cleanup.rake
CHANGED
@@ -36,30 +36,29 @@ namespace :drg_cms do
|
|
36
36
|
task :clear_sessions, [:name] => :environment do |t, args|
|
37
37
|
p 'This is just an example how to clear sessions collection. It wont do anything because of next line.'
|
38
38
|
return if true
|
39
|
-
# This should remove all sessions documents created by robots
|
40
|
-
# It is quite a task to compare two dates in mongoid. This should not be problem if it is run daily
|
39
|
+
# This should remove all sessions documents created by robots
|
40
|
+
# It is quite a task to compare two dates in mongoid. This should not be problem if it is run daily
|
41
41
|
ActionDispatch::Session::MongoidStore::Session.all.each do |doc|
|
42
|
-
doc.delete if (doc.created_at == doc.updated_at
|
42
|
+
doc.delete if (doc.created_at == doc.updated_at || doc.updated_at < 100.days.ago)
|
43
43
|
end
|
44
|
-
# or if you want to clear everything older than 1 week
|
44
|
+
# or if you want to clear everything older than 1 week
|
45
45
|
ActionDispatch::Session::MongoidStore::Session.where(:updated_at.lt => 1.week.ago).delete
|
46
|
-
DcSite.collection.database.command(
|
46
|
+
DcSite.collection.database.command(compact: 'sessions')
|
47
47
|
end
|
48
48
|
|
49
49
|
###########################################################################
|
50
50
|
desc 'Clears mongodb session documents created by web robots'
|
51
51
|
task :clear_sessions_from_robots, [:name] => :environment do |t, args|
|
52
|
-
# This should remove all sessions documents created by web robots
|
53
|
-
# ActionDispatch::Session::MongoidStore::Session.where('$where' => 'this.created_at == this.updated_at').limit(1000).each do |doc|
|
52
|
+
# This should remove all sessions documents created by web robots
|
54
53
|
n = 0
|
55
54
|
ActionDispatch::Session::MongoidStore::Session.batch_size(1000).all.each do |doc|
|
56
|
-
if (doc.created_at + 2 > doc.updated_at
|
55
|
+
if (doc.created_at + 2 > doc.updated_at || doc.updated_at < 1.year.ago)
|
57
56
|
doc.delete
|
58
|
-
p "Deleted #{n}" if (n+=1)%1000 == 0
|
57
|
+
p "Deleted #{n}" if (n += 1) % 1000 == 0
|
59
58
|
end
|
60
59
|
end
|
61
60
|
p "Deleted #{n}"
|
62
|
-
DcSite.collection.database.command(
|
61
|
+
DcSite.collection.database.command(compact: 'sessions')
|
63
62
|
end
|
64
63
|
|
65
64
|
###########################################################################
|
@@ -72,16 +71,14 @@ namespace :drg_cms do
|
|
72
71
|
return (p "#{archive_file} exists") if File.exist?(archive_file)
|
73
72
|
|
74
73
|
date_to = Time.local(date[0,4].to_i, date[4,2].to_i, date[6,2].to_i).beginning_of_day
|
75
|
-
n = 0
|
76
|
-
save = ''
|
74
|
+
n, save = 0, ''
|
77
75
|
DcVisit.where(:time.lt => date_to).each do |visit|
|
78
76
|
save << visit.to_json + "\n"
|
79
|
-
#
|
80
|
-
p "Deleted #{n}" if (n+=1)%10000 == 0
|
77
|
+
p "Deleted #{n}" if (n += 1) % 10000 == 0
|
81
78
|
end
|
82
79
|
DcVisit.where(:time.lt => date_to).delete
|
83
|
-
File.
|
84
|
-
DcSite.collection.database.command(
|
80
|
+
File.write(archive_file, save)
|
81
|
+
DcSite.collection.database.command(compact: 'dc_visits')
|
85
82
|
end
|
86
83
|
|
87
84
|
###########################################################################
|
@@ -90,39 +87,20 @@ namespace :drg_cms do
|
|
90
87
|
input = read_input("Just press Enter to start. If you type in anything process won't start.")
|
91
88
|
return unless input.to_s.size == 0
|
92
89
|
today = Time.now.beginning_of_day
|
93
|
-
n = 0
|
94
|
-
save_stat, save_ads = '', ''
|
90
|
+
n, save_stat, save_ads = 0, '', ''
|
95
91
|
DcAd.all.each do |ad|
|
96
|
-
if !ad.active
|
92
|
+
if !ad.active || (ad.valid_to && ad.valid_to < today)
|
97
93
|
save_ads << ad.to_json + "\n"
|
98
94
|
DcAdStat.where(:dc_ad_id => ad._id).each do |stat|
|
99
95
|
save_stat << stat.to_json + "\n"
|
100
|
-
p "Deleted #{n}" if (n+=1)%10000 == 0
|
96
|
+
p "Deleted #{n}" if (n += 1) % 10000 == 0
|
101
97
|
end
|
102
98
|
DcAdStat.where(:dc_ad_id => ad._id).delete
|
103
99
|
end
|
104
100
|
end
|
105
|
-
File.
|
106
|
-
File.
|
107
|
-
DcSite.collection.database.command(
|
101
|
+
File.write("ads_stat_#{Time.now.strftime('%Y%d%m')}.json", save_stat)
|
102
|
+
File.write("ads_#{Time.now.strftime('%Y%d%m')}.json", save_ads)
|
103
|
+
DcSite.collection.database.command(compact: 'dc_ad_stats')
|
108
104
|
end
|
109
|
-
|
110
|
-
=begin
|
111
|
-
###########################################################################
|
112
|
-
desc "Correct error when ad_id ield is used instead of dc_ad_id."
|
113
|
-
task :repair_ad_stats, [:name] => :environment do |t, args|
|
114
|
-
input = read_input("Just press Enter to start. If you type in anything process won't start.")
|
115
|
-
return unless input.to_s.size == 0
|
116
|
-
n = 0
|
117
|
-
p DcAdStat.only(:id).where(:dc_ad_id => nil).to_a.size
|
118
|
-
DcAdStat.where(:dc_ad_id => nil).each do |stat|
|
119
|
-
stat.dc_ad_id = stat.ad_id
|
120
|
-
stat.ad_id = nil
|
121
|
-
stat.save
|
122
|
-
|
123
|
-
p n if (n+=1)%1000 == 0
|
124
|
-
end
|
125
|
-
end
|
126
|
-
=end
|
127
|
-
|
105
|
+
|
128
106
|
end
|
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.
|
4
|
+
version: 0.7.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damjan Rems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: mongoid
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: kaminari-mongoid
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,7 +159,7 @@ executables: []
|
|
159
159
|
extensions: []
|
160
160
|
extra_rdoc_files: []
|
161
161
|
files:
|
162
|
-
-
|
162
|
+
- CHANGELOG.md
|
163
163
|
- MIT-LICENSE
|
164
164
|
- README.md
|
165
165
|
- Rakefile
|
@@ -217,6 +217,7 @@ files:
|
|
217
217
|
- app/controllers/dc_main_controller.rb
|
218
218
|
- app/controls/browse_models_control.rb
|
219
219
|
- app/controls/cmsedit_control.rb
|
220
|
+
- app/controls/dc_category_control.rb
|
220
221
|
- app/controls/dc_help_control.rb
|
221
222
|
- app/controls/dc_page_control.rb
|
222
223
|
- app/controls/dc_poll_result_control.rb
|
@@ -232,6 +233,7 @@ files:
|
|
232
233
|
- app/forms/dc_browse_fields.yml
|
233
234
|
- app/forms/dc_browse_models.yml
|
234
235
|
- app/forms/dc_category.yml
|
236
|
+
- app/forms/dc_category_as_tree.yml
|
235
237
|
- app/forms/dc_design.yml
|
236
238
|
- app/forms/dc_filter.yml
|
237
239
|
- app/forms/dc_folder_permission.yml
|
@@ -266,12 +268,15 @@ files:
|
|
266
268
|
- app/forms/dc_user.yml
|
267
269
|
- app/forms/dc_user_role.yml
|
268
270
|
- app/forms/drgcms_cms.yml
|
271
|
+
- app/forms/help/dc_category_as_tree.en
|
272
|
+
- app/forms/help/dc_category_as_tree.sl
|
269
273
|
- app/forms/json_ld_schema.yml
|
270
274
|
- app/helpers/cms_common_helper.rb
|
271
275
|
- app/helpers/cms_edit_helper.rb
|
272
276
|
- app/helpers/cms_helper.rb
|
273
277
|
- app/helpers/cms_index_helper.rb
|
274
278
|
- app/helpers/dc_application_helper.rb
|
279
|
+
- app/helpers/dc_category_helper.rb
|
275
280
|
- app/models/concerns/dc_page_concern.rb
|
276
281
|
- app/models/concerns/dc_piece_concern.rb
|
277
282
|
- app/models/concerns/dc_policy_rule_concern.rb
|
data/History.log
DELETED
@@ -1,109 +0,0 @@
|
|
1
|
-
|
2
|
-
New features for DRG CMS version up to 0.5.51.1
|
3
|
-
Rails version 5.1 compatibility
|
4
|
-
Ruby version 2.3 is now required
|
5
|
-
select field with multiple can now properly process non BSON array values
|
6
|
-
DRG CMS Form readonly field with readonly : yes option will not be saved to database on save
|
7
|
-
dc_dummy collection will be deprecated and replaced with dc_memory collection. Name was chosen unfortunately
|
8
|
-
DrgForms can now be used for editing YAML settings saved in dc_page document. This enables editing dynamic settings of elements embedded in design
|
9
|
-
cms_edit url can now be used only as cms
|
10
|
-
|
11
|
-
Bugs resolved for DRG CMS version up to 0.5.51.1
|
12
|
-
journal is now able to undelete deleted document
|
13
|
-
|
14
|
-
New features for DRG CMS version up to 0.5.50.4
|
15
|
-
Rails 5.0 compatibility
|
16
|
-
category types can now be defined in dc_big_table under dc_category_type key
|
17
|
-
DrgCms gem routes can now be defined as DrgCms.routes
|
18
|
-
new field tree_select added to DRG CMS Forms. Tree select will be used as data entry field for categories instead of select field with multiple option
|
19
|
-
switch to Rails concern for main model definitions which may be reused.
|
20
|
-
site policy can be inherited from other site
|
21
|
-
menus can now belong to site
|
22
|
-
clear_link method is now a class method of DcPage model and can thus be called directly from other parts of application
|
23
|
-
|
24
|
-
Bugs resolved for DRG CMS version up to 0.5.50.4
|
25
|
-
journal is now able to undelete deleted document
|
26
|
-
|
27
|
-
|
28
|
-
New features for DRG CMS version 0.5.10.14
|
29
|
-
table_style added to result_set DRGCMS Forms option. This allows CSS style like width: 150% which will result in horizontal scroler on table and view more columns on result set.
|
30
|
-
result_set filter now has is empty option allowing to filter fields with null value.
|
31
|
-
filter OFF icon now displays currently active filter when hovered.
|
32
|
-
request_process field added to dc_site collection. It allowis for site to have different requests processing as defined in rails routes file. Single rails instance can now mix single document sites with complex sites.
|
33
|
-
multiple option is added to DRGCMS Forms select_field.
|
34
|
-
is_email? class method added to dc_user model.
|
35
|
-
form generator has now list of all model fields added at the end of generated form. Field names can be used as template in YAML translation file.
|
36
|
-
dc_choices4_field method implemented. It returns choices that are defined in localization files.
|
37
|
-
categories field changed from multitext_autocomplete to select field with multiple options.
|
38
|
-
a poll form can now be surrounded by div tag thus allowing for additional styling of polls
|
39
|
-
drgcms_controlls files can now also be defined only as control files.
|
40
|
-
journal documents can now be filtered by document id
|
41
|
-
CMS menu redesigned. Instead of pulldown menus are now displayed fixed on the left side of edit area
|
42
|
-
|
43
|
-
Bugs resolved for DRG CMS version 0.5.10.14
|
44
|
-
prevent double form submit when browser is restarted.
|
45
|
-
when user has no role defined guest role is automatically applied
|
46
|
-
dc_cleanup rake task deletes 1000 session documents created by robots at once instead of all which ended in error if number of documents was higher then 100.000
|
47
|
-
|
48
|
-
|
49
|
-
New features for DRG CMS version 0.5.10
|
50
|
-
|
51
|
-
jQuery javascript library forced to jQuery2
|
52
|
-
Choices for select fields are now UTF-8 sorted since MongoDB does not provide utf sorting.
|
53
|
-
Placeholder text added for text_autocomplete field. It can also be defined in form field html options.
|
54
|
-
Filters option can now have "like" keyword for fields that are not defined on form. For example created_by like user_id.
|
55
|
-
|
56
|
-
Bugs resolved for DRG CMS version 0.5.10
|
57
|
-
|
58
|
-
jQuery migrate udated to version 1.3. This was required by jquery-rails gem which included latest version of jQuery which resulted in an runtime error.
|
59
|
-
Call before_new callback only when new empty record has been created.
|
60
|
-
|
61
|
-
--
|
62
|
-
|
63
|
-
New features for DRG CMS version 0.5.9
|
64
|
-
|
65
|
-
Main CMS menu was becoming to large and was divided into two menus.
|
66
|
-
Result set browse filter data entry redesigned. Values can now be entered directly on actions area. Value of entered fied is also retained beetwen calls.
|
67
|
-
New DcInternals model introduced. It will be used for accessing internal variables.
|
68
|
-
DRG Forms has new option columns. Option defines number of columns per tab or fields. Field option also got colspan option indicating over how many columns field spans.
|
69
|
-
DRG Forms field size can now also be defined on same level as field type. Before it was defined in html sublevel.
|
70
|
-
|
71
|
-
Bugs resolved for DRG CMS version 0.5.9
|
72
|
-
|
73
|
-
Improved readonly display of select and text_autocomplete DRG Forms fields.
|
74
|
-
Text_autocomplete field is set to nil when content of field is deleted.
|
75
|
-
|
76
|
-
--
|
77
|
-
|
78
|
-
New features for DRG CMS version 0.5.8
|
79
|
-
|
80
|
-
Browsing array of hashes is now possible with DRG Forms
|
81
|
-
Simple browsing of all defined models and field definitions added to CMS System menu
|
82
|
-
new result_set options table_style, table_class, tr_style, tr_class, td_style, td_class. Welcome colors to result_set browser
|
83
|
-
result_set has been renewed for more modern design. Header elements have now sorting icons
|
84
|
-
dblclick and click actions can now be defined on result set and can fire any action when clicked or double clicked on result set row.
|
85
|
-
|
86
|
-
Bugs resolved for DRG CMS version 0.5.8
|
87
|
-
|
88
|
-
associated menu can now be selected on dc_page form also for non dc_simple_menu menus
|
89
|
-
|
90
|
-
--
|
91
|
-
|
92
|
-
New features for DRG CMS version 0.5.7
|
93
|
-
|
94
|
-
single site document. All data for the site can be saved to single dc_site document and processed by dc_single_sitedoc_request
|
95
|
-
site parts can now also be saved and collected from dc_site document
|
96
|
-
CMS menu done right
|
97
|
-
Page title is now set from dc_page_renderer default method
|
98
|
-
|
99
|
-
Bugs resolved for DRG CMS version 0.5.7
|
100
|
-
|
101
|
-
Corrected bug when multitext_autocomplete field was not displaying right values when displayed readonly
|
102
|
-
|
103
|
-
dc_choices4 now checks if model has active field defined and returns only choices of documents that have active field value set to true
|
104
|
-
|
105
|
-
Design and page edit icons are now displayed only when design or page documents are available
|
106
|
-
|
107
|
-
return_to from drgcms_control was not properly handled
|
108
|
-
|
109
|
-
Mouse cursor now changes to pointer when moved over ajax link
|