drg_cms 0.4.58 → 0.4.61

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.
@@ -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( image_tag('drg_cms/edit_page.png', class: 'dc-link-img', title: "#{t('drgcms.edit_page')}"),
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( image_tag('drg_cms/edit_design.png', class: 'dc-link-img', title: "#{t('drgcms.edit_design')}"),
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( image_tag('drg_cms/edit_site.png', class: 'dc-link-img', title: "#{t('drgcms.edit_site')}"),
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( image_tag('drg_cms/arrow_in.png', class: 'dc-link-img', title: t('drgcms.minimize')), '#',
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( image_tag('drg_cms/arrow_out.png', class: 'dc-link-img', title: t('drgcms.maximize')), '#',
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( image_tag('drg_cms/reload.png', class: 'dc-link-img', title: t('drgcms.reload')), '#',
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( image_tag('drg_cms/edit.png', class: 'dc-link-img', title: t('drgcms.edit_selected')), '#',
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( image_tag('drg_cms/copy.png', class: 'dc-link-img', title: "#{t('drgcms.doc_paste_title')}"),
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
- <%= DrgcmsFormField::Elfinder.file_manager_url(self) %>
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>
@@ -1,6 +1,6 @@
1
1
  #coding: utf-8
2
2
  #--
3
- # Copyright (c) 2012-2013 Damjan Rems
3
+ # Copyright (c) 2012+ Damjan Rems
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining
6
6
  # a copy of this software and associated documentation files (the
@@ -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: 'Edit: Selected table (collection)'
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
@@ -50,6 +50,7 @@ sl:
50
50
  menu_plus: Malo drugačen menu
51
51
  not_email: ni veljaven e-naslov!
52
52
  updated_by_other: Dokument je spremenil drug uporabnik. Prosimo ponovite vpis podatkov.
53
+ not_id: Vsebina polja ni ključ ID!
53
54
 
54
55
  edit: Urejanje
55
56
  new: Dodaj
@@ -25,4 +25,5 @@ Gem::Specification.new do |s|
25
25
  s.add_dependency 'bson'
26
26
  s.add_dependency 'mongoid'
27
27
  s.add_dependency 'kaminari'
28
+ s.add_dependency 'font-awesome-rails'
28
29
  end
@@ -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 = DrgCms.paths(:forms)
114
+ # forms_paths = DrgCms.paths(:forms)
115
+ # patches_paths = DrgCms.paths(:patches)
69
116
  ###############################################################################
70
117
  def self.paths(key)
71
118
  @@paths[key]
@@ -1,4 +1,4 @@
1
1
  module DrgCms #:nodoc:
2
2
  # drg_cms gem version
3
- VERSION = "0.4.58"
3
+ VERSION = "0.4.61"
4
4
  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.58
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-06 00:00:00.000000000 Z
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.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'
@@ -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