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

37 lines
852 B
Text
Raw Normal View History

2019-09-13 15:15:58 -04:00
<% if policy(PrivateKey.new(asymmetric_key)).show? %>
2019-09-13 16:04:19 -04:00
<div class="alert alert-primary" role="alert">
2019-09-13 15:15:58 -04:00
<h4 class="alert-heading">
2019-09-13 16:03:18 -04:00
<%= translate '.primary_header' %>
2019-09-13 15:15:58 -04:00
</h4>
<hr/>
<p>
<%= translate(
2019-09-13 16:03:18 -04:00
'.primary_text',
2019-09-13 15:15:58 -04:00
delay: distance_of_time_in_words(AsymmetricKey::PRIVATE_KEY_CLEAR_DELAY),
) %>
</p>
<%= link_to(
translate('.link'),
2019-09-14 15:29:24 -04:00
asymmetric_key_private_key_path(
2019-09-13 15:15:58 -04:00
asymmetric_key,
format: :key,
private_key_pem_secret: params[:private_key_pem_secret],
),
2019-09-13 16:04:19 -04:00
class: 'btn btn-primary',
2019-09-13 15:15:58 -04:00
) %>
</div>
2019-09-13 16:02:31 -04:00
<% else %>
<div class="alert alert-secondary" role="alert">
<h4 class="alert-heading">
<%= translate '.secondary_header' %>
</h4>
<p>
<%= translate '.secondary_text' %>
</p>
</div>
2019-09-13 15:15:58 -04:00
<% end %>