<% add_decidim_page_title(t("authorizations", scope: "layouts.decidim.user_profile")) %> <% content_for(:subtitle) { t("authorizations", scope: "layouts.decidim.user_profile") } %> <% url_params = (redirect_url.present? ? { redirect_url: redirect_url } : {}) %>
<% if @granted_authorizations.any? %>
<% @granted_authorizations.each do |authorization| %> <% if authorization.renewable? %> <%= link_to "#", title: t(".show_renew_info"), data: { open: "renew-modal", "open-url": renew_modal_authorizations_path(handler: authorization.name) }, class: "card--list__item authorization-renewable" do %> <%= render partial: "granted_authorization", locals: { authorization: authorization } %> <% end %> <% elsif authorization.expired? %> <%= link_to authorization_method(authorization).root_path(**url_params), title: t(".expired_verification"), class: "card--list__item" do %> <% render partial: "granted_authorization", locals: { authorization: authorization } %> <% end %> <% else %>
<%= render partial: "granted_authorization", locals: { authorization: authorization } %>
<% end %> <% end %>
" aria-hidden="true" role="dialog">
<% end %> <% if @pending_authorizations.any? %>
<% @pending_authorizations.each do |authorization| %> <%= link_to authorization_method(authorization).resume_authorization_path(**url_params) do %>
<%= icon "reload", class: "card--list__icon", aria_label: t(".pending_verification"), role: "img" %>
<%= t("#{authorization.name}.name", scope: "decidim.authorization_handlers") %>
<%= t("started_at", scope: "decidim.authorization_handlers", timestamp: l(authorization.updated_at, format: :long)) %>
<% end %> <% end %>
<% end %> <% if unauthorized_methods.any? %>
<% unauthorized_methods.each do |unauthorized_method| %> <%= link_to unauthorized_method.root_path(**url_params) do %>
<%= icon "lock-unlocked", class: "card--list__icon", aria_label: t(".unauthorized_verification"), role: "img" %>
<%= t("#{unauthorized_method.key}.name", scope: "decidim.authorization_handlers") %>
<%= t("#{unauthorized_method.key}.explanation", scope: "decidim.authorization_handlers") %>
<% end %> <% end %>
<% end %>