docbrown/app/views/moderations/_mod_sidebar_left.html.erb
Ridhwana 5e93d3a25e
Add a contact email address to the /admin/customization/config (#16497)
* feat: remove the default email and cobine the periodic digest and the contact email under the Email section

* refactor: rename  the email_link to contact link and use the contact_email as a default and fallback to the ForemInstance.email

* chore: alignment

* feat: use the contact_email helper

* feat: move the contact_email to the ForemInstance model

* feat: use ForemInstance.contact_email instead of the application helper method

* removed the application Helper

* feat: set the dafault on the contact_email

* fix: cypress tests

* Update app/lib/constants/settings/general.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-15 17:37:08 +02:00

85 lines
3.7 KiB
Text

<aside class="crayons-layout__sidebar-left p-3 pb-1 m:p-0 m:pb-0 grid gap-1 m:block">
<h1 class="crayons-title mb-0 pl-0 m:pl-2 m:mb-6">
<%= t("views.moderations.heading") %>
</h1>
<nav class="mod-center--nav" aria-label="Mod center inbox navigation">
<h3 class="crayons-subtitle-3 mb-2 pl-2 hidden m:block">
<%= t("views.moderations.aside.inbox") %>
</h3>
<div id="mod-center-inbox" class="mod-center--nav--medium hidden m:block">
<a
href="<%= "#{URL.url}/mod" %>"
class="crayons-link crayons-link--block <%= "crayons-link--current" if @tag.blank? %>"
data-tag-name="All topics">
<%= t("views.moderations.aside.all") %>
</a>
<% if @current_user_tags.any? %>
<% @current_user_tags.each do |tag| %>
<a href="<%= "#{URL.url}/mod/#{tag}" %>" class="crayons-link crayons-link--block <%= "crayons-link--current" if tag == @tag&.name %>" data-tag-name="<%= tag %>">
#<%= tag %>
<span id="<%= tag %>-indicator" class="c-indicator"></span>
</a>
<% end %>
<% end %>
</div>
<div id="mod-center-inbox" class="mod-center--nav--default crayons-tabs crayons-tabs--scrollable flex m:hidden">
<ul class="crayons-tabs__list">
<li>
<a
data-text="All topics"
href="<%= mod_path %>"
class="crayons-tabs__item <%= "crayons-tabs__item--current" if @tag.blank? %>"
aria-current="<%= "page" if @tag.blank? %>"
data-tag-name="All topics">
<%= t("views.moderations.aside.all") %>
</a>
</li>
<% if @current_user_tags.any? %>
<% @current_user_tags.each do |tag| %>
<li>
<a data-text="#<%= tag %>" href="<%= "#{mod_path}/#{tag}" %>" class="crayons-tabs__item <%= "crayons-tabs__item--current" if tag == @tag&.name %>" data-tag-name="<%= tag %>" aria-current="<%= "page" if tag == @tag&.name %>">
#<%= tag %>
<span id="<%= tag %>-indicator" class="c-indicator"></span>
</a>
</li>
<% end %>
<% end %>
</ul>
</div>
</nav>
<nav class="mod-center--nav hidden m:block" aria-label="Mod center resources navigation">
<h3 class="crayons-subtitle-3 mb-2 pl-2">
<%= t("views.moderations.aside.resources") %>
</h3>
<div id="mod-center-other-options">
<a href="<%= URL.url %>/community-moderation" class="crayons-link crayons-link--block mod-center--nav__item">
<%= t("views.moderations.aside.trusted") %>
<%= crayons_icon_tag("external-link", title: t("views.moderations.aside.external")) %>
</a>
<a href="<%= URL.url %>/tag-moderation" class="crayons-link crayons-link--block mod-center--nav__item">
<%= t("views.moderations.aside.tag") %>
<%= crayons_icon_tag("external-link", title: t("views.moderations.aside.external")) %>
</a>
<a href="<%= URL.url %>/terms" class="crayons-link crayons-link--block mod-center--nav__item">
<%= t("views.moderations.aside.terms_and_conditions") %>
<%= crayons_icon_tag("external-link", title: t("views.moderations.aside.external")) %>
</a>
<a href="<%= URL.url %>/code-of-conduct" class="crayons-link crayons-link--block mod-center--nav__item">
<%= t("views.moderations.aside.code_of_conduct") %>
<%= crayons_icon_tag("external-link", title: t("views.moderations.aside.external")) %>
</a>
</div>
</nav>
<div class="fs-s mod-feedback">
<span class="fw-medium">
<%= t("views.moderations.aside.feedback.subtitle") %>
</span>
<span>
<%= t("views.moderations.aside.feedback.description", email: ForemInstance.contact_email) %>
</span>
</div>
</aside>