diff --git a/app/models/neuigkeit.rb b/app/models/neuigkeit.rb
index c8170f1..cec9114 100755
--- a/app/models/neuigkeit.rb
+++ b/app/models/neuigkeit.rb
@@ -31,8 +31,8 @@ class Neuigkeit < ActiveRecord::Base
default_scope order(:cache_order)
scope :recent, -> { published.limit(10)}
- scope :unpublished, -> {where("datum > ? OR datum IS NULL", Date.today)}
- scope :published_scope, ->{where("datum <= ? AND datum IS NOT NULL", Date.today)}
+ scope :unpublished, -> {where("datum > ? OR datum IS NULL", Time.now)}
+ scope :published_scope, ->{where("datum <= ? AND datum IS NOT NULL", Time.now)}
scope :public, ->{includes(:rubrik).where("rubriken.public"=>true)}
scope :intern, ->{includes(:rubrik).where("rubriken.public"=>false)}
@@ -74,7 +74,7 @@ class Neuigkeit < ActiveRecord::Base
self.rubrik.public
end
def published?
- self.datum_nilsave<=Time.now.
+ self.datum_nilsave<=Time.now
end
def publish
diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb
index f367a44..2d51a43 100644
--- a/app/views/documents/show.html.erb
+++ b/app/views/documents/show.html.erb
@@ -1,11 +1,12 @@
-
<%= link_to "Back to parent" , @document.parent, class: "btn" %>
+<%= link_to "PDF", document_path(@document, :format=>"pdf"),class: "btn" %>
<%= link_to ff_icon("icon-pencil") + "Edit", write_document_path(@document), class: "btn" %>
<%= link_to ff_icon("icon-refresh")+"Refresh from Etherpad", read_from_etherpad_document_path(@document), class: "btn" if @document.is_etherpad? %>
<%= link_to "Copy Document to Etherpad", dump_to_etherpad_document_path(@document) , confirm: "Sicher? Löscht alle Änderungen im Etherpad" , class: "btn" %>
<%= link_to 'Delete', @document, method: :delete, data: { confirm: 'Are you sure?' } , remote: true, class: "btn btn-danger" if can? :delete, @document %>
+
<%= @document.name %>
diff --git a/config/application.rb b/config/application.rb
index eccce65..3de221a 100755
--- a/config/application.rb
+++ b/config/application.rb
@@ -29,7 +29,7 @@ module Fetsite
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
- # config.time_zone = 'Central Time (US & Canada)'
+ config.time_zone = 'Vienna' #'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]