Use present? instead of any?. Handles nil case.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3736 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e417d755e9
commit
a7b80fcc06
|
@ -70,7 +70,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
|
<% if authorize_for('issue_relations', 'new') || @issue.relations.present? %>
|
||||||
<hr />
|
<hr />
|
||||||
<div id="relations">
|
<div id="relations">
|
||||||
<%= render :partial => 'relations' %>
|
<%= render :partial => 'relations' %>
|
||||||
|
@ -79,14 +79,14 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if @changesets.any? %>
|
<% if @changesets.present? %>
|
||||||
<div id="issue-changesets">
|
<div id="issue-changesets">
|
||||||
<h3><%=l(:label_associated_revisions)%></h3>
|
<h3><%=l(:label_associated_revisions)%></h3>
|
||||||
<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
|
<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @journals.any? %>
|
<% if @journals.present? %>
|
||||||
<div id="history">
|
<div id="history">
|
||||||
<h3><%=l(:label_history)%></h3>
|
<h3><%=l(:label_history)%></h3>
|
||||||
<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
|
<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
<%= render :partial => 'issues/sidebar' %>
|
<%= render :partial => 'issues/sidebar' %>
|
||||||
|
|
||||||
<% if User.current.allowed_to?(:add_issue_watchers, @project) ||
|
<% if User.current.allowed_to?(:add_issue_watchers, @project) ||
|
||||||
(@issue.watchers.any? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
|
(@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
|
||||||
<div id="watchers">
|
<div id="watchers">
|
||||||
<%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
|
<%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue