drg_rotator 0.1.0
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 +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +29 -0
- data/Rakefile +36 -0
- data/app/assets/config/drg_rotator_manifest.js +0 -0
- data/app/forms/dc_rotator.yml +78 -0
- data/app/forms/dc_rotator_settings.yml +33 -0
- data/app/helpers/dc_rotator_renderer.rb +153 -0
- data/app/models/dc_rotator.rb +85 -0
- data/config/locales/dc_rotator_en.yml +78 -0
- data/config/routes.rb +2 -0
- data/lib/drg_rotator.rb +7 -0
- data/lib/drg_rotator/engine.rb +4 -0
- data/lib/drg_rotator/version.rb +3 -0
- data/lib/tasks/drg_rotator_tasks.rake +4 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 827b78e800738e6f7bc9fcde23a3ebe8d0038290
|
4
|
+
data.tar.gz: 2eb87df99979f2ed07663f26ab105c55a5740766
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f5c520e155d282102605fd0ae76e94fca7d662e1d0f7460c563dcc894d2649ad19b9c570ec669f0134af7f2f6c053f9f4487cad707f8a101a34f06ca59b05a0c
|
7
|
+
data.tar.gz: 258cfad57d1ca92d4562903fff4a1fdd4e5a982d0c1de0a2744fbd567bed4820def0f5fb9e56a4fc3baeb9d84149aa2a0264ffcdbe06e061ef8a1e454e82f27a
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2018 Damjan Rems
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# DrgRotator
|
2
|
+
DrgRotator implements rotating web element for DRG CMS.
|
3
|
+
|
4
|
+
## Usage
|
5
|
+
Add this line to your application's Gemfile:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
gem 'drg_rotator'
|
9
|
+
```
|
10
|
+
and then put this line in page design code.
|
11
|
+
|
12
|
+
```irb
|
13
|
+
<%= dc_render(:dc_rotator) %>
|
14
|
+
```
|
15
|
+
|
16
|
+
It is possible to implement more then one rotator element on page.
|
17
|
+
|
18
|
+
```irb
|
19
|
+
<%= dc_render(:dc_rotator, element: 'rotator1') %>
|
20
|
+
<%= dc_render(:dc_rotator, element: 'rotator2') %>
|
21
|
+
```
|
22
|
+
|
23
|
+
When you implement more then one rotator on page or rotators on more pages or have implemented rotators on different sites it is possible to define categories under which rotator will be selecting rotating data documents. Categories must be defined in CMS Advanced menu in option Big Table under key dc_rotator.
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
Fork this repository on GitHub and issue a pull request
|
27
|
+
|
28
|
+
## License
|
29
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'DrgRotator'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
18
|
+
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
|
21
|
+
load 'rails/tasks/statistics.rake'
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
require 'bundler/gem_tasks'
|
26
|
+
|
27
|
+
require 'rake/testtask'
|
28
|
+
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
30
|
+
t.libs << 'test'
|
31
|
+
t.pattern = 'test/**/*_test.rb'
|
32
|
+
t.verbose = false
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
task default: :test
|
File without changes
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# Form for dc_rotator
|
2
|
+
table: dc_rotator
|
3
|
+
|
4
|
+
index:
|
5
|
+
filter: id as text_field, naziv, kats, active
|
6
|
+
actions: standard
|
7
|
+
|
8
|
+
result_set:
|
9
|
+
actions: standard
|
10
|
+
|
11
|
+
columns:
|
12
|
+
10:
|
13
|
+
name: description
|
14
|
+
20:
|
15
|
+
name: created_at
|
16
|
+
format: '%d.%m.%Y'
|
17
|
+
30:
|
18
|
+
name: created_by
|
19
|
+
eval: dc_name4_id,dc_user,name
|
20
|
+
40:
|
21
|
+
name: active
|
22
|
+
eval: dc_icon4_boolean
|
23
|
+
|
24
|
+
form:
|
25
|
+
title:
|
26
|
+
field: description
|
27
|
+
|
28
|
+
actions: standard
|
29
|
+
tabs:
|
30
|
+
0main:
|
31
|
+
10:
|
32
|
+
name: description
|
33
|
+
type: text_field
|
34
|
+
size: 50
|
35
|
+
20:
|
36
|
+
name: valid_from
|
37
|
+
type: datetime_picker
|
38
|
+
30:
|
39
|
+
name: valid_until
|
40
|
+
type: datetime_picker
|
41
|
+
40:
|
42
|
+
name: kats
|
43
|
+
type: select
|
44
|
+
multiple: true
|
45
|
+
eval: dc_big_table 'dc_rotator'
|
46
|
+
html:
|
47
|
+
include_blank: true
|
48
|
+
50:
|
49
|
+
name: order
|
50
|
+
type: text_field
|
51
|
+
size: 3
|
52
|
+
60:
|
53
|
+
name: active
|
54
|
+
type: check_box
|
55
|
+
1content:
|
56
|
+
10:
|
57
|
+
name: link
|
58
|
+
type: text_field
|
59
|
+
size: 50
|
60
|
+
20:
|
61
|
+
name: target
|
62
|
+
type: text_with_select
|
63
|
+
size: 10
|
64
|
+
30:
|
65
|
+
name: picture
|
66
|
+
type: file_select
|
67
|
+
size: 50
|
68
|
+
50:
|
69
|
+
name: text_over
|
70
|
+
type: check_box
|
71
|
+
60:
|
72
|
+
name: css_over
|
73
|
+
type: text_area
|
74
|
+
size: 50x10
|
75
|
+
70:
|
76
|
+
name: text
|
77
|
+
type: html_field
|
78
|
+
options: 'height: 400'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
## Form for rotator settings
|
2
|
+
table: dc_memory
|
3
|
+
title: helpers.dc_rotator.settings
|
4
|
+
controls: design_element_settings
|
5
|
+
|
6
|
+
form:
|
7
|
+
actions:
|
8
|
+
1: save
|
9
|
+
|
10
|
+
fields:
|
11
|
+
10:
|
12
|
+
name: delay
|
13
|
+
text: helpers.dc_rotator.delay
|
14
|
+
help: helpers.dc_rotator.delay_help
|
15
|
+
type: text_field
|
16
|
+
size: 3
|
17
|
+
|
18
|
+
20:
|
19
|
+
name: kats
|
20
|
+
text: helpers.label.dc_rotator.kats
|
21
|
+
help: helpers.help.dc_rotator.kats
|
22
|
+
type: select
|
23
|
+
multiple: true
|
24
|
+
eval: dc_big_table 'rotator'
|
25
|
+
css: '#td_record_kats .ms-container {min-width: 250px;}'
|
26
|
+
|
27
|
+
30:
|
28
|
+
name: klass
|
29
|
+
text: helpers.dc_rotator.klass
|
30
|
+
help: helpers.dc_rotator.klass_help
|
31
|
+
type: text_field
|
32
|
+
size: 20
|
33
|
+
|
@@ -0,0 +1,153 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2018+ 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
|
+
# Renderer for rotator web element
|
26
|
+
########################################################################
|
27
|
+
class DcRotatorRenderer
|
28
|
+
|
29
|
+
########################################################################
|
30
|
+
#
|
31
|
+
########################################################################
|
32
|
+
def initialize( parent, opts={} )
|
33
|
+
@parent = parent
|
34
|
+
@opts = opts
|
35
|
+
@opts[:element] ||= 'rotator'
|
36
|
+
@parts_css = ''
|
37
|
+
self
|
38
|
+
end
|
39
|
+
|
40
|
+
########################################################################
|
41
|
+
# Fetch documents displayed by rorator
|
42
|
+
########################################################################
|
43
|
+
def rotator_documents()
|
44
|
+
kats = @opts.dig(:settings, @opts[:element], 'kats')
|
45
|
+
query = if kats
|
46
|
+
DcRotator.where(:kats.in => kats, active: true)
|
47
|
+
else
|
48
|
+
DcRotator.where(active: true)
|
49
|
+
end
|
50
|
+
query = query.and({"$or" => [{:valid_from => nil}, {:valid_from.lt => Time.now}]},
|
51
|
+
{"$or" => [{:valid_until => nil}, {:valid_until.gt => Time.now}]})
|
52
|
+
|
53
|
+
query.order_by(order: 1).limit(10)
|
54
|
+
end
|
55
|
+
|
56
|
+
########################################################################
|
57
|
+
# Prepares code for displaying single element
|
58
|
+
########################################################################
|
59
|
+
def one_element(doc)
|
60
|
+
html = if doc.picture.empty?
|
61
|
+
%Q[<div class="orbit-text">#{doc.text.html_safe}</div>]
|
62
|
+
else
|
63
|
+
%Q[<div class="orbit-pic-with-text" style="position: relative;"><img class="orbit-image" src="#{doc.picture}" alt="#{doc.description}">] +
|
64
|
+
(doc.text_over ? "<div style=\"#{doc.css_over}\">#{doc.text}</div>" : '') + '</div>'
|
65
|
+
end.html_safe
|
66
|
+
html = @parent.link_to(html, doc.link, target: doc.target) unless doc.link.empty?
|
67
|
+
html
|
68
|
+
end
|
69
|
+
|
70
|
+
########################################################################
|
71
|
+
# Render rotator for display.
|
72
|
+
########################################################################
|
73
|
+
def rotator_4display
|
74
|
+
delay = @opts.dig(:settings, @opts[:element], 'delay') || 2000
|
75
|
+
html = %Q[
|
76
|
+
<div class="orbit" role="region" aria-label="" data-orbit data-timer-delay="#{delay}">
|
77
|
+
<div class="orbit-wrapper">
|
78
|
+
<ul class="orbit-container">
|
79
|
+
]
|
80
|
+
nav = '<nav class="orbit-bullets">'
|
81
|
+
# each document
|
82
|
+
n, is_active = 0, 'is-active'
|
83
|
+
rotator_documents.each do |doc|
|
84
|
+
html << %Q[<li class="#{is_active} orbit-slide"> <figure class="orbit-figure">]
|
85
|
+
html << one_element(doc)
|
86
|
+
html << '</figure> </li>'
|
87
|
+
nav << %Q[<button class="#{is_active}" data-slide="#{n}"><span class="show-for-sr">Slide #{n+1} details.</span></button>]
|
88
|
+
#
|
89
|
+
is_active = ''
|
90
|
+
n+=1
|
91
|
+
end
|
92
|
+
"#{html}</ul>#{nav}</nav></div></div>"
|
93
|
+
end
|
94
|
+
|
95
|
+
########################################################################
|
96
|
+
# Create code for rotator settings link
|
97
|
+
########################################################################
|
98
|
+
def link_for_rotator_settings
|
99
|
+
table = @opts[:table] || @parent.page.class.to_s
|
100
|
+
id = (table == 'dc_site') ? @parent.site.id : @parent.page.id
|
101
|
+
%Q[
|
102
|
+
#{@parent.dc_link_for_edit(table: 'dc_memory', title: 'helpers.dc_rotator.settings',
|
103
|
+
form_name: 'dc_rotator_settings', icon: 'cog lg',
|
104
|
+
id: id, location: table, action: 'new',
|
105
|
+
element: @opts[:element] )}
|
106
|
+
#{@parent.dc_link_for_create(table: 'dc_rotator', title: 'helpers.dc_rotator.create')}
|
107
|
+
]
|
108
|
+
end
|
109
|
+
|
110
|
+
########################################################################
|
111
|
+
# Render rotator for edit.
|
112
|
+
########################################################################
|
113
|
+
def rotator_4edit
|
114
|
+
html = %Q[<div class="orbit">#{link_for_rotator_settings}]
|
115
|
+
# each document
|
116
|
+
rotator_documents.each do |doc|
|
117
|
+
html << %Q[<div class="orbit-slide">#{@parent.dc_link_for_edit(table: 'dc_rotator', id: doc.id, title: 'helpers.dc_rotator.edit')}</div>]
|
118
|
+
html << one_element(doc)
|
119
|
+
end
|
120
|
+
"#{html}</div>"
|
121
|
+
end
|
122
|
+
|
123
|
+
########################################################################
|
124
|
+
# Default rorator renderer method.
|
125
|
+
########################################################################
|
126
|
+
def default
|
127
|
+
clas = @opts.dig(:settings, @opts[:element], 'class')
|
128
|
+
clas = "#{clas} #{@opts[:div_class]}" if @opts[:div_class]
|
129
|
+
html = clas.blank? ? '' : "<div class=\"#{clas}\">"
|
130
|
+
html << if @opts[:edit_mode] > 1
|
131
|
+
rotator_4edit
|
132
|
+
else
|
133
|
+
rotator_4display
|
134
|
+
end
|
135
|
+
html << (clas.blank? ? '' : '</div>')
|
136
|
+
end
|
137
|
+
|
138
|
+
########################################################################
|
139
|
+
#
|
140
|
+
########################################################################
|
141
|
+
def render_html
|
142
|
+
method = @opts[:method] || 'default'
|
143
|
+
respond_to?(method) ? send(method) : "Error rotator: Method #{method} doesn't exist!"
|
144
|
+
end
|
145
|
+
|
146
|
+
########################################################################
|
147
|
+
#
|
148
|
+
########################################################################
|
149
|
+
def render_css
|
150
|
+
@parts_css
|
151
|
+
end
|
152
|
+
|
153
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2018+ 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
|
+
# DcRotator model definition.
|
26
|
+
##########################################################################
|
27
|
+
class DcRotator
|
28
|
+
include Mongoid::Document
|
29
|
+
include Mongoid::Timestamps
|
30
|
+
|
31
|
+
field :description, type: String
|
32
|
+
field :link, type: String
|
33
|
+
field :target, type: String, default: ''
|
34
|
+
field :picture, type: String
|
35
|
+
field :text, type: String
|
36
|
+
field :css_over, type: String
|
37
|
+
field :text_over, type: Boolean, default: false
|
38
|
+
|
39
|
+
field :valid_from, type: DateTime
|
40
|
+
field :valid_until, type: DateTime
|
41
|
+
field :order, type: Integer, default: 10
|
42
|
+
field :kats, type: Array
|
43
|
+
|
44
|
+
field :active, type: Boolean, default: true
|
45
|
+
field :created_by, type: BSON::ObjectId
|
46
|
+
field :updated_by, type: BSON::ObjectId
|
47
|
+
|
48
|
+
index( { kats: 1 } )
|
49
|
+
|
50
|
+
validates :description, presence: true
|
51
|
+
|
52
|
+
validate :additional_controls
|
53
|
+
|
54
|
+
before_save :do_before_save
|
55
|
+
|
56
|
+
private
|
57
|
+
|
58
|
+
##########################################################################
|
59
|
+
#
|
60
|
+
##########################################################################
|
61
|
+
def do_before_save
|
62
|
+
#
|
63
|
+
end
|
64
|
+
|
65
|
+
######################################################################
|
66
|
+
# Additional controls if required. Will see.
|
67
|
+
######################################################################
|
68
|
+
def additional_controls #
|
69
|
+
if kats.nil? or kats.size == 0
|
70
|
+
# errors.add('kats', 'At least one category should be selected!')
|
71
|
+
end
|
72
|
+
if text_over
|
73
|
+
errors.add('css_over', 'helpers.help.rotator.css_over_error') if css_over.blank?
|
74
|
+
errors.add('picture', 'helpers.help.rotator.picture_error') if picture.blank?
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
######################################################################
|
79
|
+
# Returns values for categories
|
80
|
+
######################################################################
|
81
|
+
def self.choices4_kats
|
82
|
+
DcSite.where(active: true).inject([]) {|r, site| r << [site.name, site.name] }
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2018+ 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
|
+
en:
|
25
|
+
helpers:
|
26
|
+
label:
|
27
|
+
|
28
|
+
dc_rotator:
|
29
|
+
tabletitle: Table for defining rotator web element
|
30
|
+
0main: Main
|
31
|
+
1content: Content
|
32
|
+
choices4_target: New window:_blank
|
33
|
+
|
34
|
+
description: Description
|
35
|
+
link: Link
|
36
|
+
picture: Picture
|
37
|
+
text: Text
|
38
|
+
valid_from: Valid from date
|
39
|
+
valid_until: Valid to date
|
40
|
+
kats: Kategories
|
41
|
+
order: Order
|
42
|
+
active: Active
|
43
|
+
created_by: Created by
|
44
|
+
created_at: Created at
|
45
|
+
updated_at: Updated at
|
46
|
+
text_over: Text over
|
47
|
+
css_over: CSS za text
|
48
|
+
|
49
|
+
# help labels ####################################################
|
50
|
+
help:
|
51
|
+
|
52
|
+
dc_rotator:
|
53
|
+
description: Short description of rotator element
|
54
|
+
link: Destination link when clicked on rotator element
|
55
|
+
picture: Picture used for rotator element
|
56
|
+
text: HTML text used for rotator element or text over picture
|
57
|
+
valid_from: Start time when rotator element appears
|
58
|
+
order: Order on which elements are displayed
|
59
|
+
valid_until: End time for displaying rotator element
|
60
|
+
kats: Rotator element categories. Categories choices can be set in Big table under document named dc_rotator.
|
61
|
+
active: Rotator element is active.
|
62
|
+
class: Additional CSS class for rotator div
|
63
|
+
text_over: Check, if you want text to be displayed over picture
|
64
|
+
css_over: CSS for positioning and styling text over picture
|
65
|
+
css_over_error: CSS text must be present
|
66
|
+
picture_error: Picture data must be present
|
67
|
+
|
68
|
+
# Settings fields
|
69
|
+
dc_rotator:
|
70
|
+
create: Rotator - Create new rotator element
|
71
|
+
edit: Rotator - Edit rotator element
|
72
|
+
settings: Rotator settings
|
73
|
+
kats: Categories
|
74
|
+
kats_help: Kategories selected for this rotator
|
75
|
+
delay: Delay
|
76
|
+
delay_help: Delay between rotator elements in miliseconds
|
77
|
+
klass: CSS Class
|
78
|
+
klass_help: Class name used for rotator element
|
data/config/routes.rb
ADDED
data/lib/drg_rotator.rb
ADDED
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: drg_rotator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Damjan Rems
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-09-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: drg_cms
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: foundation-rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: DRG Rotator implements rotating image or HTML text on DRG CMS enabled
|
42
|
+
web site. It requirers Foundation library for implementing rotating web element.
|
43
|
+
email:
|
44
|
+
- damjan.rems@gmail.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- MIT-LICENSE
|
50
|
+
- README.md
|
51
|
+
- Rakefile
|
52
|
+
- app/assets/config/drg_rotator_manifest.js
|
53
|
+
- app/forms/dc_rotator.yml
|
54
|
+
- app/forms/dc_rotator_settings.yml
|
55
|
+
- app/helpers/dc_rotator_renderer.rb
|
56
|
+
- app/models/dc_rotator.rb
|
57
|
+
- config/locales/dc_rotator_en.yml
|
58
|
+
- config/routes.rb
|
59
|
+
- lib/drg_rotator.rb
|
60
|
+
- lib/drg_rotator/engine.rb
|
61
|
+
- lib/drg_rotator/version.rb
|
62
|
+
- lib/tasks/drg_rotator_tasks.rake
|
63
|
+
homepage: https://www.drgcms.org
|
64
|
+
licenses:
|
65
|
+
- MIT
|
66
|
+
metadata: {}
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
requirements: []
|
82
|
+
rubyforge_project:
|
83
|
+
rubygems_version: 2.6.14.1
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: 'DRG Rotator: Implements rotating web element for DRG CMS.'
|
87
|
+
test_files: []
|