camaleon_post_created_at 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +37 -0
- data/app/helpers/plugins/camaleon_post_created_at/main_helper.rb +33 -0
- data/config/camaleon_plugin.json +19 -0
- data/config/locales/en.yml +5 -0
- data/config/locales/es.yml +5 -0
- data/lib/camaleon_post_created_at.rb +4 -0
- data/lib/camaleon_post_created_at/engine.rb +4 -0
- data/lib/camaleon_post_created_at/version.rb +3 -0
- data/lib/tasks/camaleon_post_created_at_tasks.rake +4 -0
- metadata +98 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 55c1188df07730132e0a1a7957ab77676ca71c5e
|
4
|
+
data.tar.gz: 880dab53fb0061e2355c745a6e248e21361e42b2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 48f38dc218ab60cde90471017e2a35b99518cdd67a74d1c93fcf1619e41071262bb0c0dbf48532f2cf8f0c4645006b40be549738aa11a1f7f9b7785f754044c5
|
7
|
+
data.tar.gz: 6e9b7f1dce79b5dc28eb545b71c876ef554b093f37fecb14679ef21318779a09a0f8a81c8584b1c6044a02924193c13188c015d6613f77066e087e0bade6a7d9
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2016 Owen Peredo
|
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/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
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 = 'CamaleonPostCreatedAt'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
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
|
+
Bundler::GemHelper.install_tasks
|
26
|
+
|
27
|
+
require 'rake/testtask'
|
28
|
+
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
30
|
+
t.libs << 'lib'
|
31
|
+
t.libs << 'test'
|
32
|
+
t.pattern = 'test/**/*_test.rb'
|
33
|
+
t.verbose = false
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
task default: :test
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Plugins::CamaleonPostCreatedAt::MainHelper
|
2
|
+
def self.included(klass)
|
3
|
+
# klass.helper_method [:my_helper_method] rescue "" # here your methods accessible from views
|
4
|
+
end
|
5
|
+
|
6
|
+
# here all actions on going to active
|
7
|
+
# you can run sql commands like this:
|
8
|
+
# results = ActiveRecord::Base.connection.execute(query);
|
9
|
+
# plugin: plugin model
|
10
|
+
def camaleon_post_created_at_on_active(plugin)
|
11
|
+
end
|
12
|
+
|
13
|
+
# here all actions on going to inactive
|
14
|
+
# plugin: plugin model
|
15
|
+
def camaleon_post_created_at_on_inactive(plugin)
|
16
|
+
end
|
17
|
+
|
18
|
+
# here all actions to upgrade for a new version
|
19
|
+
# plugin: plugin model
|
20
|
+
def camaleon_post_created_at_on_upgrade(plugin)
|
21
|
+
end
|
22
|
+
|
23
|
+
def camaleon_post_created_at_post_form(args)
|
24
|
+
args[:extra_settings] <<
|
25
|
+
"<div class='form-group'>
|
26
|
+
<label class='control-label'>#{cama_t('camaleon_cms.plugins.post_created_at.created_at')}</label>
|
27
|
+
<div id='plugin_field_post_created_at' data-locale='#{current_locale}' class='input-group date'>
|
28
|
+
<input type='text' name='post[created_at]' data-format='yyyy-MM-dd hh:mm:ss' class='form-control ' value='#{@post.created_at}' />
|
29
|
+
<span class='add-on input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>
|
30
|
+
</div>
|
31
|
+
</div><script>jQuery(function(){ $('#plugin_field_post_created_at').datetimepicker({format: 'YYYY-MM-DD HH:mm'}) })</script>"
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"title": "Camaleon Post Created At",
|
3
|
+
"descr": "",
|
4
|
+
"key": "camaleon_post_created_at", // must be the name of the folder of your plugin, sample: app/views/plugins/<my_plugin> ==> 'my_plugin'
|
5
|
+
"helpers": [
|
6
|
+
"Plugins::CamaleonPostCreatedAt::MainHelper"
|
7
|
+
],
|
8
|
+
"hooks": {
|
9
|
+
"on_active": [
|
10
|
+
"camaleon_post_created_at_on_active"
|
11
|
+
],
|
12
|
+
"on_inactive": [
|
13
|
+
"camaleon_post_created_at_on_inactive"
|
14
|
+
],
|
15
|
+
"new_post":["camaleon_post_created_at_post_form"],
|
16
|
+
"edit_post":["camaleon_post_created_at_post_form"]
|
17
|
+
//here you can add all your hooks (read documentation)
|
18
|
+
}
|
19
|
+
}
|
metadata
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: camaleon_post_created_at
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Owen Peredo
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-11-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
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: camaleon_cms
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.3.5
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.3.5
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sqlite3
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Camaleon CMS plugin to permit to customize the created at date of post
|
56
|
+
contents
|
57
|
+
email:
|
58
|
+
- owenperedo@gmail.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- MIT-LICENSE
|
64
|
+
- Rakefile
|
65
|
+
- app/helpers/plugins/camaleon_post_created_at/main_helper.rb
|
66
|
+
- config/camaleon_plugin.json
|
67
|
+
- config/locales/en.yml
|
68
|
+
- config/locales/es.yml
|
69
|
+
- lib/camaleon_post_created_at.rb
|
70
|
+
- lib/camaleon_post_created_at/engine.rb
|
71
|
+
- lib/camaleon_post_created_at/version.rb
|
72
|
+
- lib/tasks/camaleon_post_created_at_tasks.rake
|
73
|
+
homepage: ''
|
74
|
+
licenses:
|
75
|
+
- MIT
|
76
|
+
metadata: {}
|
77
|
+
post_install_message:
|
78
|
+
rdoc_options: []
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project:
|
93
|
+
rubygems_version: 2.4.8
|
94
|
+
signing_key:
|
95
|
+
specification_version: 4
|
96
|
+
summary: Permit to customize the created at date of post contents
|
97
|
+
test_files: []
|
98
|
+
has_rdoc:
|