thmen nur rendern wenn erlaubt
This commit is contained in:
@@ -6,8 +6,8 @@ Verwendung: Aufruf mit
|
|||||||
-->
|
-->
|
||||||
<% toolbar_elements = !pretty_toolbar.nil? ? pretty_toolbar : @toolbar_elements %>
|
<% toolbar_elements = !pretty_toolbar.nil? ? pretty_toolbar : @toolbar_elements %>
|
||||||
<% unless toolbar_elements.nil? || toolbar_elements.empty? %>
|
<% unless toolbar_elements.nil? || toolbar_elements.empty? %>
|
||||||
<span class="label"><%= I18n.t("common.actions")%></span>
|
<!--<span class="label"><% I18n.t("common.actions")%></span>
|
||||||
<div class="btn-group">
|
--><div class="btn-group">
|
||||||
<% toolbar_elements.each do |t| %>
|
<% toolbar_elements.each do |t| %>
|
||||||
<% unless t[:method]==:versions %>
|
<% unless t[:method]==:versions %>
|
||||||
<% text='<i class="'.html_safe+ t[:hicon].to_s.html_safe + '"></i>'.html_safe+t[:text] %>
|
<% text='<i class="'.html_safe+ t[:hicon].to_s.html_safe + '"></i>'.html_safe+t[:text] %>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<% if can? :show, small %>
|
||||||
<a name="thema_<%=small.id%>" href="#<%=small.id%>">
|
<a name="thema_<%=small.id%>" href="#<%=small.id%>">
|
||||||
<h2><%= small.title %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %></h2>
|
<h2><%= small.title %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %></h2>
|
||||||
</a>
|
</a>
|
||||||
@@ -30,3 +31,6 @@
|
|||||||
@small_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('thema.edit'), :path=>small} if can? :edit, small
|
@small_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('thema.edit'), :path=>small} if can? :edit, small
|
||||||
@small_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('thema.remove'), :path=>small, :method=>:delete,:confirm=>I18n.t('thema.sure')} if can? :delete, small %>
|
@small_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('thema.remove'), :path=>small, :method=>:delete,:confirm=>I18n.t('thema.sure')} if can? :delete, small %>
|
||||||
<% render :partial=>'layouts/pretty_toolbar', :object=>@small_elements unless @small_elements.empty? %>
|
<% render :partial=>'layouts/pretty_toolbar', :object=>@small_elements unless @small_elements.empty? %>
|
||||||
|
<% else %>
|
||||||
|
Error
|
||||||
|
<% end %>
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
<%= thema.title%>
|
<%= thema.title if can? :show , thema %>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user