1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/views/private_keys/_alert.html.erb

40 lines
1,015 B
Text

<% if policy(PrivateKey.new(asymmetric_key)).show_alert? %>
<% if policy(PrivateKey.new(asymmetric_key)).show? %>
<div class="alert alert-primary" role="alert">
<h4 class="alert-heading">
<%= translate '.primary_header' %>
</h4>
<hr/>
<p>
<%= translate(
'.primary_text',
delay: distance_of_time_in_words(
AsymmetricKey::PRIVATE_KEY_CLEAR_DELAY,
),
) %>
</p>
<%= link_to(
translate('.link'),
asymmetric_key_private_key_path(
asymmetric_key,
format: :key,
private_key_pem_secret: params[:private_key_pem_secret],
),
class: 'btn btn-primary',
) %>
</div>
<% else %>
<div class="alert alert-secondary" role="alert">
<h4 class="alert-heading">
<%= translate '.secondary_header' %>
</h4>
<p>
<%= translate '.secondary_text' %>
</p>
</div>
<% end %>
<% end %>