scinote-web/app/views/shared/_dialog.html.erb
artoscinote 401a32edd9
Implement failed snapshot pop-up on task screen [SCI-6612] (#3950)
* Implement failed snapshot pop-up on task screen [SCI-6612]

* Copy change [SCI-6612]

* Proper handling of snapshot transition error [SCI-6612]

* Move modal auto open logic to JS file [SCI-6612]

* Remove unnecessary .html_safe [SCI-6612]
2022-04-04 11:04:03 +02:00

32 lines
1.1 KiB
Text

<div id="<%= id %>" class="sci-dialog modal fade <%= 'modal-auto-open' if defined?(shown) && shown %>" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title"><%= title %></h4>
</div>
<div class="modal-body">
<div class="sci-dialog__icon <%= type %>">
<% case type %>
<% when 'error', 'warning' %>
<i class="fas fa-exclamation-triangle"></i>
<% when 'info' %>
<i class="fas fa-info"></i>
<% when 'success' %>
<i class="fas fa-check-circle"></i>
<% else %>
<i class="fas fa-info"></i>
<% end %>
</div>
<div class="sci-dialog__body">
<%= body %>
</div>
</div>
<div class="modal-footer text-center">
<button type="button"
class="btn btn-primary"
data-dismiss="modal"><%= defined?(button_text) ? button_text : t('general.okay') %></button>
</div>
</div>
</div>
</div>