drg_cms 0.4.58 → 0.4.61
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/drg_cms/drg_cms.js +29 -20
- data/app/assets/stylesheets/drg_cms/drg_cms.css +77 -86
- data/app/assets/stylesheets/drg_cms_application.css +1 -0
- data/app/assets/stylesheets/drg_cms_cms.css +1 -0
- data/app/controllers/cmsedit_controller.rb +71 -27
- data/app/forms/dc_design.yml +1 -1
- data/app/helpers/cmsedit_helper.rb +171 -60
- data/app/helpers/dc_application_helper.rb +2 -2
- data/app/helpers/dc_poll_renderer.rb +2 -2
- data/app/models/dc_piece.rb +1 -1
- data/app/models/dc_policy_rule.rb +1 -1
- data/app/models/drgcms_form_field.rb +5 -4
- data/app/models/drgcms_form_fields.rb +1027 -0
- data/app/views/cmsedit/_edit_stuff.html.erb +9 -9
- data/app/views/cmsedit/_result.html.erb +4 -1
- data/config/initializers/kaminari_patch.rb +1 -1
- data/config/locales/drgcms_en.yml +2 -1
- data/config/locales/drgcms_sl.yml +1 -0
- data/drg_cms.gemspec +1 -0
- data/lib/drg_cms.rb +48 -1
- data/lib/drg_cms/version.rb +1 -1
- metadata +18 -4
- data/app/forms/__drgcms_cms.yml +0 -28
@@ -8,33 +8,33 @@
|
|
8
8
|
<%#= link_to(image_tag('drg_cms/view_tile.png', class: 'dc-link-img', title: t('drgcms.menu_plus')), '#',
|
9
9
|
onclick: "$('#cmsedit-menu-plus').toggleClass('div-hidden');") %>
|
10
10
|
<% if @page %>
|
11
|
-
<%= link_to(
|
11
|
+
<%= link_to( fa_icon('edit lg', class: "dc-animate", title: "#{t('drgcms.edit_page')}"),
|
12
12
|
{controller: 'cmsedit', action: 'edit', table: @site.page_table, id: @page._id}, target: 'iframe_cms') %>
|
13
13
|
|
14
|
-
<%= link_to(
|
14
|
+
<%= link_to( fa_icon('credit-card lg', class: "dc-animate", title: "#{t('drgcms.edit_design')}"),
|
15
15
|
{controller: 'cmsedit', action: 'edit', table: 'dc_design', id: @design._id}, target: 'iframe_cms') %>
|
16
16
|
|
17
|
-
<%= link_to(
|
17
|
+
<%= link_to( fa_icon('globe lg', class: "dc-animate", title: "#{t('drgcms.edit_site')}"),
|
18
18
|
{controller: 'cmsedit', action: 'edit', table: 'dc_site', id: @site._id}, target: 'iframe_cms') %>
|
19
19
|
<% end %>
|
20
20
|
|
21
|
-
<%= link_to(
|
21
|
+
<%= link_to( fa_icon('compress lg', class: "dc-animate", title: t('drgcms.minimize')), '#',
|
22
22
|
onclick: "$('#iframe_cms').height(1); return false;" ) %>
|
23
23
|
|
24
|
-
<%= link_to(
|
24
|
+
<%= link_to( fa_icon('expand lg', class: "dc-animate", title: t('drgcms.maximize')), '#',
|
25
25
|
onclick: "$('#iframe_cms').height( $('#iframe_cms').height() + 500);; return false;") %>
|
26
26
|
|
27
|
-
<%= link_to(
|
27
|
+
<%= link_to( fa_icon('refresh lg', class: "dc-animate", title: t('drgcms.reload')), '#',
|
28
28
|
onclick: "document.location.reload(true); return false;") %>
|
29
29
|
|
30
30
|
<%= select('record', 'select', dc_choices4_cmsmenu ) %>
|
31
|
-
<%= link_to(
|
31
|
+
<%= link_to( fa_icon('bars lg', class: "dc-animate", title: t('drgcms.edit_selected')), '#',
|
32
32
|
onclick: "$('#iframe_cms').attr('src', $('#record_select').val() ); return false;") %>
|
33
33
|
|
34
|
-
<%= link_to(
|
34
|
+
<%= link_to( fa_icon('copy lg', class: "dc-animate", title: "#{t('drgcms.doc_paste_title')}"),
|
35
35
|
{controller: 'dc_common', action: 'paste_clipboard'}, target: 'iframe_cms') %>
|
36
36
|
|
37
|
-
<%=
|
37
|
+
<%= DrgcmsFormFields::Elfinder.file_manager_url(self) %>
|
38
38
|
|
39
39
|
</td>
|
40
40
|
</tr>
|
@@ -8,7 +8,10 @@
|
|
8
8
|
<tr><%= dc_header_for_result %></tr>
|
9
9
|
|
10
10
|
<% for r in @records %>
|
11
|
-
<tr class="dc-<%= cycle("odd","even")
|
11
|
+
<tr class="dc-<%= cycle("odd","even")%>"
|
12
|
+
data="<%= url_for(action: 'show', controller: 'cmsedit', id: r,
|
13
|
+
readonly: (params[:readonly] ? 2 : 1), table: params[:table],
|
14
|
+
formname: params[:formname], ids: params[:ids]) %>" >
|
12
15
|
<%= dc_actions_for_result r %>
|
13
16
|
<%= dc_columns_for_result r %>
|
14
17
|
</tr>
|
@@ -44,12 +44,13 @@ en:
|
|
44
44
|
edit_site: 'Edit: Site'
|
45
45
|
edit_page: 'Edit: Page'
|
46
46
|
file_manager: File manager
|
47
|
-
edit_selected:
|
47
|
+
edit_selected: Edit documents in selected collection
|
48
48
|
invalid_username: Invalid username or password!
|
49
49
|
system_menu: CMS system tables
|
50
50
|
menu_plus: Show alternative menu
|
51
51
|
not_email: is not valid e-mail address!
|
52
52
|
updated_by_other: Document was updated by other user. Please reenter your data.
|
53
|
+
not_id: Value entered is not ID!
|
53
54
|
|
54
55
|
edit: Edit
|
55
56
|
new: New
|
data/drg_cms.gemspec
CHANGED
data/lib/drg_cms.rb
CHANGED
@@ -53,6 +53,52 @@ def self.add_forms_path(path)
|
|
53
53
|
@@paths[:forms] << path
|
54
54
|
end
|
55
55
|
|
56
|
+
###############################################################################
|
57
|
+
# Patching is one of the rubies best strenghts and also its curse. Loading
|
58
|
+
# patches in development has become real problem for developers. This is my
|
59
|
+
# way of patch loading.
|
60
|
+
#
|
61
|
+
# Preferred location for patch files is lib/patches. But can be located anywhere in
|
62
|
+
# Rails application path. Add DrgCms.add_forms_path to initialization part and pass
|
63
|
+
# directory name where patching files are located as parameter.
|
64
|
+
#
|
65
|
+
# Method will also load patch file so loading in config/initializers is not required.
|
66
|
+
#
|
67
|
+
# Parameters:
|
68
|
+
# [path] String. Path to patches directory
|
69
|
+
#
|
70
|
+
# Example:
|
71
|
+
# # As used in MyPlugin plugin.
|
72
|
+
# require "my_plugin/engine"
|
73
|
+
# module MyPlugin
|
74
|
+
# end
|
75
|
+
#
|
76
|
+
# DrgCms.add_patches_path File.dirname(__FILE__) + '/patches'
|
77
|
+
###############################################################################
|
78
|
+
def self.add_patches_path(path)
|
79
|
+
self.add_path(:patches, path)
|
80
|
+
# Dir["#{path}/**/*.rb"].each { |path| p path; require_dependency path }
|
81
|
+
# Dir["#{path}/**/*.rb"].each { |file| p file; require file }
|
82
|
+
end
|
83
|
+
|
84
|
+
###############################################################################
|
85
|
+
# General add path method. Paths are saved into @@paths hash variable. Paths can
|
86
|
+
# then be reused in different parts of application.
|
87
|
+
#
|
88
|
+
# Adding paths is best done in plugin mudule initialization code.
|
89
|
+
#
|
90
|
+
# Parameters:
|
91
|
+
# [type] Symbol. Defines type of data. Current used values are :forms, :patches
|
92
|
+
# [path] String. Path or string which will be added to @@paths hash.
|
93
|
+
#
|
94
|
+
# Example:
|
95
|
+
# DrgCms.add_path(File.expand_path('patches', __FILE__), :patches)
|
96
|
+
###############################################################################
|
97
|
+
def self.add_path(type, path)
|
98
|
+
@@paths[type] ||= []
|
99
|
+
@@paths[type] << path
|
100
|
+
end
|
101
|
+
|
56
102
|
###############################################################################
|
57
103
|
###############################################################################
|
58
104
|
def self.add_form_path(path) #:nodoc:
|
@@ -65,7 +111,8 @@ end
|
|
65
111
|
#
|
66
112
|
# Parameters:
|
67
113
|
# [key] String. Key
|
68
|
-
# forms_paths
|
114
|
+
# forms_paths = DrgCms.paths(:forms)
|
115
|
+
# patches_paths = DrgCms.paths(:patches)
|
69
116
|
###############################################################################
|
70
117
|
def self.paths(key)
|
71
118
|
@@paths[key]
|
data/lib/drg_cms/version.rb
CHANGED
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.
|
4
|
+
version: 0.4.61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damjan Rems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: font-awesome-rails
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
description: 'DRG CMS: Content management system for Ruby, Rails and MongoDB'
|
112
126
|
email:
|
113
127
|
- damjan.rems@gmail.com
|
@@ -156,7 +170,6 @@ files:
|
|
156
170
|
- app/controllers/dc_common_controller.rb
|
157
171
|
- app/controllers/dc_main_controller.rb
|
158
172
|
- app/controllers/drgcms_controls/dc_page_controls.rb
|
159
|
-
- app/forms/__drgcms_cms.yml
|
160
173
|
- app/forms/all_options.yml
|
161
174
|
- app/forms/cms_forms.yml
|
162
175
|
- app/forms/cms_menu.yml
|
@@ -235,6 +248,7 @@ files:
|
|
235
248
|
- app/models/dc_user_role.rb
|
236
249
|
- app/models/dc_visit.rb
|
237
250
|
- app/models/drgcms_form_field.rb
|
251
|
+
- app/models/drgcms_form_fields.rb
|
238
252
|
- app/views/__dc_at_the_beginning/create.html.erb
|
239
253
|
- app/views/__dc_at_the_beginning/index.html.erb
|
240
254
|
- app/views/cmsedit/_edit_stuff.html.erb
|
@@ -328,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
328
342
|
version: '0'
|
329
343
|
requirements: []
|
330
344
|
rubyforge_project:
|
331
|
-
rubygems_version: 2.2.
|
345
|
+
rubygems_version: 2.2.3
|
332
346
|
signing_key:
|
333
347
|
specification_version: 4
|
334
348
|
summary: 'DRG CMS: CMS for Ruby, Rails and MongoDB'
|
data/app/forms/__drgcms_cms.yml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
## YAML Template for drgcms_menu1s
|
2
|
-
---
|
3
|
-
title: drgCMS First Top Menu
|
4
|
-
table: drgcms1menu
|
5
|
-
new_part:
|
6
|
-
form:
|
7
|
-
actions:
|
8
|
-
1: cancle
|
9
|
-
2:
|
10
|
-
type: submit
|
11
|
-
text: Create
|
12
|
-
|
13
|
-
fields:
|
14
|
-
1:
|
15
|
-
name: part_type
|
16
|
-
type: select
|
17
|
-
choices: part,drgcms1menu
|
18
|
-
eval: Person.all.collect {|p| [ p.name, p.id ] }
|
19
|
-
|
20
|
-
2:
|
21
|
-
name: part_embedded_in
|
22
|
-
type: select
|
23
|
-
choices: Design:design,PodjetnikPage:podjetnik_page
|
24
|
-
|
25
|
-
3:
|
26
|
-
name: location_id
|
27
|
-
type: select
|
28
|
-
choices: site-top,ads-top,site-right,site-bottom,&get_all_locations
|