Skip to content

Commit

Permalink
fix get_project_app_links() plugin link order (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Aug 9, 2024
1 parent 42d2732 commit 7174f62
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 44 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ Changelog for the **SODAR Core** Django app package. Loosely follows the
`Keep a Changelog <http://keepachangelog.com/en/1.0.0/>`_ guidelines.


Unreleased
==========

Fixed
-----

- **Projectroles**
- Incorrect app plugin link order in ``get_project_app_links()`` (#1468)


v1.0.1 (2024-08-08)
===================

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# The short X.Y version
version = '1.0'
# The full version, including alpha/beta/rc tags
release = '1.0.1'
release = '1.0.2-WIP'


# -- General configuration ---------------------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions docs/source/major_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ older SODAR Core version. For a complete list of changes in current and previous
releases, see the :ref:`full changelog<changelog>`.


v1.0.2 (WIP)
************

Release Highlights
==================

TBA


v1.0.1 (2024-08-08)
*******************

Expand Down
28 changes: 14 additions & 14 deletions projectroles/tests/test_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,20 +604,6 @@ def test_get_sidebar_links_project_detail_view(self):
'icon': 'mdi:cube',
'active': True,
},
{
'name': 'app-plugin-bgjobs',
'url': f'/bgjobs/list/{self.project.sodar_uuid}',
'label': 'Background Jobs',
'icon': 'mdi:server',
'active': False,
},
{
'name': 'app-plugin-example_project_app',
'url': f'/examples/project/{self.project.sodar_uuid}',
'label': 'Example Project App',
'icon': 'mdi:rocket-launch',
'active': False,
},
{
'name': 'app-plugin-filesfolders',
'url': f'/files/{self.project.sodar_uuid}',
Expand All @@ -632,6 +618,20 @@ def test_get_sidebar_links_project_detail_view(self):
'icon': 'mdi:clock-time-eight',
'active': False,
},
{
'name': 'app-plugin-bgjobs',
'url': f'/bgjobs/list/{self.project.sodar_uuid}',
'label': 'Background Jobs',
'icon': 'mdi:server',
'active': False,
},
{
'name': 'app-plugin-example_project_app',
'url': f'/examples/project/{self.project.sodar_uuid}',
'label': 'Example Project App',
'icon': 'mdi:rocket-launch',
'active': False,
},
{
'name': 'project-roles',
'url': f'/project/members/{self.project.sodar_uuid}',
Expand Down
56 changes: 28 additions & 28 deletions projectroles/tests/test_views_ajax.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,20 +625,6 @@ def test_get(self):
'icon': 'mdi:cube',
'active': False,
},
{
'name': 'app-plugin-bgjobs',
'url': f'/bgjobs/list/{self.project.sodar_uuid}',
'label': 'Background Jobs',
'icon': 'mdi:server',
'active': False,
},
{
'name': 'app-plugin-example_project_app',
'url': f'/examples/project/{self.project.sodar_uuid}',
'label': 'Example Project App',
'icon': 'mdi:rocket-launch',
'active': False,
},
{
'name': 'app-plugin-filesfolders',
'url': f'/files/{self.project.sodar_uuid}',
Expand All @@ -653,6 +639,20 @@ def test_get(self):
'icon': 'mdi:clock-time-eight',
'active': False,
},
{
'name': 'app-plugin-bgjobs',
'url': f'/bgjobs/list/{self.project.sodar_uuid}',
'label': 'Background Jobs',
'icon': 'mdi:server',
'active': False,
},
{
'name': 'app-plugin-example_project_app',
'url': f'/examples/project/{self.project.sodar_uuid}',
'label': 'Example Project App',
'icon': 'mdi:rocket-launch',
'active': False,
},
{
'name': 'project-roles',
'url': f'/project/members/{self.project.sodar_uuid}',
Expand Down Expand Up @@ -691,20 +691,6 @@ def test_get_app_links(self):
'icon': 'mdi:cube',
'active': False,
},
{
'name': 'app-plugin-bgjobs',
'url': f'/bgjobs/list/{self.project.sodar_uuid}',
'label': 'Background Jobs',
'icon': 'mdi:server',
'active': False,
},
{
'name': 'app-plugin-example_project_app',
'url': f'/examples/project/{self.project.sodar_uuid}',
'label': 'Example Project App',
'icon': 'mdi:rocket-launch',
'active': False,
},
{
'name': 'app-plugin-filesfolders',
'url': f'/files/{self.project.sodar_uuid}',
Expand All @@ -719,6 +705,20 @@ def test_get_app_links(self):
'icon': 'mdi:clock-time-eight',
'active': False,
},
{
'name': 'app-plugin-bgjobs',
'url': f'/bgjobs/list/{self.project.sodar_uuid}',
'label': 'Background Jobs',
'icon': 'mdi:server',
'active': False,
},
{
'name': 'app-plugin-example_project_app',
'url': f'/examples/project/{self.project.sodar_uuid}',
'label': 'Example Project App',
'icon': 'mdi:rocket-launch',
'active': False,
},
{
'name': 'project-roles',
'url': f'/project/members/{self.project.sodar_uuid}',
Expand Down
2 changes: 1 addition & 1 deletion projectroles/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def get_project_app_links(
}
)
# Add app plugins links
app_plugins = get_active_plugins()
app_plugins = get_active_plugins(custom_order=True)
for plugin in app_plugins:
if self._is_app_visible(plugin, project, user):
ret.append(
Expand Down

0 comments on commit 7174f62

Please sign in to comment.