Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

479 480 page text controller and edit form #552

Conversation

phonghpham
Copy link
Contributor

🔗 Issue

Resolves #479 #480

✍️ Description

This PR adds ability for staff admin to update org page text.

  • Implemented edit and update actions to allow staff admins to modify the hero and about attributes.
  • Created corresponding views to allow staff to edit page text from dashboard along with tests for coverage.
  • Updated about section in the home page view to use attributes from PageText or existing default message.

📷 Screenshots/Demos

pet_rescue-edit_page_text

@phonghpham phonghpham force-pushed the 479-480-page-text-controller-and-edit-form branch 2 times, most recently from fffc0bd to c1109a3 Compare March 15, 2024 19:39
</div>
<!-- About Us -->
<div class="form-group">
<%= form.text_field :about, label: "About Us", placeholder: "About Us text", class: 'form-control' %>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this to a text area instead? This input should easily accept a couple hundred words so it would be nice to see that easier in a text area.

Copy link
Collaborator

@kasugaijin kasugaijin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @phonghpham! Just one comment re textarea.

@kasugaijin
Copy link
Collaborator

@phonghpham we just merged a long awaited PR on authorization. Could you please add an auth check to the controller actions (and probably need to add a permission in the arrays of permissions for this activity for staff, and admin)? Let me know if you need any help doing so. Most other controllers have it implemeneted, now, for examples.

@nsiwnf nsiwnf force-pushed the 479-480-page-text-controller-and-edit-form branch from c1109a3 to 79e6b19 Compare March 23, 2024 16:40
@mononoken
Copy link
Collaborator

@phonghpham we just merged a long awaited PR on authorization. Could you please add an auth check to the controller actions (and probably need to add a permission in the arrays of permissions for this activity for staff, and admin)? Let me know if you need any help doing so. Most other controllers have it implemeneted, now, for examples.

@phonghpham, if you have any issues implementing the authz, feel free to ask here or @ me on Slack.

@phonghpham phonghpham force-pushed the 479-480-page-text-controller-and-edit-form branch 2 times, most recently from 5fd2836 to c823557 Compare March 29, 2024 03:11
@phonghpham
Copy link
Contributor Author

@kasugaijin , @mononoken, apologies for teh delay, this is ready for re-review

@phonghpham phonghpham force-pushed the 479-480-page-text-controller-and-edit-form branch from 19a4b56 to 7074ef3 Compare March 31, 2024 14:03
Copy link
Collaborator

@kasugaijin kasugaijin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates! @phonghpham

@kasugaijin kasugaijin merged commit 13d81a8 into rubyforgood:main Mar 31, 2024
5 checks passed
@phonghpham phonghpham deleted the 479-480-page-text-controller-and-edit-form branch March 31, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants