drg_cms 0.5.52.7 → 0.5.52.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/drg_cms/drg_cms.css +1 -6
- data/app/controllers/cmsedit_controller.rb +11 -7
- data/app/controllers/dc_application_controller.rb +5 -3
- data/app/forms/dc_category.yml +3 -0
- data/app/forms/dc_menu.yml +2 -1
- data/app/forms/dc_page.yml +2 -0
- data/app/forms/dc_policy_rule.yml +1 -0
- data/app/forms/dc_policy_rule_nocms.yml +1 -0
- data/app/forms/dc_simple_menu.yml +1 -0
- data/app/forms/dc_simple_menu_item.yml +9 -16
- data/app/forms/dc_site.yml +2 -1
- data/app/forms/dc_user.yml +20 -34
- data/app/helpers/cmsedit_helper.rb +25 -3
- data/app/helpers/dc_application_helper.rb +7 -8
- data/app/helpers/dc_menu_renderer.rb +47 -4
- data/app/helpers/dc_simple_menu_renderer.rb +4 -2
- data/app/models/concerns/dc_page_concern.rb +7 -0
- data/app/models/concerns/dc_user_concern.rb +15 -1
- data/app/models/dc_simple_menu.rb +1 -1
- data/app/models/dc_user_role.rb +9 -0
- data/app/models/drgcms_form_fields.rb +9 -4
- data/config/locales/drgcms_en.yml +1 -0
- data/config/locales/drgcms_sl.yml +1 -0
- data/lib/drg_cms/version.rb +1 -1
- data/test/fixtures/drg_cms_test_data.rb +0 -0
- metadata +3 -4
- data/app/views/cmsedit/__result.html.erb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40fa56fbdb21a8a10e26ebeefc4f9ebf1a0a41d3
|
4
|
+
data.tar.gz: f3c627f7e59044e1826d120174b91c06d7d0ee25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 377369ee96b9fa738a115e607d3e187ab5a1bb951ea767add202be5cc3e3d1ef9f83f39a03ce8411c8c3fc86889c7d250e4f22c2ee51448b90b1ecc0492b0942
|
7
|
+
data.tar.gz: 2db3772bf7c84abf8a316eb3519f74e86b0d2a2925214f6e8a2a328f2b683ef6fa67df3d56cc4363d2481c7de9e77b030d2481c49ebe720e28a7d43623052f7e
|
@@ -253,6 +253,7 @@ font-size: 0.9rem;
|
|
253
253
|
/* border-bottom: 2px solid #222; */
|
254
254
|
color: #000;
|
255
255
|
font-weight: bold;
|
256
|
+
background-color: #ddd;
|
256
257
|
}
|
257
258
|
|
258
259
|
.dc-menu {
|
@@ -467,12 +468,6 @@ border: 1px solid #ddd;
|
|
467
468
|
width: 99.9%;
|
468
469
|
margin: 0px;
|
469
470
|
background-color: #fff;
|
470
|
-
/*
|
471
|
-
|
472
|
-
border-radius: 1px;
|
473
|
-
border-top:1px solid #fff;
|
474
|
-
border-left:1px solid #fff;
|
475
|
-
border-bottom:1px solid #ccc;*/
|
476
471
|
}
|
477
472
|
|
478
473
|
.dc-form {
|
@@ -185,6 +185,7 @@ def check_filter_options() #:nodoc:
|
|
185
185
|
site_id = dc_get_site._id if dc_get_site
|
186
186
|
# dont't filter site if no dc_site_id field or user is ADMIN
|
187
187
|
site_id = nil if !model.method_defined?('dc_site_id') or dc_user_can(DcPermission::CAN_ADMIN)
|
188
|
+
site_id = nil if session[table_name][:filter].to_s.match('dc_site_id')
|
188
189
|
#
|
189
190
|
if @records = DcFilter.get_filter(session[table_name][:filter])
|
190
191
|
@records = @records.and(dc_site_id: site_id) if site_id
|
@@ -239,7 +240,7 @@ def index
|
|
239
240
|
@records = @records.page(params[:page]).per(per_page) if per_page > 0
|
240
241
|
end
|
241
242
|
else
|
242
|
-
|
243
|
+
Rails.logger.error "Error: result_set:filter: #{@form['result_set']['filter']} not found in controls!"
|
243
244
|
end
|
244
245
|
else
|
245
246
|
if @tables.size > 1
|
@@ -412,12 +413,14 @@ def create
|
|
412
413
|
create_new_empty_record
|
413
414
|
params[:return_to] = 'index' if params[:commit] == t('drgcms.save&back') # save & back
|
414
415
|
if save_data
|
415
|
-
|
416
|
-
@parms['id'] = @record.id # must be set, for proper update link
|
417
|
-
flash[:info] = t('drgcms.doc_saved')
|
416
|
+
flash[:info] = t('drgcms.doc_saved')
|
418
417
|
return process_return_to(params[:return_to]) if params[:return_to]
|
419
|
-
|
420
|
-
|
418
|
+
|
419
|
+
@parms['id'] = @record.id # must be set, for proper update link
|
420
|
+
params[:id] = @record.id # must be set, for find_record
|
421
|
+
edit
|
422
|
+
# render action: :edit
|
423
|
+
else # error
|
421
424
|
render action: :new
|
422
425
|
end
|
423
426
|
else # duplicate record
|
@@ -443,6 +446,7 @@ def edit
|
|
443
446
|
return index if ret.class == FalseClass
|
444
447
|
end
|
445
448
|
@parms['action'] = 'update'
|
449
|
+
render action: :edit
|
446
450
|
end
|
447
451
|
|
448
452
|
########################################################################
|
@@ -472,7 +476,7 @@ def update
|
|
472
476
|
else
|
473
477
|
flash[:error] = t('drgcms.not_authorized')
|
474
478
|
end
|
475
|
-
|
479
|
+
edit
|
476
480
|
end
|
477
481
|
|
478
482
|
########################################################################
|
@@ -322,12 +322,14 @@ def dc_process_default_request()
|
|
322
322
|
@js, @css = '', ''
|
323
323
|
# find domain name in sites
|
324
324
|
@site = dc_get_site
|
325
|
-
# site
|
325
|
+
# site not defined. render 404 error
|
326
326
|
return dc_render_404('Site!') if @site.nil?
|
327
327
|
dc_set_options(@site.settings)
|
328
328
|
# HOMEPAGE. When no parameters is set
|
329
|
-
params[:path]
|
330
|
-
|
329
|
+
params[:path] = @site.homepage_link if params[:id].nil? and params[:path].nil?
|
330
|
+
@options[:path] = params[:path].split('/')
|
331
|
+
params[:path] = @options[:path].first if @options[:path].size > 1
|
332
|
+
# some other process request. It should fail if not defined
|
331
333
|
return send(@site.request_processor) unless @site.request_processor.blank?
|
332
334
|
|
333
335
|
# Search for page
|
data/app/forms/dc_category.yml
CHANGED
data/app/forms/dc_menu.yml
CHANGED
data/app/forms/dc_page.yml
CHANGED
@@ -35,44 +35,37 @@ form:
|
|
35
35
|
10:
|
36
36
|
name: caption
|
37
37
|
type: text_field
|
38
|
-
|
39
|
-
size: 30
|
38
|
+
size: 30
|
40
39
|
20:
|
41
40
|
name: picture
|
42
41
|
type: file_select
|
43
|
-
|
44
|
-
|
42
|
+
size: 50
|
43
|
+
preview: no
|
45
44
|
30:
|
46
45
|
name: link_prepend
|
47
46
|
type: text_field
|
48
|
-
|
49
|
-
size: 20
|
47
|
+
size: 20
|
50
48
|
40:
|
51
49
|
name: link
|
52
50
|
type: text_with_select
|
53
51
|
eval: '@parent.dc_page_class.all_pages_for_site(@parent.dc_get_site)'
|
54
|
-
|
55
|
-
size: 50
|
52
|
+
size: 50
|
56
53
|
50:
|
57
54
|
name: target
|
58
55
|
type: text_field
|
59
|
-
|
60
|
-
size: 10
|
56
|
+
size: 10
|
61
57
|
60:
|
62
58
|
name: order
|
63
59
|
type: text_field
|
64
|
-
|
65
|
-
size: 2
|
60
|
+
size: 2
|
66
61
|
70:
|
67
62
|
name: submenu
|
68
63
|
type: text_area
|
69
|
-
|
70
|
-
size: 60x20
|
64
|
+
size: 60x20
|
71
65
|
80:
|
72
66
|
name: css
|
73
67
|
type: text_area
|
74
|
-
|
75
|
-
size: 60x10
|
68
|
+
size: 60x10
|
76
69
|
90:
|
77
70
|
name: policy_id
|
78
71
|
type: select
|
data/app/forms/dc_site.yml
CHANGED
data/app/forms/dc_user.yml
CHANGED
@@ -17,10 +17,13 @@ result_set:
|
|
17
17
|
name: username
|
18
18
|
2:
|
19
19
|
name: first_name
|
20
|
+
width: 40%
|
20
21
|
3:
|
21
22
|
name: last_name
|
23
|
+
width: 20%
|
22
24
|
4:
|
23
25
|
name: last_visit
|
26
|
+
width: 10%
|
24
27
|
|
25
28
|
form:
|
26
29
|
title:
|
@@ -34,66 +37,55 @@ form:
|
|
34
37
|
10:
|
35
38
|
name: username
|
36
39
|
type: text_field
|
37
|
-
|
38
|
-
size: 10
|
40
|
+
size: 10
|
39
41
|
20:
|
40
42
|
name: title
|
41
43
|
type: text_field
|
42
|
-
|
43
|
-
size: 5
|
44
|
+
size: 5
|
44
45
|
30:
|
45
46
|
name: first_name
|
46
47
|
type: text_field
|
47
|
-
|
48
|
-
size: 20
|
48
|
+
size: 20
|
49
49
|
|
50
50
|
40:
|
51
51
|
name: middle_name
|
52
52
|
type: text_field
|
53
|
-
|
54
|
-
size: 20
|
53
|
+
size: 20
|
55
54
|
|
56
55
|
50:
|
57
56
|
name: last_name
|
58
57
|
type: text_field
|
59
|
-
|
60
|
-
size: 20
|
58
|
+
size: 20
|
61
59
|
|
62
60
|
60:
|
63
61
|
name: company
|
64
62
|
type: text_field
|
65
|
-
|
66
|
-
size: 50
|
63
|
+
size: 50
|
67
64
|
|
68
65
|
70:
|
69
66
|
name: address
|
70
67
|
type: text_field
|
71
|
-
|
72
|
-
size: 50
|
68
|
+
size: 50
|
73
69
|
|
74
70
|
80:
|
75
71
|
name: post
|
76
72
|
type: text_field
|
77
|
-
|
78
|
-
size: 50
|
73
|
+
size: 50
|
79
74
|
|
80
75
|
90:
|
81
76
|
name: country
|
82
77
|
type: text_field
|
83
|
-
|
84
|
-
size: 20
|
78
|
+
size: 20
|
85
79
|
|
86
80
|
100:
|
87
81
|
name: email
|
88
82
|
type: text_field
|
89
|
-
|
90
|
-
size: 30
|
83
|
+
size: 30
|
91
84
|
|
92
85
|
110:
|
93
86
|
name: phone
|
94
87
|
type: text_field
|
95
|
-
|
96
|
-
size: 30
|
88
|
+
size: 30
|
97
89
|
|
98
90
|
120:
|
99
91
|
name: birthdate
|
@@ -104,36 +96,30 @@ form:
|
|
104
96
|
130:
|
105
97
|
name: picture
|
106
98
|
type: text_field
|
107
|
-
|
108
|
-
size: 50
|
99
|
+
size: 50
|
109
100
|
|
110
101
|
140:
|
111
102
|
name: about
|
112
103
|
type: text_area
|
113
|
-
|
114
|
-
size: 100x10
|
104
|
+
size: 100x10
|
115
105
|
|
116
106
|
150:
|
117
107
|
name: password
|
118
108
|
type: password_field
|
119
|
-
|
120
|
-
size: 20
|
109
|
+
size: 20
|
121
110
|
|
122
111
|
160:
|
123
112
|
name: password_confirmation
|
124
113
|
type: password_field
|
125
|
-
|
126
|
-
size: 20
|
114
|
+
size: 20
|
127
115
|
|
128
116
|
170:
|
129
117
|
name: dc_user_roles
|
130
118
|
type: embedded
|
131
119
|
form_name: dc_user_role
|
132
|
-
|
133
|
-
size: 20
|
120
|
+
size: 20
|
134
121
|
|
135
122
|
180:
|
136
123
|
name: signature
|
137
124
|
type: text_area
|
138
|
-
|
139
|
-
size: 100x5
|
125
|
+
size: 100x5
|
@@ -30,6 +30,27 @@
|
|
30
30
|
module CmseditHelper
|
31
31
|
# javascript part created by form helpers
|
32
32
|
attr_reader :js
|
33
|
+
|
34
|
+
############################################################################
|
35
|
+
# Get standard actions when actions directive contains single line.
|
36
|
+
# Subroutine of dc_actions_for_index
|
37
|
+
#
|
38
|
+
# Allows for actions: new, filter, standard syntax
|
39
|
+
############################################################################
|
40
|
+
def define_standard_actions(actions_params, standard)
|
41
|
+
actions = {}
|
42
|
+
actions_params.split(',').each do |an_action|
|
43
|
+
an_action.strip!
|
44
|
+
if an_action == 'standard'
|
45
|
+
actions.merge!(standard)
|
46
|
+
else
|
47
|
+
standard.each do |index, action|
|
48
|
+
(actions[index] = action; break) if action == an_action
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
actions
|
53
|
+
end
|
33
54
|
|
34
55
|
############################################################################
|
35
56
|
# Creates action div for cmsedit index action.
|
@@ -38,13 +59,14 @@ def dc_actions_for_index()
|
|
38
59
|
return '' if @form['index'].nil? or @form['readonly']
|
39
60
|
actions = @form['index']['actions']
|
40
61
|
return '' if actions.nil? or actions.size == 0
|
41
|
-
# Simulate standard actions
|
42
|
-
actions = {'standard' => true} if actions.class == String && actions == 'standard'
|
43
62
|
std_actions = {2 => 'new', 3 => 'sort', 4 => 'filter' }
|
44
|
-
if actions
|
63
|
+
if actions.class == String
|
64
|
+
actions = define_standard_actions(actions, std_actions)
|
65
|
+
elsif actions['standard']
|
45
66
|
actions.merge!(std_actions)
|
46
67
|
actions['standard'] = nil
|
47
68
|
end
|
69
|
+
|
48
70
|
# start div with hidden spinner image
|
49
71
|
html = <<EOT
|
50
72
|
<div id="dc-action-menu">
|
@@ -106,7 +106,7 @@ def dc_render(renderer, opts={})
|
|
106
106
|
@css << obj.render_css.to_s
|
107
107
|
html.nil? ? '' : html.html_safe # nil can happened
|
108
108
|
else
|
109
|
-
|
109
|
+
I18n.t 'drgcms.no_class', class: klass
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -647,13 +647,13 @@ end
|
|
647
647
|
# Returns:
|
648
648
|
# String. Translated text.
|
649
649
|
####################################################################
|
650
|
-
def t(key, default=
|
650
|
+
def t(key, default=nil)
|
651
651
|
c = I18n.t(key)
|
652
652
|
if c.class == Hash or c.match( 'translation missing' )
|
653
653
|
c = I18n.t(key, locale: 'en')
|
654
654
|
# Still not found. Return default if set
|
655
655
|
if c.class == Hash or c.match( 'translation missing' )
|
656
|
-
c = default.
|
656
|
+
c = default.nil? ? key : default
|
657
657
|
end
|
658
658
|
end
|
659
659
|
c
|
@@ -923,12 +923,11 @@ def dc_choices4_cmsmenu()
|
|
923
923
|
end
|
924
924
|
#
|
925
925
|
html = '<ul>'
|
926
|
-
menus.to_a.sort.each do |
|
927
|
-
menu = one_menu[1] # value is the second (1) element of array
|
926
|
+
menus.to_a.sort.each do |index, menu| # sort menus, result is array of sorted hashes
|
928
927
|
next unless menu['caption']
|
929
|
-
|
930
|
-
menu['
|
931
|
-
|
928
|
+
icon = menu['icon'].match('/') ? image_tag(menu['icon']) : fa_icon(menu['icon']) #external or fa- image
|
929
|
+
html << "<li class=\"cmsedit-top-level-menu\">#{icon}#{t(menu['caption'])}<ul>"
|
930
|
+
menu['items'].to_a.sort.each do |index1, value| # again, sort menu items first
|
932
931
|
html << if value['link']
|
933
932
|
opts = { target: value['target'] || 'iframe_cms' }
|
934
933
|
"<li>#{dc_link_to(t(value['caption']), value['icon'] || '', value['link'], opts)}</li>"
|
@@ -40,9 +40,7 @@ include DcApplicationHelper
|
|
40
40
|
########################################################################
|
41
41
|
def initialize( parent, opts ) #:nodoc:
|
42
42
|
@parent = parent
|
43
|
-
@menu = opts[:name] ?
|
44
|
-
DcMenu.find_by(name: opts[:name].to_s) :
|
45
|
-
DcMenu.find(@parent.site.menu_id)
|
43
|
+
@menu = opts[:name] ? DcMenu.find_by(name: opts[:name].to_s) : DcMenu.find(@parent.site.menu_id)
|
46
44
|
@opts = opts
|
47
45
|
self
|
48
46
|
end
|
@@ -105,11 +103,56 @@ def link_4menu(item)
|
|
105
103
|
@parent.link_to(caption, link, {target: target}) )
|
106
104
|
end
|
107
105
|
|
106
|
+
########################################################################
|
107
|
+
# Returns html code required for creating one link in a menu.
|
108
|
+
#
|
109
|
+
# Parameters:
|
110
|
+
# [item] MenuItem.
|
111
|
+
########################################################################
|
112
|
+
def link_4menu(item)
|
113
|
+
# prepand to link
|
114
|
+
link = if !item.link_prepend.blank?
|
115
|
+
item.link_prepend
|
116
|
+
elsif !@menu.link_prepend.blank?
|
117
|
+
@menu.link_prepend
|
118
|
+
else
|
119
|
+
''
|
120
|
+
end
|
121
|
+
|
122
|
+
if item.link.match('http')
|
123
|
+
link = item.link
|
124
|
+
else
|
125
|
+
link += (item.link[0] == '/' ? '' : '/') + item.link
|
126
|
+
link = '/' + link unless link[0] == '/' # link should start with '/'
|
127
|
+
end
|
128
|
+
|
129
|
+
caption = ''
|
130
|
+
unless item.picture.blank?
|
131
|
+
caption = case
|
132
|
+
when item.picture[0] == '@' then # call method
|
133
|
+
method = item.picture[1,100] # remove leading @
|
134
|
+
return send(method) if respond_to?(method)
|
135
|
+
return @parent.send(method) if @parent.respond_to?(method)
|
136
|
+
return 'ERROR!'
|
137
|
+
when item.picture.match(/\./) then @parent.image_tag(item.picture)
|
138
|
+
when item.picture.match('<i') then item.picture
|
139
|
+
else
|
140
|
+
@parent.fa_icon(item.picture)
|
141
|
+
end
|
142
|
+
caption << ' '
|
143
|
+
end
|
144
|
+
# - in first place won't write caption text
|
145
|
+
caption = caption.html_safe + (item.caption[0] == '-' ? '' : item.caption.html_safe )
|
146
|
+
|
147
|
+
target = item.target.blank? ? nil : item.target
|
148
|
+
@parent.link_to(caption, link, {target: target})
|
149
|
+
end
|
150
|
+
|
108
151
|
########################################################################
|
109
152
|
# Creates HTML code required for submenu on single level. Subroutine of default.
|
110
153
|
########################################################################
|
111
154
|
def do_menu_level(menu, options={})
|
112
|
-
html = "<ul
|
155
|
+
html = "<ul>"
|
113
156
|
if @opts[:edit_mode] > 1
|
114
157
|
options[:title] = menu.respond_to?('name') ? menu.name : menu.caption # 1. level or submenus
|
115
158
|
options[:id] = menu._id
|
@@ -102,8 +102,10 @@ def link_4menu(item)
|
|
102
102
|
unless item.picture.blank?
|
103
103
|
caption = case
|
104
104
|
when item.picture[0] == '@' then # call method
|
105
|
-
method = item.picture
|
106
|
-
return
|
105
|
+
method = item.picture[1,100] # remove leading @
|
106
|
+
return send(method) if respond_to?(method)
|
107
|
+
return @parent.send(method) if @parent.respond_to?(method)
|
108
|
+
return 'ERROR!'
|
107
109
|
when item.picture.match(/\./) then @parent.image_tag(item.picture)
|
108
110
|
when item.picture.match('<i') then item.picture
|
109
111
|
else
|
@@ -82,6 +82,13 @@ before_save :do_before_save
|
|
82
82
|
validates :publish_date, presence: true
|
83
83
|
|
84
84
|
######################################################################
|
85
|
+
# Will return subject_link. Field name link should be common for all documents
|
86
|
+
# which can be found with links.
|
87
|
+
######################################################################
|
88
|
+
def link
|
89
|
+
subject_link
|
90
|
+
end
|
91
|
+
|
85
92
|
protected
|
86
93
|
|
87
94
|
######################################################################
|
@@ -88,7 +88,21 @@ def do_before_save
|
|
88
88
|
self.name = "#{self.title} #{self.first_name} #{self.middle_name + ' ' unless self.middle_name.blank?}#{self.last_name}".strip
|
89
89
|
# to ensure unique e-mail
|
90
90
|
self.email = "unknown@#{self.id}" if self.email.to_s.strip.size < 5
|
91
|
-
end
|
91
|
+
end
|
92
|
+
|
93
|
+
##########################################################################
|
94
|
+
# Checks if user has role 'role_id' defined in his roles
|
95
|
+
##########################################################################
|
96
|
+
def has_role?(role_id)
|
97
|
+
return false unless role_id
|
98
|
+
#
|
99
|
+
unless BSON::ObjectId.legal?(role_id)
|
100
|
+
role = DcPolicyRole.get_role(role_id)
|
101
|
+
role_id = role.id if role
|
102
|
+
end
|
103
|
+
role = self.dc_user_roles.where(dc_policy_role_id: role_id)
|
104
|
+
(role && role.active?)
|
105
|
+
end
|
92
106
|
|
93
107
|
##########################################################################
|
94
108
|
# Will return all possible values for country field ready for input in select field.
|
@@ -119,7 +119,7 @@ end
|
|
119
119
|
#
|
120
120
|
# Do nothing. The method is defined only for compatibility.
|
121
121
|
#######################################################################
|
122
|
-
def self.update_menu_item_link(
|
122
|
+
def self.update_menu_item_link(document)
|
123
123
|
end
|
124
124
|
|
125
125
|
end
|
data/app/models/dc_user_role.rb
CHANGED
@@ -52,4 +52,13 @@ class DcUserRole
|
|
52
52
|
field :updated_by, type: BSON::ObjectId
|
53
53
|
|
54
54
|
embedded_in :dc_user
|
55
|
+
|
56
|
+
###############################################################################
|
57
|
+
# Determine of role is still active
|
58
|
+
###############################################################################
|
59
|
+
def active?
|
60
|
+
now = Time.zone.local
|
61
|
+
self.active and (self.valid_from.nil? or now > self.valid_from) and (self.valid_to.nil? or now < self.valid_to)
|
55
62
|
end
|
63
|
+
|
64
|
+
end
|
@@ -347,10 +347,15 @@ def render
|
|
347
347
|
#
|
348
348
|
html = ''
|
349
349
|
@yaml['html'].each {|k,v| html << "#{k}=\"#{v}\" "}
|
350
|
-
#
|
351
|
-
|
352
|
-
|
353
|
-
|
350
|
+
#
|
351
|
+
if @yaml['name'] == @yaml['table']
|
352
|
+
tables = @yaml['table']
|
353
|
+
ids = @record._id
|
354
|
+
else
|
355
|
+
tables = @parent.tables.inject('') { |r,v| r << "#{v[1]};" } + @yaml['table']
|
356
|
+
ids = @parent.ids.inject('') { |r,v| r << "#{v};" } + @record._id
|
357
|
+
end
|
358
|
+
opts = { controller: 'cmsedit', action: 'index', ids: ids, table: tables, form_name: @yaml['form_name'],
|
354
359
|
field_name: @yaml['name'], iframe: "if_#{@yaml['name']}", readonly: @readonly }
|
355
360
|
@html << "<iframe class='iframe_embedded' id='if_#{@yaml['name']}' name='if_#{@yaml['name']}' #{html}></iframe>"
|
356
361
|
@js = <<EOJS
|
data/lib/drg_cms/version.rb
CHANGED
File without changes
|
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.5.52.
|
4
|
+
version: 0.5.52.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damjan Rems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -303,7 +303,6 @@ files:
|
|
303
303
|
- app/models/dc_user_role.rb
|
304
304
|
- app/models/dc_visit.rb
|
305
305
|
- app/models/drgcms_form_fields.rb
|
306
|
-
- app/views/cmsedit/__result.html.erb
|
307
306
|
- app/views/cmsedit/_edit_stuff.html.erb
|
308
307
|
- app/views/cmsedit/_form.html.erb
|
309
308
|
- app/views/cmsedit/_result.html.erb
|
@@ -397,7 +396,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
397
396
|
version: '0'
|
398
397
|
requirements: []
|
399
398
|
rubyforge_project:
|
400
|
-
rubygems_version: 2.6.14
|
399
|
+
rubygems_version: 2.6.14.1
|
401
400
|
signing_key:
|
402
401
|
specification_version: 4
|
403
402
|
summary: 'DRG: Rapid web application development tool and CMS for Ruby, Rails and
|
@@ -1,20 +0,0 @@
|
|
1
|
-
|
2
|
-
<div class="dc-table-frame">
|
3
|
-
|
4
|
-
<%= dc_table_title_for_result @records %>
|
5
|
-
|
6
|
-
<% unless @records.nil? %>
|
7
|
-
<%= dc_background_for_result(:start) %>
|
8
|
-
|
9
|
-
<tr><%= dc_header_for_result %></tr>
|
10
|
-
<% for document in @records %>
|
11
|
-
<%= dc_row_for_result(document) %>
|
12
|
-
<%= dc_actions_for_result(document) %>
|
13
|
-
<%= dc_columns_for_result(document) %>
|
14
|
-
</tr>
|
15
|
-
<% end %>
|
16
|
-
|
17
|
-
<%= dc_background_for_result(:end) %>
|
18
|
-
<% end %>
|
19
|
-
|
20
|
-
</div>
|