forked from bofh/fetsite
AutoCommit Don Jul 2 13:03:01 CEST 2015
This commit is contained in:
@@ -115,6 +115,7 @@ class BeispieleController < ApplicationController
|
|||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @beispiel.update_attributes(params[:beispiel])
|
if @beispiel.update_attributes(params[:beispiel])
|
||||||
format.html { redirect_to @backlink, notice: 'Beispiel was successfully updated.' }
|
format.html { redirect_to @backlink, notice: 'Beispiel was successfully updated.' }
|
||||||
|
format.js {render action: "show"}
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
else
|
else
|
||||||
format.html { render action: "edit" }
|
format.html { render action: "edit" }
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
alert("<%=@beispiel.divid%>");
|
|
||||||
$("<%= '#' + @beispiel.divid %>").replaceWith("<%= escape_javascript render @beispiel %>");
|
$("<%= '#' + @beispiel.divid %>").replaceWith("<%= escape_javascript render @beispiel %>");
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
<div id="<%= beispiel.divid %>" class="contentbox">
|
<div id="<%= beispiel.divid %>" class="contentbox">
|
||||||
<%= semantic_form_for @beispiel, :html => { :multipart => true } do |f| %>
|
<%= semantic_form_for @beispiel, :html => { :multipart => true }, :remote=>true do |f| %>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span5" >
|
<div class="span5" >
|
||||||
<%= f.input :name, label: false %> <%=f.input :datum , :as => :datetimepicker, :label=> false %>
|
<%= f.input :name, label: false %> <%=f.input :datum , :as => :string, :label=> false %>
|
||||||
|
<%= f.input :desc, label: false %>
|
||||||
|
|
||||||
<b><%link_to ffi1_icon("note20")+" " + beispiel_form.name + " " + I18n.l(beispiel_form.datum), beispiel_form.beispieldatei.url, title: beispiel_form.desc %></b>
|
<b><%link_to ffi1_icon("note20")+" " + beispiel_form.name + " " + I18n.l(beispiel_form.datum), beispiel_form.beispieldatei.url, title: beispiel_form.desc %></b>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
alert("<%=@beispiel.divid%>");
|
|
||||||
$("<%= '#' + @beispiel.divid %>").replaceWith("<%= escape_javascript render(partial: "beispiele/beispiel_form", object: @beispiel, locals: {:beispiel=> @beispiel}) %>")
|
$("<%= '#' + @beispiel.divid %>").replaceWith("<%= escape_javascript render(partial: "beispiele/beispiel_form", object: @beispiel, locals: {:beispiel=> @beispiel}) %>")
|
||||||
|
|||||||
Reference in New Issue
Block a user