Sha256: a40eb3cc30d18fd4950cbc6829d6a83de410090b1039f276b12b70e4230e3512

Contents?: true

Size: 1.25 KB

Versions: 7

Compression:

Stored size: 1.25 KB

Contents

<h2>Suggestions</h2>

<% if @approaches.length > 0 %>
  <% if @approaches.first.changes.empty? %>
    <p>No changes necessary.</p>
  <% else %>
    <p>Suggested changes (<%= link_to_function "show", "show_suggest_graph('#{serialize_changes(@approaches.first)}', '#{serialize_relevant_roles(@approaches.first)}', '#{@context}', relevant_user_ids())" %>):</p>
    <%= render "suggestion", :object => @approaches.first %>
  <% end %>
<% else %>
  <p><strong>No approach found.</strong></p>
<% end %>

<% if @approaches.length > 1 %>
  <p <%= !params[:show_all] ? '' : 'style="display: none"' %>><a href="#" onclick="$(this).up().hide();$('more-suggestions').show();return false">Show other <%= pluralize(@approaches.length - 1, 'approach') %></a></p>
  <div id="more-suggestions" <%= params[:show_all] ? '' : 'style="display: none"' %>>
    <% @approaches[1..-1].each_with_index do |approach, index| %>
      <p>
        <%= (index + 2).ordinalize %> best approach (<%= pluralize(approach.changes.length, 'step') %>, <%= link_to_function "show", "show_suggest_graph('#{serialize_changes(approach)}', '#{serialize_relevant_roles(approach)}', '#{@context}', relevant_user_ids())" %>)
        <%= render "suggestion", :object => approach %>
      </p>
    <% end %>
  </div>
<% end %>

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
stffn-declarative_authorization-0.3.1 app/views/authorization_rules/_suggestions.erb
stffn-declarative_authorization-0.3.2.1 app/views/authorization_rules/_suggestions.erb
stffn-declarative_authorization-0.3.2.2 app/views/authorization_rules/_suggestions.erb
stffn-declarative_authorization-0.3.2 app/views/authorization_rules/_suggestions.erb
tma-declarative_authorization-0.3.2.1 app/views/authorization_rules/_suggestions.erb
tma-declarative_authorization-0.3.2.2 app/views/authorization_rules/_suggestions.erb
uhees-declarative_authorization-0.3.1 app/views/authorization_rules/_suggestions.erb