* 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
73 lines
3.9 KiB
Text
73 lines
3.9 KiB
Text
<% title t("views.moderations.heading") %>
|
|
|
|
<%= javascript_include_tag "modCenter", defer: true %>
|
|
|
|
<div id="moderation-page" aria-hidden="true"></div>
|
|
|
|
<% if current_user&.trusted? %>
|
|
<div class="crayons-layout crayons-layout--2-cols" style="max-width: 1700px" id="mod-center">
|
|
<%= render "moderations/mod_sidebar_left" %>
|
|
<main class="mod-index-container articles-list crayons-layout__content">
|
|
|
|
<header class="mod-index-header hidden m:block">
|
|
<div class="crayons-subtitle-1 flex">
|
|
<% if @tag %>
|
|
<span class="p-4 py-2">#<%= @tag.accessible_name %>:</span>
|
|
<% end %>
|
|
<a class="crayons-navigation__item p-4 py-2 <%= "crayons-navigation__item--current" if @feed == "inbox" %>" href="<%= request.path %>?state=inbox"><%= t("views.moderations.feed.inbox_filter") %></a>
|
|
<a class="crayons-navigation__item p-4 py-2 ml-2 <%= "crayons-navigation__item--current" if @feed == "latest" %>" href="<%= request.path %>?state=latest"><%= t("views.moderations.feed.latest_filter") %></a>
|
|
</div>
|
|
</header>
|
|
<div class="crayons-notice mb-4 border-2 border-solid border-accent-brand">
|
|
<%= t("views.moderations.feed.#{@feed}_html") %>
|
|
</div>
|
|
<%= form_tag(request.path, method: :get, id: "members_filter_form") do %>
|
|
<div class="mod-filter">
|
|
<div class="crayons-layout__content mod-filter__item">
|
|
<label class="mod-filter__label" for="members"><%= t("views.moderations.members.label") %>:</label>
|
|
<%= select_tag :members,
|
|
options_for_select(
|
|
{
|
|
t("views.moderations.members.all") => "",
|
|
t("views.moderations.members.new") => "new",
|
|
t("views.moderations.members.established") => "not_new"
|
|
},
|
|
params[:members],
|
|
),
|
|
{ class: "crayons-select crayons-input-sm", "aria-label": t("views.moderations.members.filter"),
|
|
onchange: "this.form.submit();" } %>
|
|
<%= hidden_field_tag :state, params[:state] %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<section class="mod-index-body">
|
|
<div class="mod-index-list-header lh-tight hidden m:grid">
|
|
<h2 class="mod-index-list-header__label"><%= t("views.moderations.post") %></h2>
|
|
<h2 class="mod-index-list-header__label"><%= t("views.moderations.author") %></h2>
|
|
<h2 class="mod-index-list-header__label align-center"><%= t("views.moderations.date") %></h2>
|
|
</div>
|
|
|
|
<div class="mod-index-list" id="mod-index-list" data-articles="<%= @articles %>">
|
|
</div>
|
|
</section>
|
|
</div>
|
|
<div data-testid="flag-user-modal-container" class="flag-user-modal-container hidden"></div>
|
|
<div data-testid="unpublish-post-modal-container" class="unpublish-post-modal-container hidden"></div>
|
|
</main>
|
|
<% else %>
|
|
<div class="container" style="margin-top: 90px;">
|
|
<h1 class="pt-5" style="text-align: center"><%= t("views.moderations.notice.subtitle", community: community_name) %></h1>
|
|
<div class="body">
|
|
<p><%= t("views.moderations.notice.desc1_html", community: community_name) %></p>
|
|
<p>
|
|
<%= t("views.moderations.notice.desc2_html", code: link_to(t("views.moderations.notice.code_of_conduct"), code_of_conduct_path), trusted: link_to(t("views.moderations.notice.trusted"), community_moderation_path),
|
|
tag: link_to(t("views.moderations.notice.tag"), tag_moderation_path)) %>
|
|
</p>
|
|
<p><%= t("views.moderations.notice.desc3_html", email: mail_to(contact_link, contact_link)) %></p>
|
|
<% unless user_signed_in? %>
|
|
<p><em><%= t("views.moderations.notice.desc4") %></em></p>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|