CHANGE: Themengruppe verwenden pretty_toolbar

This commit is contained in:
HausdorffHimself
2013-09-01 21:07:09 +02:00
parent 489dc933a2
commit 65b287d613
4 changed files with 28 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ class ThemengruppenController < ApplicationController
# GET /themengruppen.json # GET /themengruppen.json
def index def index
@themengruppen = Themengruppe.all @themengruppen = Themengruppe.all
@toolbar_elements = [{:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('themengruppe.new'), :path=>new_themengruppe_path()}]
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
@@ -14,6 +15,8 @@ class ThemengruppenController < ApplicationController
# GET /themengruppen/1.json # GET /themengruppen/1.json
def show def show
@themengruppe = Themengruppe.find(params[:id]) @themengruppe = Themengruppe.find(params[:id])
@toolbar_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('themengruppe.edit'), :path=>edit_themengruppe_path(@themengruppe)}]
@toolbar_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('themengruppe.remove'), :path=>themengruppe_path(@themengruppe), :method=>:delete,:confirm=>I18n.t('themengruppe.sure')}
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb

View File

@@ -2,5 +2,7 @@
<%= render 'form' %> <%= render 'form' %>
<!--
<%= link_to 'Show', @themengruppe %> | <%= link_to 'Show', @themengruppe %> |
<%= link_to 'Back', themengruppen_path %> <%= link_to 'Back', themengruppen_path %>
-->

View File

@@ -1,20 +1,22 @@
<div class="container-fluid"> <div class="container-fluid">
<% @themengruppen.each_slice(2) do |row| %> <% @themengruppen.each_slice(2) do |row| %>
<div class="row-fluid"> <div class="row-fluid">
<% row.each do |themengruppe| %> <% row.each do |themengruppe| %>
<div class="span6 equalheight"> <div class="span6 equalheight">
<div class="container-fluid"> <div class="container-fluid">
<%= render themengruppe %> <%= render themengruppe %>
<br/> <br/>
<div class="row-fluid"> <div class="row-fluid">
<%= link_to 'Edit', edit_themengruppe_path(themengruppe) %> <!--
</div> <%= link_to 'Edit', edit_themengruppe_path(themengruppe) %>
</div> -->
<br/>
</div>
<% end %>
</div> </div>
<% end %> </div>
<br/>
</div>
<% end %>
</div>
<% end %>
</div> </div>
<br/> <br/>
@@ -25,4 +27,7 @@
--> -->
</script> </script>
<%= render :partial=>'layouts/pretty_toolbar' %>
<!--
<%= link_to 'New Themengruppe', new_themengruppe_path %> <%= link_to 'New Themengruppe', new_themengruppe_path %>
-->

View File

@@ -25,6 +25,8 @@
<br/><br/> <br/><br/>
<!--
<%= link_to 'Edit', edit_themengruppe_path(@themengruppe) %> | <%= link_to 'Edit', edit_themengruppe_path(@themengruppe) %> |
<%= link_to 'Back', themengruppen_path %> <%= link_to 'Back', themengruppen_path %>
-->
<%= render :partial=>'layouts/pretty_toolbar' %>