Rechtemanagement integriert in views

This commit is contained in:
Andreas Stephanides
2013-08-15 11:46:41 +02:00
parent de83a40683
commit 0f6559bce6
5 changed files with 10 additions and 6 deletions

View File

@@ -6,6 +6,7 @@
<%= link_to c.name, c %>
</li>
<% end %>
<% if can?(:verwalten,Calendar) %>
<% if request.fullpath == calendars_verwalten_path %>
<li class="active pull-right">
<% else %>
@@ -13,4 +14,5 @@
<% end %>
<%= link_to "Verwaltung", calendars_verwalten_path %>
</li>
<% end %>
</ul>

View File

@@ -27,8 +27,8 @@
</div>
<div class="row-fluid">
<div class="btn-group">
<%= link_to 'New Entry', new_calentry_path, {:class=>"btn"} %>
<%= link_to 'Edit', edit_calendar_path(@calendar), {:class=>"btn"} %>
<%= link_to 'New Entry', new_calentry_path, {:class=>"btn"} unless cannot? :new, Calendar%>
<%= link_to 'Edit', edit_calendar_path(@calendar), {:class=>"btn"} unless cannot? :edit, Calendar %>
<%= link_to 'Back', calendars_path, {:class=>"btn"} %>
</div>
</div>

View File

@@ -2,4 +2,4 @@
<%= render 'form' %>
<%= link_to 'Back', rubrik_path(@rubrik) %>
<%= link_to 'Back', rubrik_path(@rubrik) unless @rubrik.nil? %>