Show maximum number of document reached notice only when current user has document creations permissions.

This commit is contained in:
Senén Rodero Rodríguez
2017-07-24 18:51:00 +02:00
parent c438e510c0
commit 593da5e76b
2 changed files with 12 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
<% if documents.any? %>
<% if documents.size == max_documents_allowed %>
<% if documents.size == max_documents_allowed && can?(:create, Document) %>
<div class="row documents-list">
<div class="small-12 column">
<div class="callout primary text-center">