* Test with Grid layout * Use Flexbox * Replace with utility classes * Wire up Tools -> Emails * Stash: will rebase with a better commit message * Fix transition between Email and Tools component * Refactor Verify Email Ownership button a bit * Use respond_to for verify_email_ownership * Wrap the Preact Snackbar controller in Stimulus and use it from users/tools/email_controller * Add HTML5 validation to EmailComponent * Validation and cleanup * Add Email history list and fix styling * Additional styling cleanups * Add error handling * Close panel after email operations * Actually use <local-time> GitHub time element correctly * Add specs for Tools component and controller * Email to Emails * Add tests for Admin::Users::Tools::EmailsComponent * Fix bug with ToolsComponent instantiation in ToolsController * Add notes to show page * Add ToolsComponent css * Use Rails UJS instead of manual Stimulus to connect remote helpers * Make Notes section come alive by adding its code * Make Credits section come alive by adding its code * Go back to vertical flex * Finalize small restructuring of credits code * Simplify ToolsComponent instantiation * Add basic Add user to org functionality * Make update user permissions form work * Make remove user from org work * Use generic Stimulus AjaxController to cleanup code * Use Stimulus AjaxController for NotesComponent * Use Stimulus AjaxController for CreditsComponent * Use Stimulus AjaxController for OrganizationsController * Add Admin::Users::Tools::ReportsComponent * Do not display snackbar message if there is no message * Add Admin::Users::Tools::ReactionsComponent * Fix EmailsComponent spec * Add CreditsComponent tests * Fix quotes * Add OrganizationsComponent specs * Add ReportsComponent spec * Add ReactionsComponent spec * Fix rubocop violation * Fix ToolsComponent specs * Remove unused variable * More tests * Use keyword argument for ToolsComponent * Fill in Tools requests specs * Use Rspec shared_examples for ToolsController and EmailsController * Add tests for Admin::Users::Tools::CreditsController * Add tests for Admin::Users::Tools::NotesController * Add tests for Admin::Users::Tools::OrganizationsController * Add tests for Admin::Users::Tools::ReactionsController and ReportsController * Fix bugs and add tests to Admin::OrganizationMembershipsController * Add comments to deprecated sections of the UsersController * Fix bugs and add tests to Admin::UsersController #send_email and #verify_email_ownership * Add User model tests * Feature flag fixes * Add Cypress Tools - Emails tests * Add Cypress Tools - Notes tests * Add Cypress Tools - Credits tests * Add Cypress Tools - Organizations tests * Add Cypress Tools - Reports and Reactions tests * Mark the replace target as a polite region * Update view_component gem * Tiny fixes * Fix spec * Wrap component rendering in render_component * Move user.related_negative_reactions to a Reaction scope * Move user.reports to a FeedbackMessage scope * Move user.last_verification_date as EmailAuthorization class method * Revert encapsulation to private * Fix boxes backlinks names * Add keyboard focus styling to boxes * Remove duplicate styling * Remove duplicated header element * Improve heading hiearchy * Fix <legend> and labels * Backlink should be Tools not Users * Announce section change to screen reader and fix focus * Fix specs * Add focus style for backlinks * Enable email sending in e2e mode * Use Settings instead of env variable
72 lines
3.2 KiB
Text
72 lines
3.2 KiB
Text
<%# This is where the component loaded from the server side will insert itself %>
|
|
<div data-user-target="replace" role="region"></div>
|
|
|
|
<section class="crayons-card p-3 js-component tools-component" data-user-target="toolsComponent">
|
|
<%# Used to announce to the screen reader client side which section the user is in %>
|
|
<div id="section-title" class="hidden">Tools section</div>
|
|
|
|
<h3 class="crayons-subtitle-2">Tools</h3>
|
|
|
|
<div class="crayons-card__body grid grid-cols-2 grid-rows-3 gap-3">
|
|
<%= link_to admin_user_tools_emails_path(@user), remote: true,
|
|
data: { action: "ajax:success->user#replacePartial" },
|
|
class: "crayons-card box js-action" do %>
|
|
<h4 class="crayons-subtitle-3 mb-4">Emails</h4>
|
|
|
|
<span class="color-base-70">
|
|
<%= pluralize(@emails.total, "past email") %>
|
|
<% if @emails.verified %> - Verified<% end -%>
|
|
</span>
|
|
<% end %>
|
|
|
|
<%= link_to admin_user_tools_notes_path(@user), remote: true,
|
|
data: { action: "ajax:success->user#replacePartial" },
|
|
class: "crayons-card box js-action" do %>
|
|
<h4 class="crayons-subtitle-3 mb-4">Notes</h4>
|
|
|
|
<span class="color-base-70">
|
|
<%= pluralize(@notes.total, "note") %>
|
|
</span>
|
|
<% end %>
|
|
|
|
<%= link_to admin_user_tools_credits_path(@user), remote: true,
|
|
data: { action: "ajax:success->user#replacePartial" },
|
|
class: "crayons-card box js-action" do %>
|
|
<h4 class="crayons-subtitle-3 mb-4">Credits</h4>
|
|
|
|
<span class="color-base-70">
|
|
<%= pluralize(@credits.total, "credit") %>
|
|
</span>
|
|
<% end %>
|
|
|
|
<%= link_to admin_user_tools_organizations_path(@user), remote: true,
|
|
data: { action: "ajax:success->user#replacePartial" },
|
|
class: "crayons-card box js-action" do %>
|
|
<h4 class="crayons-subtitle-3 mb-4">Organizations</h4>
|
|
|
|
<span class="color-base-70">
|
|
<%= pluralize(@organizations.total, "organization") %>
|
|
</span>
|
|
<% end %>
|
|
|
|
<%= link_to admin_user_tools_reports_path(@user), remote: true,
|
|
data: { action: "ajax:success->user#replacePartial" },
|
|
class: "crayons-card box js-action" do %>
|
|
<h4 class="crayons-subtitle-3 mb-4">Reports</h4>
|
|
|
|
<span class="color-base-70">
|
|
<%= pluralize(@reports.total, "report") %>
|
|
</span>
|
|
<% end %>
|
|
|
|
<%= link_to admin_user_tools_reactions_path(@user), remote: true,
|
|
data: { action: "ajax:success->user#replacePartial" },
|
|
class: "crayons-card box js-action" do %>
|
|
<h4 class="crayons-subtitle-3 mb-4">Reactions</h4>
|
|
|
|
<span class="color-base-70">
|
|
<%= pluralize(@reactions.total, "reaction") %>
|
|
</span>
|
|
<% end %>
|
|
</div>
|
|
</section>
|