diff --git a/ckanext/datavic_iar_theme/config.py b/ckanext/datavic_iar_theme/config.py
index 19a40594..1840f77c 100644
--- a/ckanext/datavic_iar_theme/config.py
+++ b/ckanext/datavic_iar_theme/config.py
@@ -2,21 +2,20 @@
import ckan.plugins.toolkit as tk
-
CONFIG_PARENT_SITE_URL = "ckan.parent_site_url"
-DEFAULT_PARENT_SITE_URL = "https://www.data.vic.gov.au/"
-
CONFIG_HOTJAR_ENABLED = "ckan.tracking.hotjar_enabled"
CONFIG_HOTJAR_HJID = "ckan.tracking.hotjar.hjid"
CONFIG_HOTJAR_HJSV = "ckan.tracking.hotjar.hjsv"
+CONFIG_SHOW_BLOG = "ckan.pages.show_blog_button"
+CONFIG_PAGES_BASE_URL = "ckan.pages.base_url"
def get_parent_site_url() -> str:
- return tk.config.get(CONFIG_PARENT_SITE_URL, DEFAULT_PARENT_SITE_URL)
+ return tk.config[CONFIG_PARENT_SITE_URL]
def hotjar_tracking_enabled() -> bool:
- return tk.asbool(tk.config.get(CONFIG_HOTJAR_ENABLED))
+ return tk.config[CONFIG_HOTJAR_ENABLED]
def get_hotjar_hsid() -> str | None:
@@ -26,3 +25,10 @@ def get_hotjar_hsid() -> str | None:
def get_hotjar_hjsv() -> str | None:
return tk.config.get(CONFIG_HOTJAR_HJSV)
+
+def show_blog_button() -> bool:
+ return tk.config[CONFIG_SHOW_BLOG]
+
+
+def get_pages_base_url() -> str:
+ return tk.config[CONFIG_PAGES_BASE_URL]
diff --git a/ckanext/datavic_iar_theme/config_declaration.yaml b/ckanext/datavic_iar_theme/config_declaration.yaml
new file mode 100644
index 00000000..8976c395
--- /dev/null
+++ b/ckanext/datavic_iar_theme/config_declaration.yaml
@@ -0,0 +1,14 @@
+version: 1
+groups:
+ - annotation: ckanext-datavic-iar-theme
+ options:
+ - key: ckan.parent_site_url
+ default: https://www.data.vic.gov.au/
+
+ - key: ckan.tracking.hotjar_enabled
+ type: bool
+ default: False
+
+ - key: ckan.tracking.hotjar.hjid
+
+ - key: ckan.tracking.hotjar.hjsv
diff --git a/ckanext/datavic_iar_theme/grunt/sass/_dataset.scss b/ckanext/datavic_iar_theme/grunt/sass/_dataset.scss
new file mode 100644
index 00000000..53a44896
--- /dev/null
+++ b/ckanext/datavic_iar_theme/grunt/sass/_dataset.scss
@@ -0,0 +1,95 @@
+.via-iar-delwp-dataset {
+ .delwp-resource-list {
+ .resource-item {
+ align-items: center;
+ gap: 1rem;
+ padding-bottom: 1rem;
+
+ .resource-icon img {
+ width: 50px;
+ }
+
+ .resource-summary {
+ p {
+ margin: 0;
+ }
+
+ .resource-summary__formats {
+ font-size: rpl-font-size('xs');
+ }
+ }
+
+ .btn-group .btn {
+ border: 2px rpl-color() solid;
+ background: rpl-color('white');
+ color: #545454;
+ }
+ }
+ }
+
+ .delwp-access-notes {
+ margin-top: 2rem;
+ margin-bottom: 1rem;
+ }
+
+ #data-request-form {
+ margin-top: 4rem;
+
+ & > h3 {
+ margin-bottom: 1rem;
+ }
+
+ & > p {
+ font-size: rpl-font-size('m');
+ margin-bottom: 2rem;
+ }
+
+ .form {
+ .form-group {
+ label {
+ float: unset;
+ width: auto;
+ color: #1a1a1a;
+ font-size: rpl-font-size('m');
+ font-family: rpl-font('bold');
+ margin-bottom: 1rem;
+
+ span.required {
+ color: #aa0028;
+ font-family: rpl-font('regular');
+ font-size: rpl-font-size('s');
+ font-weight: normal;
+ }
+ }
+
+ .controls {
+ margin-left: 0;
+ }
+
+ input {
+ height: 50px;
+ }
+
+ input,
+ textarea {
+ background-color: #f5f5f5;
+ border-color: #666666;
+ box-shadow: none;
+ }
+ }
+
+ .form-actions {
+ float: left;
+ }
+ }
+
+ @include rpl_breakpoint('m') {
+ max-width: 75%;
+ }
+ }
+
+
+ #dataset-contact {
+ display: none;
+ }
+}
diff --git a/ckanext/datavic_iar_theme/grunt/sass/_login.scss b/ckanext/datavic_iar_theme/grunt/sass/_login.scss
index 206d54cd..07efb832 100644
--- a/ckanext/datavic_iar_theme/grunt/sass/_login.scss
+++ b/ckanext/datavic_iar_theme/grunt/sass/_login.scss
@@ -51,7 +51,8 @@ a.close {
.row.user-login-page,
-.row.user-register-page {
+.row.user-register-page,
+.row.user-reset-page {
.primary {
float: none;
@@ -139,9 +140,11 @@ a.close {
gap: 30px;
justify-content: space-between;
align-items: center;
-
margin-top: rem(48px);
+ &.form-reset {
+ justify-content: flex-end;
+ }
.sign-up {
font-family: "Vic-Bold", arial, sans-serif;
@@ -154,6 +157,10 @@ a.close {
.btn {
width: 25%;
+ &.btn-reset {
+ width: 35%;
+ }
+
&:disabled {
width: unset;
margin-left: auto;
@@ -201,6 +208,10 @@ a.close {
.btn {
padding: 16px;
+
+ &.btn-reset {
+ width: fit-content;
+ }
}
}
}
@@ -212,7 +223,6 @@ a.close {
}
}
-
.row.user-register-page {
.division-line {
margin-bottom: rem(24px);
@@ -237,7 +247,6 @@ a.close {
margin-bottom: rem(36px);
}
}
-
}
.division-line {
diff --git a/ckanext/datavic_iar_theme/grunt/sass/_menu.scss b/ckanext/datavic_iar_theme/grunt/sass/_menu.scss
index dbd3b13b..be053be0 100644
--- a/ckanext/datavic_iar_theme/grunt/sass/_menu.scss
+++ b/ckanext/datavic_iar_theme/grunt/sass/_menu.scss
@@ -356,3 +356,113 @@ $rpl-menu-gutter: rpl_grid_get_gutter($rpl-grid) !default;
height: 3rem;
}
}
+
+.pages-menu {
+ .rpl-link {
+ color: rpl-color('secondary');
+
+ &::after {
+ content: none;
+ border: none;
+ }
+ }
+
+ .dropdown {
+ display: none;
+ position: absolute;
+ top: 100%;
+ z-index: 100;
+ background-color: rpl-color('primary');
+ transition: background-color 0.3s ease;
+ inset: -40px 60px auto -40px;
+
+ .container {
+ display: flex;
+ flex-direction: column;
+ padding: 28px 48px 40px;
+
+ .dropdown-header {
+ padding: 0;
+
+ h3 {
+ color: #1A1A1A;
+ font-size: 20px;
+ font-weight: 700;
+ padding: 0 8px;
+ }
+ }
+
+ .dropdown-items {
+ list-style-type: none;
+ padding: 0;
+
+ li {
+ border-bottom: 1px solid rpl-color('light_primary');
+
+ a {
+ color: #1A1A1A;
+ font-size: 14px;
+ padding: 12px 8px;
+ }
+ }
+
+ .dropdown-item:hover {
+ background-color: rpl-color('primary');
+ }
+ }
+ }
+ }
+}
+
+#main-menu {
+ .pages-menu {
+ .rpl-link {
+ @include rpl_typography_font('xs', 1em, 'bold');
+ background-color: transparent;
+ padding: 0;
+ position: relative;
+ margin: $rpl-menu-horizontal-items-root-margin;
+
+ &::after {
+ content: "";
+ display: inline-block;
+ font-family: FontAwesome;
+ color: rpl-color('secondary');
+ }
+
+ &.show {
+ &::after {
+ transform: rotate(180deg);
+ transition: transform 0.3s ease;
+ }
+ }
+ }
+
+ .dropdown {
+ margin-left: 20px;
+ inset: 0 60px auto -40px;
+
+ .container {
+ flex-direction: row;
+
+ .dropdown-header {
+ width: 25%;
+ }
+
+ .dropdown-items {
+ width: 25%
+ }
+ }
+ }
+ }
+}
+
+.dropdown-shown {
+ background-color: rpl-color('light_primary_2') !important;
+ transition: background-color 0.3s ease;
+}
+
+.dropdown-hidden {
+ background-color: rpl-color('primary') !important;
+ transition: background-color 0.3s ease;
+}
diff --git a/ckanext/datavic_iar_theme/grunt/sass/_resources.scss b/ckanext/datavic_iar_theme/grunt/sass/_resources.scss
index 12fb733a..932b24e1 100644
--- a/ckanext/datavic_iar_theme/grunt/sass/_resources.scss
+++ b/ckanext/datavic_iar_theme/grunt/sass/_resources.scss
@@ -12,7 +12,6 @@ $primary-color: #0052C2;
.resource-summary {
flex-grow: 2;
margin-right: 15px;
- word-break: break-all;
}
.resource-icon {
@@ -27,6 +26,12 @@ $primary-color: #0052C2;
vertical-align: text-bottom;
}
}
+
+ @media (min-width: 767px) {
+ .resource-summary {
+ width: 24%;
+ }
+ }
}
.resource-list {
@@ -38,24 +43,37 @@ $primary-color: #0052C2;
&:hover {
background-color: transparent;
}
- .btn-group {
- display: inline-block;
+
+ .buttons {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-end;
+ gap: 0.5rem;
}
- }
- .btn-group {
- position: relative;
- top: auto;
- right: auto;
- }
- @media (max-width:767px) {
- .resource-item {
- display: inline;
- .btn-group {
- display: block;
- }
+ .btn {
+ border: 2px solid rpl_color('primary');
+ padding: 0.75rem;
}
+
+ .btn-outline {
+ border-width: 2px;
+ background-color: #FFFFFF;
+ }
+ .btn-api {
+ border-color: #3A833A;
+ color: #3A833A;
+ }
+ }
+
+ @media (max-width: 767px) {
+ .resource-item {
+ display: inline;
}
+ .buttons {
+ flex-direction: column;
+ }
+ }
}
.dropdown-menu {
@@ -71,6 +89,8 @@ $primary-color: #0052C2;
}
.dataset-resources {
+ display: inline;
+
.badge {
background: none;
color: rpl_color('dark_neutral');
@@ -100,6 +120,43 @@ $primary-color: #0052C2;
}
}
+.dataset-api {
+ li {
+ display: inline;
+ padding-right: 50px;
+ &:last-child {
+ padding-right: 0;
+ }
+ }
+
+ i {
+ padding-right: 3px;
+ }
+
+ display: inline;
+ float: right;
+ color: rpl_color('dark_neutral');
+ font-size: rem(14px);
+
+ .preview {
+ color: #011A3C;
+ }
+
+ .api a {
+ color: #3A833A;
+ }
+}
+
+@media (max-width: 767px) {
+ .dataset-api, .dataset-resources {
+ display: block;
+ }
+ .dataset-api {
+ margin-top: 0.75rem;
+ float: unset;
+ }
+}
+
.res_abstract_heading {
font-family: "VIC-Bold", "Arial", "Helvetica", "sans-serif";
font-size: 1.5rem;
@@ -160,3 +217,9 @@ $primary-color: #0052C2;
}
}
}
+
+@media (min-width: 576px) {
+ .api-modal {
+ max-width: 80%;
+ }
+}
\ No newline at end of file
diff --git a/ckanext/datavic_iar_theme/grunt/sass/styles.scss b/ckanext/datavic_iar_theme/grunt/sass/styles.scss
index 17360b27..2dee3352 100644
--- a/ckanext/datavic_iar_theme/grunt/sass/styles.scss
+++ b/ckanext/datavic_iar_theme/grunt/sass/styles.scss
@@ -62,3 +62,4 @@
@import 'login';
@import 'activity';
@import 'datatables';
+@import 'dataset';
diff --git a/ckanext/datavic_iar_theme/helpers.py b/ckanext/datavic_iar_theme/helpers.py
index fe03e137..375e8205 100644
--- a/ckanext/datavic_iar_theme/helpers.py
+++ b/ckanext/datavic_iar_theme/helpers.py
@@ -58,7 +58,7 @@ def format_list() -> list[str]:
)
formats = [
- resource.format.upper().split('.')[-1] for resource in query if resource.format
+ resource.format.upper().split(".")[-1] for resource in query if resource.format
]
unique_formats = set(formats)
@@ -128,16 +128,16 @@ def visibility_list() -> list[dict[str, str]]:
@helper
def featured_resource_preview(package: dict[str, Any]) -> Optional[dict[str, Any]]:
"""Return a featured resource preview
- - It takes only CSV resources with an existing preview
- - Only resources uploaded to datastore
- - Only not historical resources
+ - It takes only CSV resources with an existing preview
+ - Only resources uploaded to datastore
+ - Only not historical resources
"""
featured_preview = None
- resource_groups: list[list[dict[str, Any]]] = tk.h.group_resources_by_temporal_range(
- package.get("resources", [])
- )
+ resource_groups: list[
+ list[dict[str, Any]]
+ ] = tk.h.group_resources_by_temporal_range(package.get("resources", []))
resources = resource_groups[0] if resource_groups else []
@@ -161,19 +161,6 @@ def featured_resource_preview(package: dict[str, Any]) -> Optional[dict[str, Any
return featured_preview
-def _get_last_resource_if_historical(package: dict[str, Any]) -> dict[str, Any] | None:
- """If the dataset contains historical resources, return the most recent one"""
- historical_resources = tk.h.historical_resources_list(package.get("resources", []))
-
- if len(historical_resources) <= 1:
- return
-
- if historical_resources[1].get("period_start"):
- return historical_resources[0]
-
- return
-
-
@helper
def get_route_after_login_config():
return tk.config.get("ckan.auth.route_after_login")
@@ -186,4 +173,97 @@ def get_came_from_url(came_from: str | None) -> str:
tk.config.get("ckan.auth.route_after_login") or "dataset.search"
)
return came_from
-
+
+
+@helper
+def is_delwp_vector_data(resources: list[dict[str, Any]]) -> bool:
+ for res in resources:
+ if res["format"].lower() in [
+ "dwg",
+ "dxf",
+ "gdb",
+ "shp",
+ "mif",
+ "tab",
+ "extended tab",
+ "mapinfo",
+ ]:
+ return True
+
+ return False
+
+
+@helper
+def is_delwp_raster_data(resources: list[dict[str, Any]]) -> bool:
+ for res in resources:
+ if res["format"].lower() in [
+ "ecw",
+ "geotiff",
+ "jpeg",
+ "jp2",
+ "jpeg 2000",
+ "tiff",
+ "lass",
+ "xyz",
+ ]:
+ return True
+
+ return False
+
+
+@helper
+def is_delwp_dataset(package: dict[str, Any]) -> bool:
+ """Check if the dataset is harvested with delwp harvester"""
+ for extra in package.get("extras", []):
+ if extra["key"] != "harvest_source_type":
+ continue
+
+ if extra["value"] == "delwp":
+ return True
+
+ return False
+
+
+@helper
+def is_delwp_dataset_restricted(package: dict[str, Any]) -> bool:
+ """Check if the delwp dataset is restricted"""
+ for extra in package.get("extras", []):
+ if extra["key"] != "delwp_restricted":
+ continue
+
+ return tk.asbool(extra["value"])
+
+ return False
+
+
+@helper
+def get_route_after_login_config():
+ return tk.config.get("ckan.auth.route_after_login")
+
+
+
+@helper
+def show_blog_button():
+ return conf.show_blog_button()
+
+
+@helper
+def get_pages_dropdown_items():
+ dropdown_items = ""
+ pages_list = tk.get_action('ckanext_pages_list')({},
+ {'order': True, 'private': False})
+ for page in pages_list:
+ type_ = 'blog' if page['page_type'] == 'blog' else conf.get_pages_base_url()
+ name = page['name']
+ title = page['title']
+ link = tk.h.literal('{} '.format(type_, name, title))
+ li = tk.h.literal('
') + link + tk.h.literal(' ')
+ dropdown_items = dropdown_items + li
+ return dropdown_items
+
+@helper
+def datastore_loaded_resources(pkg_dict: dict[str, Any]) -> list[str]:
+ """Return a list of the dataset resources that are loaded to the datastore"""
+ if not pkg_dict["resources"]:
+ return []
+ return [resource["id"] for resource in pkg_dict["resources"] if resource["datastore_active"]]
diff --git a/ckanext/datavic_iar_theme/plugin.py b/ckanext/datavic_iar_theme/plugin.py
index f4623599..c32d0d81 100644
--- a/ckanext/datavic_iar_theme/plugin.py
+++ b/ckanext/datavic_iar_theme/plugin.py
@@ -7,6 +7,7 @@
log = logging.getLogger(__name__)
+@tk.blanket.config_declarations
class DatavicIARThemePlugin(p.SingletonPlugin):
p.implements(p.IConfigurer)
p.implements(p.ITemplateHelpers)
diff --git a/ckanext/datavic_iar_theme/public/image-icon.png b/ckanext/datavic_iar_theme/public/image-icon.png
new file mode 100644
index 00000000..ec9c2e85
Binary files /dev/null and b/ckanext/datavic_iar_theme/public/image-icon.png differ
diff --git a/ckanext/datavic_iar_theme/public/vic-gov-au.png b/ckanext/datavic_iar_theme/public/vic-gov-au.png
new file mode 100644
index 00000000..7ee8207b
Binary files /dev/null and b/ckanext/datavic_iar_theme/public/vic-gov-au.png differ
diff --git a/ckanext/datavic_iar_theme/public/vic-gov-logo.png b/ckanext/datavic_iar_theme/public/vic-gov-logo.png
new file mode 100644
index 00000000..65b72277
Binary files /dev/null and b/ckanext/datavic_iar_theme/public/vic-gov-logo.png differ
diff --git a/ckanext/datavic_iar_theme/templates/ajax_snippets/api_info.html b/ckanext/datavic_iar_theme/templates/ajax_snippets/api_info.html
index c58cded7..598cce06 100644
--- a/ckanext/datavic_iar_theme/templates/ajax_snippets/api_info.html
+++ b/ckanext/datavic_iar_theme/templates/ajax_snippets/api_info.html
@@ -1 +1,150 @@
-{% ckan_extends %}
+{% set resource_id = h.sanitize_id(resource_id) %}
+{% set sql_example_url = h.url_for('api.action', ver=3, logic_function='datastore_search_sql', qualified=True) + '?sql=SELECT * from "' + resource_id + '" WHERE title LIKE \'jones\'' %}
+{# not urlencoding the sql because its clearer #}
+
+
+
+
+
+
{{ _('Access resource data via a web API with powerful query support') }} .
+ {% trans %}
+ Further information in the main
+ CKAN Data API and DataStore documentation .
+ {% endtrans %}
+
+
+
+ {{ _('Endpoints') }} »
+
+
+
+
+
{{ _('The Data API can be accessed via the following actions of the CKAN action API.') }}
+
+
+
+
+ {{ _('Create') }}
+
+ {{ h.url_for('api.action', ver=3, logic_function='datastore_create', qualified=True) }}
+
+
+
+ {{ _('Update / Insert') }}
+
+ {{ h.url_for('api.action', ver=3, logic_function='datastore_upsert', qualified=True) }}
+
+
+
+ {{ _('Query') }}
+
+ {{ h.url_for('api.action', ver=3, logic_function='datastore_search', qualified=True) }}
+
+
+ {% if h.datastore_search_sql_enabled() %}
+
+ {{ _('Query (via SQL)') }}
+
+ {{ h.url_for('api.action', ver=3, logic_function='datastore_search_sql', qualified=True) }}
+
+
+ {% endif %}
+
+
+
+
+
+
+
+
+ {{ _('Querying') }} »
+
+
+
+
+
{{ _('Query example (first 5 results)') }}
+
+ {{ h.url_for('api.action', ver=3, logic_function='datastore_search', resource_id=resource_id, limit=5, qualified=True) }}
+
+
+
{{ _('Query example (results containing \'jones\')') }}
+
+ {{ h.url_for('api.action', ver=3, logic_function='datastore_search', resource_id=resource_id, q='jones', qualified=True) }}
+
+ {% if h.datastore_search_sql_enabled() %}
+
{{ _('Query example (via SQL statement)') }}
+
+ {{ sql_example_url }}
+
+ {% endif %}
+
+
+
+
+
+
+ {{ _('Example: Javascript') }} »
+
+
+
+
+
{{ _('A simple ajax (JSONP) request to the data API using jQuery.') }}
+
+ var data = {
+ resource_id: '{{ resource_id }}', // the resource id
+ limit: 5, // get 5 results
+ q: 'jones' // query for 'jones'
+ };
+ $.ajax({
+ url: '{{ h.url_for('api.action', ver=3, logic_function='datastore_search', qualified=True) }}',
+ data: data,
+ dataType: 'jsonp',
+ success: function(data) {
+ alert('Total results found: ' + data.result.total)
+ }
+ });
+
+
+
+
+
+
+ {{ _('Example: Python') }} »
+
+
+
+
+
+ import urllib.request
+ url = '{{ h.url_for('api.action', qualified=True, ver=3, logic_function='datastore_search', resource_id=resource_id, limit=5) + '&q=title:jones' }}' {# not urlencoding the ":" because its clearer #}
+ fileobj = urllib.request.urlopen(url)
+ print(fileobj.read())
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ckanext/datavic_iar_theme/templates/ckanext_pages/snippets/pages_list.html b/ckanext/datavic_iar_theme/templates/ckanext_pages/snippets/pages_list.html
new file mode 100644
index 00000000..a0be6b81
--- /dev/null
+++ b/ckanext/datavic_iar_theme/templates/ckanext_pages/snippets/pages_list.html
@@ -0,0 +1,45 @@
+{% set pages_total = pages|length %}
+{% set action = '{0}_show'.format(type) %}
+
+{% set ckan_29_or_higher = h.ckan_version().split('.')[1] | int >= 9 %}
+
+
+
+{% if pages %}
+
+ {% set editor = h.pages_get_wysiwyg_editor() %}
+
+ {% for page in pages %}
+
+ {% if ckan_29_or_higher %}
+ {% if id %} {# this is for orgs and groups #}
+ {% set url = h.url_for('pages.{}_pages_show'.format(c.group_dict['type']), id=id, page=page.name) %}
+ {% elif type == 'blog' %}
+ {% set url = h.url_for('pages.blog_show', page=page.name) %}
+ {% else %}
+ {% set url = h.url_for('datavicpages.show', page=page.name) %}
+ {% endif %}
+
+ {% else %}
+ {% if id %} {# this is for orgs and groups #}
+ {% set url = h.url_for(controller='ckanext.pages.controller:PagesController', action=action, id=id, page='/' + page.name) %}
+ {% elif type == 'blog' %}
+ {% set url = h.url_for(controller='ckanext.pages.controller:PagesController', action='blog_show', page='/' + page.name) %}
+ {% else %}
+ {% set url = h.url_for(controller='ckanext.pages.controller:PagesController', action='pages_show', page='/' + page.name) %}
+ {% endif %}
+
+ {% endif %}
+
+ {%- snippet 'ckanext_pages/snippets/page_item.html', url=url, page=page -%}
+
+ {% endfor %}
+
+
+{% else %}
+ {% if type == 'blog' %}
+ {{ _('There are currently no blog articles here') }}
+ {% else %}
+ {{ _('There are currently no pages here') }}
+ {% endif %}
+{% endif %}
diff --git a/ckanext/datavic_iar_theme/templates/header.html b/ckanext/datavic_iar_theme/templates/header.html
index 3773275f..38a84133 100644
--- a/ckanext/datavic_iar_theme/templates/header.html
+++ b/ckanext/datavic_iar_theme/templates/header.html
@@ -16,16 +16,17 @@
{% block header_account_logged %}
{% if c.userobj.sysadmin %}
-
+
+ {% if h.vic_iar_show_blog_button() %}
-
+ {% endif %}
@@ -99,7 +100,24 @@
+
+
diff --git a/ckanext/datavic_iar_theme/templates/mailcraft/emails/base.html b/ckanext/datavic_iar_theme/templates/mailcraft/emails/base.html
new file mode 100644
index 00000000..c6ae4944
--- /dev/null
+++ b/ckanext/datavic_iar_theme/templates/mailcraft/emails/base.html
@@ -0,0 +1,296 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ VPS DATA DIRECTORY
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% block main_text %}{% endblock %}
+ {% block regards %}
+
Message sent by {{ site_title }} ({{ site_url }} )
+ {% endblock %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ckanext/datavic_iar_theme/templates/mailcraft/emails/request_delwp_data/body.html b/ckanext/datavic_iar_theme/templates/mailcraft/emails/request_delwp_data/body.html
new file mode 100644
index 00000000..9aa6074e
--- /dev/null
+++ b/ckanext/datavic_iar_theme/templates/mailcraft/emails/request_delwp_data/body.html
@@ -0,0 +1,12 @@
+{% extends "mailcraft/emails/base.html" %}
+
+{% block main_text %}
+
+A user has requested an access to DEECA dataset .
+
+Name - {{ username }}
+Email - {{ email }}
+Organisation - {{ organisation }}
+Message - {{ message }}
+
+{% endblock %}
diff --git a/ckanext/datavic_iar_theme/templates/mailcraft/emails/request_delwp_data/body.txt b/ckanext/datavic_iar_theme/templates/mailcraft/emails/request_delwp_data/body.txt
new file mode 100644
index 00000000..ceeb830e
--- /dev/null
+++ b/ckanext/datavic_iar_theme/templates/mailcraft/emails/request_delwp_data/body.txt
@@ -0,0 +1,6 @@
+A user has requested an access to DEECA dataset: {{ h.url_for('dataset.read', id=package_id, _external=True)}}
+
+Name - {{ username }}
+Email - {{ email }}
+Organisation - {{ organisation }}
+Message - {{ message }}
diff --git a/ckanext/datavic_iar_theme/templates/package/read_base.html b/ckanext/datavic_iar_theme/templates/package/read_base.html
index 3e772e30..129cfc09 100644
--- a/ckanext/datavic_iar_theme/templates/package/read_base.html
+++ b/ckanext/datavic_iar_theme/templates/package/read_base.html
@@ -16,7 +16,6 @@
{% endif %}
{% if h.check_access('package_update', {'id':pkg.id }) %}
- {% set url = h.url_for('dataset.edit', id=pkg.name) %}
{% set is_ready_for_sync = h.is_ready_for_publish(pkg) %}
{% if is_ready_for_sync %}
@@ -50,9 +49,9 @@ Sync dataset on DataVic: {{ pkg.title }}
{% endif %}
{% if pkg.workflow_status|lower != 'draft' %}
- {{ _('Edit') }}
+ {{ _('Edit') }}
{% else %}
- {{ _('Edit') }}
+ {{ _('Edit') }}
{% endif %}
{% endif %}
{% endblock %}
diff --git a/ckanext/datavic_iar_theme/templates/package/snippets/change_item.html b/ckanext/datavic_iar_theme/templates/package/snippets/change_item.html
new file mode 100644
index 00000000..f411c109
--- /dev/null
+++ b/ckanext/datavic_iar_theme/templates/package/snippets/change_item.html
@@ -0,0 +1,11 @@
+{{ gettext('On %(timestamp)s, %(username)s:', timestamp=h.render_datetime(activity_diff.activities[1].timestamp, with_hours=True, with_seconds=True), username=h.linked_user(activity_diff.activities[1].user_id)) }}
+
+{% set changes = h.compare_pkg_dicts(activity_diff.activities[0].data.package, activity_diff.activities[1].data.package, activity_diff.activities[0].id) %}
+
+
+ {% for change in changes %}
+ {% snippet "snippets/changes/{}.html".format(
+ change.type), change=change, dataset_type=pkg_dict.type %}
+
+ {% endfor %}
+
diff --git a/ckanext/datavic_iar_theme/templates/package/snippets/data_api_button.html b/ckanext/datavic_iar_theme/templates/package/snippets/data_api_button.html
index 75943148..f4b1c238 100644
--- a/ckanext/datavic_iar_theme/templates/package/snippets/data_api_button.html
+++ b/ckanext/datavic_iar_theme/templates/package/snippets/data_api_button.html
@@ -6,5 +6,5 @@
{% if resource.datastore_active %}
{% set loading_text = _('Loading...') %}
{% set api_info_url = h.url_for('api.snippet', ver=1, snippet_path='api_info.html', resource_id=resource.id) %}
- {{ _('Data API') }}
+ {{ _('Data API') }}
{% endif %}
diff --git a/ckanext/datavic_iar_theme/templates/package/snippets/delwp_resources_list.html b/ckanext/datavic_iar_theme/templates/package/snippets/delwp_resources_list.html
new file mode 100644
index 00000000..55a2d0b4
--- /dev/null
+++ b/ckanext/datavic_iar_theme/templates/package/snippets/delwp_resources_list.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
{{ _("Resources") }}
+
+ {{ pkg.resources | map(attribute='format') | unique | join(' | ') }}
+
+
+
+ {% if with_button %}
+
+ {% endif %}
+
+
diff --git a/ckanext/datavic_iar_theme/templates/package/snippets/resource_item.html b/ckanext/datavic_iar_theme/templates/package/snippets/resource_item.html
index b93b34cf..675defa3 100644
--- a/ckanext/datavic_iar_theme/templates/package/snippets/resource_item.html
+++ b/ckanext/datavic_iar_theme/templates/package/snippets/resource_item.html
@@ -11,7 +11,7 @@
{% if url_is_edit %}
Edit "{{ h.resource_display_name(res) }} "
{% else %}
- {{ h.resource_display_name(res)}}
+ {{ h.resource_display_name(res) }}
{% endif %}
{% if h.is_historical() or url_is_edit %}
@@ -30,45 +30,50 @@
{% block resource_item_description %}
{% endblock %}
{% block resource_item_explore %}
- {% if not url_is_edit %}
-
- {% endif %}
+ {% if can_edit %}
+
+
+
+ {{ _('Edit') }}
+
+
+ {% endif %}
+
+
+
+ {{ _('More information') }}
+
+
+ {% if res.url and h.is_url(res.url) %}
+
+
+ {% if res.has_views or res.url_type == 'upload' %}
+
+ {{ _('Download data') }}
+ {% else %}
+
+ {{ _('Go to Resource') }}
+ {% endif %}
+
+
+ {% endif %}
+ {% endblock %}
+
+ {% endif %}
{% endblock %}
diff --git a/ckanext/datavic_iar_theme/templates/scheming/package/snippets/package_form.html b/ckanext/datavic_iar_theme/templates/scheming/package/snippets/package_form.html
index bb749bbb..e28a7d2f 100644
--- a/ckanext/datavic_iar_theme/templates/scheming/package/snippets/package_form.html
+++ b/ckanext/datavic_iar_theme/templates/scheming/package/snippets/package_form.html
@@ -30,4 +30,4 @@
{%- endif -%}
- {% endblock %}
\ No newline at end of file
+ {% endblock %}
diff --git a/ckanext/datavic_iar_theme/templates/snippets/changes/new_resource.html b/ckanext/datavic_iar_theme/templates/snippets/changes/new_resource.html
new file mode 100644
index 00000000..c64168d1
--- /dev/null
+++ b/ckanext/datavic_iar_theme/templates/snippets/changes/new_resource.html
@@ -0,0 +1,16 @@
+{% set pkg_url = h.url_for(dataset_type ~ '.read', id=change.pkg_id) %}
+{% set resource_url = h.url_for(dataset_type ~ '_resource.read', id=change.pkg_id, resource_id = change.resource_id, qualified=True) %}
+
+{% set pkg_link %}
+{{ change.title }}
+{% endset %}
+
+{% set resource_link %}
+{{ change.resource_name or _('Unnamed resource') }}
+{% endset %}
+
+
+
+ {{ _('Added resource {resource_link} to {pkg_link}').format(pkg_link=pkg_link, resource_link=resource_link) }}
+
+
\ No newline at end of file
diff --git a/ckanext/datavic_iar_theme/templates/snippets/dataset_search_form.html b/ckanext/datavic_iar_theme/templates/snippets/dataset_search_form.html
index 939857ec..97c364b1 100644
--- a/ckanext/datavic_iar_theme/templates/snippets/dataset_search_form.html
+++ b/ckanext/datavic_iar_theme/templates/snippets/dataset_search_form.html
@@ -195,14 +195,16 @@
- {% if format %}
+ {% if format and format == 'ALL_API' %}
+ {{ _("All API formats") }}
+ {% elif format %}
{% for item in h.vic_iar_format_list() %}
{% if item == format %}
{{ item|upper }}
{% endif %}
{% endfor %}
{% else %}
- Please select a format
+ Please select a format
{% endif %}
Please select a format
+
+
+ {{ _("All API formats") }}
+
+
{% for item in items %}
{% endif %}
{% endblock %}
+
+{% block resources %}
+ {{ super() }}
+
+ {% set digital_twin_resources = h.get_digital_twin_resources(package.id) %}
+ {% set featured_resource = h.vic_iar_featured_resource_preview(package) %}
+ {% if digital_twin_resources or featured_resource %}
+
+ {% if digital_twin_resources %}
+
+ {% endif %}
+ {% if featured_resource %}
+
+ {% endif %}
+ {{ _('Preview') }}
+
+ {% endif %}
+ {% set datastore_loaded_resources = h.vic_iar_datastore_loaded_resources(package) %}
+ {% if datastore_loaded_resources %}
+
+ {% set loading_text = _('Loading...') %}
+ {% set api_info_url = h.url_for('api.snippet', ver=1, snippet_path='api_info.html', resource_id=datastore_loaded_resources[0]) %}
+
+ {{ _("API") }}
+
+
+ {% endif %}
+
+{% endblock %}
diff --git a/ckanext/datavic_iar_theme/templates/user/edit_user_form.html b/ckanext/datavic_iar_theme/templates/user/edit_user_form.html
index 883e25f9..36c94913 100644
--- a/ckanext/datavic_iar_theme/templates/user/edit_user_form.html
+++ b/ckanext/datavic_iar_theme/templates/user/edit_user_form.html
@@ -37,15 +37,20 @@
{{ _('Change password') }}
- {{ form.input('old_password',
- type='password',
- label=_('Sysadmin Password') if is_sysadmin else _('Old Password'),
- id='field-password-old',
- value=data.oldpassword,
- error=errors.oldpassword,
- classes=['control-medium'],
- attrs={'autocomplete': 'off', 'class': 'form-control'}
- ) }}
+
+ {% set self_update = g.user == data.name %}
+
+ {% if not is_sysadmin or self_update %}
+ {{ form.input('old_password',
+ type='password',
+ label=_('Old Password'),
+ id='field-password-old',
+ value=data.oldpassword,
+ error=errors.oldpassword,
+ classes=['control-medium'],
+ attrs={'autocomplete': 'off', 'class': 'form-control'}
+ ) }}
+ {% endif %}
{{ form.input('password1', type='password', label=_('Password'), id='field-password', value=data.password1, error=errors.password1, classes=['control-medium'], attrs={'autocomplete': 'off', 'class': 'form-control'} ) }}
diff --git a/ckanext/datavic_iar_theme/templates/user/request_reset.html b/ckanext/datavic_iar_theme/templates/user/request_reset.html
new file mode 100644
index 00000000..d412f6d0
--- /dev/null
+++ b/ckanext/datavic_iar_theme/templates/user/request_reset.html
@@ -0,0 +1,83 @@
+{% ckan_extends %}
+
+
+{% block wrapper_class %} user-reset-page {% endblock %}
+
+{% block subtitle %}{{ _('Reset your password') }}{% endblock %}
+
+{% block breadcrumb_content %}
+ {% link_for _('Password Reset'), named_route='user.request_reset' %}
+{% endblock %}
+
+{% block primary %}
+
+ {% block primary_content %}
+
+
+ {% block primary_content_inner %}
+
{{ _('Reset your password') }}
+ {% block form %}
+
+ {% endblock %}
+ {% endblock %}
+
+
+ {% endblock %}
+
+{% endblock %}
+
+
+{% block secondary_content %}
+ {% block help %}
+
+ {% block help_inner %}
+ {{ _('How does this work?') }}
+
+
{% trans %}Enter your email address or username into the box and we
+ will send you an email with a link to enter a new password.
+ {% endtrans %}
+
+ {% endblock %}
+
+ {% endblock %}
+{% endblock %}
diff --git a/ckanext/datavic_iar_theme/webassets/css/datavic_iar_theme.css b/ckanext/datavic_iar_theme/webassets/css/datavic_iar_theme.css
index 1a8a3366..2d1638c7 100644
--- a/ckanext/datavic_iar_theme/webassets/css/datavic_iar_theme.css
+++ b/ckanext/datavic_iar_theme/webassets/css/datavic_iar_theme.css
@@ -1,3 +1,4 @@
+@charset "UTF-8";
html {
font-size: 100%; }
@@ -1720,6 +1721,79 @@ nav {
#mobile-menu .rpl-site-header__top {
height: 3rem; }
+.pages-menu .rpl-link {
+ color: #011A3C; }
+ .pages-menu .rpl-link::after {
+ content: none;
+ border: none; }
+
+.pages-menu .dropdown {
+ display: none;
+ position: absolute;
+ top: 100%;
+ z-index: 100;
+ background-color: #F6BE00;
+ transition: background-color 0.3s ease;
+ inset: -40px 60px auto -40px; }
+ .pages-menu .dropdown .container {
+ display: flex;
+ flex-direction: column;
+ padding: 28px 48px 40px; }
+ .pages-menu .dropdown .container .dropdown-header {
+ padding: 0; }
+ .pages-menu .dropdown .container .dropdown-header h3 {
+ color: #1A1A1A;
+ font-size: 20px;
+ font-weight: 700;
+ padding: 0 8px; }
+ .pages-menu .dropdown .container .dropdown-items {
+ list-style-type: none;
+ padding: 0; }
+ .pages-menu .dropdown .container .dropdown-items li {
+ border-bottom: 1px solid #F69C00; }
+ .pages-menu .dropdown .container .dropdown-items li a {
+ color: #1A1A1A;
+ font-size: 14px;
+ padding: 12px 8px; }
+ .pages-menu .dropdown .container .dropdown-items .dropdown-item:hover {
+ background-color: #F6BE00; }
+
+#main-menu .pages-menu .rpl-link {
+ font-family: "VIC-Bold", "Arial", "Helvetica", "sans-serif";
+ font-size: 0.875rem;
+ line-height: 1em;
+ font-weight: normal;
+ background-color: transparent;
+ padding: 0;
+ position: relative;
+ margin: auto 1.75rem auto auto; }
+ #main-menu .pages-menu .rpl-link::after {
+ content: "";
+ display: inline-block;
+ font-family: FontAwesome;
+ color: #011A3C; }
+ #main-menu .pages-menu .rpl-link.show::after {
+ transform: rotate(180deg);
+ transition: transform 0.3s ease; }
+
+#main-menu .pages-menu .dropdown {
+ margin-left: 20px;
+ inset: 0 60px auto -40px; }
+ #main-menu .pages-menu .dropdown .container {
+ flex-direction: row; }
+ #main-menu .pages-menu .dropdown .container .dropdown-header {
+ width: 25%; }
+ #main-menu .pages-menu .dropdown .container .dropdown-items {
+ width: 25%; }
+
+.dropdown-shown {
+ background-color: #FCEBB3 !important;
+ transition: background-color 0.3s ease; }
+
+.dropdown-hidden {
+ background-color: #F6BE00 !important;
+ transition: background-color 0.3s ease; }
+
.module-content .pagination {
margin: 0; }
@@ -1825,8 +1899,7 @@ nav {
padding: 10px; }
.resource-item .resource-summary {
flex-grow: 2;
- margin-right: 15px;
- word-break: break-all; }
+ margin-right: 15px; }
.resource-item .resource-icon {
max-width: 45px; }
.resource-item .resource-icon .format-label {
@@ -1837,6 +1910,9 @@ nav {
height: 60px;
width: 60px;
vertical-align: text-bottom; }
+ @media (min-width: 767px) {
+ .resource-item .resource-summary {
+ width: 24%; } }
.resource-list .resource-item {
display: flex;
@@ -1845,19 +1921,26 @@ nav {
align-items: flex-start; }
.resource-list .resource-item:hover {
background-color: transparent; }
- .resource-list .resource-item .btn-group {
- display: inline-block; }
-
-.resource-list .btn-group {
- position: relative;
- top: auto;
- right: auto; }
+ .resource-list .resource-item .buttons {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-end;
+ gap: 0.5rem; }
+ .resource-list .resource-item .btn {
+ border: 2px solid #F6BE00;
+ padding: 0.75rem; }
+ .resource-list .resource-item .btn-outline {
+ border-width: 2px;
+ background-color: #FFFFFF; }
+ .resource-list .resource-item .btn-api {
+ border-color: #3A833A;
+ color: #3A833A; }
@media (max-width: 767px) {
.resource-list .resource-item {
display: inline; }
- .resource-list .resource-item .btn-group {
- display: block; } }
+ .resource-list .buttons {
+ flex-direction: column; } }
.dropdown-menu {
border-color: #F6BE00; }
@@ -1865,23 +1948,48 @@ nav {
background-image: none;
background-color: #F6BE00; }
-.dataset-resources .badge {
- background: none;
- color: #465870;
- font-size: 0.875rem;
- padding: 0 0.25rem 0 0;
- text-shadow: none;
- text-transform: uppercase; }
- .dataset-resources .badge:hover, .dataset-resources .badge:focus {
+.dataset-resources {
+ display: inline; }
+ .dataset-resources .badge {
+ background: none;
color: #465870;
- text-decoration: underline; }
- .dataset-resources .badge:before {
- content: "|";
- padding-right: 0.625rem; }
+ font-size: 0.875rem;
+ padding: 0 0.25rem 0 0;
+ text-shadow: none;
+ text-transform: uppercase; }
+ .dataset-resources .badge:hover, .dataset-resources .badge:focus {
+ color: #465870;
+ text-decoration: underline; }
+ .dataset-resources .badge:before {
+ content: "|";
+ padding-right: 0.625rem; }
+ .dataset-resources li:first-child .badge:before {
+ content: "";
+ padding-right: 0; }
+
+.dataset-api {
+ display: inline;
+ float: right;
+ color: #465870;
+ font-size: 0.875rem; }
+ .dataset-api li {
+ display: inline;
+ padding-right: 50px; }
+ .dataset-api li:last-child {
+ padding-right: 0; }
+ .dataset-api i {
+ padding-right: 3px; }
+ .dataset-api .preview {
+ color: #011A3C; }
+ .dataset-api .api a {
+ color: #3A833A; }
-.dataset-resources li:first-child .badge:before {
- content: "";
- padding-right: 0; }
+@media (max-width: 767px) {
+ .dataset-api, .dataset-resources {
+ display: block; }
+ .dataset-api {
+ margin-top: 0.75rem;
+ float: unset; } }
.res_abstract_heading {
font-family: "VIC-Bold", "Arial", "Helvetica", "sans-serif";
@@ -1925,6 +2033,10 @@ nav {
font-family: "VIC-Regular", "Arial", "Helvetica", "sans-serif";
margin-bottom: 0.5rem; }
+@media (min-width: 576px) {
+ .api-modal {
+ max-width: 80%; } }
+
.dataset-resources {
margin-top: 0.75rem; }
.dataset-resources li a.badge {
@@ -3137,46 +3249,57 @@ a.close {
font-size: 1.5rem; }
.row.user-login-page .primary,
-.row.user-register-page .primary {
+.row.user-register-page .primary,
+.row.user-reset-page .primary {
float: none; }
.row.user-login-page .primary .page-heading,
- .row.user-register-page .primary .page-heading {
+ .row.user-register-page .primary .page-heading,
+ .row.user-reset-page .primary .page-heading {
margin-bottom: 4rem; }
.row.user-login-page .primary .sso-block,
- .row.user-register-page .primary .sso-block {
+ .row.user-register-page .primary .sso-block,
+ .row.user-reset-page .primary .sso-block {
padding: 0 30px; }
.row.user-login-page .primary .sso-block .sso-block-button,
- .row.user-register-page .primary .sso-block .sso-block-button {
+ .row.user-register-page .primary .sso-block .sso-block-button,
+ .row.user-reset-page .primary .sso-block .sso-block-button {
text-align: center;
margin-bottom: 2.25rem; }
.row.user-login-page .primary .sso-block .sso-block-button .btn,
- .row.user-register-page .primary .sso-block .sso-block-button .btn {
+ .row.user-register-page .primary .sso-block .sso-block-button .btn,
+ .row.user-reset-page .primary .sso-block .sso-block-button .btn {
width: 100%;
text-decoration: none; }
.row.user-login-page .primary .sso-block .sso-block--info,
- .row.user-register-page .primary .sso-block .sso-block--info {
+ .row.user-register-page .primary .sso-block .sso-block--info,
+ .row.user-reset-page .primary .sso-block .sso-block--info {
font-style: italic;
line-height: 1.3;
display: flex;
align-items: center;
margin-bottom: 2rem; }
.row.user-login-page .primary .sso-block .sso-block--info .info--icon,
- .row.user-register-page .primary .sso-block .sso-block--info .info--icon {
+ .row.user-register-page .primary .sso-block .sso-block--info .info--icon,
+ .row.user-reset-page .primary .sso-block .sso-block--info .info--icon {
margin: 0 10px; }
.row.user-login-page .primary .sso-block .sso-block--info .info--icon svg,
- .row.user-register-page .primary .sso-block .sso-block--info .info--icon svg {
+ .row.user-register-page .primary .sso-block .sso-block--info .info--icon svg,
+ .row.user-reset-page .primary .sso-block .sso-block--info .info--icon svg {
height: 32px;
width: 32px; }
.row.user-login-page .primary .sso-block .sso-block--info .info--text a,
- .row.user-register-page .primary .sso-block .sso-block--info .info--text a {
+ .row.user-register-page .primary .sso-block .sso-block--info .info--text a,
+ .row.user-reset-page .primary .sso-block .sso-block--info .info--text a {
text-decoration: underline; }
.row.user-login-page .primary .module-content,
- .row.user-register-page .primary .module-content {
+ .row.user-register-page .primary .module-content,
+ .row.user-reset-page .primary .module-content {
width: fit-content;
margin: 0 auto;
max-width: 655px; }
.row.user-login-page .primary .module-content .form-label,
- .row.user-register-page .primary .module-content .form-label {
+ .row.user-register-page .primary .module-content .form-label,
+ .row.user-reset-page .primary .module-content .form-label {
width: unset;
float: unset;
text-align: left;
@@ -3184,80 +3307,111 @@ a.close {
font-size: 1rem;
margin-bottom: 0.5rem; }
.row.user-login-page .primary .module-content .control-medium,
- .row.user-register-page .primary .module-content .control-medium {
+ .row.user-register-page .primary .module-content .control-medium,
+ .row.user-reset-page .primary .module-content .control-medium {
margin: 0;
margin-bottom: 1rem; }
.row.user-login-page .primary .module-content .control-medium .controls,
- .row.user-register-page .primary .module-content .control-medium .controls {
+ .row.user-register-page .primary .module-content .control-medium .controls,
+ .row.user-reset-page .primary .module-content .control-medium .controls {
margin-left: 0; }
.row.user-login-page .primary .module-content .control-medium input,
.row.user-login-page .primary .module-content .control-medium select,
.row.user-login-page .primary .module-content .control-medium textarea,
.row.user-register-page .primary .module-content .control-medium input,
.row.user-register-page .primary .module-content .control-medium select,
- .row.user-register-page .primary .module-content .control-medium textarea {
+ .row.user-register-page .primary .module-content .control-medium textarea,
+ .row.user-reset-page .primary .module-content .control-medium input,
+ .row.user-reset-page .primary .module-content .control-medium select,
+ .row.user-reset-page .primary .module-content .control-medium textarea {
width: 100%;
height: 50px;
background-color: #F6F6F9;
border: 1px solid #D7DBE0;
border-radius: 0.25rem; }
.row.user-login-page .primary .module-content .form-actions,
- .row.user-register-page .primary .module-content .form-actions {
+ .row.user-register-page .primary .module-content .form-actions,
+ .row.user-reset-page .primary .module-content .form-actions {
display: flex;
gap: 30px;
justify-content: space-between;
align-items: center;
margin-top: 3rem; }
+ .row.user-login-page .primary .module-content .form-actions.form-reset,
+ .row.user-register-page .primary .module-content .form-actions.form-reset,
+ .row.user-reset-page .primary .module-content .form-actions.form-reset {
+ justify-content: flex-end; }
.row.user-login-page .primary .module-content .form-actions .sign-up,
- .row.user-register-page .primary .module-content .form-actions .sign-up {
+ .row.user-register-page .primary .module-content .form-actions .sign-up,
+ .row.user-reset-page .primary .module-content .form-actions .sign-up {
font-family: "Vic-Bold", arial, sans-serif; }
.row.user-login-page .primary .module-content .form-actions .sign-up a,
- .row.user-register-page .primary .module-content .form-actions .sign-up a {
+ .row.user-register-page .primary .module-content .form-actions .sign-up a,
+ .row.user-reset-page .primary .module-content .form-actions .sign-up a {
color: #011A3C; }
.row.user-login-page .primary .module-content .form-actions .btn,
- .row.user-register-page .primary .module-content .form-actions .btn {
+ .row.user-register-page .primary .module-content .form-actions .btn,
+ .row.user-reset-page .primary .module-content .form-actions .btn {
width: 25%; }
+ .row.user-login-page .primary .module-content .form-actions .btn.btn-reset,
+ .row.user-register-page .primary .module-content .form-actions .btn.btn-reset,
+ .row.user-reset-page .primary .module-content .form-actions .btn.btn-reset {
+ width: 35%; }
.row.user-login-page .primary .module-content .form-actions .btn:disabled,
- .row.user-register-page .primary .module-content .form-actions .btn:disabled {
+ .row.user-register-page .primary .module-content .form-actions .btn:disabled,
+ .row.user-reset-page .primary .module-content .form-actions .btn:disabled {
width: unset;
margin-left: auto; }
.row.user-login-page .primary .module-content .password-reset,
- .row.user-register-page .primary .module-content .password-reset {
+ .row.user-register-page .primary .module-content .password-reset,
+ .row.user-reset-page .primary .module-content .password-reset {
font-size: 0.875rem;
text-align: right; }
.row.user-login-page .primary .module-content .password-reset a,
- .row.user-register-page .primary .module-content .password-reset a {
+ .row.user-register-page .primary .module-content .password-reset a,
+ .row.user-reset-page .primary .module-content .password-reset a {
color: #011A3C;
text-decoration: underline; }
@media (max-width: 767px) {
.row.user-login-page .primary,
- .row.user-register-page .primary {
+ .row.user-register-page .primary,
+ .row.user-reset-page .primary {
padding: 0; }
.row.user-login-page .primary .sso-block,
- .row.user-register-page .primary .sso-block {
+ .row.user-register-page .primary .sso-block,
+ .row.user-reset-page .primary .sso-block {
padding: 0; }
.row.user-login-page .primary .sso-block .sso-block-button,
- .row.user-register-page .primary .sso-block .sso-block-button {
+ .row.user-register-page .primary .sso-block .sso-block-button,
+ .row.user-reset-page .primary .sso-block .sso-block-button {
text-align: center;
margin-bottom: 1.5rem; }
.row.user-login-page .primary .sso-block .sso-block-button .btn,
- .row.user-register-page .primary .sso-block .sso-block-button .btn {
+ .row.user-register-page .primary .sso-block .sso-block-button .btn,
+ .row.user-reset-page .primary .sso-block .sso-block-button .btn {
word-wrap: break-word;
white-space: normal;
line-height: 1.3; }
.row.user-login-page .primary .module-content,
- .row.user-register-page .primary .module-content {
+ .row.user-register-page .primary .module-content,
+ .row.user-reset-page .primary .module-content {
max-width: unset;
width: 100%;
padding: 10px; }
.row.user-login-page .primary .module-content .form-actions .btn,
- .row.user-register-page .primary .module-content .form-actions .btn {
- padding: 16px; } }
+ .row.user-register-page .primary .module-content .form-actions .btn,
+ .row.user-reset-page .primary .module-content .form-actions .btn {
+ padding: 16px; }
+ .row.user-login-page .primary .module-content .form-actions .btn.btn-reset,
+ .row.user-register-page .primary .module-content .form-actions .btn.btn-reset,
+ .row.user-reset-page .primary .module-content .form-actions .btn.btn-reset {
+ width: fit-content; } }
@media (max-width: 991px) {
.row.user-login-page,
- .row.user-register-page {
+ .row.user-register-page,
+ .row.user-reset-page {
margin: 0; } }
.row.user-register-page .division-line {
@@ -3352,3 +3506,59 @@ a.close {
.dataTables_wrapper .pagination {
padding-top: 2.5rem; }
+
+.via-iar-delwp-dataset .delwp-resource-list .resource-item {
+ align-items: center;
+ gap: 1rem;
+ padding-bottom: 1rem; }
+ .via-iar-delwp-dataset .delwp-resource-list .resource-item .resource-icon img {
+ width: 50px; }
+ .via-iar-delwp-dataset .delwp-resource-list .resource-item .resource-summary p {
+ margin: 0; }
+ .via-iar-delwp-dataset .delwp-resource-list .resource-item .resource-summary .resource-summary__formats {
+ font-size: 0.875rem; }
+ .via-iar-delwp-dataset .delwp-resource-list .resource-item .btn-group .btn {
+ border: 2px #F6BE00 solid;
+ background: #fff;
+ color: #545454; }
+
+.via-iar-delwp-dataset .delwp-access-notes {
+ margin-top: 2rem;
+ margin-bottom: 1rem; }
+
+.via-iar-delwp-dataset #data-request-form {
+ margin-top: 4rem; }
+ .via-iar-delwp-dataset #data-request-form > h3 {
+ margin-bottom: 1rem; }
+ .via-iar-delwp-dataset #data-request-form > p {
+ font-size: 1.125rem;
+ margin-bottom: 2rem; }
+ .via-iar-delwp-dataset #data-request-form .form .form-group label {
+ float: unset;
+ width: auto;
+ color: #1a1a1a;
+ font-size: 1.125rem;
+ font-family: "VIC-Bold", "Arial", "Helvetica", "sans-serif";
+ margin-bottom: 1rem; }
+ .via-iar-delwp-dataset #data-request-form .form .form-group label span.required {
+ color: #aa0028;
+ font-family: "VIC-Regular", "Arial", "Helvetica", "sans-serif";
+ font-size: 1rem;
+ font-weight: normal; }
+ .via-iar-delwp-dataset #data-request-form .form .form-group .controls {
+ margin-left: 0; }
+ .via-iar-delwp-dataset #data-request-form .form .form-group input {
+ height: 50px; }
+ .via-iar-delwp-dataset #data-request-form .form .form-group input,
+ .via-iar-delwp-dataset #data-request-form .form .form-group textarea {
+ background-color: #f5f5f5;
+ border-color: #666666;
+ box-shadow: none; }
+ .via-iar-delwp-dataset #data-request-form .form .form-actions {
+ float: left; }
+ @media screen and (min-width: 768px) {
+ .via-iar-delwp-dataset #data-request-form {
+ max-width: 75%; } }
+
+.via-iar-delwp-dataset #dataset-contact {
+ display: none; }
diff --git a/ckanext/datavic_iar_theme/webassets/js/datavic-dropdown.js b/ckanext/datavic_iar_theme/webassets/js/datavic-dropdown.js
new file mode 100644
index 00000000..c37abdb0
--- /dev/null
+++ b/ckanext/datavic_iar_theme/webassets/js/datavic-dropdown.js
@@ -0,0 +1,34 @@
+this.ckan.module("datavic-dropdown", function ($) {
+ "use strict";
+
+ return {
+ options: {},
+ initialize: function () {
+
+ $(".rpl-site-header__inner").addClass("dropdown-hidden");
+
+ this.el.click(function () {
+ var header
+ var dropdown_top
+
+ if ($(window).width() <= 991) {
+ header = $("#mobile-menu").children(".rpl-site-header__inner");
+ dropdown_top = $(this).offset().top
+ $(this).next(".dropdown").css("transform", `translate(40px, ${dropdown_top}px)`);
+ } else {
+ header = $("#main-menu").children(".rpl-site-header__inner");
+ dropdown_top = header.offset().top + header.outerHeight(true) - 2
+ var dropdown_height = $("body").outerHeight() - dropdown_top
+ $(this).next(".dropdown").css("transform", `translate(40px, ${dropdown_top}px)`);
+ $(this).next(".dropdown").css("height", `${dropdown_height}px`);
+ }
+ $(this).next(".dropdown").slideToggle();
+ $(this).toggleClass("show")
+ $(this).next(".dropdown").toggleClass("dropdown-shown");
+ header.toggleClass("dropdown-hidden").toggleClass("dropdown-shown");
+
+
+ });
+ },
+ };
+});
diff --git a/ckanext/datavic_iar_theme/webassets/webassets.yml b/ckanext/datavic_iar_theme/webassets/webassets.yml
index 7921417d..55ee6e61 100644
--- a/ckanext/datavic_iar_theme/webassets/webassets.yml
+++ b/ckanext/datavic_iar_theme/webassets/webassets.yml
@@ -16,6 +16,7 @@ datavic-iar-theme-js:
- js/datavic-checkbox.js
- js/_datavic_autocomplete.js
- js/datavic-search-autocomplete.js
+ - js/datavic-dropdown.js
extra:
preload:
- base/main
diff --git a/test.ini b/test.ini
index 949de9ce..1dbfc04f 100644
--- a/test.ini
+++ b/test.ini
@@ -22,6 +22,7 @@ scheming.dataset_schemas =
scheming.presets =
ckanext.scheming:presets.json
ckanext.datavicmain:iar_presets.json
+ ckanext.alias:presets.yaml
scheming.dataset_fallback = false