pretty toolbar Neuigkeiten

This commit is contained in:
Andreas Stephanides
2013-08-27 22:03:05 +02:00
parent e6a1166a2d
commit 108a27e804
6 changed files with 48 additions and 14 deletions

View File

@@ -0,0 +1,27 @@
<h1>Listing gremien</h1>
<table>
<tr>
<th>Name</th>
<th>Desc</th>
<th>Typ</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @gremien.each do |gremium| %>
<tr>
<td><%= gremium.name %></td>
<td><%= gremium.desc %></td>
<td><%= gremium.typ %></td>
<td><%= link_to 'Show', gremium %></td>
<td><%= link_to 'Edit', edit_gremium_path(gremium) %></td>
<td><%= link_to 'Destroy', gremium, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New Gremium', new_gremium_path %>

View File

@@ -8,6 +8,6 @@ Verwendung: Aufruf mit
<span class="label"><%= I18n.t("common.actions")%></span>
<div class="btn-group">
<% toolbar_elements.each do |t| %>
<%= link_to '<i class="'.html_safe+ t[:hicon].to_s.html_safe + '"></i>'.html_safe+t[:text], t[:path], :method=>t[:method], :confirm=>t[:confirm].to_s, :data=>t[:data], :class=>"btn" %>
<%= link_to '<i class="'.html_safe+ t[:hicon].to_s.html_safe + '"></i>'.html_safe+t[:text], t[:path], :method=>t[:method], :confirm=>t[:confirm].to_s, :data=>t[:data], :class=>((t[:method].to_s=='delete') ? "btn btn-danger" : "btn") %>
<% end %>
</div>

View File

@@ -1,5 +1,5 @@
<%= tinymce_assets %>
<%= semantic_form_for @neuigkeit do |f| %>
<%= semantic_form_for [@neuigkeit.rubrik,@neuigkeit] do |f| %>
<%= f.inputs do %>
<%= f.input :title, :placeholder=>"Titel" %>
<%= f.input :text, :as=>:tinymce_text %>

View File

@@ -29,4 +29,4 @@
</div>
</div>
<%= toolbar_html (@toolbar_elements) %>
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>