-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin missing translations and tiny improvements. #2023
Changes from 8 commits
c9f31d1
eceb2cb
e18169f
82c8ef5
a9f3428
32b995e
6ec9364
f9a71a1
5309569
ad1895e
5dea1b5
1116a22
ae7eda5
a133fbf
2b41ddd
469da5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
{% macro empty_list(heading, message, img="emptyFlower", link=None, linkText="", attributes="") %} | ||
<div class="flex items-center border-dashed border-1 border-gray-400 p-8 sm:bg-{{img}} sm:bg-right bg-empty-state" data-testid='empty-list'> | ||
<div class="w-full sm:w-2/3" tabindex="0"> | ||
<div class="text-title text-gray-700 mb-6">{{ heading }}</div> | ||
{% macro empty_list(heading, message=None, img="emptyFlower", link=None, linkText="", attributes="") %} | ||
<div class="flex items-center border-dashed border-1 border-gray-400 p-8 sm:bg-{{img}} sm:bg-right bg-empty-state min-h-emptyState" data-testid='empty-list'> | ||
<div class="w-full sm:w-2/3 space-y-gutterHalf" tabindex="0"> | ||
<div class="text-title text-gray-700">{{ heading }}</div> | ||
{% if message %} | ||
<p class="mb-0 text-base text-gray-800">{{ message }}</p> | ||
{% if link %} | ||
<a class="inline-block mt-6 text-base font-bold" {% if attributes %} {{ attributes }} {% endif %} href="{{ link }}">{{ linkText }}</a> | ||
{% endif %} | ||
{% endif %} | ||
{% if link %} | ||
<a class="inline-block text-base font-bold" {% if attributes %} {{ attributes }} {% endif %} href="{{ link }}"> | ||
{{ linkText }} | ||
</a> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endmacro %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{% from "components/big-number.html" import big_number %} | ||
{% from "components/empty-list.html" import empty_list %} | ||
|
||
{% macro mapping_table(caption='', field_headings=[], field_headings_visible=True, caption_visible=True, equal_length=False, font_size="table-font-xsmall", testid=None) -%} | ||
<section class="scrollable-table" tabindex="0"> | ||
|
@@ -43,8 +44,8 @@ | |
{% endfor %} | ||
{% if not items %} | ||
{% call row() %} | ||
<td class="table-empty-message p-6" colspan="10"> | ||
{{ empty_message }} | ||
<td class="table-empty-message h-10" colspan="10"> | ||
{{ empty_list(heading=empty_message) }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not use the empty component! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you move this change into its own PR? Along with the change to the empty_list component. |
||
</td> | ||
{% endcall %} | ||
{% endif %} | ||
|
@@ -87,8 +88,8 @@ | |
</td> | ||
{%- endmacro %} | ||
|
||
{% macro row_heading(cell_width=None) -%} | ||
<th class="table-field {{ cell_width if cell_width}}" scope="row"> | ||
{% macro row_heading(cell_width=None, rowspan="1") -%} | ||
<th class="table-field {{ cell_width if cell_width}}" scope="row" rowspan="{{ rowspan }}"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This lets us create |
||
{{ caller() }} | ||
</th> | ||
{%- endmacro %} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,19 +15,29 @@ | |
<div class="w-1/4 float-left py-0 px-0 px-gutterHalf box-border"> | ||
<nav class="navigation"> | ||
<ul> | ||
<li><a | ||
href="{{ url_for('.organisation_dashboard', org_id=current_org.id) }}" {{ org_navigation.is_selected('dashboard') }}>Usage</a> | ||
<li> | ||
<a href="{{ url_for('.organisation_dashboard', org_id=current_org.id) }}" {{ org_navigation.is_selected('dashboard') | ||
}}> | ||
{{ _("Usage") }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks worse than it is, I simply added the |
||
</a> | ||
</li> | ||
<li> | ||
<a href="{{ url_for('.manage_org_users', org_id=current_org.id) }}" {{ org_navigation.is_selected('team-members') }}> | ||
{{ _("Team members")}} | ||
</a> | ||
</li> | ||
<li><a | ||
href="{{ url_for('.manage_org_users', org_id=current_org.id) }}" {{ org_navigation.is_selected('team-members') }}>Team | ||
members</a></li> | ||
{% if current_user.platform_admin %} | ||
<li><a | ||
href="{{ url_for('.organisation_settings', org_id=current_org.id) }}" {{ org_navigation.is_selected('settings') }}>Settings</a> | ||
<li> | ||
<a href="{{ url_for('.organisation_settings', org_id=current_org.id) }}" {{ org_navigation.is_selected('settings') }}> | ||
{{ _("Settings") }} | ||
</a> | ||
</li> | ||
<li> | ||
<a href="{{ url_for('.organisation_trial_mode_services', org_id=current_org.id) }}" {{ | ||
org_navigation.is_selected('trial-services') }}> | ||
{{ _("Trial services") }} | ||
</a> | ||
</li> | ||
<li><a | ||
href="{{ url_for('.organisation_trial_mode_services', org_id=current_org.id) }}" {{ org_navigation.is_selected('trial-services') }}>Trial | ||
services</a></li> | ||
{% endif %} | ||
</ul> | ||
</nav> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,7 @@ | |
{{ nav_menu_item(url=url_for('main.contact', service_id=current_service.id),localised_txt=_('Contact us'), is_active=header_navigation.is_selected('contact')) }} | ||
{% endif %} | ||
{% else %} {# current_user.platform_admin #} | ||
{% if not platform_admin_view_ind %} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes the empty main navigation in platform admin. ✨ No more layout shift ✨ 🎉 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you move this change into its own PR? So we can make this PR just translation changes? |
||
{% if current_user.has_permissions() %} | ||
{{ nav_menu_item(url=url_for('main.live_services', service_id=current_service.id), localised_txt=_('Admin panel'), css_classes='pl-0') }} | ||
{{ nav_menu_item(url=url_for('main.service_dashboard', service_id=current_service.id),localised_txt=_('Dashboard'), is_active=header_navigation.is_selected('dashboard')) }} | ||
|
@@ -113,9 +113,10 @@ | |
{{ nav_menu_item(url=url_for('main.service_settings', service_id=current_service.id),localised_txt=_('Settings'), is_active=header_navigation.is_selected('settings')) }} | ||
{% else %} {# not current_user.has_permissions, i.e. services not in context #} | ||
{{ nav_menu_item(url=url_for('main.choose_account'),localised_txt=_('Your services'),css_classes='pl-0',id_key='choose_account', is_active=header_navigation.is_selected('choose_account')) }} | ||
{{ nav_menu_item(url=url_for('main.live_services', service_id=current_service.id),localised_txt=_('Admin panel')) }} | ||
{{ nav_menu_item(url=url_for('main.live_services', service_id=current_service.id),localised_txt=_('Admin panel'), | ||
is_active=header_navigation) }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just adding the aria-current There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
{% endif %} | ||
{% endif %} | ||
|
||
{% endif %} | ||
{% endif %} | ||
<a | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
{% extends "org_template.html" %} | ||
|
||
{% block org_page_title %} | ||
Usage | ||
{{_("Usage")}} | ||
{% endblock %} | ||
|
||
{% block org_content %} | ||
|
||
<h1 class="heading-medium"> | ||
Usage | ||
{{_("Usage")}} | ||
</h1> | ||
<ul> | ||
{% for service in current_org.live_services %} | ||
<li class="browse-list-item"> | ||
<a href="{{ url_for('main.usage', service_id=service.id) }}" class="browse-list-link">{{ service['name'] }}</a> | ||
<a href="{{ url_for('main.service_dashboard', service_id=service.id) }}" class="browse-list-link">{{ service['name'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found out that there is not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense to me! |
||
}}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did this file change? was this left over form the other changes that you removed from this PR? if so lets revert changes to this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably due to the rebuild after I reverted the changes.