Skip to content

Commit

Permalink
chore: fix typo
Browse files Browse the repository at this point in the history
* change record to lowercase as I double-checked with other references and looks like it is the right way to be lowercase see:
[moderation](https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/administration/user_moderation/user_moderation.py#L25)
[users](https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/administration/users/users.py#L54)
[domains](https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/administration/domains/domains.py#L40)
I also checked in other packages see:
[banners](https://github.com/inveniosoftware/invenio-banners/blob/master/invenio_banners/administration/banners.py#L23)

* Remove what seems to be a typo in the template
* Convert indentations from tabs to spaces
* Fix error  'branded' PropType is defined but prop is never used
  • Loading branch information
Samk13 authored and utnapischtim committed Oct 23, 2024
1 parent 3a1b7f2 commit f159176
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
3 changes: 2 additions & 1 deletion invenio_app_rdm/administration/records/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# Copyright (C) 2023-2024 CERN.
# Copyright (C) 2023 Graz University of Technology.
# Copyright (C) 2024 KTH Royal Institute of Technology.
#
# invenio-administration is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
Expand All @@ -21,7 +22,7 @@ class RecordAdminListView(AdminResourceListView):
"""Configuration for OAI-PMH sets list view."""

api_endpoint = "/records"
name = "Records"
name = "records"
resource_config = "records_resource"
search_request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
title = "Records"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file is part of InvenioRDM
// Copyright (C) 2023-2024 CERN.
// Copyright (C) 2024 KTH Royal Institute of Technology.
//
// InvenioRDM is free software; you can redistribute it and/or modify it
// under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -22,8 +23,7 @@ import {

export class RecordCommunitiesList extends Component {
render() {
const { communities, loading, error, maxDisplayedCommunities, branded } =
this.props;
const { communities, loading, error, maxDisplayedCommunities } = this.props;
let Element = null;

if (loading) {
Expand Down Expand Up @@ -116,12 +116,10 @@ RecordCommunitiesList.propTypes = {
communities: PropTypes.array,
loading: PropTypes.bool,
error: PropTypes.string,
branded: PropTypes.string,
};

RecordCommunitiesList.defaultProps = {
communities: undefined,
loading: false,
error: "",
branded: undefined,
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{#
# This file is part of Invenio.
# Copyright (C) 2022-2024 CERN.
# Copyright (C) 2024 KTH Royal Institute of Technology.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
Expand All @@ -21,12 +22,12 @@
{% set title = page.title %}
{% block page_body %}
<div class="ui container rel-mt-2">
<div class="row">
<div class="col-xs-12 rich-input-content">
<h1>{{ page.title|safe }}</h1>
{% block content %}{{ page.content|safe }}{% endblock %}
</div>
</div>
<div class="row">
<div class="col-xs-12 rich-input-content">
<h1>{{ page.title|safe }}</h1>
{% block content %}{{ page.content|safe }}{% endblock %}
</div>
</div>
</div>
{% endblock %}

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

This file is part of Invenio.
Copyright (C) 2023 Graz University of Technology.
Copyright (C) 2024 KTH Royal Institute of Technology.

Invenio App RDM is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -15,4 +16,3 @@
{% endwith %}

{% endblock %}
toggle

8 comments on commit f159176

@carlinmack
Copy link
Contributor

Choose a reason for hiding this comment

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

Image
I'm not sure it should be lowercase πŸ˜…

@carlinmack
Copy link
Contributor

@carlinmack carlinmack commented on f159176 Oct 31, 2024

Choose a reason for hiding this comment

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

@utnapischtim
Copy link
Contributor

Choose a reason for hiding this comment

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

Would that mean that the name class property should be marked as translatable?

@utnapischtim
Copy link
Contributor

@utnapischtim utnapischtim commented on f159176 Oct 31, 2024

Choose a reason for hiding this comment

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

thats strange because the moderation or domain are lowercase too and they are not lowercase in the screenshot

@utnapischtim
Copy link
Contributor

Choose a reason for hiding this comment

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

could it be that the error is, that the Records view class has not menu_label and therefore falls back to name ? menu_label

@utnapischtim
Copy link
Contributor

Choose a reason for hiding this comment

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

https://github.com/inveniosoftware/invenio-administration/blob/main/invenio_administration/views/base.py#L63-L64 here is the "problem" . so yes, the correct solution would be to add the menu_label property to RecordAdminListView but also to DraftAdminListView, so that the name could be always lowercase

@carlinmack
Copy link
Contributor

Choose a reason for hiding this comment

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

I think instead menu_label should be used, I'm making a PR

@carlinmack
Copy link
Contributor

Choose a reason for hiding this comment

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

PR: #2891 apologies for sending you down the rabbit hole too :)

Please sign in to comment.