goldencobra 2.3.3 → 2.3.4
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/models/goldencobra/article.rb +58 -47
- data/app/models/goldencobra/article_url.rb +11 -0
- data/app/models/goldencobra/articletype.rb +14 -2
- data/app/models/goldencobra/articletype_field.rb +13 -0
- data/app/models/goldencobra/articletype_group.rb +16 -0
- data/app/models/goldencobra/articletype_template.rb +17 -0
- data/app/models/goldencobra/author.rb +13 -0
- data/app/models/goldencobra/comment.rb +1 -2
- data/app/models/goldencobra/domain.rb +14 -0
- data/app/models/goldencobra/help.rb +1 -2
- data/app/models/goldencobra/import.rb +4 -5
- data/app/models/goldencobra/import_metadata.rb +17 -0
- data/app/models/goldencobra/link_checker.rb +15 -0
- data/app/models/goldencobra/location.rb +15 -15
- data/app/models/goldencobra/menue.rb +3 -2
- data/app/models/goldencobra/permission.rb +3 -3
- data/app/models/goldencobra/redirector.rb +14 -0
- data/app/models/goldencobra/role.rb +1 -2
- data/app/models/goldencobra/role_user.rb +0 -3
- data/app/models/goldencobra/template.rb +25 -0
- data/app/models/goldencobra/tracking.rb +2 -3
- data/app/models/goldencobra/upload.rb +2 -1
- data/app/models/goldencobra/vita.rb +2 -3
- data/app/models/goldencobra/widget.rb +5 -7
- data/app/models/translation.rb +2 -3
- data/app/models/user.rb +1 -1
- data/app/serializers/goldencobra/article_serializer.rb +64 -0
- data/app/serializers/goldencobra/upload_serializer.rb +20 -0
- data/app/views/goldencobra/admin/articles/_layout_sidebar.html.erb +1 -1
- data/config/initializers/templates.rb +15 -0
- data/config/locales/active_admin.de.yml +4 -0
- data/config/locales/active_admin.en.yml +4 -0
- data/db/migrate/20180308124139_create_goldencobra_templates.rb +10 -0
- data/db/migrate/20180308124302_create_goldencobra_articletype_templates.rb +10 -0
- data/lib/goldencobra/version.rb +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 17da51b19ac22211cb5695562c4b927c28aef7f8
|
|
4
|
+
data.tar.gz: dcfcb4852f66167c1ef574b5f750abf91a40d73a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 46f4a9edefd0fa2b510e170408d14ea47a57572e8bba9081c816503d1ae4978344b3d81f3289f6c4d5de8946231b9e3b1bd3991e95cb98fcc42e7dbda0078ff1
|
|
7
|
+
data.tar.gz: 2d654e0cf2120c8312de826f02c7069cec902334d0b58df37983b49fa4d8122e14c4d69f19ff4d3f9feb85ab98edce19983175031108f851397d4102a343a4d5
|
|
@@ -3,47 +3,64 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Table name: goldencobra_articles
|
|
5
5
|
#
|
|
6
|
-
# id
|
|
7
|
-
# title
|
|
8
|
-
# created_at
|
|
9
|
-
# updated_at
|
|
10
|
-
# url_name
|
|
11
|
-
# slug
|
|
12
|
-
# content
|
|
13
|
-
# teaser
|
|
14
|
-
# ancestry
|
|
15
|
-
# startpage
|
|
16
|
-
# active
|
|
17
|
-
# subtitle
|
|
18
|
-
# summary
|
|
19
|
-
# context_info
|
|
20
|
-
# canonical_url
|
|
21
|
-
# robots_no_index
|
|
22
|
-
# breadcrumb
|
|
23
|
-
# template_file
|
|
24
|
-
# article_for_index_id
|
|
25
|
-
# article_for_index_levels
|
|
26
|
-
# article_for_index_count
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# cacheable
|
|
30
|
-
# image_gallery_tags
|
|
31
|
-
# article_type
|
|
32
|
-
# external_url_redirect
|
|
33
|
-
# index_of_articles_tagged_with
|
|
34
|
-
# sort_order
|
|
35
|
-
# reverse_sort
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
#
|
|
6
|
+
# id :integer not null, primary key
|
|
7
|
+
# title :string(255)
|
|
8
|
+
# created_at :datetime not null
|
|
9
|
+
# updated_at :datetime not null
|
|
10
|
+
# url_name :string(255)
|
|
11
|
+
# slug :string(255)
|
|
12
|
+
# content :text(65535)
|
|
13
|
+
# teaser :text(65535)
|
|
14
|
+
# ancestry :string(255)
|
|
15
|
+
# startpage :boolean default(FALSE)
|
|
16
|
+
# active :boolean default(TRUE)
|
|
17
|
+
# subtitle :string(255)
|
|
18
|
+
# summary :text(65535)
|
|
19
|
+
# context_info :text(65535)
|
|
20
|
+
# canonical_url :string(255)
|
|
21
|
+
# robots_no_index :boolean default(FALSE)
|
|
22
|
+
# breadcrumb :string(255)
|
|
23
|
+
# template_file :string(255)
|
|
24
|
+
# article_for_index_id :integer
|
|
25
|
+
# article_for_index_levels :integer default(0)
|
|
26
|
+
# article_for_index_count :integer default(0)
|
|
27
|
+
# enable_social_sharing :boolean
|
|
28
|
+
# article_for_index_images :boolean default(FALSE)
|
|
29
|
+
# cacheable :boolean default(TRUE)
|
|
30
|
+
# image_gallery_tags :string(255)
|
|
31
|
+
# article_type :string(255)
|
|
32
|
+
# external_url_redirect :string(255)
|
|
33
|
+
# index_of_articles_tagged_with :string(255)
|
|
34
|
+
# sort_order :string(255)
|
|
35
|
+
# reverse_sort :boolean
|
|
36
|
+
# sorter_limit :integer
|
|
37
|
+
# not_tagged_with :string(255)
|
|
38
|
+
# use_frontend_tags :boolean default(FALSE)
|
|
39
|
+
# dynamic_redirection :string(255) default("false")
|
|
40
|
+
# redirection_target_in_new_window :boolean default(FALSE)
|
|
41
|
+
# commentable :boolean default(FALSE)
|
|
42
|
+
# active_since :datetime default(Fri, 03 Oct 2014 09:43:07 CEST +02:00)
|
|
43
|
+
# redirect_link_title :string(255)
|
|
44
|
+
# display_index_types :string(255) default("all")
|
|
45
|
+
# creator_id :integer
|
|
46
|
+
# external_referee_id :string(255)
|
|
47
|
+
# external_referee_ip :string(255)
|
|
48
|
+
# external_updated_at :datetime
|
|
49
|
+
# image_gallery_type :string(255) default("lightbox")
|
|
50
|
+
# url_path :text(65535)
|
|
51
|
+
# global_sorting_id :integer default(0)
|
|
52
|
+
# display_index_articletypes :string(255) default("all")
|
|
53
|
+
# index_of_articles_descendents_depth :string(255) default("1")
|
|
54
|
+
# ancestry_depth :integer default(0)
|
|
55
|
+
# metatag_title_tag :string(255)
|
|
56
|
+
# metatag_meta_description :string(255)
|
|
57
|
+
# metatag_open_graph_title :string(255)
|
|
58
|
+
# metatag_open_graph_description :string(255)
|
|
59
|
+
# metatag_open_graph_type :string(255) default("website")
|
|
60
|
+
# metatag_open_graph_url :string(255)
|
|
61
|
+
# metatag_open_graph_image :string(255)
|
|
62
|
+
# state :integer default(0)
|
|
63
|
+
# display_index_articles :boolean default(FALSE)
|
|
47
64
|
#
|
|
48
65
|
|
|
49
66
|
# For article rendering to string (:render_html) needed
|
|
@@ -846,12 +863,6 @@ module Goldencobra
|
|
|
846
863
|
return results
|
|
847
864
|
end
|
|
848
865
|
|
|
849
|
-
def self.templates_for_select
|
|
850
|
-
Dir.glob(File.join(::Rails.root, "app", "views", "layouts", "*.html.erb"))
|
|
851
|
-
.map { |a| File.basename(a, ".html.erb") }
|
|
852
|
-
.delete_if { |a| a =~ /^_/ }
|
|
853
|
-
end
|
|
854
|
-
|
|
855
866
|
def self.simple_search(q)
|
|
856
867
|
active.search(title_or_subtitle_or_url_name_or_content_or_summary_or_teaser_contains: q).relation.map do |article|
|
|
857
868
|
{
|
|
@@ -52,3 +52,14 @@ module Goldencobra
|
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
|
+
|
|
56
|
+
# == Schema Information
|
|
57
|
+
#
|
|
58
|
+
# Table name: goldencobra_article_urls
|
|
59
|
+
#
|
|
60
|
+
# id :integer not null, primary key
|
|
61
|
+
# article_id :integer
|
|
62
|
+
# url :text(65535)
|
|
63
|
+
# created_at :datetime not null
|
|
64
|
+
# updated_at :datetime not null
|
|
65
|
+
#
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
module Goldencobra
|
|
2
2
|
class Articletype < ActiveRecord::Base
|
|
3
|
-
attr_accessible :default_template_file, :name, :fieldgroups_attributes
|
|
3
|
+
attr_accessible :default_template_file, :name, :fieldgroups_attributes, :template_ids
|
|
4
4
|
|
|
5
5
|
has_many :articles, class_name: Goldencobra::Article, foreign_key: :article_type, primary_key: :name
|
|
6
6
|
has_many :fieldgroups, class_name: Goldencobra::ArticletypeGroup, dependent: :destroy
|
|
7
|
-
|
|
7
|
+
has_many :articletype_templates
|
|
8
|
+
has_many :templates, through: :articletype_templates
|
|
8
9
|
accepts_nested_attributes_for :fieldgroups, allow_destroy: true
|
|
9
10
|
|
|
10
11
|
validates_uniqueness_of :name
|
|
@@ -115,3 +116,14 @@ module Goldencobra
|
|
|
115
116
|
end
|
|
116
117
|
end
|
|
117
118
|
end
|
|
119
|
+
|
|
120
|
+
# == Schema Information
|
|
121
|
+
#
|
|
122
|
+
# Table name: goldencobra_articletypes
|
|
123
|
+
#
|
|
124
|
+
# id :integer not null, primary key
|
|
125
|
+
# name :string(255)
|
|
126
|
+
# default_template_file :string(255)
|
|
127
|
+
# created_at :datetime not null
|
|
128
|
+
# updated_at :datetime not null
|
|
129
|
+
#
|
|
@@ -10,3 +10,16 @@ module Goldencobra
|
|
|
10
10
|
default_scope { order(:sorter) }
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
|
+
|
|
14
|
+
# == Schema Information
|
|
15
|
+
#
|
|
16
|
+
# Table name: goldencobra_articletype_fields
|
|
17
|
+
#
|
|
18
|
+
# id :integer not null, primary key
|
|
19
|
+
# articletype_group_id :integer
|
|
20
|
+
# fieldname :string(255)
|
|
21
|
+
# sorter :integer default(0)
|
|
22
|
+
# class_name :string(255)
|
|
23
|
+
# created_at :datetime not null
|
|
24
|
+
# updated_at :datetime not null
|
|
25
|
+
#
|
|
@@ -11,3 +11,19 @@ module Goldencobra
|
|
|
11
11
|
default_scope { order(:sorter) }
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
|
+
|
|
15
|
+
# == Schema Information
|
|
16
|
+
#
|
|
17
|
+
# Table name: goldencobra_articletype_groups
|
|
18
|
+
#
|
|
19
|
+
# id :integer not null, primary key
|
|
20
|
+
# title :string(255)
|
|
21
|
+
# expert :boolean default(FALSE)
|
|
22
|
+
# foldable :boolean default(TRUE)
|
|
23
|
+
# closed :boolean default(TRUE)
|
|
24
|
+
# sorter :integer default(0)
|
|
25
|
+
# articletype_id :integer
|
|
26
|
+
# created_at :datetime not null
|
|
27
|
+
# updated_at :datetime not null
|
|
28
|
+
# position :string(255) default("first_block")
|
|
29
|
+
#
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Goldencobra
|
|
2
|
+
class ArticletypeTemplate < ActiveRecord::Base
|
|
3
|
+
belongs_to :template
|
|
4
|
+
belongs_to :articletype
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
# == Schema Information
|
|
9
|
+
#
|
|
10
|
+
# Table name: goldencobra_articletype_templates
|
|
11
|
+
#
|
|
12
|
+
# id :integer not null, primary key
|
|
13
|
+
# articletype_id :integer
|
|
14
|
+
# template_id :integer
|
|
15
|
+
# created_at :datetime not null
|
|
16
|
+
# updated_at :datetime not null
|
|
17
|
+
#
|
|
@@ -14,3 +14,16 @@ module Goldencobra
|
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
|
+
|
|
18
|
+
# == Schema Information
|
|
19
|
+
#
|
|
20
|
+
# Table name: goldencobra_authors
|
|
21
|
+
#
|
|
22
|
+
# id :integer not null, primary key
|
|
23
|
+
# firstname :string(255)
|
|
24
|
+
# lastname :string(255)
|
|
25
|
+
# email :string(255)
|
|
26
|
+
# googleplus :string(255)
|
|
27
|
+
# created_at :datetime not null
|
|
28
|
+
# updated_at :datetime not null
|
|
29
|
+
#
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_comments
|
|
@@ -8,7 +7,7 @@
|
|
|
8
7
|
# article_id :integer
|
|
9
8
|
# commentator_id :integer
|
|
10
9
|
# commentator_type :string(255)
|
|
11
|
-
# content :text
|
|
10
|
+
# content :text(65535)
|
|
12
11
|
# active :boolean default(TRUE)
|
|
13
12
|
# approved :boolean default(FALSE)
|
|
14
13
|
# reported :boolean default(FALSE)
|
|
@@ -36,3 +36,17 @@ module Goldencobra
|
|
|
36
36
|
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
|
+
|
|
40
|
+
# == Schema Information
|
|
41
|
+
#
|
|
42
|
+
# Table name: goldencobra_domains
|
|
43
|
+
#
|
|
44
|
+
# id :integer not null, primary key
|
|
45
|
+
# hostname :string(255)
|
|
46
|
+
# title :string(255)
|
|
47
|
+
# client :string(255)
|
|
48
|
+
# created_at :datetime not null
|
|
49
|
+
# updated_at :datetime not null
|
|
50
|
+
# url_prefix :string(255)
|
|
51
|
+
# main :boolean default(FALSE)
|
|
52
|
+
#
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_helps
|
|
6
5
|
#
|
|
7
6
|
# id :integer not null, primary key
|
|
8
7
|
# title :string(255)
|
|
9
|
-
# description :text
|
|
8
|
+
# description :text(65535)
|
|
10
9
|
# url :string(255)
|
|
11
10
|
# created_at :datetime not null
|
|
12
11
|
# updated_at :datetime not null
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_imports
|
|
6
5
|
#
|
|
7
6
|
# id :integer not null, primary key
|
|
8
|
-
# assignment :text
|
|
9
|
-
# assignment_groups :text
|
|
7
|
+
# assignment :text(65535)
|
|
10
8
|
# target_model :string(255)
|
|
11
9
|
# successful :boolean
|
|
12
10
|
# upload_id :integer
|
|
13
11
|
# separator :string(255) default(",")
|
|
14
|
-
# result :text
|
|
12
|
+
# result :text(65535)
|
|
15
13
|
# created_at :datetime not null
|
|
16
14
|
# updated_at :datetime not null
|
|
15
|
+
# encoding_type :string(255)
|
|
16
|
+
# assignment_groups :text(65535)
|
|
17
17
|
#
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
# Dynamische Importfunktionen:
|
|
21
20
|
# Jedes Model welches eigene Importfunktionen anbieten will muss lediglich eine liste der verfügbaren funktionen ImportDataFunctions = [] haben
|
|
22
21
|
# und die entsprechenden parameterized.underscored klassenfunktionenen bereithalten
|
|
@@ -11,3 +11,20 @@ module Goldencobra
|
|
|
11
11
|
belongs_to :importmetatagable, polymorphic: true
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
|
+
|
|
15
|
+
# == Schema Information
|
|
16
|
+
#
|
|
17
|
+
# Table name: goldencobra_import_metadata
|
|
18
|
+
#
|
|
19
|
+
# id :integer not null, primary key
|
|
20
|
+
# database_owner :string(255)
|
|
21
|
+
# exported_at :datetime
|
|
22
|
+
# database_admin_first_name :string(255)
|
|
23
|
+
# database_admin_last_name :string(255)
|
|
24
|
+
# database_admin_phone :string(255)
|
|
25
|
+
# database_admin_email :string(255)
|
|
26
|
+
# importmetatagable_id :integer
|
|
27
|
+
# importmetatagable_type :string(255)
|
|
28
|
+
# created_at :datetime not null
|
|
29
|
+
# updated_at :datetime not null
|
|
30
|
+
#
|
|
@@ -75,3 +75,18 @@ module Goldencobra
|
|
|
75
75
|
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
|
+
|
|
79
|
+
# == Schema Information
|
|
80
|
+
#
|
|
81
|
+
# Table name: goldencobra_link_checkers
|
|
82
|
+
#
|
|
83
|
+
# id :integer not null, primary key
|
|
84
|
+
# article_id :integer
|
|
85
|
+
# target_link :text(65535)
|
|
86
|
+
# position :text(65535)
|
|
87
|
+
# response_code :string(255)
|
|
88
|
+
# response_time :string(255)
|
|
89
|
+
# response_error :text(65535)
|
|
90
|
+
# created_at :datetime not null
|
|
91
|
+
# updated_at :datetime not null
|
|
92
|
+
#
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_locations
|
|
6
5
|
#
|
|
7
|
-
# id
|
|
8
|
-
# lat
|
|
9
|
-
# lng
|
|
10
|
-
# street
|
|
11
|
-
# city
|
|
12
|
-
# zip
|
|
13
|
-
# region
|
|
14
|
-
# country
|
|
15
|
-
# created_at
|
|
16
|
-
# updated_at
|
|
17
|
-
# title
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
6
|
+
# id :integer not null, primary key
|
|
7
|
+
# lat :string(255)
|
|
8
|
+
# lng :string(255)
|
|
9
|
+
# street :string(255)
|
|
10
|
+
# city :string(255)
|
|
11
|
+
# zip :string(255)
|
|
12
|
+
# region :string(255)
|
|
13
|
+
# country :string(255)
|
|
14
|
+
# created_at :datetime not null
|
|
15
|
+
# updated_at :datetime not null
|
|
16
|
+
# title :string(255)
|
|
17
|
+
# locateable_type :string(255)
|
|
18
|
+
# locateable_id :integer
|
|
19
|
+
# street_number :string(255)
|
|
20
|
+
# manual_geocoding :boolean default(FALSE)
|
|
21
21
|
#
|
|
22
22
|
|
|
23
23
|
module Goldencobra
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_menues
|
|
@@ -13,10 +12,12 @@
|
|
|
13
12
|
# updated_at :datetime not null
|
|
14
13
|
# ancestry :string(255)
|
|
15
14
|
# sorter :integer default(0)
|
|
16
|
-
# description :text
|
|
15
|
+
# description :text(65535)
|
|
17
16
|
# call_to_action_name :string(255)
|
|
18
17
|
# description_title :string(255)
|
|
19
18
|
# image_id :integer
|
|
19
|
+
# ancestry_depth :integer default(0)
|
|
20
|
+
# remote :boolean default(FALSE)
|
|
20
21
|
#
|
|
21
22
|
|
|
22
23
|
module Goldencobra
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_permissions
|
|
@@ -9,10 +8,11 @@
|
|
|
9
8
|
# subject_class :string(255)
|
|
10
9
|
# subject_id :string(255)
|
|
11
10
|
# role_id :integer
|
|
12
|
-
#
|
|
11
|
+
# sorter_id :integer default(0)
|
|
13
12
|
# created_at :datetime not null
|
|
14
13
|
# updated_at :datetime not null
|
|
15
|
-
#
|
|
14
|
+
# operator_id :integer
|
|
15
|
+
# domain_id :integer
|
|
16
16
|
#
|
|
17
17
|
|
|
18
18
|
module Goldencobra
|
|
@@ -129,3 +129,17 @@ module Goldencobra
|
|
|
129
129
|
end
|
|
130
130
|
end
|
|
131
131
|
end
|
|
132
|
+
|
|
133
|
+
# == Schema Information
|
|
134
|
+
#
|
|
135
|
+
# Table name: goldencobra_redirectors
|
|
136
|
+
#
|
|
137
|
+
# id :integer not null, primary key
|
|
138
|
+
# source_url :text(65535)
|
|
139
|
+
# target_url :text(65535)
|
|
140
|
+
# redirection_code :integer default(301)
|
|
141
|
+
# active :boolean default(TRUE)
|
|
142
|
+
# ignore_url_params :boolean default(TRUE)
|
|
143
|
+
# created_at :datetime not null
|
|
144
|
+
# updated_at :datetime not null
|
|
145
|
+
#
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_roles
|
|
6
5
|
#
|
|
7
6
|
# id :integer not null, primary key
|
|
8
7
|
# name :string(255)
|
|
9
|
-
# description :text
|
|
8
|
+
# description :text(65535)
|
|
10
9
|
# created_at :datetime not null
|
|
11
10
|
# updated_at :datetime not null
|
|
12
11
|
# redirect_after_login :string(255) default("reload")
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_roles_users
|
|
6
5
|
#
|
|
7
6
|
# operator_id :integer
|
|
8
7
|
# role_id :integer
|
|
9
|
-
# created_at :datetime not null
|
|
10
|
-
# updated_at :datetime not null
|
|
11
8
|
# operator_type :string(255) default("User")
|
|
12
9
|
#
|
|
13
10
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Goldencobra
|
|
2
|
+
class Template < ActiveRecord::Base
|
|
3
|
+
attr_accessible :title, :layout_file_name
|
|
4
|
+
|
|
5
|
+
# List all layout files found in folder /app/views/layouts
|
|
6
|
+
#
|
|
7
|
+
# @return [Array] List of file names
|
|
8
|
+
def self.layouts_for_select
|
|
9
|
+
Dir.glob(File.join(::Rails.root, "app", "views", "layouts", "*.html.erb"))
|
|
10
|
+
.map { |a| File.basename(a, ".html.erb") }
|
|
11
|
+
.delete_if { |a| a =~ /^_/ }
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# == Schema Information
|
|
17
|
+
#
|
|
18
|
+
# Table name: goldencobra_templates
|
|
19
|
+
#
|
|
20
|
+
# id :integer not null, primary key
|
|
21
|
+
# title :string(255)
|
|
22
|
+
# layout_file_name :string(255)
|
|
23
|
+
# created_at :datetime not null
|
|
24
|
+
# updated_at :datetime not null
|
|
25
|
+
#
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_trackings
|
|
6
5
|
#
|
|
7
6
|
# id :integer not null, primary key
|
|
8
|
-
# request :text
|
|
7
|
+
# request :text(65535)
|
|
9
8
|
# session_id :string(255)
|
|
10
9
|
# referer :string(255)
|
|
11
10
|
# url :string(255)
|
|
@@ -18,7 +17,7 @@
|
|
|
18
17
|
# page_duration :string(255)
|
|
19
18
|
# view_duration :string(255)
|
|
20
19
|
# db_duration :string(255)
|
|
21
|
-
# url_paremeters :
|
|
20
|
+
# url_paremeters :text(65535)
|
|
22
21
|
# utm_source :string(255)
|
|
23
22
|
# utm_medium :string(255)
|
|
24
23
|
# utm_term :string(255)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# id :integer not null, primary key
|
|
6
6
|
# source :string(255)
|
|
7
7
|
# rights :string(255)
|
|
8
|
-
# description :text
|
|
8
|
+
# description :text(65535)
|
|
9
9
|
# image_file_name :string(255)
|
|
10
10
|
# image_content_type :string(255)
|
|
11
11
|
# image_file_size :integer
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
# attachable_type :string(255)
|
|
16
16
|
# alt_text :string(255)
|
|
17
17
|
# sorter_number :integer
|
|
18
|
+
# image_remote_url :string(255)
|
|
18
19
|
#
|
|
19
20
|
|
|
20
21
|
module Goldencobra
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_vita
|
|
@@ -9,10 +8,10 @@
|
|
|
9
8
|
# loggable_type :string(255)
|
|
10
9
|
# user_id :integer
|
|
11
10
|
# title :string(255)
|
|
12
|
-
# description :text
|
|
11
|
+
# description :text(65535)
|
|
13
12
|
# created_at :datetime not null
|
|
14
13
|
# updated_at :datetime not null
|
|
15
|
-
# status_cd :integer default
|
|
14
|
+
# status_cd :integer default(0)
|
|
16
15
|
#
|
|
17
16
|
|
|
18
17
|
module Goldencobra
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
#encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: goldencobra_widgets
|
|
6
5
|
#
|
|
7
6
|
# id :integer not null, primary key
|
|
8
7
|
# title :string(255)
|
|
9
|
-
# content :text
|
|
8
|
+
# content :text(65535)
|
|
10
9
|
# css_name :string(255)
|
|
11
10
|
# active :boolean
|
|
12
11
|
# created_at :datetime not null
|
|
13
12
|
# updated_at :datetime not null
|
|
14
13
|
# id_name :string(255)
|
|
15
14
|
# sorter :integer
|
|
16
|
-
# mobile_content :text
|
|
15
|
+
# mobile_content :text(65535)
|
|
17
16
|
# teaser :string(255)
|
|
18
17
|
# default :boolean
|
|
19
|
-
# description :text
|
|
18
|
+
# description :text(65535)
|
|
20
19
|
# offline_days :string(255)
|
|
21
20
|
# offline_time_active :boolean
|
|
22
|
-
# alternative_content :text
|
|
21
|
+
# alternative_content :text(65535)
|
|
23
22
|
# offline_date_start :date
|
|
24
23
|
# offline_date_end :date
|
|
25
|
-
# offline_time_week_start_end :text
|
|
24
|
+
# offline_time_week_start_end :text(65535)
|
|
26
25
|
#
|
|
27
26
|
|
|
28
|
-
|
|
29
27
|
module Goldencobra
|
|
30
28
|
class Widget < ActiveRecord::Base
|
|
31
29
|
attr_accessible :title, :content, :css_name, :active, :id_name, :sorter, :teaser, :default,
|
data/app/models/translation.rb
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
|
|
3
2
|
# == Schema Information
|
|
4
3
|
#
|
|
5
4
|
# Table name: translations
|
|
@@ -7,8 +6,8 @@
|
|
|
7
6
|
# id :integer not null, primary key
|
|
8
7
|
# locale :string(255)
|
|
9
8
|
# key :string(255)
|
|
10
|
-
# value :text
|
|
11
|
-
# interpolations :text
|
|
9
|
+
# value :text(65535)
|
|
10
|
+
# interpolations :text(65535)
|
|
12
11
|
# is_proc :boolean default(FALSE)
|
|
13
12
|
# created_at :datetime not null
|
|
14
13
|
# updated_at :datetime not null
|
data/app/models/user.rb
CHANGED
|
@@ -24,3 +24,67 @@ module Goldencobra
|
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
|
+
|
|
28
|
+
# == Schema Information
|
|
29
|
+
#
|
|
30
|
+
# Table name: goldencobra_articles
|
|
31
|
+
#
|
|
32
|
+
# id :integer not null, primary key
|
|
33
|
+
# title :string(255)
|
|
34
|
+
# created_at :datetime not null
|
|
35
|
+
# updated_at :datetime not null
|
|
36
|
+
# url_name :string(255)
|
|
37
|
+
# slug :string(255)
|
|
38
|
+
# content :text(65535)
|
|
39
|
+
# teaser :text(65535)
|
|
40
|
+
# ancestry :string(255)
|
|
41
|
+
# startpage :boolean default(FALSE)
|
|
42
|
+
# active :boolean default(TRUE)
|
|
43
|
+
# subtitle :string(255)
|
|
44
|
+
# summary :text(65535)
|
|
45
|
+
# context_info :text(65535)
|
|
46
|
+
# canonical_url :string(255)
|
|
47
|
+
# robots_no_index :boolean default(FALSE)
|
|
48
|
+
# breadcrumb :string(255)
|
|
49
|
+
# template_file :string(255)
|
|
50
|
+
# article_for_index_id :integer
|
|
51
|
+
# article_for_index_levels :integer default(0)
|
|
52
|
+
# article_for_index_count :integer default(0)
|
|
53
|
+
# enable_social_sharing :boolean
|
|
54
|
+
# article_for_index_images :boolean default(FALSE)
|
|
55
|
+
# cacheable :boolean default(TRUE)
|
|
56
|
+
# image_gallery_tags :string(255)
|
|
57
|
+
# article_type :string(255)
|
|
58
|
+
# external_url_redirect :string(255)
|
|
59
|
+
# index_of_articles_tagged_with :string(255)
|
|
60
|
+
# sort_order :string(255)
|
|
61
|
+
# reverse_sort :boolean
|
|
62
|
+
# sorter_limit :integer
|
|
63
|
+
# not_tagged_with :string(255)
|
|
64
|
+
# use_frontend_tags :boolean default(FALSE)
|
|
65
|
+
# dynamic_redirection :string(255) default("false")
|
|
66
|
+
# redirection_target_in_new_window :boolean default(FALSE)
|
|
67
|
+
# commentable :boolean default(FALSE)
|
|
68
|
+
# active_since :datetime default(Fri, 03 Oct 2014 09:43:07 CEST +02:00)
|
|
69
|
+
# redirect_link_title :string(255)
|
|
70
|
+
# display_index_types :string(255) default("all")
|
|
71
|
+
# creator_id :integer
|
|
72
|
+
# external_referee_id :string(255)
|
|
73
|
+
# external_referee_ip :string(255)
|
|
74
|
+
# external_updated_at :datetime
|
|
75
|
+
# image_gallery_type :string(255) default("lightbox")
|
|
76
|
+
# url_path :text(65535)
|
|
77
|
+
# global_sorting_id :integer default(0)
|
|
78
|
+
# display_index_articletypes :string(255) default("all")
|
|
79
|
+
# index_of_articles_descendents_depth :string(255) default("1")
|
|
80
|
+
# ancestry_depth :integer default(0)
|
|
81
|
+
# metatag_title_tag :string(255)
|
|
82
|
+
# metatag_meta_description :string(255)
|
|
83
|
+
# metatag_open_graph_title :string(255)
|
|
84
|
+
# metatag_open_graph_description :string(255)
|
|
85
|
+
# metatag_open_graph_type :string(255) default("website")
|
|
86
|
+
# metatag_open_graph_url :string(255)
|
|
87
|
+
# metatag_open_graph_image :string(255)
|
|
88
|
+
# state :integer default(0)
|
|
89
|
+
# display_index_articles :boolean default(FALSE)
|
|
90
|
+
#
|
|
@@ -20,3 +20,23 @@ module Goldencobra
|
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
|
+
|
|
24
|
+
# == Schema Information
|
|
25
|
+
#
|
|
26
|
+
# Table name: goldencobra_uploads
|
|
27
|
+
#
|
|
28
|
+
# id :integer not null, primary key
|
|
29
|
+
# source :string(255)
|
|
30
|
+
# rights :string(255)
|
|
31
|
+
# description :text(65535)
|
|
32
|
+
# image_file_name :string(255)
|
|
33
|
+
# image_content_type :string(255)
|
|
34
|
+
# image_file_size :integer
|
|
35
|
+
# created_at :datetime not null
|
|
36
|
+
# updated_at :datetime not null
|
|
37
|
+
# attachable_id :integer
|
|
38
|
+
# attachable_type :string(255)
|
|
39
|
+
# alt_text :string(255)
|
|
40
|
+
# sorter_number :integer
|
|
41
|
+
# image_remote_url :string(255)
|
|
42
|
+
#
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<h5>
|
|
22
22
|
<%= I18n.t(@article.article_type.split(' ').first.to_s.strip, :scope => [:activerecord, :models, "goldencobra/article"], :default => "Layout der Seite") %>
|
|
23
23
|
</h5>
|
|
24
|
-
<%= f.select :template_file,
|
|
24
|
+
<%= f.select :template_file, @article.articletype.templates.map { |t| [t.title, t.layout_file_name]}, :include_blank => false %>
|
|
25
25
|
<br/><br/>
|
|
26
26
|
<%= f.submit t("submit_layout", :scope => [:active_admin, :sidebars]) %>
|
|
27
27
|
<% end %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Rails.application.config.to_prepare do
|
|
2
|
+
if ActiveRecord::Base.connection.table_exists?("goldencobra_templates")
|
|
3
|
+
# Beim starten der Application wird das Verzeichnis /app/views/layouts durchsucht nach
|
|
4
|
+
# neuen Templatefiles und erzeugt für diese dann eine Goldencobra::Template
|
|
5
|
+
Goldencobra::Template.layouts_for_select.each do |template_file_name|
|
|
6
|
+
template = Goldencobra::Template.where(layout_file_name: template_file_name).first
|
|
7
|
+
unless template
|
|
8
|
+
template = Goldencobra::Template.create(layout_file_name: template_file_name, title: template_file_name)
|
|
9
|
+
Goldencobra::Articletype.all.each do |at|
|
|
10
|
+
at.templates << template
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -44,6 +44,8 @@ de:
|
|
|
44
44
|
div: "Ich akzeptiere die AGB & Datenschutzbestimmungen *"
|
|
45
45
|
submit: "Registrieren"
|
|
46
46
|
active_admin:
|
|
47
|
+
template:
|
|
48
|
+
as: "Templates"
|
|
47
49
|
redirector:
|
|
48
50
|
as: "Weiterleitungen"
|
|
49
51
|
article_url:
|
|
@@ -629,6 +631,8 @@ de:
|
|
|
629
631
|
as: "Artikeltypen"
|
|
630
632
|
general: "Allgemein"
|
|
631
633
|
article_fields: "Artikelfelder"
|
|
634
|
+
default_template: "Standard Layout"
|
|
635
|
+
templates: "Verfügbare Templates"
|
|
632
636
|
position_hint: "Zwischen dem ersten und dem letzten Block kommen die speziellen Feldoptionen eines Artikeltypen"
|
|
633
637
|
foldable_hint: "Kann man den Bereich auf und zu klappen?"
|
|
634
638
|
closed_hint: "Ist der Bereich beim Laden geschlossen?"
|
|
@@ -44,6 +44,8 @@ en:
|
|
|
44
44
|
div: "I accept AGB & Privacy Policy *"
|
|
45
45
|
submit: "Sign-up"
|
|
46
46
|
active_admin:
|
|
47
|
+
template:
|
|
48
|
+
as: "Templates"
|
|
47
49
|
redirector:
|
|
48
50
|
as: "Redirections"
|
|
49
51
|
article_url:
|
|
@@ -629,6 +631,8 @@ en:
|
|
|
629
631
|
as: "Article types"
|
|
630
632
|
general: "General"
|
|
631
633
|
article_fields: "Article fields"
|
|
634
|
+
default_template: "Default Layout"
|
|
635
|
+
templates: "Available Templates"
|
|
632
636
|
position_hint: "Field options of article type between first and last block"
|
|
633
637
|
foldable_hint: "Is this part foldable?"
|
|
634
638
|
closed_hint: "Is this part closed on load?"
|
data/lib/goldencobra/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: goldencobra
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marco Metz
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2018-03-
|
|
13
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rails
|
|
@@ -2603,6 +2603,7 @@ files:
|
|
|
2603
2603
|
- app/models/goldencobra/articletype.rb
|
|
2604
2604
|
- app/models/goldencobra/articletype_field.rb
|
|
2605
2605
|
- app/models/goldencobra/articletype_group.rb
|
|
2606
|
+
- app/models/goldencobra/articletype_template.rb
|
|
2606
2607
|
- app/models/goldencobra/author.rb
|
|
2607
2608
|
- app/models/goldencobra/comment.rb
|
|
2608
2609
|
- app/models/goldencobra/domain.rb
|
|
@@ -2617,6 +2618,7 @@ files:
|
|
|
2617
2618
|
- app/models/goldencobra/role.rb
|
|
2618
2619
|
- app/models/goldencobra/role_user.rb
|
|
2619
2620
|
- app/models/goldencobra/setting.rb
|
|
2621
|
+
- app/models/goldencobra/template.rb
|
|
2620
2622
|
- app/models/goldencobra/tracking.rb
|
|
2621
2623
|
- app/models/goldencobra/upload.rb
|
|
2622
2624
|
- app/models/goldencobra/vita.rb
|
|
@@ -2694,6 +2696,7 @@ files:
|
|
|
2694
2696
|
- config/initializers/sass_load_path.rb
|
|
2695
2697
|
- config/initializers/settings.rb
|
|
2696
2698
|
- config/initializers/sidekiq.rb.tmpl
|
|
2699
|
+
- config/initializers/templates.rb
|
|
2697
2700
|
- config/locales/active_admin.de.yml
|
|
2698
2701
|
- config/locales/active_admin.en.yml
|
|
2699
2702
|
- config/locales/active_admin.zh-CN.yml
|
|
@@ -2717,6 +2720,8 @@ files:
|
|
|
2717
2720
|
- db/migrate/20160527083745_add_state_to_goldencobra_articles.rb
|
|
2718
2721
|
- db/migrate/20160614074840_create_goldencobra_article_urls.rb
|
|
2719
2722
|
- db/migrate/20160704070529_add_showindexarticles_to_goldencobra_articles.rb
|
|
2723
|
+
- db/migrate/20180308124139_create_goldencobra_templates.rb
|
|
2724
|
+
- db/migrate/20180308124302_create_goldencobra_articletype_templates.rb
|
|
2720
2725
|
- db/seeds.rb
|
|
2721
2726
|
- lib/generators/goldencobra/articletype/USAGE
|
|
2722
2727
|
- lib/generators/goldencobra/articletype/articletype_generator.rb
|
|
@@ -2772,7 +2777,8 @@ files:
|
|
|
2772
2777
|
homepage: https://github.com/ikusei/Goldencobra
|
|
2773
2778
|
licenses:
|
|
2774
2779
|
- Lizenz CC BY-NC-SA 3.0
|
|
2775
|
-
metadata:
|
|
2780
|
+
metadata:
|
|
2781
|
+
changelog_uri: https://github.com/ikuseiGmbH/Goldencobra/blob/master/doc/versionhistory
|
|
2776
2782
|
post_install_message:
|
|
2777
2783
|
rdoc_options: []
|
|
2778
2784
|
require_paths:
|
|
@@ -2790,7 +2796,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
2790
2796
|
requirements:
|
|
2791
2797
|
- ImageMagick
|
|
2792
2798
|
rubyforge_project:
|
|
2793
|
-
rubygems_version: 2.5.
|
|
2799
|
+
rubygems_version: 2.5.2
|
|
2794
2800
|
signing_key:
|
|
2795
2801
|
specification_version: 4
|
|
2796
2802
|
summary: Basic CMS based on Rails engines
|