goldencobra 1.4.0 → 1.4.27
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.
- data/README.markdown +3 -2
- data/app/assets/images/goldencobra/Jcrop.gif +0 -0
- data/app/assets/javascripts/goldencobra/active_admin.js +145 -84
- data/app/assets/javascripts/goldencobra/jquery.Jcrop.min.js +22 -0
- data/app/assets/javascripts/goldencobra/jquery.color.js +661 -0
- data/app/assets/stylesheets/goldencobra/active_admin.css.scss +375 -252
- data/app/assets/stylesheets/goldencobra/{application.css → application.css.scss} +0 -0
- data/app/assets/stylesheets/goldencobra/ikusei_active_admin.scss +35 -26
- data/app/assets/stylesheets/goldencobra/jquery.Jcrop.min.css +29 -0
- data/app/controllers/goldencobra/api/v2/articles_controller.rb +221 -0
- data/app/controllers/goldencobra/api/v2/locales_controller.rb +31 -0
- data/app/controllers/goldencobra/api/v2/settings_controller.rb +31 -0
- data/app/controllers/goldencobra/articles_controller.rb +42 -16
- data/app/controllers/goldencobra/sessions_controller.rb +8 -1
- data/app/helpers/goldencobra/application_helper.rb +3 -1
- data/app/helpers/goldencobra/articles_helper.rb +14 -8
- data/app/middleware/goldencobra/handle_invalid_percent_encoding.rb +40 -0
- data/app/models/ability.rb +43 -48
- data/app/models/goldencobra/article.rb +292 -218
- data/app/models/goldencobra/article_author.rb +19 -0
- data/app/models/goldencobra/article_image.rb +2 -0
- data/app/models/goldencobra/articletype.rb +30 -28
- data/app/models/goldencobra/author.rb +5 -3
- data/app/models/goldencobra/domain.rb +2 -0
- data/app/models/goldencobra/import.rb +2 -2
- data/app/models/goldencobra/link_checker.rb +64 -0
- data/app/models/goldencobra/menue.rb +4 -2
- data/app/models/goldencobra/permission.rb +3 -1
- data/app/models/goldencobra/redirector.rb +131 -0
- data/app/models/goldencobra/setting.rb +29 -3
- data/app/models/goldencobra/upload.rb +60 -1
- data/app/models/goldencobra/url_builder.rb +58 -0
- data/app/models/goldencobra/vita.rb +4 -0
- data/app/models/goldencobra/widget.rb +10 -0
- data/app/models/user.rb +1 -1
- data/app/views/goldencobra/admin/articles/_article_type.html.erb +1 -1
- data/app/views/goldencobra/admin/articles/_articles_index.html.erb +3 -3
- data/app/views/goldencobra/admin/articles/_image_module_sidebar.html.erb +19 -7
- data/app/views/goldencobra/admin/articles/_layout_sidebar.html.erb +2 -2
- data/app/views/goldencobra/admin/articles/_link_checker.html.erb +4 -4
- data/app/views/goldencobra/admin/articles/_link_checker_index.html.erb +1 -1
- data/app/views/goldencobra/admin/articles/_select_article_type.html.erb +8 -8
- data/app/views/goldencobra/admin/articles/_sort_articles_index.html.erb +1 -1
- data/app/views/goldencobra/admin/articles/_widgets_sidebar.html.erb +2 -2
- data/app/views/goldencobra/admin/articles/toggle_expert_mode.js.erb +2 -2
- data/app/views/goldencobra/admin/settings/_index.html.erb +14 -0
- data/app/views/goldencobra/admin/settings/_key_value.html.erb +12 -0
- data/app/views/goldencobra/admin/settings/_settings_group.html.erb +14 -0
- data/app/views/goldencobra/admin/shared/_help.html.erb +12 -10
- data/app/views/goldencobra/admin/shared/_item.html.erb +4 -4
- data/app/views/goldencobra/admin/shared/_overview.html.erb +14 -4
- data/app/views/goldencobra/admin/shared/load_overviewtree.js.erb +6 -0
- data/app/views/goldencobra/admin/uploads/_jcrop.html.erb +23 -0
- data/app/views/goldencobra/articles/_edit_article_link.html.erb +1 -1
- data/app/views/goldencobra/articles/show.rss.builder +5 -0
- data/app/views/goldencobra/articles/sitemap.xml.builder +15 -1
- data/app/views/goldencobra/manage/_admin_article_management.html.erb +1 -1
- data/app/views/goldencobra/manage/_admin_article_management_content.html.erb +4 -4
- data/app/views/goldencobra/manage/render_admin_menue.html.erb +1 -0
- data/app/views/goldencobra/manage/render_admin_menue.js.erb +0 -1
- data/app/views/goldencobra/sessions/_login.html.erb +4 -4
- data/app/views/goldencobra/sessions/_register.html.erb +6 -6
- data/app/views/layouts/goldencobra/active_admin_resque.html.erb +1 -1
- data/app/worker/articles_cache_worker.rb +1 -1
- data/config/initializers/check_for_missing_articletypes.rb +40 -37
- data/config/initializers/devise.rb +3 -1
- data/config/initializers/http_validator.rb +9 -2
- data/config/initializers/liquid_tags.rb +2 -2
- data/config/locales/active_admin.de.yml +509 -3
- data/config/locales/active_admin.en.yml +580 -64
- data/config/locales/de.yml +478 -4
- data/config/locales/en.yml +406 -10
- data/config/pre-commit.rb +3 -0
- data/config/routes.rb +12 -1
- data/config/settings.yml +51 -50
- data/db/migrate/20130114154115_add_sorter_to_goldencobra_permissions.rb +4 -1
- data/db/migrate/20140204221345_add_operator_to_goldencobra_permissions.rb +5 -0
- data/db/migrate/20140411152728_add_creator_id_to_goldencobra_articles.rb +5 -0
- data/db/migrate/20140505144517_add_taggingcounter.rb +15 -0
- data/db/migrate/20140603084537_add_domain_to_goldencobra_permissions.rb +7 -0
- data/db/migrate/20140615200342_resize_link_checkfield.rb +13 -0
- data/db/migrate/20140626135753_add_externalreferee_to_goldencobra_articles.rb +6 -0
- data/db/migrate/20140702103024_add_externaldate_to_goldencobra_articles.rb +5 -0
- data/db/migrate/20140702105550_add_remoteurl_to_goldencobra_uploads.rb +5 -0
- data/db/migrate/20140702142818_add_image_gallery_type_to_goldencobra_articles.rb +5 -0
- data/db/migrate/20140819101033_add_urlpath_to_goldencobra_articles.rb +5 -0
- data/db/migrate/20141009104216_set_db_and_tables_to_utf8.rb +20 -0
- data/db/migrate/20141104115144_create_goldencobra_redirectors.rb +15 -0
- data/db/migrate/20141112124531_add_globalsorting_to_goldencobra_articles.rb +7 -0
- data/db/migrate/20141124170930_add_indiex_to_gc.rb +26 -0
- data/db/migrate/20150115111024_create_goldencobra_article_authors.rb +28 -0
- data/db/migrate/20150115134707_add_remove_author_stuff.rb +11 -0
- data/db/migrate/20150417153454_add_status_to_goldencobra_vita_steps.rb +5 -0
- data/db/seeds.rb +4 -153
- data/lib/generators/goldencobra/articletype/templates/edit_index.html.erb +1 -1
- data/lib/generators/goldencobra/articletype/templates/initializer.rb +4 -2
- data/lib/generators/goldencobra/install_generator.rb +3 -0
- data/lib/generators/goldencobra/server_generator.rb +67 -0
- data/lib/generators/goldencobra/templates/active_admin.rb.erb +3 -0
- data/lib/generators/goldencobra/templates/robots.txt +5 -0
- data/lib/generators/goldencobra/templates/views/articletypes/default/_edit_index.html.erb +9 -0
- data/lib/generators/goldencobra/templates/views/articletypes/default/_edit_show.html.erb +0 -0
- data/lib/generators/goldencobra/templates/views/articletypes/default/_index.html.erb +31 -18
- data/lib/generators/goldencobra/templates/views/articletypes/default/_show.html.erb +22 -15
- data/lib/goldencobra/engine.rb +19 -3
- data/lib/goldencobra/version.rb +1 -1
- data/lib/tasks/article_cache.rake +19 -0
- data/lib/tasks/i18n.rake +1 -1
- data/lib/tasks/import.rake +31 -3
- data/lib/tasks/link_checker.rake +4 -2
- metadata +217 -23
- data/config/locales/activerecord.de.yml +0 -227
- data/config/locales/activerecord.en.yml +0 -148
- data/config/locales/devise.de.yml +0 -54
- data/config/locales/devise.en.yml +0 -57
- data/config/locales/formtastic.de.yml +0 -10
- data/config/locales/formtastic.en.yml +0 -10
- data/config/locales/goldencobra.de.yml +0 -40
- data/config/locales/goldencobra.en.yml +0 -3
data/config/settings.yml
CHANGED
@@ -1,51 +1,52 @@
|
|
1
1
|
goldencobra:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
2
|
+
locations:
|
3
|
+
geocoding: "true"
|
4
|
+
live-support:
|
5
|
+
active: "false"
|
6
|
+
email: "metz@ikusei.de"
|
7
|
+
translations:
|
8
|
+
use_db_store: "false"
|
9
|
+
analytics:
|
10
|
+
active: "false"
|
11
|
+
timespan_in_days: "360"
|
12
|
+
bugherd:
|
13
|
+
user: "current_user"
|
14
|
+
role: "admin"
|
15
|
+
api: ""
|
16
|
+
comments:
|
17
|
+
commentator: "User"
|
18
|
+
menues:
|
19
|
+
recreate_cache: "false"
|
20
|
+
widgets:
|
21
|
+
recreate_cache: "false"
|
22
|
+
time_control: "true"
|
23
|
+
html2pdf_uid: "c5c13af822"
|
24
|
+
use_solr: "false"
|
25
|
+
page:
|
26
|
+
default_title_tag: "Enter your name to appear in Title-Tag after a pipe, e.g. Goldencobra for: YourTitle | Goldencobra - You found me in Goldencobra Settings"
|
27
|
+
default_meta_description_tag: "Enter your default MetaDescription: You found me in Goldencobra Settings"
|
28
|
+
article:
|
29
|
+
preview:
|
30
|
+
roles: "Admin"
|
31
|
+
edit_link:
|
32
|
+
user: "current_user"
|
33
|
+
role: "admin"
|
34
|
+
image_positions: "standard"
|
35
|
+
cache_articles: "false"
|
36
|
+
max_cache_24h: "false"
|
37
|
+
article_index:
|
38
|
+
link_to_article: "weiterlesen"
|
39
|
+
use_ssl: "false"
|
40
|
+
url: "Enter your website url, e.g. www.goldencobra.de - You found me in Goldencobra Settings"
|
41
|
+
facebook:
|
42
|
+
appid: "Enter your facebook app id, e.g. 123456"
|
43
|
+
opengraph_default_image: "Enter a default image path to your open-graph image if available, e.g. /assets/open-graph.png - You found me in Goldencobra Settings"
|
44
|
+
geocode_ip_address: "false"
|
45
|
+
remove_old_versions:
|
46
|
+
active: "true"
|
47
|
+
weeks: "2"
|
48
|
+
visitors:
|
49
|
+
send_confirmation_email: "false"
|
50
|
+
upload:
|
51
|
+
convert_options: "-strip -colorspace sRGB -flatten"
|
52
|
+
random_logo_url: ""
|
@@ -1,5 +1,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
class AddSorterToGoldencobraPermissions < ActiveRecord::Migration
|
2
4
|
def change
|
3
|
-
#
|
5
|
+
# das hier ist schon in der Migration CreateGoldencobraPermissions enthalten
|
6
|
+
# add_column :goldencobra_permissions, :sorter_id, :integer, :default => 0
|
4
7
|
end
|
5
8
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class AddTaggingcounter < ActiveRecord::Migration
|
4
|
+
def up
|
5
|
+
unless column_exists? :tags, :taggings_count
|
6
|
+
add_column :tags, :taggings_count, :integer
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def down
|
11
|
+
if column_exists? :tags, :taggings_count
|
12
|
+
remove_column :tags, :taggings_count
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class ResizeLinkCheckfield < ActiveRecord::Migration
|
4
|
+
def up
|
5
|
+
change_column :goldencobra_articles, :link_checker, :text, :limit => 4294967295
|
6
|
+
change_column :versions, :object, :text, :limit => 4294967295
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
change_column :goldencobra_articles, :link_checker, :text
|
11
|
+
change_column :versions, :object, :text
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class SetDbAndTablesToUtf8 < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
db_config = ActiveRecord::Base.connection.instance_values["config"]
|
4
|
+
db_name = db_config[:database]
|
5
|
+
|
6
|
+
puts "ALTER DATABASE #{db_name} TO utf8..."
|
7
|
+
execute("ALTER DATABASE #{db_name} CHARACTER SET utf8 COLLATE utf8_general_ci;")
|
8
|
+
puts "done"
|
9
|
+
|
10
|
+
ActiveRecord::Base.connection.tables.each do |table|
|
11
|
+
puts "ALTER TABLE #{table} TO utf8..."
|
12
|
+
execute("ALTER TABLE #{table} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;")
|
13
|
+
end
|
14
|
+
puts "done"
|
15
|
+
end
|
16
|
+
|
17
|
+
def down
|
18
|
+
puts "Nothing to revert..."
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class CreateGoldencobraRedirectors < ActiveRecord::Migration
|
4
|
+
def change
|
5
|
+
create_table :goldencobra_redirectors do |t|
|
6
|
+
t.text :source_url
|
7
|
+
t.text :target_url
|
8
|
+
t.integer :redirection_code, :default => 301
|
9
|
+
t.boolean :active, :default => true
|
10
|
+
t.boolean :ignore_url_params, :default => true
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class AddIndiexToGc < ActiveRecord::Migration
|
4
|
+
def change
|
5
|
+
add_index "goldencobra_articles", ["title"], :name => "index_goldencobra_articles_on_title", :quiet => true
|
6
|
+
add_index "goldencobra_articles", ["url_name"], :name => "index_goldencobra_articles_on_url_name", :quiet => true
|
7
|
+
add_index "goldencobra_articles", ["active"], :name => "index_goldencobra_articles_on_active", :quiet => true
|
8
|
+
add_index "goldencobra_articles", ["breadcrumb"], :name => "index_goldencobra_articles_on_breadcrumb", :quiet => true
|
9
|
+
add_index "goldencobra_articles", ["url_path"], :name => "index_goldencobra_articles_on_url_path", :length => 200, :quiet => true
|
10
|
+
|
11
|
+
add_index "goldencobra_menues", ["target"], :name => "index_goldencobra_articles_on_target", :quiet => true
|
12
|
+
add_index "goldencobra_menues", ["active"], :name => "index_goldencobra_articles_on_active", :quiet => true
|
13
|
+
|
14
|
+
add_index "goldencobra_redirectors", ["active"], :name => "index_goldencobra_articles_on_active", :quiet => true
|
15
|
+
add_index "goldencobra_redirectors", ["source_url"], :name => "index_goldencobra_articles_on_source_url", :length => 200, :quiet => true
|
16
|
+
add_index "goldencobra_redirectors", ["target_url"], :name => "index_goldencobra_articles_on_target_url", :length => 200, :quiet => true
|
17
|
+
|
18
|
+
add_index "goldencobra_settings", ["title", "ancestry"], :name => "index_goldencobra_articles_on_title_and_ancestry", :quiet => true
|
19
|
+
add_index "goldencobra_settings", ["title"], :name => "index_goldencobra_articles_on_title", :quiet => true
|
20
|
+
add_index "goldencobra_settings", ["ancestry"], :name => "index_goldencobra_articles_on_ancestry", :quiet => true
|
21
|
+
|
22
|
+
add_index "goldencobra_widgets", ["active"], :name => "index_goldencobra_articles_on_active", :quiet => true
|
23
|
+
add_index "goldencobra_widgets", ["title", "active"], :name => "index_goldencobra_articles_on_title_and_active", :quiet => true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
class CreateGoldencobraArticleAuthors < ActiveRecord::Migration
|
4
|
+
def up
|
5
|
+
create_table :goldencobra_article_authors do |t|
|
6
|
+
t.integer :article_id
|
7
|
+
t.integer :author_id
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
|
12
|
+
# migrate data from articles author_id to kreuztabelle
|
13
|
+
Goldencobra::Article.where("author_id IS NOT NULL").each do |article|
|
14
|
+
Goldencobra::ArticleAuthor.create(article_id: article.id, author_id: article.author_id)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def down
|
19
|
+
# migrate data from goldencobra_article_authors to articles author_id
|
20
|
+
Goldencobra::ArticleAuthor.select([:article_id, :author_id]).uniq(:article_id).each do |article_author|
|
21
|
+
a = Goldencobra::Article.find_by_id(article_author.article_id)
|
22
|
+
a.author_id = article_author.author_id
|
23
|
+
a.save
|
24
|
+
end
|
25
|
+
|
26
|
+
drop_table :goldencobra_article_authors
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddRemoveAuthorStuff < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
remove_column :goldencobra_articles, :author_id
|
4
|
+
remove_column :goldencobra_articles, :author_backup
|
5
|
+
end
|
6
|
+
|
7
|
+
def down
|
8
|
+
add_column :goldencobra_articles, :author_id, :integer
|
9
|
+
add_column :goldencobra_articles, :author_backup, :string
|
10
|
+
end
|
11
|
+
end
|
data/db/seeds.rb
CHANGED
@@ -2,7 +2,7 @@ User.delete_all
|
|
2
2
|
Goldencobra::Role.delete_all
|
3
3
|
admin = Goldencobra::Role.find_or_create_by_name("admin")
|
4
4
|
guest = Goldencobra::Role.find_or_create_by_name("guest")
|
5
|
-
user = User.create!(:email => "admin@goldencobra.de", :password => "
|
5
|
+
user = User.create!(:email => "admin@goldencobra.de", :password => "2BTGAKJxukL6AB", :password_confirmation => "2BTGAKJxukL6AB", :firstname => "Admin", :lastname => "Goldencobra")
|
6
6
|
user.roles << admin
|
7
7
|
|
8
8
|
Goldencobra::Help.delete_all
|
@@ -12,7 +12,6 @@ Goldencobra::Article.delete_all
|
|
12
12
|
|
13
13
|
Goldencobra::Article.create!(content: "Diese Seite existiert leider nicht.", url_name: "404", breadcrumb: "Seite nicht gefunden", title: "404",article_type: "Default Show")
|
14
14
|
Goldencobra::Article.create!(content: "kein Zugriff", url_name: "401", breadcrumb: "Kein Zugriff", title: "401",article_type: "Default Show")
|
15
|
-
Goldencobra::Article.create!(content: "", url_name: "search-results", breadcrumb: "Suchergebnisse", title: "Suchergebnisse",article_type: "Default Show")
|
16
15
|
|
17
16
|
Goldencobra::Permission.delete_all
|
18
17
|
Goldencobra::Permission.create(:sorter_id => 1, :role_id => Goldencobra::Role.find_by_name("admin").id, :action => "manage", :subject_class => ":all" )
|
@@ -21,156 +20,8 @@ Goldencobra::Permission.create(:sorter_id => 1, :role_id => Goldencobra::Role.fi
|
|
21
20
|
Goldencobra::Permission.create(:sorter_id => 1, :role_id => Goldencobra::Role.find_by_name("guest").id, :action => "update", :subject_class => "User", :subject_id => "user.id" )
|
22
21
|
Goldencobra::Permission.create(:sorter_id => 1, :role_id => Goldencobra::Role.find_by_name("guest").id, :action => "destroy", :subject_class => "User", :subject_id => "user.id" )
|
23
22
|
|
24
|
-
|
25
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
26
|
-
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
27
|
-
#
|
28
|
-
# Examples:
|
29
|
-
#
|
30
|
-
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
31
|
-
# Mayor.create(name: 'Emanuel', city: cities.first)
|
32
|
-
|
33
|
-
### MAIN MENU ###
|
34
|
-
puts "create main menu..."
|
35
|
-
Goldencobra::Menue.delete_all
|
36
|
-
main = Goldencobra::Menue.find_by_title("Top-Navigation")
|
37
|
-
main = Goldencobra::Menue.create!(title: "Top-Navigation", css_class: "", target: "") if main.blank?
|
38
|
-
home = Goldencobra::Menue.find_by_title("Startseite")
|
39
|
-
home = Goldencobra::Menue.create!(title: "Startseite", parent_id: main.id, css_class: "", target: "/") if home.blank?
|
40
|
-
news = Goldencobra::Menue.find_by_title("News")
|
41
|
-
news = Goldencobra::Menue.create!(title: "News", parent_id: main.id, css_class: "", target: "/news") if news.blank?
|
42
|
-
dates = Goldencobra::Menue.find_by_title("Termine")
|
43
|
-
dates = Goldencobra::Menue.create!(title: "Termine", parent_id: main.id, css_class: "", target: "/termine") if dates.blank?
|
44
|
-
more = Goldencobra::Menue.find_by_title("Weiteres")
|
45
|
-
more = Goldencobra::Menue.create!(title: "Weiteres", parent_id: main.id, css_class: "", target: "/weiteres") if more.blank?
|
46
|
-
|
47
|
-
puts "main menu created."
|
48
|
-
|
49
|
-
|
50
|
-
### FOOTER MENU ###
|
51
|
-
puts "create footer menu..."
|
52
|
-
|
53
|
-
footer = Goldencobra::Menue.find_by_title("Footer-Navigation")
|
54
|
-
footer = Goldencobra::Menue.create!(title: "Footer-Navigation", css_class: "", target: "") if footer.blank?
|
55
|
-
agb = Goldencobra::Menue.find_by_title("AGB")
|
56
|
-
agb = Goldencobra::Menue.create!(title: "AGB", parent_id: footer.id, css_class: "", target: "/agb") if agb.blank?
|
57
|
-
contact = Goldencobra::Menue.find_by_title("Kontakt")
|
58
|
-
contact = Goldencobra::Menue.create!(title: "Kontakt", parent_id: footer.id, css_class: "", target: "/kontakt") if contact.blank?
|
59
|
-
impress = Goldencobra::Menue.find_by_title("Impressum")
|
60
|
-
impress = Goldencobra::Menue.create!(title: "Impressum", parent_id: footer.id, css_class: "", target: "/impressum") if impress.blank?
|
61
|
-
|
62
|
-
puts "footer menu created."
|
63
|
-
|
64
|
-
### START AND 404 PAGE ###
|
23
|
+
### START PAGE ###
|
65
24
|
puts "create start page article..."
|
66
25
|
start = Goldencobra::Article.find_by_title("Willkommen")
|
67
|
-
start = Goldencobra::Article.create!(title: "Willkommen",breadcrumb:"Willkommen", article_type: "Default Show", ancestry: nil, active: true, url_name: "willkommen", template_file: "application") if start.blank?
|
68
|
-
start.mark_as_startpage!
|
69
|
-
|
70
|
-
### CONTENT PAGES ###
|
71
|
-
puts "create content page articles..."
|
72
|
-
|
73
|
-
newsblog = Goldencobra::Article.find_by_title("News")
|
74
|
-
newsblogContent = "<article>
|
75
|
-
<h2><a href='/news'>News 1 Überschrift</a></h2>
|
76
|
-
<div class='article-date'>
|
77
|
-
03. Januar 2013
|
78
|
-
</div>
|
79
|
-
<div>
|
80
|
-
Erste Nachricht - Inhalt:<br/>Mehrere mehrere mehrere mehrere mehrere mehrere<br/>Zeilen Zeilen Zeilen Zeilen Zeilen!
|
81
|
-
<p><a class='more' href='#'>weiterlesen</a></p>
|
82
|
-
</div>
|
83
|
-
<hr>
|
84
|
-
</article>
|
85
|
-
<article>
|
86
|
-
<h2><a href='/news'>News 2 Überschrift</a></h2>
|
87
|
-
<div class='article-date'>
|
88
|
-
01. Januar 2013
|
89
|
-
</div>
|
90
|
-
<div>
|
91
|
-
Zweite Nachricht - Inhalt:<br/>Mehrere mehrere mehrere mehrere mehrere mehrere<br/>Zeilen Zeilen Zeilen Zeilen Zeilen!
|
92
|
-
<p><a class='more' href='#'>weiterlesen</a></p>
|
93
|
-
</div>
|
94
|
-
<hr>
|
95
|
-
</article>"
|
96
|
-
newsblog = Goldencobra::Article.create!(title: "News",breadcrumb:"News", article_type: "Default Show", ancestry: nil, active: true, content: newsblogContent, url_name: "news", template_file: "application") if newsblog.blank?
|
97
|
-
|
98
|
-
datestable = Goldencobra::Article.find_by_title("Termine")
|
99
|
-
datestableContent = "<table border='0'>
|
100
|
-
<tbody>
|
101
|
-
<tr>
|
102
|
-
<td>Punkt1:</td>
|
103
|
-
<td>Eins</td>
|
104
|
-
</tr>
|
105
|
-
<tr>
|
106
|
-
<td>Punkt2:</td>
|
107
|
-
<td>Zwei</td>
|
108
|
-
</tr>
|
109
|
-
<tr>
|
110
|
-
<td>Punkt3:</td>
|
111
|
-
<td>Drei</td>
|
112
|
-
</tr>
|
113
|
-
<tr>
|
114
|
-
<td>Punkt4:</td>
|
115
|
-
<td>Vier Vier Vier Vier<br/>über über über über<br/>mehrere mehrere mehrere mehrere<br/>Zeilen</td>
|
116
|
-
</tr>
|
117
|
-
<tr>
|
118
|
-
<td>Punkt5:</td>
|
119
|
-
<td>Fünf Fünf Fünf Fünf<br/>über über über über<br/>mehrere mehrere mehrere mehrere<br/>Zeilen</td>
|
120
|
-
</tr>
|
121
|
-
</tbody>
|
122
|
-
</table>"
|
123
|
-
datestable = Goldencobra::Article.create!(title: "Termine",breadcrumb:"Termine", article_type: "Default Show", ancestry: nil, active: true, content: datestableContent, url_name: "termine", template_file: "application") if datestable.blank?
|
124
|
-
|
125
|
-
moreform = Goldencobra::Article.find_by_title("Weiteres")
|
126
|
-
moreformContent = "<form method='post' data-remote='true' action='/' accept-charset='UTF-8'>
|
127
|
-
<div class='choice'>
|
128
|
-
<ul>
|
129
|
-
<li>
|
130
|
-
<label class='' for='gender'>Anrede <span>*</span></label>
|
131
|
-
</li>
|
132
|
-
<li style='margin-left: 30px;'>
|
133
|
-
<input type='radio' value='1' name='gender' id='gender_1'>
|
134
|
-
<label for='gender_1'>Herr</label>
|
135
|
-
</li>
|
136
|
-
<li style='margin-left: 20px;'>
|
137
|
-
<input type='radio' value='0' name='gender' id='gender_0'>
|
138
|
-
<label for='gender_0'>Frau</label>
|
139
|
-
</li>
|
140
|
-
</ul>
|
141
|
-
<br>
|
142
|
-
</div>
|
143
|
-
|
144
|
-
<label for='first_name'>Vorname <span>*</span></label>
|
145
|
-
<input type='text' value='' name='first_name' id='first_name'><br>
|
146
|
-
|
147
|
-
<label for='last_name'>Nachname <span>*</span></label>
|
148
|
-
<input type='text' value='' name='last_name' id='last_name'><br>
|
149
|
-
|
150
|
-
<label for='email'>E-Mail <span>*</span></label>
|
151
|
-
<input type='text' value='' name='email' id='email'><br/>
|
152
|
-
|
153
|
-
<input type='submit' value='Eintragen' name='commit'>
|
154
|
-
<div class='clear'></div>
|
155
|
-
</form>"
|
156
|
-
moreform = Goldencobra::Article.create!(title: "Weiteres",breadcrumb:"Weiteres", article_type: "Default Show", ancestry: nil, active: true, content: moreformContent, url_name: "weiteres", template_file: "application") if moreform.blank?
|
157
|
-
|
158
|
-
puts "content page articles created."
|
159
|
-
|
160
|
-
### DEFAULT SIDEBAR WIDGET ###
|
161
|
-
puts "create default sidebar widget..."
|
162
|
-
|
163
|
-
Goldencobra::Widget.delete_all
|
164
|
-
contactwidget = Goldencobra::Widget.find_by_title("Kontakt")
|
165
|
-
contactwidgetContent = "<h3>Allgemeine Kontaktinformationen</h3>
|
166
|
-
<p>ikusei GmbH <br/>
|
167
|
-
Zossener Str. 55-58<br/>
|
168
|
-
10961 Berlin</p>
|
169
|
-
<hr>
|
170
|
-
<p>Telefon: +49 (0)30 - 7 55 66 75 2-0<br/>
|
171
|
-
Telefax: +49 (0)30 - 7 55 66 75 2-9</p>
|
172
|
-
<hr>
|
173
|
-
<p><a href='mailto:info@ikusei.de'>info@ikusei.de</a></p>"
|
174
|
-
contactwidget = Goldencobra::Widget.create!(title: "Kontakt", active: true, content: contactwidgetContent, default: true) if contactwidget.blank?
|
175
|
-
|
176
|
-
puts "default sidebar widget created."
|
26
|
+
start = Goldencobra::Article.create!(title: "Willkommen", breadcrumb: "Willkommen", article_type: "Default Show", ancestry: nil, active: true, url_name: "willkommen", template_file: "application") if start.blank?
|
27
|
+
start.mark_as_startpage!
|