Closed lukecampbell closed 7 years ago
I still need to do some code cleanup and some docstrings, but there it is... It was about as hard as I thought it was going to be. This diagram really helped me make sense of CKAN:
The really good news, is now I think I get how CKAN works...
Oh also, in addition to the commit message, I replaced the "Groups" navlink with "Feedback".
Can we make the feedback button tied to a dataset, instead of generic across the site?
I'd rather the feedback button go in the dataset tab area, just before the 'Groups' tab, and auto-submit a hidden field(s) with the dataset URL, and possibly Title as well, so when the email gets generated, we can bundle that info along with whatever the feedback comment is. Otherwise, we're going to be having a lot of back and forth: 'Which _____ dataset are you referring to', etc.
But, we can probably remove the site-wide 'Groups' tab where you've replaced it with the current Feedback tab anyway, I'm not sure we'll be using that in CKAN and it just confuses the navigation as is.
Issue left open
This commit adds two new schema items: smtp.port (not sure why we didn't have it before). As well as feedback.recipients which is a space delimited list of email addresses that will receive feedback.
This commit adds a new controller called FeedbackController which simply renders the "Submit Feedback" form and passes the template the data.
This commit adds a new library for mailing based on Flask-Mail. In my opinion, Flask-Mail deals with far more edge cases for email than the existing CKAN mailer.
To disable feedback leave the recipients entry blank.
There's also a template for the body of the feedback emails.
This PR will address https://github.com/ioos/catalog-ckan/issues/144