* Migrate to esbuild WIP * Add exclude * Remove redundant file * Move file * Move to javascript_include_tag * Lint fix * WIP * WIP * Add watch mode to esbuild WIP * Get jest working * Remove babel * Revert "Remove babel" This reverts commit 6da35260aa19d6f97f586deb66c0ecaf48433b73. * More WIP * Got image to load * WIP * Resolve audit * Lint fix * WIP * Fix jest spec * [CI] Remove asset-restore for test build stage * Production compliant * Temp disable sourcemap * Update glob * Add esbuild helper to stimulus * Import fragment * Temp disable coverage to see failing tests * Fix broken spec * Address lint * Set proper es6 target * Use esbuild for everything * wait what * Revert "Set proper es6 target" This reverts commit 98f5278093421baa8ffe2ca580845b01c1a1eadf. * Revert "Use esbuild for everything" This reverts commit 0ac46738f07ffcb6af095ccb1ffa5e439b7fefa3. * Replace uglifier with terser * New compiled assets version * Remvoe honeybadger-io/webpack * Remove cypress coverage checks for now * Update jsconfig.json * Update docker-compose * Remove public/packs-test from ci cache
56 lines
3.9 KiB
Text
56 lines
3.9 KiB
Text
<%= javascript_include_tag "admin/editUser", defer: true %>
|
|
<div class="flex relative justify-between s:justify-end gap-2 my-2 s:my-0">
|
|
<a id="tag-priority-link" href="<%= dashboard_show_user_path(username: @user.username ) %>" class="c-link c-link--block c-link--icon-alone" aria-label="<%= t("views.main.tags.aria_label") %>" title="<%= t("views.main.tags.aria_label") %>">
|
|
<%= crayons_icon_tag("dashboard-line") %>
|
|
</a>
|
|
<%= link_to t("views.admin.users.profile.visit"), @user.path, class: "c-cta", target: "_blank", rel: "noopener" %>
|
|
<div class="dropdown-trigger-container">
|
|
<button type="button" class="c-btn c-btn--icon-alone dropdown-trigger" id="options-dropdown-trigger" aria-haspopup="true" aria-expanded="false" aria-controls="options-dropdown">
|
|
<%= crayons_icon_tag("overflow-vertical", title: t("views.admin.users.profile.options.icon")) %>
|
|
</button>
|
|
<div class="crayons-dropdown right-0 left-0 s:left-auto" id="options-dropdown">
|
|
<ul class="p-0">
|
|
<% if @user.access_locked? %>
|
|
<li><%= link_to t("views.admin.users.profile.locked.unlock"), unlock_access_admin_user_path(@user), method: :patch, class: "c-link c-link--block" %></li>
|
|
<% end %>
|
|
<li><button type="button" class="c-btn w-100 align-left" data-modal-title="<%= t("views.admin.users.export.heading", user: @user.name) %>" data-modal-size="small" data-modal-content-selector="#export-data"><%= t("views.admin.users.profile.options.export") %></button></li>
|
|
<li><button type="button" class="c-btn w-100 align-left" data-modal-title="<%= t("views.admin.users.merge.heading") %>" data-modal-size="small" data-modal-content-selector="#merge-accounts"><%= t("views.admin.users.profile.options.merge") %></button></li>
|
|
<% if @user.articles_count > 0 %>
|
|
<li>
|
|
<button type="button"
|
|
class="c-btn w-100 align-left"
|
|
data-modal-title="<%= t("views.admin.users.unpublish.heading") %>"
|
|
data-modal-size="small"
|
|
data-modal-content-selector="#unpublish-all-posts"
|
|
data-form-action="<%= unpublish_all_articles_admin_user_path(@user) %>"
|
|
data-user-name="<%= @user.name %>"><%= t("views.admin.users.profile.options.unpublish") %></button>
|
|
</li>
|
|
<% end %>
|
|
<% if @user.identities.any? %>
|
|
<li><button type="button" class="c-btn w-100 align-left" data-modal-title="<%= t("views.admin.users.social.heading") %>" data-modal-size="medium" data-modal-content-selector="#remove-social-accounts"><%= t("views.admin.users.profile.options.remove_social") %></button></li>
|
|
<% end %>
|
|
<li>
|
|
<button type="button"
|
|
class="c-btn c-btn--destructive w-100 align-left"
|
|
data-modal-title="<%= t("views.admin.users.banish.heading", user: @user.name) %>"
|
|
data-modal-size="small"
|
|
data-modal-content-selector="#banish-for-spam"
|
|
data-form-action="<%= banish_admin_user_path(@user) %>"
|
|
data-user-name="<%= @user.name %>"
|
|
data-banishable-user="<%= @banishable_user %>"><%= t("views.admin.users.profile.options.banish") %></button>
|
|
</li>
|
|
<li><button type="button" class="c-btn c-btn--destructive w-100 align-left" data-modal-title="<%= t("views.admin.users.delete.heading", user: @user.name) %>" data-modal-size="small" data-modal-content-selector="#delete-user"><%= t("views.admin.users.profile.options.delete") %></button></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<%# These are contents for modals %>
|
|
<div class="hidden">
|
|
<%= render "admin/users/show/profile/actions/export" %>
|
|
<%= render "admin/users/show/profile/actions/merge" %>
|
|
<%= render "admin/users/modals/unpublish_modal" %>
|
|
<%= render "admin/users/show/profile/actions/social_accounts" %>
|
|
<%= render "admin/users/modals/banish_modal" %>
|
|
<%= render "admin/users/show/profile/actions/delete" %>
|
|
</div>
|