docbrown/app/controllers/admin
rhymes 99ddd31058
Pin posts to feed (#13807)
* Add SiteConfig.feed_pinned_article and validation

* Display pinned article at the top of feed

* Add (basic) functionality to pin/unpin post

* Admins can pin other users posts as well

* Hide the button if looking at the non pinned post

* Add pinned/unpinned snackbar message

* Rename SiteConfig usage to Settings::General

* Add pinned article to the Admin articles index

* Show the pin post button when there's no pinned article

* Move pinning to a separate controller

* Fix SiteConfig reference

* Hide PinController actions to unauthorized users

* PinnedArticlesController#show action and refactor some of the code

* Add Modal interaction

* Fix modal-pinned checkbox interaction

* Fixed pin/unpin post

* Add ArticleDecorator#pinned? specs

* Add PinnedArticlePolicy and PinnedArticlesController specs

* Add ability to actually pin an article from the admin after submit

* Add partial Cypress pin/unpin spec

* Fix pinned article and add basic Cypress interaction tests

* Add Crayons styling to modal

* Only render the pinned article on the default Feed page

* Use persisted?

* Add some comments

* Update app/javascript/articles/Article.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/javascript/packs/homePageFeed.jsx

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Fix Cypress tests

* Update app/javascript/admin/controllers/article_controller.js

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

* Fix pinning in article show page

* Used PinnedArticle domain model

* Fix spec

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/adminFlows/articles/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/articleFlows/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update cypress/integration/articleFlows/pinArticle.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/admin/articles/index.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Fix merge woes

* Add missing article pin post flows

* Add missing admin article flows

* Add Unpin to Admin as well

* Add Audit::Log entries for pin/unpin actions

* Update app/controllers/stories/feeds_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Do not rate limit in E2E tests

* Use .find instead of .filter

* Rename ArticleIdValidator to ExistingArticleIdValidator

* Treat draft and deleted articles the same

* Make sure posts can be pinned after the pinned article is unpublished or deleted

* Use .get directly

* Fix spec and fix PinnedArticlesController#show

* Strengthen pinArticle Cypress tests

* Add Cypress test heading guard

* Add another Cypress test heading guard

* Remove duplicate validator

* Try using the Tools: header instead of the article title

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-06-04 10:54:53 +02:00
..
settings Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
tags Move AssignTagModerator from labor to services (#11826) 2020-12-17 09:51:26 +07:00
users Confirmations that users GDPR data was deleted (#11039) 2020-12-14 12:49:45 +03:00
application_controller.rb Add config post route for admin api (#11698) 2020-12-22 15:50:34 -05:00
articles_controller.rb Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
badge_achievements_controller.rb Add the Ability to Remove Badge Achievements From Users (#9896) [deploy] 2020-08-25 11:14:47 -06:00
badges_controller.rb [15-min-fix] Remove badge slug field b/c auto-gen by title (#13649) 2021-05-05 13:49:43 -04:00
broadcasts_controller.rb RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
chat_channels_controller.rb RFC 50: fix some more hardcoded paths (#13473) 2021-04-26 17:49:54 +02:00
comments_controller.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
configs_controller.rb Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
consumer_apps_controller.rb Push Notification multi app support (#13304) 2021-04-21 17:13:01 -06:00
data_update_scripts_controller.rb Navigation Items and Role access for Data Update Scripts (#12292) 2021-02-09 17:41:14 +02:00
display_ads_controller.rb RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
email_messages_controller.rb Remove resource_admin dashboards (Administrate) (#11792) 2020-12-08 12:38:13 -06:00
events_controller.rb RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
feedback_messages_controller.rb Remove <provider>_created_at columns (#13264) 2021-04-29 10:24:16 -05:00
html_variants_controller.rb RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
invitations_controller.rb Don't update last_buffered timestamp when creating a suggested tweet (#12537) 2021-02-04 10:00:21 -05:00
listing_categories_controller.rb RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
listings_controller.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
moderator_actions_controller.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
mods_controller.rb Move AssignTagModerator from labor to services (#11826) 2020-12-17 09:51:26 +07:00
navigation_links_controller.rb RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
organization_memberships_controller.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
organizations_controller.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
overview_controller.rb Add open reports count to admin overview (#13346) 2021-04-12 12:03:11 -05:00
pages_controller.rb [15-Minute Fix] Refactor code smells (#13347) 2021-04-21 14:52:32 -05:00
permissions_controller.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
podcasts_controller.rb Allow admin to add users as podcast owners (MLH Fellowship) (#11728) [deploy] 2020-12-17 10:55:16 -07:00
privileged_reactions_controller.rb Upgrade rubocop* packages to the latest version and fix violations (#11972) 2020-12-21 18:29:43 +01:00
profile_field_groups_controller.rb Profile Admin updates (#10133) 2020-09-02 12:32:25 +02:00
profile_fields_controller.rb [deploy] Add display_area & show_in_onboarding to the profile setup ui (#10158) 2020-09-02 16:30:33 -05:00
reactions_controller.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
response_templates_controller.rb RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
secrets_controller.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
settings_controller.rb Split Settings::Authentication from SiteConfig (#13095) 2021-04-12 09:41:09 +02:00
sponsorships_controller.rb RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
tags_controller.rb Fix tag alias problems (#12480) 2021-02-03 11:58:59 -05:00
tools_controller.rb RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
users_controller.rb Replacing granular admin email settings with one default email (#13853) 2021-05-28 12:17:08 +03:00
webhook_endpoints_controller.rb [deploy] Move /internal to `/admin (#9639) 2020-08-07 10:36:26 -04:00
welcome_controller.rb Clean up SiteConfig (#13738) 2021-05-18 09:38:31 +07:00