mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 22:25:30 +08:00
62 lines
2.3 KiB
Text
62 lines
2.3 KiB
Text
<h5>
|
|
<%= t('invite_users.results.heading') %>
|
|
</h5>
|
|
<hr />
|
|
<div class="results-wrap">
|
|
<% @invite_results.each do |result| %>
|
|
<% if result[:status] == :user_exists %>
|
|
<div class="alert alert-info" role="alert">
|
|
<strong><%= result[:email] %></strong>
|
|
-
|
|
<%= t('invite_users.results.user_exists') %>
|
|
</div>
|
|
<% elsif result[:status] == :user_exists_and_in_team %>
|
|
<div class="alert alert-info" role="alert">
|
|
<strong><%= result[:email] %></strong>
|
|
-
|
|
<%= t('invite_users.results.user_exists_and_in_team',
|
|
team: result[:team].name,
|
|
role: t("user_teams.enums.role.#{result[:user_team].role}")) %>
|
|
</div>
|
|
<% elsif result[:status] == :user_exists_unconfirmed_invited_to_team %>
|
|
<div class="alert alert-info" role="alert">
|
|
<strong><%= result[:email] %></strong>
|
|
-
|
|
<%= t('invite_users.results.user_exists_unconfirmed_invited_to_team',
|
|
team: result[:team].name,
|
|
role: t("user_teams.enums.role.#{result[:user_team].role}")) %>
|
|
</div>
|
|
<% elsif result[:status] == :user_exists_invited_to_team %>
|
|
<div class="alert alert-info" role="alert">
|
|
<strong><%= result[:email] %></strong>
|
|
-
|
|
<%= t('invite_users.results.user_exists_invited_to_team',
|
|
team: result[:team].name,
|
|
role: t("user_teams.enums.role.#{result[:user_team].role}")) %>
|
|
</div>
|
|
<% elsif result[:status] == :user_created %>
|
|
<div class="alert alert-success" role="alert">
|
|
<strong><%= result[:email] %></strong>
|
|
-
|
|
<%= t('invite_users.results.user_created') %>
|
|
</div>
|
|
<% elsif result[:status] == :user_created_invited_to_team %>
|
|
<div class="alert alert-success" role="alert">
|
|
<strong><%= result[:email] %></strong>
|
|
-
|
|
<%= t('invite_users.results.user_created_invited_to_team',
|
|
team: result[:team].name,
|
|
role: t("user_teams.enums.role.#{result[:user_team].role}")) %>
|
|
</div>
|
|
<% elsif result[:status] == :user_invalid %>
|
|
<div class="alert alert-danger" role="alert">
|
|
<strong><%= result[:email] %></strong>
|
|
-
|
|
<%= t('invite_users.results.user_invalid') %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
<% if @too_many_emails %>
|
|
<%= t('invite_users.results.too_many_emails', nr: Constants::INVITE_USERS_LIMIT) %>
|
|
<% end %>
|
|
</div>
|