2019-11-28 06:16:25 +08:00
|
|
|
<% provide(:head_title, t("users.settings.account.connected_accounts.head_title")) %>
|
2020-07-13 20:51:51 +08:00
|
|
|
<% provide(:container_class, "no-second-nav-container") %>
|
2019-11-28 06:16:25 +08:00
|
|
|
|
|
|
|
<%= render partial: "users/settings/sidebar.html.erb" %>
|
2020-07-13 20:51:51 +08:00
|
|
|
<div class="tab-content user-account-connected-accounts">
|
2019-11-28 06:16:25 +08:00
|
|
|
<div class="tab-pane tab-pane-settings active" role="tabpanel">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12 col-sm-12">
|
2020-07-13 20:51:51 +08:00
|
|
|
<h1 class="connected-accounts-title"><%= t('users.settings.account.connected_accounts.title') %></h1>
|
2023-02-14 23:50:15 +08:00
|
|
|
<% if @linked_accounts.present? %>
|
2019-11-28 06:16:25 +08:00
|
|
|
<% @linked_accounts.each do |provider| %>
|
2023-02-14 23:50:15 +08:00
|
|
|
<% settings = ApplicationSettings.instance %>
|
|
|
|
<% if provider == 'giot_connect' || settings.values['azure_ad_apps']&.find { |v| v['provider_name'] == provider } %>
|
2019-11-28 06:16:25 +08:00
|
|
|
<% if lookup_context.exists?(provider, 'users/settings/account/connected_accounts', true) %>
|
|
|
|
<%= render partial: provider %>
|
|
|
|
<% else %>
|
|
|
|
<%= render partial: 'azure_ad', locals: { provider: provider } %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<h5>
|
|
|
|
<i><%= t('users.settings.account.connected_accounts.not_connected') %></i>
|
|
|
|
</h5>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="tab-pane tab-pane-settings" role="tabpanel"></div>
|
|
|
|
</div>
|