Skip to content

Commit

Permalink
ckan 2.9.11 compatibility (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterVorman authored Jul 16, 2024
1 parent 303d8b4 commit 42fafe4
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
{% block header_account %}
<div class="account-masthead">
{% block header_account_container_content %}
{% if c.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ c.userobj.id }}">
{% if g.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ g.userobj.id }}">
<ul class="list-unstyled unstyled">
{% block header_account_logged %}
{% if c.userobj.sysadmin %}
{% if g.userobj.sysadmin %}
<li>
<a href="{{ h.url_for(controller='admin', action='index') }}" title="{{ _('Sysadmin settings') }}">
<i class="fa fa-gavel" aria-hidden="true"></i>
Expand All @@ -63,9 +63,9 @@
</li>
{% endif %}
<li>
<a href="{{ h.url_for('user.read', id=c.userobj.name) }}" class="image" title="{{ _('View profile') }}">
<a href="{{ h.url_for('user.read', id=g.userobj.name) }}" class="image" title="{{ _('View profile') }}">
{{ h.user_image((c.user if c and c.user else ''), size=22) }}
<span class="username">{{ h.opendata_theme_abbreviate_name(c.userobj.display_name) }}</span>
<span class="username">{{ h.opendata_theme_abbreviate_name(g.userobj.display_name) }}</span>
</a>
</li>
{% set new_activities = h.new_activities() %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
<div class="side-nav-account">
{% block header_account %}
{% block header_account_container_content %}
{% if c.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ c.userobj.id }}">
{% if g.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ g.userobj.id }}">
<ul class="list-unstyled unstyled">
{% block header_account_logged %}
{% if c.userobj.sysadmin %}
{% if g.userobj.sysadmin %}
<li>
<a href="{{ h.url_for(controller='admin', action='index') }}" title="{{ _('Sysadmin settings') }}">
<span class="text">{{ _('Admin') }}</span>
</a>
</li>
{% endif %}
<li>
<a href="{{ h.url_for('user.read', id=c.userobj.name) }}" title="{{ _('View profile') }}">
<span class="username">{{ c.userobj.display_name }}</span>
<a href="{{ h.url_for('user.read', id=g.userobj.name) }}" title="{{ _('View profile') }}">
<span class="username">{{ g.userobj.display_name }}</span>
</a>
</li>
{% set new_activities = h.new_activities() %}
Expand All @@ -42,7 +42,7 @@

{% block header_account_settings_link %}
<li>
<a href="{{ h.url_for('user.edit', id=c.userobj.name) }}" title="{{ _('Profile settings') }}">
<a href="{{ h.url_for('user.edit', id=g.userobj.name) }}" title="{{ _('Profile settings') }}">
<span class="text">{{ _('Profile settings') }}</span>
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% ckan_extends %}
{% block header_account_log_out_link %}
{% if c.userobj.sysadmin %}
{% if g.userobj.sysadmin %}
<li>
<a href="{{ h.url_for(controller='user', action='index') }}" title="{{ _('User List') }}">
<i class="fa fa-users" aria-hidden="true"></i>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% ckan_extends %}

{% block header_account_log_out_link %}
{% if c.userobj.sysadmin %}
{% if g.userobj.sysadmin %}
<li>
<a href="{{ h.url_for(controller='user', action='index') }}" title="{{ _('User List') }}">
<i class="fa fa-users" aria-hidden="true"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</li>
</ul>
</div>
{% if c.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ c.userobj.id }}">
{% if g.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ g.userobj.id }}">
<ul class="list-unstyled unstyled">
{% block header_account_logged %}
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
{% block header_account %}
<div class="account-masthead">
{% block header_account_container_content %}
{% if c.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ c.userobj.id }}">
{% if g.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ g.userobj.id }}">
<ul class="list-unstyled unstyled">
{% block header_account_logged %}
{{ super() }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
{% block header_account %}
<div class="account-masthead">
{% block header_account_container_content %}
{% if c.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ c.userobj.id }}">
{% if g.userobj %}
<div class="account avatar authed" data-module="me" data-me="{{ g.userobj.id }}">
<ul class="list-unstyled unstyled">
{% block header_account_logged %}
{{ super() }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{% link_for _('Profile settings'), named_route=user_edit_route, id=user.name, class_='btn btn-default', icon='cog' %}
</div>
<ul class="nav nav-tabs">
{{ h.build_nav_icon(dashboard_index_route, _('News feed')) }}
{{ h.build_nav_icon(dashboard_index_route, _('News feed'), offset=0) }}
{{ h.build_nav_icon(dashboard_datasets_route, _('My Datasets')) }}
{{ h.build_nav_icon(dashboard_organizations_route, _('My {Organizations}'.format(Organizations=org_alias_pural))) }}
{{ h.build_nav_icon(dashboard_groups_route, _('My {Groups}'.format(Groups=group_alias_pural))) }}
Expand Down

0 comments on commit 42fafe4

Please sign in to comment.