forked from bofh/fetsite
themen fix + remote form für themen
This commit is contained in:
@@ -4,5 +4,5 @@
|
||||
<br/>
|
||||
|
||||
<%= link_to 'Edit', edit_frage_path(frage) %> |
|
||||
<%= link_to 'Destroy',frage, method: :delete, data: { confirm: 'Are you sure?' } %>
|
||||
<%= link_to 'Destroy',frage, method: :delete, :remote=> true , data: { confirm: 'Are you sure?' } %>
|
||||
</p>
|
||||
|
||||
3
app/views/fragen/_liste.html.erb
Normal file
3
app/views/fragen/_liste.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<% @fragen.each do |frage| %>
|
||||
<%= render frage %>
|
||||
<% end %>
|
||||
12
app/views/fragen/_rform.html.erb
Normal file
12
app/views/fragen/_rform.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<%= tinymce_assets %>
|
||||
<%= semantic_form_for @frage , :remote=>true do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :thema %>
|
||||
<%= f.input :text, :as=>:tinymce_text%>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
1
app/views/fragen/create.js.erb
Normal file
1
app/views/fragen/create.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#fragen").html("<%=escape_javascript( render :partial=>'fragen/liste' )%>")
|
||||
Reference in New Issue
Block a user