2016-11-06 18:29:00 +08:00
|
|
|
<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>
|
2017-01-25 19:01:23 +08:00
|
|
|
<% elsif result[:status] == :user_exists_and_in_team %>
|
2016-11-06 18:29:00 +08:00
|
|
|
<div class="alert alert-info" role="alert">
|
|
|
|
<strong><%= result[:email] %></strong>
|
|
|
|
-
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= t('invite_users.results.user_exists_and_in_team',
|
2022-04-15 21:31:08 +08:00
|
|
|
team: result[:team].name,
|
2017-01-25 19:01:23 +08:00
|
|
|
role: t("user_teams.enums.role.#{result[:user_team].role}")) %>
|
2016-11-06 18:29:00 +08:00
|
|
|
</div>
|
2017-01-25 19:01:23 +08:00
|
|
|
<% elsif result[:status] == :user_exists_unconfirmed_invited_to_team %>
|
2016-11-06 18:29:00 +08:00
|
|
|
<div class="alert alert-info" role="alert">
|
|
|
|
<strong><%= result[:email] %></strong>
|
|
|
|
-
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= t('invite_users.results.user_exists_unconfirmed_invited_to_team',
|
2022-04-15 21:31:08 +08:00
|
|
|
team: result[:team].name,
|
2017-01-25 19:01:23 +08:00
|
|
|
role: t("user_teams.enums.role.#{result[:user_team].role}")) %>
|
2016-11-06 18:29:00 +08:00
|
|
|
</div>
|
2017-01-25 19:01:23 +08:00
|
|
|
<% elsif result[:status] == :user_exists_invited_to_team %>
|
2016-11-06 18:29:00 +08:00
|
|
|
<div class="alert alert-info" role="alert">
|
|
|
|
<strong><%= result[:email] %></strong>
|
|
|
|
-
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= t('invite_users.results.user_exists_invited_to_team',
|
2022-04-15 21:31:08 +08:00
|
|
|
team: result[:team].name,
|
2017-01-25 19:01:23 +08:00
|
|
|
role: t("user_teams.enums.role.#{result[:user_team].role}")) %>
|
2016-11-06 18:29:00 +08:00
|
|
|
</div>
|
|
|
|
<% elsif result[:status] == :user_created %>
|
|
|
|
<div class="alert alert-success" role="alert">
|
|
|
|
<strong><%= result[:email] %></strong>
|
|
|
|
-
|
|
|
|
<%= t('invite_users.results.user_created') %>
|
|
|
|
</div>
|
2017-01-25 19:01:23 +08:00
|
|
|
<% elsif result[:status] == :user_created_invited_to_team %>
|
2016-11-06 18:29:00 +08:00
|
|
|
<div class="alert alert-success" role="alert">
|
|
|
|
<strong><%= result[:email] %></strong>
|
|
|
|
-
|
2017-01-25 19:01:23 +08:00
|
|
|
<%= t('invite_users.results.user_created_invited_to_team',
|
2022-04-15 21:31:08 +08:00
|
|
|
team: result[:team].name,
|
2017-01-25 19:01:23 +08:00
|
|
|
role: t("user_teams.enums.role.#{result[:user_team].role}")) %>
|
2016-11-06 18:29:00 +08:00
|
|
|
</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 %>
|
2017-01-25 19:01:23 +08:00
|
|
|
</div>
|