Skip to content

Commit

Permalink
Merge pull request #56 from SmdhMdep/Dataset-Item-test
Browse files Browse the repository at this point in the history
UI fixes
  • Loading branch information
Dylanben144 authored Apr 24, 2024
2 parents 201ce6d + c38bf45 commit d474c17
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 14 deletions.
1 change: 1 addition & 0 deletions ckanext/smdh/assets/css/smdh.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ button.navbar-toggle {
.masthead {
background: #ffffff;
box-shadow: 0px 4px 3px 1px rgb(11 10 10 / 27%);
padding: 0px;
}

.masthead .navigation .nav-pills li a {
Expand Down
44 changes: 30 additions & 14 deletions ckanext/smdh/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,58 @@
{% block header_site_navigation_tabs %}
<li><a href="https://smdh.uk/datahub">DataHub</a></li>
{{ h.build_nav_main(
('dataset.search', _('Datasets')),
('organization.index', _('Organizations')),
('home.about', _('About')) )
('dataset.search', _('Datasets')),
('organization.index', _('Organizations')),
)
}}

<li><a href="/organization/smdh">Guides</a></li>

{{
h.build_nav_main(
('home.about', _('About')),
)
}}
{% endblock %}

{% block header_account_logged %}
{% if c.userobj.sysadmin %}
<li>
<li style="margin: 0px;">
<a href="{{ h.url_for(controller='admin', action='index') }}" title="{{ _('Sysadmin settings') }}">
<i class="fa fa-gavel" aria-hidden="true"></i>
<i class="fa fa-gavel fa-lg" aria-hidden="true"></i>
<span class="text">{{ _('Admin') }}</span>
</a>
</li>
{% endif %}
<li>
<li style="margin: 0px;">
<a href="{{ h.url_for('user.read', id=c.userobj.name) }}" class="image" title="{{ _('View profile') }}">
{{ h.user_image((c.user if c and c.user else ''), size=22) }}
<span class="username">{{ c.userobj.display_name }}</span>
</a>
</li>

<li style="margin: 0px;">
<a href="{{ h.url_for('dashboard.organizations') }}" title="{{ _('Profile settings') }}">
<i class="fa fa-home fa-lg" aria-hidden="true"></i>
<span class="text">{{ _('Profile settings') }}</span>
</a>
</li>

{% set new_activities = h.new_activities() %}
<li class="notifications {% if new_activities > 0 %}notifications-important{% endif %}">
<li style="margin: 0px;" class="notifications {% if new_activities > 0 %}notifications-important{% endif %}">
{% set notifications_tooltip = ngettext('Dashboard (%(num)d new item)', 'Dashboard (%(num)d new items)', new_activities)
%}
<a href="{{ h.url_for('dashboard.index') }}" title="{{ notifications_tooltip }}">
<div style="position: relative;">

<i class="fa fa-bell" aria-hidden="true"></i>
<i class="fa fa-bell fa-lg" aria-hidden="true"></i>
<span class="text">{{ _('Dashboard') }}</span>

{% if new_activities != 0 %}
<span style="
position: absolute;
top: 5px;
right: -1px;
top: 6px;
right: 1px;
width: 7px;
height: 7px;
background: red;
Expand All @@ -54,16 +70,16 @@
</a>
</li>
{% block header_account_settings_link %}
<li>
<li style="margin: 0px;">
<a href="{{ h.url_for('user.edit', id=c.userobj.name) }}" title="{{ _('Profile settings') }}">
<i class="fa fa-cog" aria-hidden="true"></i>
<i class="fa fa-cog fa-lg" aria-hidden="true"></i>
<span class="text">{{ _('Profile settings') }}</span>
</a>
</li>
{% endblock %} {% block header_account_log_out_link %}
<li>
<li style="margin: 0px;">
<a href="{{ h.url_for('/user/_logout') }}" title="{{ _('Log out') }}">
<i class="fa fa-sign-out" aria-hidden="true"></i>
<i class="fa fa-sign-out fa-lg" aria-hidden="true"></i>
<span class="text">{{ _('Log out') }}</span>
</a>
</li>
Expand Down
2 changes: 2 additions & 0 deletions ckanext/smdh/templates/snippets/home_breadcrumb_item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{# Used to insert the home icon into a breadcrumb #}
<li class="home"><a href="{{ h.url_for('home.index') }}" aria-label="{{ _('Home') }}"><p style="font-weight: bold;"> {{ _('Home') }}</p><span> {{ _('Home') }}</span></a></li>

0 comments on commit d474c17

Please sign in to comment.