Commit graph

22 commits

Author SHA1 Message Date
Andy Zhao
b80dae1436
Update data exporter to handle admin send (#10274)
* Update data exporter to handle admin send

* Match button with everything else

* Use proper redirect path

* Stub SiteConfig definition instead of setting it

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

* Removed if statement by accident oops

* Remove non-functional boolean param and pass email directly

* Use refinement to conv to boolean instead of JSON.parse

* Rename to StringToBoolean

* Use 'using' in proper scope (not in method)

* Rename to_bool to to_boolean

* Refactor if statement, thanks rhymes!

* Fix small bugs in tests

* Remove tracking for export_email b/c no @user

Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2020-10-26 18:00:56 -04:00
Julianna Tetreault
0a5babc10e
Add Recent Reactions to the Admin Users' Page (#10680)
* Adds Recent Reations back to the Admin Users page...UGH rebasing :(
  - Render negative_reactions partial in admin/edit.html.erb
  - Add #set_related_reactions back to Admin::UsersController
  - Refacotors JS to target #reports-row in _reports.html.erb

* Alphabetizes reports and reactions partials in edit.html.erb

* Adds tests around Recent Reports and Recent Reactions sections to users_spec.rb
2020-10-07 14:21:10 +07:00
Brunno Souza
e5973ebf9c
Refactoring user_controller separating some classes to service (#10384)
* Refactoring user_controller separating some classes to service

* Replace service Credit::Manager and improve yours specs

* improve method with memoize
2020-10-05 10:41:59 +02:00
Molly Struve
b0e086346d
[deploy] Refactor:Remove BackupData Model and Code (#10409) 2020-09-22 16:45:18 -05:00
Julianna Tetreault
31990b3d3b
Add Recent Reports to Users' Admin User Page (#10058) [deploy]
* Adds _reports partial and renders _reports.html.erb in /admin/users/edit.html.erb

* Adds a Recent Reports sections and a toggle function to /admin/users/_reports

* WIP: display feedback_messages in _reports.html.erb

* Adds #set_feedback_messages to Admin::Users::Controller and adjusts _reports.html.erb

* Adjusts #set_feedback_messages to look for message ids and adds to _reports.html.erb data

* Remove accidental dead code from Admin::Users::Controller

* Adjusts the else statement wording to be more fun

* Adjusts style of recent reports to mirror style of recent reactions

* Implement Admin UI changes to Recent Reports section of admin/users/:id/edit

* Adds a link to the admin_feedback_messages_path for each report in _reports.html.erb

* Adjusts the path used when a report is clicked on in _reports.html.erb

* Adds #user_types check to feedback_message.rb to determine Affected, Offender, or Reporter in _reports
2020-09-03 12:06:15 -06:00
Andy Zhao
0b849341e0
Remove ghostify from app (#10139)
* Remove ghostify from app

* Remove unused ghostify specs
2020-09-01 13:39:39 -04:00
Julianna Tetreault
92042333bd
[deploy] Add Recent Vomit Reaction Reports to Users' Admin Users Page (#10059)
* Capitalizes Admin on Admin Profile button for better consistency

* Adds reactions and reports partials and adjusts filenames of _notes, _activity, and _credits

* Removes code related to reports to separate this PR and the reports PR

* Adds ability to toggle Recent Reactions and adds #get_related_reactions to controller
  - Adds a #get_related_reactions method to the Admin::Users::Controller
  - Moves the rendering of the reactions partial below the notes partial in edit
  - Styles Recent Reactions in a list format with the ability to toggle

* Modifies #set_related_reactions name, query, and limit and the _reactions view with it
  - Adjust #get_related_reactions to read #set_related_reactions
  - Sort reactions by descending created_at
  - Add a limit of 15 to reactions displayed for any given user
  - Add .empty? in place of .nil? to _reactions.html.erb reaction check

* Adjusts the format of how Recent Reactions are displayed and adds Reaction category

* Adds a check for category: vomit in #set_related_reactions

* Renames partial, adds User reactions to #set_related_reactions, and adjusts partial styling

* Rewords message displayed when no negative reactions exist to make it fun

* Adds additional styling changes to recent reactions
2020-08-31 11:23:19 -04:00
Josh Puetz
1c566e0ec4
[deploy] Move /internal to `/admin (#9639)
* First draft - all the big changes

* Changing some more references to 'internal'

* Relocate internal request tests to admin

* Relocate internal system tests to admin

* Fix trailing space

* Test fix

* Move queries from internal to admin

* Docs updates

* Rename internal stimuls controllers to admin (plus docs)

* Rename admin layout

* Fix routing after rebase

* Fixes for latest added admin interfaces

* Serviceworker ignore paths
2020-08-07 10:36:26 -04:00
Josh Puetz
cda18d0aa4
[deploy] Move Admin interface paths (#9576)
* Move administrate to /resource_admin

* Test fixes

* Update docs
2020-08-03 08:49:23 -04:00
Rafi
bdcfba7d70
[deploy] Saving youtube url (#7516)
* Saving youtube url

* Fixing description in the spec

* Optimizing youtube logo svg

* Fixing indentation of form
2020-04-27 14:14:07 -04:00
Lucas Hiago
9ddc02cd14 Remove password verification (#5304) 2020-01-10 10:45:18 -05:00
Lucas Hiago
fde0cb26b6 Refactor method in users_controller.rb (#5108) [deploy]
* Refactor method in users_controller.rb

* Create methods to return the params

* Add specs for admin/users_controller

* Change params methods

* Delete spec for admin/user controller
2019-12-30 10:35:06 -05:00
Bolarinwa Balogun
b52d8e931d Add Instagram URL to profile links (#3307) 2019-06-26 08:56:07 -04:00
Bolarinwa Balogun
1578befdf1 Add Twitch to Profile Links (#2557) 2019-04-25 16:14:28 -04:00
Anna Buianova
1a0d4667c5 Unique twitter and github usernames #2061 (#2255)
* Set github and twitter usernames to nil if they are blank

* Verify github and twitter username in the Admin::UsersController (just in case)

* Add unique indexs on users twitter_username and github_username
2019-04-02 18:16:29 -04:00
Abraham Williams
9cb40e546b Enables Rails cops (#2186)
* Enable Rails cops

* Fix Rails/DynamicFindBy

* Fix Rails/HttpStatus

* Fix Rails/Blank

* Fix Rails/RequestReferer

* Fix Rails/ActiveRecordAliases

* Fix Rails/FindBy

* Fix Rails/Presence

* Fix Rails/Delegate

* Fix Rails/Validation

* Fix Rails/PluralizationGrammar

* Fix Rails/Present

* Fix Rails/Output

* Fix Rails/Blank

* Fix Rails/FilePath

* Fix Rails/InverseOf

* Fix Rails/LexicallyScopedActionFilter

* Add Rails/OutputSafety to TODO

* Add Rails/HasManyOrHasOneDependent to TODO

* Add Rails/SkipsModelValidations to TODO
2019-03-25 09:25:55 -04:00
Jess Lee
9c1e10cd9f Improve Internal Dashboards features(#2043) 2019-03-18 16:29:11 -04:00
Andy Zhao
0a8f9ca654 Fix URL Validations and Update Admin Dashboard (#1392)
* Validate for trailing slash instead of strict validation

* Remove unused sign_in_count field

* Add profile URLs to edit view

* Add profile URLs to admin controller params

* Add profile URLs to edit view

* Clean up index and search views for user

* Move around user fields to make more sense

* Display more informative label

* Remove name_of_user field in favor of new display label

* Fix typo

* Remove duplication for website, employer, and Mastodon URLs

* Add score to comment params

* Remove unused name_of_user field views

* Fix typo for medium url
2018-12-26 18:00:02 -05:00
Andy Zhao
22c9714919 V2 of Reports System (#441)
* Fix weird breakpoint top-nav issue

* Fix error handling when submitting blank note

* Change status closed to invalid

* Add ability to sort between status

* WIP

* Add working views for new report page

* Add mailer WIP

* Add MVP of new reports system

* Move collapse to the right & add show page link

* Fix buttons for index page

* Change collapse to collapse/expand

* Remove email functionality from new report

* Update copy of report abuse responses

* WIP of showing emails in reports

* Fix notes for user_role_service.rb

* Remove unused scripts from internal.html.erb

* Update tests for reports dashboard

* Add missing migration file

* Add finishing touches to reports dashboard

* Remove deprecated methods

* Update view with better timestamps

* Update and write new tests

* Add .codeclimate.yml

* Remove commented out editor thing

* Undo commented out code for recaptcha method

* Undo comment out code for development

* Use new comment path instead of old comment path
2018-09-04 17:08:41 -04:00
Andy Zhao
073e5444ac Add tag moderation feature (#201)
* Fix edge case for tag admin update

* Change single quotes to double quotes

* Add MVP of tag edit page

* Update rubocop version

* Use actual hex colors since vars broke

* Add enabling tag moderators via admin panel

* Remove unused boolean and variables

* Add a description for scholars

* Remove unintended method

* Update auth to work correctly

* Update boolean properly
2018-04-11 15:16:49 -07:00
Andy Zhao
f5913399aa Allow changing user for comments in admin panel (#113)
* Allow changing user for comments in admin panel

* Add successful flash msg

* Use user_id instead of name for comment admin
2018-03-20 16:25:09 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00