Skip to content

Commit

Permalink
[Fixes #781] Navigation improvements (#782)
Browse files Browse the repository at this point in the history
* navigation improvements

* simplify translations
  • Loading branch information
giohappy authored Feb 2, 2022
1 parent 60f1dd2 commit 111ea60
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,22 @@
"filter{owner.pk}": "{state('user') && state('user').pk}"
},
"authenticated": true
},{
"id": "favorite",
"labelId": "gnhome.favorites",
"type": "filter",
"query": {
"favorite": true
},
"authenticated": true
},
{
"id": "featured",
"labelId": "gnhome.featuredList",
"type": "filter",
"query": {
"filter{featured}": true
}
},
{
"id": "unpublished",
Expand Down Expand Up @@ -221,15 +237,6 @@
"query": {
"filter{resource_type.in}": "dashboard"
}
},
{
"id": "favorite",
"labelId": "gnhome.favorites",
"type": "filter",
"query": {
"favorite": true
},
"authenticated": true
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
"delete": "Delete",
"customFiltersTitle": "Resources",
"myResources": "My resources",
"pendingApproval": "This resource is not approved",
"unpublished": "This resource is unpublished",
"pendingApproval": "Pending approval",
"unpublished": "Unpublished",
"unApprovedunPublished": "This resource is unpublished and not approved",
"featuredList": "Featured",
"uploadDataset": "Upload dataset",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% block left_menu %}
<ul class="gn-menu-list">
<li>
<a href="{% block logo_href %}/{% endblock %}">
<a href="{% block logo_href %}#{% endblock %}">
{% if custom_theme.logo and custom_theme.logo.url %}
<img src="{{ custom_theme.logo.url }}">
{% else %}
Expand Down
12 changes: 11 additions & 1 deletion geonode_mapstore_client/templatetags/get_menu_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def get_base_left_topbar_menu(context):
"type": "link",
"href": "/catalogue/#/search/?f=dashboard",
"label": "Dashboards"
},
{
"type": "link",
"href": "/catalogue/#/search/?f=featured",
"label": "Featured"
}
]

Expand All @@ -74,6 +79,11 @@ def get_base_right_topbar_menu(context):
if is_mobile:
return []

home = {
"type": "link",
"href": "/",
"label": "Home"
}
user = context.get('request').user
about = {
"label": "About",
Expand Down Expand Up @@ -112,7 +122,7 @@ def get_base_right_topbar_menu(context):
"label": "Create group"
}
])
return [about]
return [home, about]


@register.simple_tag(takes_context=True)
Expand Down

0 comments on commit 111ea60

Please sign in to comment.