goldencobra 1.2.8 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. data/README.markdown +1 -1
  2. data/app/assets/javascripts/goldencobra/active_admin.js +25 -2
  3. data/app/controllers/goldencobra/application_controller.rb +1 -1
  4. data/app/controllers/goldencobra/articles_controller.rb +4 -2
  5. data/app/controllers/goldencobra/sessions_controller.rb +2 -0
  6. data/app/helpers/goldencobra/articles_helper.rb +3 -1
  7. data/app/models/goldencobra/article.rb +11 -9
  8. data/app/models/goldencobra/upload.rb +1 -0
  9. data/app/views/goldencobra/admin/articles/_layout_sidebar.html.erb +25 -8
  10. data/app/views/goldencobra/admin/articles/_select_article_type.html.erb +2 -2
  11. data/app/views/goldencobra/articles/_domain.html.erb +1 -0
  12. data/app/views/goldencobra/articles/sitemap.xml.builder +5 -0
  13. data/app/worker/articles_cache_worker.rb +2 -0
  14. data/config/initializers/geocoder.rb +3 -1
  15. data/config/initializers/liquid_tags.rb +21 -0
  16. data/config/locales/active_admin.de.yml +3 -1
  17. data/config/locales/active_admin.en.yml +2 -0
  18. data/config/locales/activerecord.en.yml +6 -0
  19. data/config/locales/goldencobra.de.yml +23 -22
  20. data/db/seeds.rb +5 -5
  21. data/lib/generators/goldencobra/articletype/articletype_generator.rb +4 -0
  22. data/lib/generators/goldencobra/articletype/templates/initializer.rb +2 -0
  23. data/lib/generators/goldencobra/templates/views/articletypes/default/_sitemap.xml.builder +7 -0
  24. data/lib/goldencobra/select_current_client.rb +2 -0
  25. data/lib/goldencobra/version.rb +1 -1
  26. metadata +12 -12
  27. data/config/locales/article_types.de.yml +0 -23
  28. data/config/locales/article_types.en.yml +0 -23
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Build Status](https://secure.travis-ci.org/ikusei/Goldencobra.png)](http://travis-ci.org/ikusei/Goldencobra)
4
4
 
5
- This Project is under development
5
+ This Project is still under development
6
6
 
7
7
  #Powered by
8
8
  - ActiveAdmin
@@ -30,6 +30,29 @@ $(function() {
30
30
  }
31
31
  });
32
32
 
33
+ if (typeof tinyMCESetting_theme_advanced_blockformats === 'undefined') {
34
+ var tinyMCESetting_theme_advanced_blockformats = "p,h1,h2,h3,div"
35
+ }
36
+
37
+ $('textarea.tinymce-no-buttons').tinymce({
38
+ script_url: "/assets/goldencobra/tiny_mce.js",
39
+ mode : "textareas",
40
+ theme : "advanced",
41
+ theme_advanced_buttons1 : "",
42
+ theme_advanced_buttons2 : "",
43
+ theme_advanced_buttons3 : "",
44
+ theme_advanced_toolbar_location : "top",
45
+ theme_advanced_toolbar_align : "center",
46
+ theme_advanced_resizing : false,
47
+ relative_urls : true,
48
+ convert_urls : false,
49
+ theme_advanced_blockformats : tinyMCESetting_theme_advanced_blockformats,
50
+ plugins : "autolink,paste",
51
+ dialog_type : "modal",
52
+ paste_auto_cleanup_on_paste : true
53
+ });
54
+
55
+
33
56
  $('textarea.tinymce').tinymce({
34
57
  script_url: "/assets/goldencobra/tiny_mce.js",
35
58
  mode : "textareas",
@@ -42,7 +65,7 @@ $(function() {
42
65
  theme_advanced_resizing : false,
43
66
  relative_urls : true,
44
67
  convert_urls : false,
45
- theme_advanced_blockformats : "p,h1,h2,h3,div",
68
+ theme_advanced_blockformats : tinyMCESetting_theme_advanced_blockformats,
46
69
  plugins : "fullscreen,autolink,paste",
47
70
  dialog_type : "modal",
48
71
  paste_auto_cleanup_on_paste : true
@@ -60,7 +83,7 @@ $(function() {
60
83
  theme_advanced_resizing : false,
61
84
  relative_urls : true,
62
85
  convert_urls : false,
63
- theme_advanced_blockformats : "p,h1,h2,h3,div",
86
+ theme_advanced_blockformats : tinyMCESetting_theme_advanced_blockformats,
64
87
  plugins : "fullscreen,autolink,paste,table",
65
88
  dialog_type : "modal",
66
89
  paste_auto_cleanup_on_paste : true,
@@ -61,7 +61,7 @@ module Goldencobra
61
61
  else
62
62
  d = Goldencobra::Domain.main
63
63
  if d.present? && @current_client.present? && @current_client.id != d.id
64
- meta_tags[:canonical] = "http://#{d.hostname}#{current_article.public_url}"
64
+ meta_tags[:canonical] = "http://#{d.hostname}#{d.url_prefix}#{current_article.public_url(false)}"
65
65
  end
66
66
  end
67
67
 
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Goldencobra
2
4
  class ArticlesController < Goldencobra::ApplicationController
3
5
  layout "application"
@@ -166,11 +168,11 @@ module Goldencobra
166
168
 
167
169
  # ------------------ associated models ------------------------------------
168
170
  def can_load_associated_model?
169
- @article.article_type.present? && @article.article_type_form_file != "Default" && @article_type = @article.send(@article.article_type_form_file.downcase.to_sym)
171
+ @article.article_type.present? && @article.article_type_form_file != "Default" && @article_type = @article.send(@article.article_type_form_file.underscore.parameterize.downcase.to_sym)
170
172
  end
171
173
 
172
174
  def load_associated_model_into_liquid
173
- Goldencobra::Article::LiquidParser["#{@article.article_type_form_file.downcase}"] = @article_type
175
+ Goldencobra::Article::LiquidParser["#{@article.article_type_form_file.underscore.parameterize.downcase}"] = @article_type
174
176
  end
175
177
 
176
178
  # ------------------ /associated models -----------------------------------
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Goldencobra
2
4
  class SessionsController < Goldencobra::ApplicationController
3
5
  layout "application"
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Goldencobra
2
4
  module ArticlesHelper
3
5
 
@@ -71,7 +73,7 @@ module Goldencobra
71
73
 
72
74
  def render_article_type_content(options={})
73
75
  if @article && @article.article_type.present? && @article.kind_of_article_type.present?
74
- render :partial => "articletypes/#{@article.article_type_form_file.downcase}/#{@article.kind_of_article_type.downcase}"
76
+ render :partial => "articletypes/#{@article.article_type_form_file.underscore.parameterize.downcase}/#{@article.kind_of_article_type.downcase}"
75
77
  else
76
78
  render :partial => "articletypes/default/show"
77
79
  end
@@ -287,8 +287,8 @@ module Goldencobra
287
287
 
288
288
  # Gets the related object by article_type
289
289
  def get_related_object
290
- if self.article_type.present? && self.article_type_form_file.present? && self.respond_to?(self.article_type_form_file.downcase)
291
- return self.send(self.article_type_form_file.downcase)
290
+ if self.article_type.present? && self.article_type_form_file.present? && self.respond_to?(self.article_type_form_file.underscore.parameterize.downcase)
291
+ return self.send(self.article_type_form_file.underscore.parameterize.downcase)
292
292
  else
293
293
  return nil
294
294
  end
@@ -321,7 +321,7 @@ module Goldencobra
321
321
  end
322
322
  end
323
323
  #include related models
324
- @list_of_articles = @list_of_articles.includes("#{self.article_type_form_file.downcase}") if self.respond_to?(self.article_type_form_file.downcase)
324
+ @list_of_articles = @list_of_articles.includes("#{self.article_type_form_file.underscore.parameterize.downcase}") if self.respond_to?(self.article_type_form_file.underscore.parameterize.downcase)
325
325
  #get articles with tag
326
326
  if self.index_of_articles_tagged_with.present?
327
327
  @list_of_articles = @list_of_articles.tagged_with(self.index_of_articles_tagged_with.split(",").map{|t| t.strip}, on: :tags, any: true)
@@ -462,7 +462,9 @@ module Goldencobra
462
462
 
463
463
  # Gibt Consultant | Subsidiary | etc. zurück je nach Seitentyp
464
464
  def article_type_form_file
465
- self.article_type.split(" ").first if self.article_type.present?
465
+ if self.article_type.present?
466
+ self.article_type.split(" ")[0..-2].join("")
467
+ end
466
468
  end
467
469
 
468
470
  # Gibt Index oder Show zurück, je nach Seitentyp
@@ -473,7 +475,7 @@ module Goldencobra
473
475
  # Liefert Kategorienenamen für sie Suche unabhängig ob Die Seite eine show oder indexseite ist
474
476
  def article_type_for_search
475
477
  if self.article_type.present?
476
- self.article_type.split(" ").first
478
+ self.article_type.split(" ")[0..-2].join("")
477
479
  else
478
480
  "Article"
479
481
  end
@@ -531,8 +533,8 @@ module Goldencobra
531
533
 
532
534
  #Datum für den RSS reader, Datum ist created_at es sei denn ein Articletype hat ein published_at definiert
533
535
  def published_at
534
- if self.article_type.present? && self.article_type_form_file.present? && self.respond_to?(self.article_type_form_file.downcase)
535
- related_object = self.send(self.article_type_form_file.downcase)
536
+ if self.article_type.present? && self.article_type_form_file.present? && self.respond_to?(self.article_type_form_file.underscore.parameterize.downcase)
537
+ related_object = self.send(self.article_type_form_file.underscore.parameterize.downcase)
536
538
  if related_object && related_object.respond_to?(:published_at)
537
539
  related_object.published_at
538
540
  else
@@ -705,8 +707,8 @@ module Goldencobra
705
707
  file_name_path = File.join(path_to_articletypes,name)
706
708
  if File.directory?(file_name_path)
707
709
  Dir.foreach(file_name_path) do |sub_name|
708
- file_name = "#{name}#{sub_name}" if File.exist?(File.join(file_name_path,sub_name)) && (sub_name =~ /^_(?!edit).*/) == 0
709
- results << file_name.split(".").first.to_s.titleize if file_name.present?
710
+ file_name = "#{name.titleize.gsub(' ','')}#{sub_name.titleize}" if File.exist?(File.join(file_name_path,sub_name)) && (sub_name =~ /^_(?!edit).*/) == 0
711
+ results << file_name.split(".").first if file_name.present?
710
712
  end
711
713
  end
712
714
  end
@@ -48,6 +48,7 @@ module Goldencobra
48
48
  result << "#{self.image_file_name} " if self.image_file_name.present?
49
49
  result << "(#{self.source}, #{self.rights}) " if self.source.present? || self.rights.present?
50
50
  result << "- #{self.updated_at.strftime("%d.%m.%Y - %H:%M Uhr")}"
51
+ return result
51
52
  end
52
53
 
53
54
  def unzip_files
@@ -1,11 +1,28 @@
1
1
  <div class="layout-sidebar">
2
2
  <h5>
3
- Artikel-Seitentyp: <%= I18n.t(@article.article_type.split(' ').first.to_s.strip, :scope => [:goldencobra, :article_types], :default => @article.article_type.split(' ').first) %>
3
+ Artikel-Seitentyp: <%= I18n.t(@article.article_type.split(' ').first.to_s.strip, :scope => [:goldencobra, :article_types], :default => @article.article_type.split(' ').first) %>
4
4
  </h5>
5
- <%= semantic_form_for ["admin", @article], :html => {:id => "goldencobra_events_article_event_modul"} do |f| %>
6
- <ul>
7
- <%= f.input :template_file, :as => :select, :collection => Goldencobra::Article.templates_for_select, :include_blank => false %>
8
- </ul>
9
- <p><br/><%= f.submit t("submit_layout", :scope => [:active_admin, :sidebars]) %></p>
10
- <% end %>
11
- </div>
5
+ <% article_types = {} %>
6
+ <% Goldencobra::Article.article_types_for_select.each do |article_type| %>
7
+ <% translated_article_type = I18n.t(article_type.parameterize.underscore.downcase, scope: [:goldencobra, :article_types], default: article_type) %>
8
+ <% article_types[translated_article_type.to_sym] = article_type %>
9
+ <% end %>
10
+
11
+ <%= form_tag change_articletype_admin_article_path(@article.id) do %>
12
+ <%= select_tag :new_article_type, options_for_select(article_types.sort, @article.article_type), :include_blank => false %>
13
+ <br/><br/>
14
+ <%= submit_tag "Artikeltyp zuweisen", id: "submit_widgets_partial" %>
15
+ <% end %>
16
+ <br/>
17
+ <hr>
18
+ <br/>
19
+
20
+ <%= semantic_form_for ["admin", @article], :html => {:id => "goldencobra_events_article_event_modul"} do |f| %>
21
+ <h5>
22
+ <%= I18n.t(@article.article_type.split(' ').first.to_s.strip, :scope => [:activerecord, :models, "goldencobra/article"], :default => "Layout der Seite") %>
23
+ </h5>
24
+ <%= f.select :template_file, Goldencobra::Article.templates_for_select, :include_blank => false %>
25
+ <br/><br/>
26
+ <%= f.submit t("submit_layout", :scope => [:active_admin, :sidebars]) %>
27
+ <% end %>
28
+ </div>
@@ -1,11 +1,11 @@
1
1
  <% article_types = {} %>
2
2
 
3
3
  <% Goldencobra::Article.article_types_for_select.each do |article_type|
4
- translated_article_type = I18n.t(article_type.parameterize.downcase, scope: [:article_types], default: article_type)
4
+ translated_article_type = I18n.t(article_type.parameterize.underscore.downcase, scope: [:goldencobra, :article_types], default: article_type)
5
5
  article_types[translated_article_type.to_sym] = article_type
6
6
  end %>
7
7
 
8
- <%= f.inputs I18n.t(:selection, scope: [:article_types]), :class => "foldable inputs" do
8
+ <%= f.inputs I18n.t(:selection, scope: [:articles]), :class => "foldable inputs" do
9
9
  if article_types.count > 0
10
10
  f.input :article_type, :label => "Artikeltyp", :as => :select, :collection => article_types.sort, include_blank: true
11
11
  end
@@ -0,0 +1 @@
1
+ <%= Goldencobra::Domain.current.hostname %><%= Goldencobra::Domain.current.url_prefix %>
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  xml.instruct! :xml, :version => '1.0', :encoding => 'UTF-8'
2
4
  xml.urlset :xmlns => 'http://www.sitemaps.org/schemas/sitemap/0.9' do
3
5
  @articles.each do |article|
@@ -7,4 +9,7 @@ xml.urlset :xmlns => 'http://www.sitemaps.org/schemas/sitemap/0.9' do
7
9
  xml.priority 0.5
8
10
  end
9
11
  end
12
+ if File.exists?(File.join(::Rails.root, "app", "views", "articletypes", "default", "_sitemap.xml.builder"))
13
+ render :partial => "articletypes/default/sitemap.xml.builder"
14
+ end
10
15
  end
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  class ArticlesCacheWorker
2
4
  include Sidekiq::Worker
3
5
  sidekiq_options queue: "default"
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  Geocoder::Configuration.always_raise << Geocoder::OverQueryLimitError
2
4
  Geocoder::Configuration.lookup = :google
3
5
  #Geocoder::Configuration.api_key = "AIzaSyCFREOloLh2CTRpELzzGJJSEPV-LKyAfjY"
@@ -7,4 +9,4 @@ Geocoder::Configuration.use_https = false
7
9
  Geocoder::Configuration.language = :de
8
10
  #Geocoder::Configuration.cache = Redis.new
9
11
 
10
- Geokit::Geocoders::google = ""
12
+ #Geokit::Geocoders::google = ""
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  class PartialRenderer < Liquid::Tag
2
4
  #include ActionController::RequestForgeryProtection
3
5
  def self.description
@@ -27,6 +29,25 @@ end
27
29
  Liquid::Template.register_tag('render_partial', PartialRenderer)
28
30
 
29
31
 
32
+ class DomainUrl < Liquid::Tag
33
+ #include ActionController::RequestForgeryProtection
34
+ def self.description
35
+ "gibt die aktuelle domain mit url prefix aus"
36
+ end
37
+
38
+ def self.usage
39
+ "{% domain %} => www.xyz.de/url_prefix"
40
+ end
41
+
42
+ def initialize(tag_name, message, tokens)
43
+ super
44
+ end
45
+
46
+ def render(context)
47
+ ActionController::Base.new.render_to_string(:partial => "/goldencobra/articles/domain", :layout => false, :locals => {:context => context} )
48
+ end
49
+ end
50
+ Liquid::Template.register_tag('domain', DomainUrl)
30
51
 
31
52
  # {% navigation_menue 3 | id: css_id_name, class_name: test %}
32
53
  class NavigationRenderer < Liquid::Tag
@@ -22,6 +22,8 @@ de:
22
22
  list: "auflisten"
23
23
  create: "erstellen"
24
24
  active_admin:
25
+ menue:
26
+ settings: "Einstellungen"
25
27
  dashboard: Übersicht
26
28
  dashboard_welcome:
27
29
  welcome: "Willkommen in Active Admin. Dies ist die Standard-Übersichtsseite."
@@ -65,7 +67,7 @@ de:
65
67
  widgets_options: "Schnipsel-Optionen"
66
68
  startpage_options: "Startseiten-Optionen"
67
69
  filters: "Filter"
68
- layout: "Ansicht & Layout"
70
+ layout: "Artikeltyp & Layout"
69
71
  image_module: "Bildergalerie"
70
72
  image_formates: "Bildgrößen"
71
73
  overview: "Überblick"
@@ -22,6 +22,8 @@ en:
22
22
  list: "list"
23
23
  create: "create"
24
24
  active_admin:
25
+ menue:
26
+ settings: "Settings"
25
27
  dashboard: Dashboard
26
28
  dashboard_welcome:
27
29
  welcome: "Welcome to Active Admin. This is the default dashboard page."
@@ -10,6 +10,12 @@ en:
10
10
  goldencobra/comment:
11
11
  one: "Comment"
12
12
  other: "Comments"
13
+ author:
14
+ one: "Author"
15
+ other: "Authors"
16
+ goldencobra/author:
17
+ one: "Author"
18
+ other: "Authors"
13
19
  import:
14
20
  one: "Import"
15
21
  other: "Imports"
@@ -1,6 +1,7 @@
1
1
  de:
2
2
  articles:
3
3
  read_on: 'weiterlesen'
4
+ selection: "Artikel"
4
5
  goldencobra:
5
6
  article_types:
6
7
  Chairman: "Vorstand"
@@ -15,25 +16,25 @@ de:
15
16
  Pressrelease: "Pressemitteilung"
16
17
  Default: "Standard"
17
18
  Partner: "Partner"
18
- consultant-index: "Berater Übersicht"
19
- consultant-show: "Berater Einzelseite"
20
- report-index: "Nachrichten Übersicht"
21
- report-show: "Nachrichten Einzelseite"
22
- subsidiary-index: "Niederlassung Übersicht"
23
- subsidiary-show: "Niederlassung Einzelseite"
24
- event-index: "Veranstaltungen Übersicht"
25
- event-show: "Veranstaltungen Einzelseite"
26
- default-index: "Standard Übersicht"
27
- default-show: "Standard Einzelseite"
28
- pressreferent-index: "Pressereferenten Übersicht"
29
- pressreferent-show: "Pressereferenten Einzelseite"
30
- personelreferent-index: "Personalreferenten Übersicht"
31
- personelreferent-show: "Personalreferenten Einzelseite"
32
- chairman-index: "Vorstand Übersicht"
33
- chairman-show: "Vorstand Einzelseite"
34
- pressrelease-index: "Pressemitteilung Übersicht"
35
- pressrelease-show: "Pressemitteilung Einzelseite"
36
- faq-index: "FAQ Übersicht"
37
- faq-show: "FAQ Einzelseite"
38
- partner-index: "Partner Übersicht"
39
- partner-show: "Partner Einzelseite"
19
+ consultant_index: "Berater Übersicht"
20
+ consultant_show: "Berater Einzelseite"
21
+ report_index: "Nachrichten Übersicht"
22
+ report_show: "Nachrichten Einzelseite"
23
+ subsidiary_index: "Niederlassung Übersicht"
24
+ subsidiary_show: "Niederlassung Einzelseite"
25
+ event_index: "Veranstaltungen Übersicht"
26
+ event_show: "Veranstaltungen Einzelseite"
27
+ default_index: "Standard Übersicht"
28
+ default_show: "Standard Einzelseite"
29
+ pressreferent_index: "Pressereferenten Übersicht"
30
+ pressreferent_show: "Pressereferenten Einzelseite"
31
+ personelreferent_index: "Personalreferenten Übersicht"
32
+ personelreferent_show: "Personalreferenten Einzelseite"
33
+ chairman_index: "Vorstand Übersicht"
34
+ chairman_show: "Vorstand Einzelseite"
35
+ pressrelease_index: "Pressemitteilung Übersicht"
36
+ pressrelease_show: "Pressemitteilung Einzelseite"
37
+ faq_index: "FAQ Übersicht"
38
+ faq_show: "FAQ Einzelseite"
39
+ partner_index: "Partner Übersicht"
40
+ partner_show: "Partner Einzelseite"
@@ -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 => "12345", :password_confirmation => "12345", :firstname => "Admin", :lastname => "Goldencobra")
5
+ user = User.create!(:email => "admin@goldencobra.de", :password => "password", :password_confirmation => "password", :firstname => "Admin", :lastname => "Goldencobra")
6
6
  user.roles << admin
7
7
 
8
8
  Goldencobra::Help.delete_all
@@ -64,7 +64,7 @@ puts "footer menu created."
64
64
  ### START AND 404 PAGE ###
65
65
  puts "create start page article..."
66
66
  start = Goldencobra::Article.find_by_title("Willkommen")
67
- start = Goldencobra::Article.create!(title: "Willkommen", article_type: "Default Show", ancestry: nil, active: true, url_name: "willkommen", template_file: "application") if start.blank?
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
68
  start.mark_as_startpage!
69
69
 
70
70
  ### CONTENT PAGES ###
@@ -93,7 +93,7 @@ newsblogContent = "<article>
93
93
  </div>
94
94
  <hr>
95
95
  </article>"
96
- newsblog = Goldencobra::Article.create!(title: "News", article_type: "Default Show", ancestry: nil, active: true, content: newsblogContent, url_name: "news", template_file: "application") if newsblog.blank?
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
97
 
98
98
  datestable = Goldencobra::Article.find_by_title("Termine")
99
99
  datestableContent = "<table border='0'>
@@ -120,7 +120,7 @@ datestableContent = "<table border='0'>
120
120
  </tr>
121
121
  </tbody>
122
122
  </table>"
123
- datestable = Goldencobra::Article.create!(title: "Termine", article_type: "Default Show", ancestry: nil, active: true, content: datestableContent, url_name: "termine", template_file: "application") if datestable.blank?
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
124
 
125
125
  moreform = Goldencobra::Article.find_by_title("Weiteres")
126
126
  moreformContent = "<form method='post' data-remote='true' action='/' accept-charset='UTF-8'>
@@ -153,7 +153,7 @@ moreformContent = "<form method='post' data-remote='true' action='/' accept-char
153
153
  <input type='submit' value='Eintragen' name='commit'>
154
154
  <div class='clear'></div>
155
155
  </form>"
156
- moreform = Goldencobra::Article.create!(title: "Weiteres", article_type: "Default Show", ancestry: nil, active: true, content: moreformContent, url_name: "weiteres", template_file: "application") if moreform.blank?
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
157
 
158
158
  puts "content page articles created."
159
159
 
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Goldencobra
2
4
  module Generators
3
5
  class ArticletypeGenerator < Rails::Generators::NamedBase
@@ -5,10 +7,12 @@ module Goldencobra
5
7
  argument :model_attributes, type: :array, default: [], banner: "model:attributes"
6
8
 
7
9
  def create_articletype_files
10
+ #TODO: Check if class name already exists and abort if true
8
11
  generate("model", "#{name} #{model_attributes.join(' ')} article_id:integer")
9
12
  end
10
13
 
11
14
  def create_partials
15
+ #TODO: Check if class name already exists and abort if true
12
16
  copy_file 'index.html.erb', "app/views/articletypes/#{name.underscore}/_index.html.erb"
13
17
  copy_file 'show.html.erb', "app/views/articletypes/#{name.underscore}/_show.html.erb"
14
18
  template 'edit_show.html.erb', "app/views/articletypes/#{name.underscore}/_edit_show.html.erb"
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  Rails.application.config.to_prepare do
2
4
  Goldencobra::Article.class_eval do
3
5
  has_one :<%= name.underscore %>, :dependent => :destroy
@@ -0,0 +1,7 @@
1
+ # encoding: utf-8
2
+ # xml.url do # create the url entry, with the specified location and date
3
+ # xml.loc "http#{@use_ssl}://#{@domain_name}#{article.public_url}"
4
+ # xml.lastmod article.updated_at.strftime('%Y-%m-%d')
5
+ # xml.priority 0.5
6
+ # end
7
+
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  # Selects the client by hostname
2
4
  module Goldencobra
3
5
  module SelectCurrentClient
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Goldencobra
4
- VERSION = "1.2.8"
4
+ VERSION = "1.3.4"
5
5
  end
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: 1.2.8
4
+ version: 1.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-12-16 00:00:00.000000000 Z
13
+ date: 2014-01-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coffee-script-source
@@ -33,17 +33,17 @@ dependencies:
33
33
  requirement: !ruby/object:Gem::Requirement
34
34
  none: false
35
35
  requirements:
36
- - - '='
36
+ - - ! '>='
37
37
  - !ruby/object:Gem::Version
38
- version: 2.14.1
38
+ version: '0'
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
- - - '='
44
+ - - ! '>='
45
45
  - !ruby/object:Gem::Version
46
- version: 2.14.1
46
+ version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rvm-capistrano
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -673,17 +673,17 @@ dependencies:
673
673
  requirement: !ruby/object:Gem::Requirement
674
674
  none: false
675
675
  requirements:
676
- - - ~>
676
+ - - '='
677
677
  - !ruby/object:Gem::Version
678
- version: 1.6.7
678
+ version: 1.7.1
679
679
  type: :runtime
680
680
  prerelease: false
681
681
  version_requirements: !ruby/object:Gem::Requirement
682
682
  none: false
683
683
  requirements:
684
- - - ~>
684
+ - - '='
685
685
  - !ruby/object:Gem::Version
686
- version: 1.6.7
686
+ version: 1.7.1
687
687
  - !ruby/object:Gem::Dependency
688
688
  name: multi_json
689
689
  requirement: !ruby/object:Gem::Requirement
@@ -2223,6 +2223,7 @@ files:
2223
2223
  - app/views/goldencobra/admin/shared/_prev_item.html.erb
2224
2224
  - app/views/goldencobra/admin/users/_vita_steps.html.erb
2225
2225
  - app/views/goldencobra/articles/_bugherd.html.erb
2226
+ - app/views/goldencobra/articles/_domain.html.erb
2226
2227
  - app/views/goldencobra/articles/_edit_article_link.html.erb
2227
2228
  - app/views/goldencobra/articles/_headers.html.erb
2228
2229
  - app/views/goldencobra/articles/_navigation_menue.html.erb
@@ -2262,8 +2263,6 @@ files:
2262
2263
  - config/locales/active_admin.en.yml
2263
2264
  - config/locales/activerecord.de.yml
2264
2265
  - config/locales/activerecord.en.yml
2265
- - config/locales/article_types.de.yml
2266
- - config/locales/article_types.en.yml
2267
2266
  - config/locales/de.yml
2268
2267
  - config/locales/devise.de.yml
2269
2268
  - config/locales/devise.en.yml
@@ -2420,6 +2419,7 @@ files:
2420
2419
  - lib/generators/goldencobra/templates/seeds.rb.erb
2421
2420
  - lib/generators/goldencobra/templates/views/articletypes/default/_index.html.erb
2422
2421
  - lib/generators/goldencobra/templates/views/articletypes/default/_show.html.erb
2422
+ - lib/generators/goldencobra/templates/views/articletypes/default/_sitemap.xml.builder
2423
2423
  - lib/generators/goldencobra/templates/views/layouts/_footer.html.erb
2424
2424
  - lib/generators/goldencobra/templates/views/layouts/_header.html.erb
2425
2425
  - lib/generators/goldencobra/templates/views/layouts/_header_meta.html.erb
@@ -1,23 +0,0 @@
1
- de:
2
- article_types:
3
- selection: "Artikel"
4
- consultant-index: "Berater Übersicht"
5
- consultant-show: "Berater Einzelseite"
6
- report-index: "Nachrichten Übersicht"
7
- report-show: "Nachrichten Einzelseite"
8
- subsidiary-index: "Niederlassung Übersicht"
9
- subsidiary-show: "Niederlassung Einzelseite"
10
- event-index: "Veranstaltungen Übersicht"
11
- event-show: "Veranstaltungen Einzelseite"
12
- default-index: "Standard Übersicht"
13
- default-show: "Standard Einzelseite"
14
- pressreferent-index: "Pressereferenten Übersicht"
15
- pressreferent-show: "Pressereferenten Einzelseite"
16
- personelreferent-index: "Personalreferenten Übersicht"
17
- personelreferent-show: "Personalreferenten Einzelseite"
18
- chairman-index: "Vorstand Übersicht"
19
- chairman-show: "Vorstand Einzelseite"
20
- pressrelease-index: "Pressemitteilung Übersicht"
21
- pressrelease-show: "Pressemitteilung Einzelseite"
22
- faq-index: "FAQ Übersicht"
23
- faq-show: "FAQ Einzelseite"
@@ -1,23 +0,0 @@
1
- en:
2
- article_types:
3
- selection: "Artikel"
4
- consultant-index: "Berater Übersicht"
5
- consultant-show: "Berater Einzelseite"
6
- report-index: "Nachrichten Übersicht"
7
- report-show: "Nachrichten Einzelseite"
8
- subsidiary-index: "Niederlassung Übersicht"
9
- subsidiary-show: "Niederlassung Einzelseite"
10
- event-index: "Veranstaltungen Übersicht"
11
- event-show: "Veranstaltungen Einzelseite"
12
- default-index: "Standard Übersicht"
13
- default-show: "Standard Einzelseite"
14
- pressreferent-index: "Pressereferenten Übersicht"
15
- pressreferent-show: "Pressereferenten Einzelseite"
16
- personelreferent-index: "Personalreferenten Übersicht"
17
- personelreferent-show: "Personalreferenten Einzelseite"
18
- chairman-index: "Vorstand Übersicht"
19
- chairman-show: "Vorstand Einzelseite"
20
- pressrelease-index: "Pressemitteilung Übersicht"
21
- pressrelease-show: "Pressemitteilung Einzelseite"
22
- faq-index: "FAQ Übersicht"
23
- faq-show: "FAQ Einzelseite"