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

feature: user-friendly page for closed supervisors reviews #595

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

tymees
Copy link
Member

@tymees tymees commented Jan 10, 2024

Addresses #594

This PR adds a page supervisors are redirected to if they access a decision URL for a proposal they've already reviewed. The issue talks about a similar page for committee reviews, but looking at the code I decided to just redirect them to the review detail page instead. In that case, they do get a message using the messages framework informing them the review has been concluded.

As part of this change, I also refactored UserAllowedMixin into a decision-only mixin (it was only used for decisions nowadays). I also moved the access check to the dispatch method instead; that way, we can still retrieve the object. This was needed, as I needed the actual object to properly redirect users and the previous approach blocked object retrieval.

Another small refactor: previously, the success URL was decided by looking at the user making the decision; I decided to look at the review type instead as that felt more consistent in behavior

As always, please double check the texts I added. Even more so for the translations,
as I was very lazy

@tymees tymees requested review from miggol and EdoStorm96 January 10, 2024 12:11
{% endblocktrans %}
</p>
</div>
{% include "reviews/review_detail_sidebar.html" %}
Copy link
Member Author

Choose a reason for hiding this comment

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

I decided to add the review sidebar to the right of the main content instead of the left as we do in other places.

The main content is way more important for this page, and I felt that having the sidebar on the left distracted from the main content.

Copy link
Contributor

@EdoStorm96 EdoStorm96 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! I have some minor suggestions for textual things, which are more so nicer imo, but I found no real textual errors or anything. Documentation on the new code is very nice and it all looks clear and clean.

msgid ""
"Je hebt deze aanvraag al beoordeeld. Controleer of dit inderdaad de aanvraag "
"is die je wou beoordelen. Op <a href=\"%(my_supervised_url)s\">deze pagina</"
"a> vind je alle aanvragen waarvan je eindverantwoordelijke bent."
Copy link
Contributor

Choose a reason for hiding this comment

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

Ik zou zeggen:

"is die je wilde beoordelen. Op <a href=\"%(my_supervised_url)s\">deze pagina</"
"a> vind je alle aanvragen waarvan je de eindverantwoordelijke bent."

"toevoegen/aanpassen"
msgstr ""
"This application has already been assessed, so you cannot add/adjust your "
"assessment"
Copy link
Contributor

Choose a reason for hiding this comment

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

misschien add/edit

Copy link
Member Author

Choose a reason for hiding this comment

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

Looking back at it, I'd say `add/change'?

@tymees tymees merged commit e4a0c04 into develop Jan 11, 2024
2 checks passed
@tymees tymees deleted the feature/descriptive-error branch January 11, 2024 15:42
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.

2 participants