We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc7ccb3 commit 385cfaeCopy full SHA for 385cfae
app/views/better_together/calendars/index.html.erb
@@ -1,9 +1,11 @@
1
<div class="container mt-5">
2
<h1 class="mb-4 text-center"><i class="fas fa-calendar-alt"></i> Calendars</h1>
3
4
- <div class="text-center my-4">
5
- <%= link_to "New calendar", new_calendar_path, class: "btn btn-success" %>
6
- </div>
+ <% if policy(resource_class).create? %>
+ <div class="text-center my-4">
+ <%= link_to "New calendar", new_calendar_path, class: "btn btn-success" %>
7
+ </div>
8
+ <% end %>
9
10
<div id="better_together_calendars" class="row row-cols-1 row-cols-md-2 g-4">
11
<%= render @calendars %>
0 commit comments