diff --git a/Gemfile b/Gemfile
index 12a6f4a..a83dee3 100755
--- a/Gemfile
+++ b/Gemfile
@@ -115,3 +115,4 @@ gem 'sunspot_solr'
gem 'sitemap_generator'
gem 'whenever'
gem 'yaml_db'
+gem 'etherpad-lite'
\ No newline at end of file
diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb
index 8b28cb9..dce8233 100644
--- a/app/controllers/documents_controller.rb
+++ b/app/controllers/documents_controller.rb
@@ -1,5 +1,5 @@
class DocumentsController < ApplicationController
-
+# require('etherpad-lite')
load_and_authorize_resource
def index
respond_to do |format|
@@ -18,13 +18,64 @@ class DocumentsController < ApplicationController
end
def edit
@document = Document.find(params[:id])
-
@parent=@document.parent
-
respond_to do |format|
format.js
end
+ end
+ def dump_to_etherpad
+ @document = Document.find(params[:id])
+ @document.dump_to_etherpad
+@document.save
+# author = ether.author('author_1')
+# pad=group.pad(@document.etherpadkey)
+# pad.html='
<%= raw(@document.text) %>
-<%= semantic_form_for @document, :html=>{:class=>""} do |f| %>
- <%= f.input :text, :as=>:tinymce_text %>
-<%= f.action :submit, :as => :input_ %>
-
-<% end %>
-<%= tinymce %>
+
+
diff --git a/app/views/fragen/_form.html.erb b/app/views/fragen/_form.html.erb
index 07f8b7d..dc4ef15 100644
--- a/app/views/fragen/_form.html.erb
+++ b/app/views/fragen/_form.html.erb
@@ -1,7 +1,7 @@
<%= tinymce_assets %>
<%= semantic_form_for @frage do |f| %>
<%= f.inputs do %>
- <%= f.input :title %>
+ <%= f.input :title , :as=>:text %>
<%= f.input :thema %>
<%= f.input :text, :as=>:tinymce_text%>
<% end %>
diff --git a/app/views/fragen/_rform.html.erb b/app/views/fragen/_rform.html.erb
index b772066..db2efe0 100644
--- a/app/views/fragen/_rform.html.erb
+++ b/app/views/fragen/_rform.html.erb
@@ -1,7 +1,7 @@
<%= tinymce_assets %>
<%= semantic_form_for @frage , :remote=>true do |f| %>
<%= f.inputs do %>
- <%= f.input :title %>
+ <%= f.input :title, :as=>:text %>
<%= f.input :thema %>
<%= f.input :text, :as=>:tinymce_text%>
<% end %>
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
index c9ab07a..2f5fb3b 100755
--- a/app/views/home/index.html.erb
+++ b/app/views/home/index.html.erb
@@ -1,5 +1,6 @@
-
<%= I18n.t('home.willkommen') %>
+
<%= I18n.t('home.willkommen') %>
+<%= render partial: "themen/small", object: @starttopic %>
diff --git a/app/views/home/kontakt.html.erb b/app/views/home/kontakt.html.erb
index 68ff483..764a481 100644
--- a/app/views/home/kontakt.html.erb
+++ b/app/views/home/kontakt.html.erb
@@ -3,8 +3,5 @@
<% @themen.each do |th| %>
<%= render partial: "themen/small", object: th %>
<% end %>
-
-
-
diff --git a/app/views/layouts/_login.html.erb b/app/views/layouts/_login.html.erb
index 7a65018..133ed37 100644
--- a/app/views/layouts/_login.html.erb
+++ b/app/views/layouts/_login.html.erb
@@ -1,9 +1,17 @@
<% if user_signed_in? %>
-
Logged in as : <%= current_user.email %>
- <%= link_to('Logout', destroy_user_session_path, :method => :delete) %>
-
- <% else %>
-
- <%= link_to('Login', new_user_session_path) %>
-
- <% end %>
+
+ <%= ff_icon('icon-user')%>
+
+
+<% else %>
+
+ <%= link_to('Login', new_user_session_path) %>
+
+<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index b6c22ee..1318273 100755
Binary files a/app/views/layouts/application.html.erb and b/app/views/layouts/application.html.erb differ
diff --git a/app/views/layouts/menu.html.erb b/app/views/layouts/menu.html.erb
index 04b795c..9a6d97c 100644
--- a/app/views/layouts/menu.html.erb
+++ b/app/views/layouts/menu.html.erb
@@ -35,15 +35,18 @@
-
+ <%= render 'layouts/login' %>
+
+
-
+
+
diff --git a/app/views/meetings/_nested_form.html.erb b/app/views/meetings/_nested_form.html.erb
index dcd269e..db36946 100644
--- a/app/views/meetings/_nested_form.html.erb
+++ b/app/views/meetings/_nested_form.html.erb
@@ -8,9 +8,9 @@
<%= f.semantic_fields_for :calentry, @meeting.calentry do |ff| %>
<%= ff.input :start, :as => :datetimepicker %>
- <%= ff.input :dauer , :as => :string, :append=>"h" %>
- <%= ff.input :typ %>
- <% ff.input :object_id %>
+ <%= ff.input :ende, :as => :datetimepicker %>
+ <%= ff.input :typ %>
+ <% ff.input :object_id, :as=>:hidden %>
<% ff.input :object_type %>
<% end %>
diff --git a/app/views/rubriken/show.html.erb b/app/views/rubriken/show.html.erb
index a74232b..c3b567b 100755
--- a/app/views/rubriken/show.html.erb
+++ b/app/views/rubriken/show.html.erb
@@ -1,4 +1,6 @@
<%= content_for :header do %>
+
+
@@ -52,7 +56,6 @@
-<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
diff --git a/app/views/themen/_verw_liste.html.erb b/app/views/themen/_verw_liste.html.erb
index 920fef3..12713b2 100644
--- a/app/views/themen/_verw_liste.html.erb
+++ b/app/views/themen/_verw_liste.html.erb
@@ -9,6 +9,9 @@
-
<%= I18n.t('home.willkommen') %>
+
<%= I18n.t('home.willkommen') %>
+<%= raw(@starttopic.text) %>
+
+
diff --git a/config/routes.rb b/config/routes.rb
index 082344b..713df3d 100755
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -156,6 +156,8 @@ Fetsite::Application.routes.draw do
get :verwalten
get :sanitize
get :is_updated
+ get :documents
+ get :meetings
end
resources :attachments
end
@@ -163,7 +165,14 @@ Fetsite::Application.routes.draw do
resources :calendars
get 'verwalten/calendars', :controller=>:calendars, :action=>:verwalten, :as=>'calendars_verwalten'
resources :calentries
- resources :documents
+ resources :documents do
+ member do
+ get :write
+ get :write_etherpad
+ get :read_from_etherpad
+ get :dump_to_etherpad
+ end
+ end
resources :meetings do
member do
get :announce