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

User Feedback / Add possibility to customize rating criterias (from DB) & other improvements #2712

Merged

Conversation

fxprunayre
Copy link
Member

@fxprunayre fxprunayre commented Apr 26, 2018

List of evaluation criteria is not limited to 5 hardcoded ones.

  • Enable advanced feedback mode by default
  • Add criteria details in full view page
  • Same comment layout in record view and all feebacks view
  • Add gravatar for users (like other pages)
  • Display average score only when at least once is set
  • Metadata title has to be handle by client side not part of a feedback (this remove dependency to ISO19139 only records) Title is retrieved from the index
  • Cleanup unused code about Other category
  • Add reCAPTCHA support
    image

image

image

Example with custom criteria

image

Related to #2419

…B) & other improvements

List of evaluation criteria is not limited to 5 hardcoded ones.

* Enable advanced feedback mode by default
* Add criteria details in full view page
* Same comment layout in record view and all feebacks view
* Add gravatar for users (like other pages)
* Do not show see all feedbacks if no feedbacks
* Display average score only when at least once is set
* Feedback date is a ISODate instead of Date like all other dates
* Metadata title has to be handle by client side not part of a feedback (this remove dependency to ISO19139 only records)
* Cleanup unused code about Other category
@@ -45,144 +55,46 @@
*/
public class RatingAverage {

/** The metadata title. */
private String metadataTitle;
Copy link
Contributor

Choose a reason for hiding this comment

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

Without the title on the home page there is no reference to the record

userfeedbackhome

Copy link
Member Author

Choose a reason for hiding this comment

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

True so I will restore that but do not rely on 19139 xpath

Copy link
Member Author

Choose a reason for hiding this comment

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

Added in 5381622

Copy link
Contributor

Choose a reason for hiding this comment

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

Works fine now

Copy link
Contributor

@PascalLike PascalLike left a comment

Choose a reason for hiding this comment

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

Except for the recaptcha, everything works fine. Thank you, a lot of nice improvements

@@ -45,144 +55,46 @@
*/
public class RatingAverage {

/** The metadata title. */
private String metadataTitle;
Copy link
Contributor

Choose a reason for hiding this comment

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

Works fine now

Log.debug("org.fao.geonet.api.userfeedback.UserFeedback", "newUserFeedback");

final IUserFeedbackService userFeedbackService = getUserFeedbackService();

boolean recaptchaEnabled = settingManager.getValueAsBool(Settings.SYSTEM_USERSELFREGISTRATION_RECAPTCHA_ENABLE);
Copy link
Contributor

Choose a reason for hiding this comment

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

With the recaptcha the check is done even if the option is not activated. I got this error on javascript console:
Error: No reCAPTCHA clients exist. Nr@https://www.gstatic.com/recaptcha/api2/v1524685466525/recaptcha__en.js:406:411 Pr@https://www.gstatic.com/recaptcha/api2/v1524685466525/recaptcha__en.js:405:62 reload@http://localhost:8080/geonetwork/static/lib3d.js:153714:1732 link/c.submitForm/<@http://localhost:8080/geonetwork/static/gn_search_default.js:999:390 m/h.success/<@http://localhost:8080/geonetwork/static/lib3d.js:641:436 e/<@http://localhost:8080/geonetwork/static/lib3d.js:675:69 $eval@http://localhost:8080/geonetwork/static/lib3d.js:689:269 $digest@http://localhost:8080/geonetwork/static/lib3d.js:686:361 $apply@http://localhost:8080/geonetwork/static/lib3d.js:690:33

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@josegar74
Copy link
Member

Tested and looks fine, some minor stuff to check, but can be done later. Going to merge the PR.

  • Do not show see all feedbacks if no feedbacks doesn't work as the button is displayed in any case.

@josegar74 josegar74 merged commit 924059b into geonetwork:3.4.x Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants