-
Notifications
You must be signed in to change notification settings - Fork 72
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
details header: remove hardcoded header, remove empty tabs #996
Conversation
invenio_communities/templates/semantic-ui/invenio_communities/details/header.html
Outdated
Show resolved
Hide resolved
b944849
to
b77efb4
Compare
invenio_communities/templates/semantic-ui/invenio_communities/details/header.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -29,6 +29,7 @@ def view(**kwargs): | |||
id_=pid_value, identity=g.identity | |||
) | |||
kwargs["community"] = community | |||
request.community = community.to_dict() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We normally use the g
context, and not the request
context. From the Flask doc:
- g:
This is a good place to store resources during a request.
- request:
To access incoming request data, you can use the global request object. Flask parses incoming request data for you and gives you access to it through that global object.
Minor: community.to_dict()
is repeated below, it could be set once, and re-used.
Moderate: can you add a comment to explain why? It won't be easy to understand why this was done, and it might break quite easily.
@@ -65,6 +65,26 @@ def _can_create_community(): | |||
return can_create | |||
|
|||
|
|||
def _has_about_page_content(): | |||
"""Function used to check if about page has content.""" | |||
community = request.community |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above about using g
instead. Very minor: I would also call it current_community
to make it very clear.
Closes https://github.com/zenodo/rdm-project/issues/172, closes inveniosoftware/invenio-app-rdm#2327
No page contents added:
Only curation policy content added:
Both added: