* 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>
* Adds ability to publish/unpublish Podcasts via /admin/podacasts/id/edit
- Moves ability to Admin to remove reliability of resource_admin
- Adds published to podcast_params in Admin::PodcastsController
* Adds a test to check the successful publishing of a podcast in podcasts_spec.rb
* Reverts change to podcast.reload in podcasts_spec.rb
* Bust caches when navigation links are changed
* Remove extra line
* Add admin_action_taken_at to SiteConfig to reference later
* Format timestamp with rfc3339 and fix Specs
Co-authored-by: mstruve <mollylbs@gmail.com>
* WIP: Gives Admins the ability to delete invitations from /admin/invitations
* Refactors #destroy to properly delete invites, redirect, & display messages
* Adds additional flash message and makes existing messages more explicit
* Adds spec to test the deletion of invitations in admin/invitations
* Adds a new admin setting for experience levels.
This is used in the post management UI to determine the range of experience. These values fallback to the ones we currently see in DEV, Total Newbies and Senior Devs. There is also a removal of the word coding when talking about experience level, since the context for each forem instance should be implied when referencing experience.
* Cleans up experience defaults
* Fixes instance_of usage
* feat: allow a page to override the code_of_conduct, terms and privacy page
* feat: let privacy policy also use a partial for its contents like coc and terms
* feat: show the defaults or the pages
* specs: add tests for the overrides
* feat: update some styles and make use crayons buttons
* fix: update order of test items
* spec: fix
* reactor: move this whole section in the if
* feat: updates
* fix: code climate + travis
* more codeeclimate
* feat: configure the frontend for sidebar nav links
* chore: add a comment
* changes to the admin interface
* feat: move the temporary task to be in the rake tasks and use it in the dev seeds
* feat: use the task in the rake seeds
* refactor: reuse the form across two modals
* refactor: use the form partial
* feat: change the modal to be large
* fix: naming
* Update db/seeds.rb
Co-authored-by: Michael Kohl <me@citizen428.net>
* chore: make the file readable
* chore: removed the if else as the rake task was run on all forems + i sent out a message to new communities
* oops
* refactor: add a scope
* chore: oops removed this
* feat: add navigation links specs
* spec: fix two failing ones
Co-authored-by: Michael Kohl <me@citizen428.net>
* Add recaptcha keys to as site-configurable keys
* Add recaptcha to site config view
* Use site config key
* Make ReCAPTCHA tag optional if keys are blank
* Use proper capitalization of recaptcha
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Refactor logic for readability
* Use proper capitalization of recaptcha
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Use proper capitalization of recaptcha
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Use proper capitalization of recaptcha
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* feat: add the order of the navigational items to the database + admin interface
* refactor: rename :display_when_signed_in to :display_only_when_signed_in
* chore: rename all instances of display_when_signed_in to display_only_when_signed_in
* feat: add a data script that will setup the base urls
* feat: add a temporary rake file that will allow us to seed prod db's
* chore: oops rename file
* chore: remove the index for now
* chore: remove validation
* feat: change the order field to position and add an index o the name and url
* feat: update everything that uses order to position
* refactor: order by name as a secondary attr
* 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
* Refactoring user_controller separating some classes to service
* Replace service Credit::Manager and improve yours specs
* improve method with memoize
* Replaces second_user_id and third_user_id with co_author_ids on the Articles table
* Adjusts migration that adds co_author_ids to also add array: true
* Replaces second_user_id and third_user_id with co_author_ids in all applicable files
- Use co_author_ids in _individual_article view
- Use co_author_ids in articles and stories controllers
- Use co_author_ids in article and podcast_episode models
- Use co_author_ids in article_dashboard
- Use co_author_ids in comments_helper
- Use co_author_ids in articles_spec
* Replaces second_user_id and third_user_id with co_author_ids in article.rb model
* Remove unused #assign_co_authors method from the Stories::Controller
* Add #co_authors and #co_author_name_and_path to article_decorator.rb
* Adds a descriptive form field for co_author_ids for Admins in /admin/articles
* Adds a conditional in article/show.html.erb to render co_author names on an Article in a human-readable way
* Replaces get_co_author_name_and_path with proper method name, co_author_name_and_path in show.html.erb
* Adds latest schema to (hopefully) resolve Travis conflicts
* Adds the safe operator to show.html.erb
* Adjusts articles_spec.rb to use an array in the first test
* Replaces unless &.empty? with if ./present? in articles/show.html.erb
* Replaces second_user_id with co_author_ids in stories_show_spec.rb test
* Replaces elsif with else in articles/show.html.erb
* Cleans up show.html.erb by removing conditional in favor of decorator method
* Refactors splitting of params in Articles::Controller and optimizes query in #co_authors
* Reverts removal of second_user_id and third_user_id and migration file
* Adds a data_update script to update co_author_ids with existing second and third user_ids
* Adds validations to co_authors and flash_messages to indicate whether an update was successful or not
- Adds to methods to article.rb to validate the IDs of co_authors and authors
- Adds flash messages to the Admin::Articles::Controller and a redirect to the show page
- Removes the JS highlighting upon submit when updating an Article in Admin
- Refactors #update action in Admin::Articles::Controller
* Adds tests to article_spec.rb around co_author_id validations in article.rb
* Adjusts #validate_co_authors_must_not_be_the_same to use .include? instead
* Uses Field::Select.with_options in article_dashboard.rb to properly display co_author_ids
* Reverts removal of assigning co_author_ids in the Stories::Controller
* Adjusts error message and adjusts return logic in article.rb (thanks, Fernando!)
* Fixes failing article_spec.rb test that checks for co_author_ids uniqueness
* Adds a default array to co_author_ids and checks if they are .blank?
* Refactor data_update script to use a single SQL statement (thank you, Michael)
* Preserve array order of co_author_ids in article_decorator.rb
* Add db file for default: []
* Add validation to fix bug related to text inputs and invalid users when adding co_authors
* Adds tests to ensure that co_author_ids are both an integer and an integer > 0
* Updates admin/articles_spec.rb to default [] instead of nil
* Adjusts validations in article.rb to be DRY-er and more consistent
* Consolidates validations further
* Refactors validations in article.rb to use procs
* Refactors data_update script to remove nil values from array
* Adds second_user_id and third_user_id to Admin::Articles::Controller and Article model
- Add second_user_id to #update
- Add third_user_id to #update
- Add second_user_id to #article_params
- Add third_user_id to #article_params
- Add second and third user_ids to :limited_columns_internal_select
* Adds a second_user_id and third_user_id form field to _individual_article.html.erb
* Adds tests around adding a co-author and multiple co-authors to an article in articles_spec.rb
* Add ga tracking to config
* Remove empty line
* Remove console.log
* Fix typo
* Update app/assets/javascripts/initializers/initializeBaseTracking.js.erb
* Add google tracking id example
* 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
* feat: cater for when there are no profile fields in a group
* feat: add a modal to create a new group
* feat: add a controller and route for the group
* refactor: add group modal
* feat: edit a group
* chore: remove an instance var
* chore: toggle the section using a toggle button
* feat: add the edit button
* chore: update the messaging
* chore: update the class name
* feat: delete the group
* chore: add some css
* chore: use group_name
* chore: rename the file and add the group select to the file
* feat: render the correct partial and add the profile_field_group_id
* feat: add a profile field
* feat: amend the styles on the card header
* feat: add a cursor pointer
* feat: get the form to redirect after an update
* chore: remove style
* feat: order by created at so that each time we save the order doesn't change
* fix: change the form
* chore: format the options
* feat: show ungrouped fields at the bottom
* feat: add the profile fields length
* chore: remove unused action
* test: add some specs for profile group workflow
* fix: oops
* refactor: grouped profile fields
* refactor: amend the styles
* chore: rename methods
* chore: update headings
* chore: remove changes from my linter
* refactor: suggestions by Michael - upgrade ternary
* refactor: order by name and label
* Allow admins to set brand color
* Remove extra line
* Fix linting
* Update app/controllers/admin/configs_controller.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Move wcag compare to own class
* Remove unnecessary spacing
Co-authored-by: Michael Kohl <citizen428@dev.to>
* 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
* Modify registrations controller
* A bit of progress
* More work
* a bit pf progress on confirmation emails
* Get basic functionality in place
* Remove comments
* First basic test
* Add tests
* Fix code styles
* Remove sessions spec
* Remove sessions spec
* Remove extra markup
* Introduce ProfileFieldGroup model
* Make profile_fields_groups name column unique
* Fix some specs
* feat: allow the page to work again
* Add guard clause to data update script
* Remove unused file
* Fix specs
* Add foreign key
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
* Make confirmation text a required field
* Use strong params to check if confirmation param is present
* Require config confirmation text to match pattern
* Allow greater flexibility for footer mascot image
This change allows admins to set a footer mascot image of any dimension
and manage the forced dimensions in their site config options.
* Update site config copy based on PR feedback
* Moves badge_achievement-related code from /admin/bagdes to /admin/badge_achievements
- Adds an Admin::BadgeAchievements::Controller
- Moves #award and #award_badges to Admin::BadgeAchievements::Controller
- Removes #award and #award_badges from Admin::Badges::Controller
- Moves award.html.erb from /admin/badges to /admin/badge_achievements
- Removes badge_achievement routes from /admin/badges
- Adds a redirect for /admin/badges/badge_achievements to routes.rb
- Cleans up and refactors code in controllers, views, and routes
* Add more actions to Admin::BadgeAchievements::Controller and matching routes
- Adds an #index and #destory action to the BadgeAchievements::Controller
- Adds destroy to the badge_achievements routes
- Adjusts redirects for badge_achievements in routes.rb
- Removes dead code from the index view for Badges
- Refactors the existing code in the index view for BadgeAchievements
* Adds an /admin/badge_achievements_spec and cleans up the /admin/badges_spec
- Removes the badge_achievement-related tests from badges_spec.rb
- Adds an additional test around deleting badge_achievements
* Add pagination to badge_achievements index view
* Adds badge_achievements to Admin menu items and add comment to routes.rb
-Add badge_achievements to the Admin nav bar
-Add a comment regarding redirects for badge_achievements
* Resolve JS console stacktrace notices and change wording on deletion buttons
* Add a Back to Badge Achievements button to the badge award form
* Adjust styling to fix failing /admin/badges_spec.rb
* Uses SQL paging to optimize scalibility and adds search functionality to index.html.erb
- Use SQL paging in Admin::BadgeAchievements::Controller in #index and #award
- Add a search by user ID to Badge Achievements index view
- Add a limit of 15 badges to be shown on the Badge Achievement index view
- Add a User ID column to the Badge Achievement index view
* Add Award Badge button back to Badge Achievement index.html.erb
* Change @badge to be more explicit and reword warning around badge deletion
* Adds award badge button back, rewords success message, and adjusts SQL paging