docbrown/app/views/admin/articles/index.html.erb
Rajat Talesra bbb9fd2e1e
Add more visibility to admins (part-2) (#19375)
* Basic thumbsup, thumbsdown and vomit

* Refined UI of flags and vomits

* If check

* Optimised code and added a method in article.rb

* Removed public keyword

* Nit fixes

* Section for flags and quality details

* Basic vomit item

* Quality item UI

* Separated code into partials

* UI changes and empty state added

* With correct implementation

* Fixed showing reaction items in all cases

* Dropdown visible

* Enabled click listerners and call functions for dropdown-button clicks

* Empty state UI fixed

* Tabs and divider UI

* Mark as valid/invalid conditions

* Nit fixes

* Logical fixes

* Added comments

* Partial item status update fix

* Reload page feature fixed

* Removed snackbar

* I18n strings

* Bug fix

* I18n strings

* Nit fixes

* Added date

* Added view details button

* Added view details test

* Sample test

* Test fixes

* Added tests for new article

* Flagged item tests added

* Added more tests

* Nit fix

* Suggested design changes

* Nit design fixes

* Tests with cy.intercept

* Nit fixes

* Nit fixes

* Hero Billboard Placement (#19467)

* init

* add option to swagger docs

* in_house validation

* filtered ad quesry changes

* styling and prioritizing home hero banner over campaign banner

* rubocop

* typo

* broken spec

* more spec fixes

* found the spec break culprit

* derp

* Update app/views/shared/_display_ad.html.erb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update app/controllers/stories_controller.rb

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* remove immediate return

* styling feedback and moving banner to articles index

* remove nil

* updated styling

* add signed in bool

* add feature flag

* remove feature flag data scripts

---------

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Fix typo / erroneous word in Admin Section (#19488)

* Typo fixes

* Update admin_menu.rb

* Minor background and shadow change (#19501)

* Refresh audience segment for 'active' user (#19470)

* Refresh an individual user's segmentation

* Refresh segment if creating a published article

* Quick refactor

* Refresh segment if update publishing

* Quick refactor

* Refresh segment if update user settings

* Refresh segments after user update + role change

* Using latest_article_updated_at

* Sidekiq uses JSON for arguments, needs basic types

* Fix test issues with last_updated_at and sidekiq params

* Tests update continues

* Consolidate dependencies

* Method names acknowledging manual exclusive

* Fix test name copypasta

* Rubocop

* Try to clarify Creator#series

* Try to avoid naming predicate

* Remove erroneously included helper

* Improve onboarding “suggested tags” page design (#19475)

* Onboarding tags

* Logical design issue fixes

* Posts count added

* Checkbox design fixes

* Optimised css

* Nit fixes

* Test case added

* Reduced data

* Nit fix

* Added more tests

* Nit fix

* Tests updatedt

* Update @honeybadger-io/js to version 5.4.1 (#19479)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>

* Update sidekiq-cron to version 1.10.1 (#19473)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>

* Update nokogiri to version 1.15.0 (#19495)

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>

* use tabindex instead of disabled to get proper keyboard nav on /onboarding tags (#19513)

* Add billboard to safe param list in Fastly vcl (#19515)

* Removed static article id from setup

* All tests passing

* Nit fixes

* Nit fixes

* Fixed tests with Joshua's help

* Added trusted user related tests

* Fixed few tests

* Added intercept and wait

* Removed tab and enter key

* Updated comment

* Updated tests

---------

Co-authored-by: Lawrence <lawrence@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Peter Frank <peter.kim.frank@gmail.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2023-05-26 19:15:12 +05:30

54 lines
2.2 KiB
Text

<h1 class="crayons-title mb-1">
Posts
<% if params[:state] && params[:state].include?("top-") && params[:state] != "top-3" && params[:state] != "top-6" %>
<%= params[:state] %>-months
<% end %>
</h1>
<nav class="mb-2 flex justify-between items-center" aria-label="Posts">
<ul class="crayons-navigation crayons-navigation--horizontal">
<li>
<a href="<%= admin_articles_path %>" class="crayons-navigation__item <%= "crayons-navigation__item--current" if params[:state].blank? %>">Hot</a>
</li>
<li>
<a
href="<%= admin_articles_path(state: :chronological) %>"
class="crayons-navigation__item <%= "crayons-navigation__item--current" if params[:state] == "chronological" %>">Chronological</a>
</li>
</ul>
</nav>
<%= paginate @articles %>
<div id="member-index-content"
class="flex flex-col gap-4"
data-controller="article-pinned-modal"
data-article-pinned-modal-root-selector-value="#article-pin-modal-root"
data-article-pinned-modal-content-selector-value="#article-pin-modal"
data-article-pinned-modal-title-value="There's another article pinned..."
data-article-pinned-modal-size-value="m"
data-article-pinned-modal-cancel-button-id-value="article-pin-modal-cancel"
data-article-pinned-modal-ok-button-id-value="article-pin-modal-ok"
data-action="article-pinned-modal:open@document->article-pinned-modal#openModal">
<% if @pinned_article.present? %>
<div class="crayons-card crayons-card--elevated p-2">
<h2 class="crayons-subtitle-1 flex gap-2 items-center mb-2 p-2"><%= crayons_icon_tag("pin.svg") %> Pinned Article</h2>
<%= render partial: "article_item", locals: { article: @pinned_article } %>
</div>
<% end %>
<% if @featured_articles.present? %>
<div class="crayons-card p-3">
<h2 class="crayons-subtitle-1 flex gap-2 items-center mb-2">Manually Featured Articles</h2>
<%= render partial: "article_item", collection: @featured_articles, as: :article %>
</div>
<% end %>
<%= render partial: "article_item", collection: @articles, as: :article %>
<%= paginate @articles %>
<%= render partial: "pinned_article_modal" %>
</div>
<%= render partial: "image_upload_script" %>