forked from bofh/fetsite
themengruppen verwalten form
This commit is contained in:
@@ -1,41 +1,32 @@
|
||||
<%= tinymce_assets %>
|
||||
<%= semantic_form_for @thema do |f| %>
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<%= semantic_form_for @thema, :remote=>true do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<%= f.input :title %>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<%= f.input :themengruppe %>
|
||||
<%= f.input :text, :as=>:tinymce_text%>
|
||||
<% end %>
|
||||
<%= tinymce %>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<%= f.input :text, :as=>:tinymce_text,:label=>false %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Attachments:</h2>
|
||||
<%= render :partial => "themen/select", :object => @thema,:locals =>{ :editor => :true} %>
|
||||
</div>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
|
||||
<!--
|
||||
<% @thema.attachments.each do |attachment| %>
|
||||
<ul>
|
||||
<li>
|
||||
<%= link_to attachment.name, edit_thema_attachment_path(@thema,attachment) %>
|
||||
<button type="button" onclick="insertAttachment(<%="\"" + attachment.datei.url + "\""%>,<%="\""+attachment.name+"\""%>)">Insert Me!</button>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%= f.action :cancel, :as => :link %>
|
||||
<% end %>
|
||||
<% end %><% end %>
|
||||
<%= tinymce %>
|
||||
<h2>Attachments:</h2>
|
||||
<%= render :partial => "themen/select", :object => @thema,:locals =>{ :editor => :true} %>
|
||||
|
||||
|
||||
<% end %>
|
||||
-->
|
||||
<!--
|
||||
|
||||
<script>
|
||||
function insertAttachment(url) {
|
||||
|
||||
tinymce.activeEditor.setContent(tinymce.activeEditor.getContent({format : 'raw'}) + "Test");
|
||||
//editor.setContent(editor.getContent + "<img src=\"" + url + "\">")
|
||||
}
|
||||
</script>
|
||||
|
||||
-->
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
</br>
|
||||
|
||||
<% unless @thema.id.nil? %>
|
||||
<% @att_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('attachment.add'), :path=>new_thema_attachment_path(@thema)}] %>
|
||||
|
||||
<% @att_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('attachment.add'), :path=>new_thema_attachment_path(@thema),:remote=>true}] %>
|
||||
<div id="attachmentform">
|
||||
</div>
|
||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@att_elements %>
|
||||
<% end %>
|
||||
<br/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="themaview">
|
||||
<h1>Editing thema</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
</div>
|
||||
</br><%= link_to 'Back', @thema %>
|
||||
|
||||
@@ -11,18 +11,14 @@
|
||||
-->
|
||||
<%= render :partial=>'layouts/pretty_toolbar' %>
|
||||
|
||||
<h2>FAQs:</h2>
|
||||
<div id="fragen">
|
||||
<%= render :partial=>'fragen/liste' %>
|
||||
</div>
|
||||
<% @frage=Frage.new; @frage.thema=@thema %>
|
||||
<%= render :partial=>'fragen/rform' %>
|
||||
<% @frage_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('frage.add'), :path=>new_frage_path}] %>
|
||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@frage_elements %>
|
||||
<%= render :partial=>'themen/fragen' %>
|
||||
<!--
|
||||
<%= link_to 'Neue Frage', new_frage_path %> <br/>
|
||||
-->
|
||||
<br/>
|
||||
|
||||
<h2><%= I18n.t('attachment.title')%>:</h2>
|
||||
<div id="attachmentform">
|
||||
</div>
|
||||
<%= link_to new_thema_attachment_path(@thema) ,:remote=>true do %> new Attachment <% end %>
|
||||
<%= render :partial => "themen/select", :object => @thema, :locals=>{:editor => :false} %>
|
||||
|
||||
Reference in New Issue
Block a user