diff --git a/app/controllers/themen_controller.rb b/app/controllers/themen_controller.rb
index a8d9aef..8c5558a 100644
--- a/app/controllers/themen_controller.rb
+++ b/app/controllers/themen_controller.rb
@@ -97,7 +97,13 @@ class ThemenController < ApplicationController
respond_to do |format|
if @thema.save
- format.html { redirect_to @thema, notice: I18n.t("thema.updated") }
+ format.html {
+ if params["button"]=="continue"
+ render action: "edit", notice: I18n.t("thema.updated")
+ else
+ redirect_to @thema, notice: I18n.t("thema.updated")
+ end
+ }
format.json { head :no_content }
format.js
else
diff --git a/app/inputs/datetimepicker_input.rb b/app/inputs/datetimepicker_input.rb
index 5654827..b26804c 100644
--- a/app/inputs/datetimepicker_input.rb
+++ b/app/inputs/datetimepicker_input.rb
@@ -1,19 +1,21 @@
class DatetimepickerInput < FormtasticBootstrap::Inputs::StringInput
def input_html_options
- super
- super.merge(:class => "datetimepicker",:value=>builder.to_s)
+ s=super
+ value=builder.object.send(method)
+ value=I18n.l(value) unless value.nil?
+ super.merge(:class => "datetimepicker",:value=>value)
end
def html_options
super
-
+
end
def wrapper_html_options
super.merge(:class=>"")
#super.merge(:class=>"datepicker",'date-date-format'.to_sym=>"%d.%m.%Y")
end
def controls_wrapper_html_options
- super.merge(:class=> " date input-append", 'data-date'.to_sym =>I18n.l(Date.today()).to_s, 'data-date-format'.to_sym=>I18n.t('date.formats.default-picker'), 'data-time-format'.to_sym=>"hh:mm" ,)
+ super.merge(:class=> " date input-append", 'data-date'.to_sym =>I18n.l(Date.today()).to_s, 'data-date-format'.to_sym=>I18n.t('date.formats.default-picker'))
end
def to_html
bootstrap_wrapping do
diff --git a/app/views/themen/_form.html.erb b/app/views/themen/_form.html.erb
index cb241d7..c952921 100644
--- a/app/views/themen/_form.html.erb
+++ b/app/views/themen/_form.html.erb
@@ -1,4 +1,5 @@
<%= tinymce_assets %>
+
<%= semantic_form_for @thema, :remote=>remote do |f| %>
<%= f.inputs do %>
@@ -17,8 +18,8 @@
<%= f.actions do %>
- <%= f.action :submit, :as => :button %>
- <%= f.action :submit, :as => :button, :label=> "&edit", :params=>{edit: true} %>
+ <%= f.action :submit, :as => :button, :label=> I18n.t("thema.save" ) %>
+ <%= f.action :submit, :as => :button, :label=> I18n.t("thema.savecont"), :button_html=>{:value=>"continue"} %>
<%= f.action :cancel, :as => :link %>
<% end %>
<% end %><% end %>
diff --git a/app/views/themen/_select.html.erb b/app/views/themen/_select.html.erb
index 2ddb1f9..a693ec0 100644
--- a/app/views/themen/_select.html.erb
+++ b/app/views/themen/_select.html.erb
@@ -23,10 +23,7 @@
-<% unless @thema.id.nil? %>
-<% @att_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('attachment.add'), :path=>new_thema_attachment_path(@thema),:remote=>true}] %>
-
-
-<%= render :partial=>'layouts/pretty_toolbar', :object=>@att_elements %>
-<% end %>
+
+
+
diff --git a/app/views/themen/edit.html.erb b/app/views/themen/edit.html.erb
index 10d69ea..3518641 100644
--- a/app/views/themen/edit.html.erb
+++ b/app/views/themen/edit.html.erb
@@ -1,5 +1,5 @@
-
Editing thema
-<%= render 'form' , :locals=>{:remote=>false}, :remote=>false %>
+<%= I18n.t("thema.edit")%>
+<%= render 'form', :locals=>{:remote=>false}, :remote=>false %>
<%= link_to 'Back', @thema %>
diff --git a/config/locales/themen.de.yml b/config/locales/themen.de.yml
index ed8c3bf..6f5de2e 100644
--- a/config/locales/themen.de.yml
+++ b/config/locales/themen.de.yml
@@ -14,6 +14,8 @@ de:
edit: "Thema bearbeiten"
remove: "Thema löschen"
manage: "Thema verwalten"
+ save: "Thema speichern"
+ savecont: "Thema zwischenspeichern"
created: "Thema erfolgreich erstellt"
updated: "Thema erfolgreich gespeichert"
sure: "Sicher, dass Sie dieses Thema löschen möchten?"
@@ -42,8 +44,8 @@ de:
text: "Antwort"
thema: "Thema"
hints:
- thema:
- title: "Überschrift"
+
+
activerecord:
errors:
models: