docbrown/app/views/admin/pages/index.html.erb
Rajat Talesra 93f73636c7
Post bootstrap changes - remove headings from admin.scss (#19019)
* h1 and h2 design fixes

* h2 redesign fixes

* Removed incorrect code

* Revert incorrect test code

* h3 heading redesign

* h4,h4,h5 headings redesign

* Minor design fixes

* Fixed all heading styles

* Test case fix

* Revert incorrect if condition

* Revert incorrect if condition

* Removed non required div
2023-02-02 15:52:35 +05:30

53 lines
2.4 KiB
Text

<%= csrf_meta_tags %>
<header class="flex items-center mb-6">
<h1 class="crayons-title">Pages</h1>
<%= link_to "New page", new_admin_page_path, class: "ml-auto crayons-btn crayons-btn--s" %>
</header>
<div class="crayons-card p-6 pages__table">
<% @pages.each do |page| %>
<div class="flex py-2 items-center" data-testid="page">
<% if page.landing_page? %>
<%= crayons_icon_tag(:lock, title: "Current locked screen") %>
<% end %>
<%= link_to page.title, page.path %>
<%= link_to "Edit", edit_admin_page_path(page.id), class: "ml-auto crayons-btn crayons-btn--s crayons-btn--secondary" %>
</div>
<% end %>
</div>
<div class="mt-8 pages__override_defaults">
<div class="my-6">
<% if !@code_of_conduct || !@privacy || !@terms %>
<h2 class="crayons-subtitle-1 mb-4">Override defaults</h2>
<div class="crayons-notice mb-4 crayons-notice--warning" aria-live="polite">
<strong>Note: Proceed with caution. When you edit any of the following pages, it will diverge from the original Forem version and you will no longer receive updates. You will see your updated version in the section above.</strong>
</div>
<div class="crayons-card p-6">
<% if !@code_of_conduct %>
<div class="flex py-2 items-center">
<%= link_to "Code of Conduct", code_of_conduct_path %>
<%= link_to "Override", new_admin_page_path(slug: "code-of-conduct"), class: "ml-auto crayons-btn crayons-btn--s crayons-btn--danger" %>
</div>
<% end %>
<% if !@privacy %>
<div class="flex py-2 items-center">
<%= link_to "Privacy Policy", privacy_path %>
<%= link_to "Override", new_admin_page_path(slug: "privacy"), class: "ml-auto crayons-btn crayons-btn--s crayons-btn--danger" %>
</div>
<% end %>
<% if !@terms %>
<div class="flex py-2 items-center">
<%= link_to "Terms of Use", terms_path %>
<%= link_to "Override", new_admin_page_path(slug: "terms"), class: "ml-auto crayons-btn crayons-btn--s crayons-btn--danger" %>
</div>
<% end %>
</div>
<% else %>
<div class="crayons-notice crayons-notice--info" aria-live="polite">
<strong>Note: You have overridden the code of conduct, privacy policy and terms of use. You will no longer receive updates on these pages from the Forem team.</strong>
</div>
<% end %>
</div>
</div>