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

Refactor Program Management section of Admin Settings #1281

Open
wants to merge 53 commits into
base: development
Choose a base branch
from

Conversation

Kafui123
Copy link
Contributor

Issue: #797

  • Created a modal to update the information displayed for the programs on the homepage.
  • Fields include program name, description, partner, contact email, contact name, and location.
  • Implemented a add a new file feature, to change the image of the programs on the homepage.
  • Saved changes button works as expected, and there are two ways to close the modal, cancel or cross button.
  • Partner, contact email, contact name, location all stored in database.
  • Program name, description, images and links can be directly seen in the home screen.
  • Added editable link for Instagram, Facebook and Berea URL.

JohnCox2211 and others added 14 commits July 5, 2024 14:38
saving solution in route, currently get system
error.
some white space and useless comments and moved
some css to its proper location. Image solution
still doesn't work, will ask a higher power about
it on monday
file handler, was trying to use userManagement.py
except as a foreign key value in program to store
one charfield variable. Add some things to hopefully
handle files, not working. Updated the test data
to contain added data fields.
…rrently attempting to change the file name to the name of the program along with the file extension.
…dal and the msgToast is also in front of the modal and clearly visible.
app/logic/fileHandler.py Outdated Show resolved Hide resolved
esw0624 and others added 4 commits July 23, 2024 09:14
Merge branch 'refactorProgramMgmt' of github.com:BCStudentSoftwareDevTeam/celts into refactorProgramMgmt
Copy link
Contributor

@BrianRamsay BrianRamsay left a comment

Choose a reason for hiding this comment

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

The UI needs a little work. Buttons may be better as "Edit Details", Program names shouldn't be <input> tags, which should fix the table column width. Buttons should be normal sized.

app/config/default.yml Outdated Show resolved Hide resolved
app/controllers/admin/userManagement.py Outdated Show resolved Hide resolved
app/controllers/admin/userManagement.py Outdated Show resolved Hide resolved
app/controllers/admin/userManagement.py Outdated Show resolved Hide resolved
app/logic/fileHandler.py Outdated Show resolved Hide resolved
app/static/js/displayFilesMacro.js Outdated Show resolved Hide resolved
app/static/js/userManagement.js Outdated Show resolved Hide resolved
app/templates/admin/userManagement.html Outdated Show resolved Hide resolved
app/templates/admin/userManagement.html Outdated Show resolved Hide resolved
app/templates/admin/userManagement.html Outdated Show resolved Hide resolved
Copy link
Contributor

@BrianRamsay BrianRamsay left a comment

Choose a reason for hiding this comment

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

We forgot about the case when a program name changes. The current logic means it can no longer find the uploaded image.

Let's store the file path in coverImage (like we do in AttachmentUpload). This way, when the name changes we don't have to do anything. This will mean changing how the image is referenced on the home page, as well as how we delete images when we upload a new one.

The table for the programs is a little narrow. 350px minimum width would fit better. Also, the header Program should be centered.

app/controllers/admin/userManagement.py Outdated Show resolved Hide resolved
app/logic/fileHandler.py Show resolved Hide resolved
app/logic/userManagement.py Outdated Show resolved Hide resolved
Copy link

View Code Coverage

@CollegeStevenLN
Copy link
Contributor

For the issue with the cover images of programs, it seems like uploaded photos are not stored, but their information is saved to the file under the program's name on the landing page. The field "coverImage" under Program still stores the original file's name.

When the landing page loads, it makes the assumption that each program has the image equal to it's program. I need to keep the photo somewhere different, or I need to correct the assumption that landingPage.py is making.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants