mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2026-08-13 23:23:23 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c585d5c142 | ||
|
|
331a5318aa | ||
|
|
7b934c8419 | ||
|
|
a4a3154c64 | ||
|
|
fccbc9089f | ||
|
|
20122ab6c0 | ||
|
|
ab8a357137 | ||
|
|
6cba9a6d2b | ||
|
|
b66f7a75df | ||
|
|
b02b7aca14 | ||
|
|
56d5d223f3 | ||
|
|
c14168c194 | ||
|
|
5b71404fda | ||
|
|
926196b30f | ||
|
|
e74d2017fc | ||
|
|
ef1f268298 | ||
|
|
af61f927f1 | ||
|
|
d5b9686302 |
@@ -0,0 +1,23 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2020-2021 Graz University of Technology.
|
||||||
|
# Copyright (C) 2025 I-Form Advanced Manufacturing Research Centre.
|
||||||
|
#
|
||||||
|
# invenio-theme-iform is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the MIT License; see LICENSE file for more details.
|
||||||
|
|
||||||
|
# Extraction from Python source files
|
||||||
|
|
||||||
|
[python: **.py]
|
||||||
|
encoding = utf-8
|
||||||
|
|
||||||
|
# Extraction from Jinja2 templates
|
||||||
|
|
||||||
|
[jinja2: **/templates/**.html]
|
||||||
|
encoding = utf-8
|
||||||
|
|
||||||
|
# Extraction from JavaScript files
|
||||||
|
|
||||||
|
[javascript: **.js]
|
||||||
|
encoding = utf-8
|
||||||
|
extract_messages = $._, jQuery._
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2020-2021 Graz University of Technology.
|
||||||
|
#
|
||||||
|
# invenio-theme-iform is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
|
# details.
|
||||||
|
|
||||||
|
# Extraction from Python source files
|
||||||
|
|
||||||
|
[python: **.py]
|
||||||
|
encoding = utf-8
|
||||||
|
|
||||||
|
# Extraction from Jinja2 templates
|
||||||
|
|
||||||
|
[jinja2: **/templates/**.html]
|
||||||
|
encoding = utf-8
|
||||||
|
|
||||||
|
# Extraction from JavaScript files
|
||||||
|
|
||||||
|
[javascript: **.js]
|
||||||
|
encoding = utf-8
|
||||||
|
extract_messages = $._, jQuery._
|
||||||
+54
-18
@@ -3,10 +3,11 @@
|
|||||||
"devenv": {
|
"devenv": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "src/modules",
|
"dir": "src/modules",
|
||||||
"lastModified": 1746707904,
|
"lastModified": 1782860656,
|
||||||
|
"narHash": "sha256-HiSNP0/eEhKGZBWC6kLZVN8I6j6AwVnI4gjeH25+/5k=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "devenv",
|
"repo": "devenv",
|
||||||
"rev": "fada79d97f2066c444766d039b0a62affd3e3cab",
|
"rev": "3f6df48c00d8aa408f0440f2707662aa91a1f033",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -19,14 +20,15 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733328505,
|
"lastModified": 1767039857,
|
||||||
"owner": "edolstra",
|
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||||
|
"owner": "NixOS",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "edolstra",
|
"owner": "NixOS",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -35,15 +37,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": [
|
"nixpkgs": "nixpkgs"
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746537231,
|
"lastModified": 1781733627,
|
||||||
|
"narHash": "sha256-U3yTuGBnmXvXoQI3qkpfEDsn9RovQPAjN7ndRco+3u0=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "fa466640195d38ec97cf0493d6d6882bc4d14969",
|
"rev": "3bbec39bc90eadfa031e6f3b77272f3f60803e39",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -61,6 +62,7 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709087332,
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "gitignore.nix",
|
"repo": "gitignore.nix",
|
||||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
@@ -74,10 +76,47 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1745934659,
|
"lastModified": 1770073757,
|
||||||
|
"narHash": "sha256-Vy+G+F+3E/Tl+GMNgiHl9Pah2DgShmIUBJXmbiQPHbI=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "47472570b1e607482890801aeaf29bfb749884f6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1781607440,
|
||||||
|
"narHash": "sha256-rxO+uc/KFbSJp+pgyXRuAX6QlG9hJdnt0BXpEQRXY+U=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "3e41b24abd260e8f71dbe2f5737d24122f972158",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-src": "nixpkgs-src"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1782132010,
|
||||||
|
"narHash": "sha256-ZnAVHdVrotp80iIMm5CSR1fdxPlw7Uwmwxb+O/wsgZ8=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "devenv-nixpkgs",
|
"repo": "devenv-nixpkgs",
|
||||||
"rev": "fbc071e5c11e23fba50037de37268e3d8a1858eb",
|
"rev": "12866ae2dddbc0ab8b329915f8072bb9c75bde89",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -91,13 +130,10 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"devenv": "devenv",
|
"devenv": "devenv",
|
||||||
"git-hooks": "git-hooks",
|
"git-hooks": "git-hooks",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs_2"
|
||||||
"pre-commit-hooks": [
|
|
||||||
"git-hooks"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
"version": 7
|
"version": 7
|
||||||
}
|
}
|
||||||
@@ -2,3 +2,5 @@
|
|||||||
inputs:
|
inputs:
|
||||||
nixpkgs:
|
nixpkgs:
|
||||||
url: github:cachix/devenv-nixpkgs/rolling
|
url: github:cachix/devenv-nixpkgs/rolling
|
||||||
|
git-hooks:
|
||||||
|
url: github:cachix/git-hooks.nix
|
||||||
|
|||||||
@@ -8,4 +8,4 @@
|
|||||||
|
|
||||||
"""Metadata for this python module."""
|
"""Metadata for this python module."""
|
||||||
|
|
||||||
__version__ = "2025.6.3"
|
__version__ = "2026.8.12"
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2020-2023 Graz University of Technology.
|
||||||
|
Copyright (C) 2023-2026 Cian-H/iform-invenio (I-Form).
|
||||||
|
|
||||||
|
invenio-theme-iform is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
|
details.
|
||||||
|
*/
|
||||||
|
|
||||||
import $ from "jquery";
|
import $ from "jquery";
|
||||||
import "semantic-ui-css";
|
import "semantic-ui-css";
|
||||||
import { MultipleOptionsSearchBar } from "@js/invenio_search_ui/components";
|
import { MultipleOptionsSearchBar } from "@js/invenio_search_ui/components";
|
||||||
@@ -7,28 +16,8 @@ import React from "react";
|
|||||||
|
|
||||||
// called on document ready
|
// called on document ready
|
||||||
$(function () {
|
$(function () {
|
||||||
importZammadScript();
|
|
||||||
syncLogoHover();
|
syncLogoHover();
|
||||||
});
|
});
|
||||||
|
|
||||||
function importZammadScript() {
|
|
||||||
let scriptNode = document.createElement("hidden"); //needed for zammad script
|
|
||||||
scriptNode.id = "zammad_form_script";
|
|
||||||
scriptNode.src = "https://ub-support.tugraz.at/assets/form/form.js";
|
|
||||||
document.head.appendChild(scriptNode);
|
|
||||||
|
|
||||||
$.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => {
|
|
||||||
$("#feedback-form").ZammadForm({
|
|
||||||
messageTitle: "Contact us",
|
|
||||||
showTitle: true,
|
|
||||||
messageSubmit: "Submit",
|
|
||||||
messageThankYou:
|
|
||||||
"Thank you for your message, (#%s). We will get back to you as quickly as possible!",
|
|
||||||
modal: true,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// used for sticky test instance notification
|
// used for sticky test instance notification
|
||||||
$(".ui.sticky.test-instance").sticky({
|
$(".ui.sticky.test-instance").sticky({
|
||||||
context: "body",
|
context: "body",
|
||||||
@@ -46,6 +35,23 @@ window.toggleVisibility = toggleVisibility;
|
|||||||
const headerSearchbar = document.getElementById("header-search-bar");
|
const headerSearchbar = document.getElementById("header-search-bar");
|
||||||
const searchBarOptions = JSON.parse(headerSearchbar.dataset.options);
|
const searchBarOptions = JSON.parse(headerSearchbar.dataset.options);
|
||||||
|
|
||||||
|
// Quick upload dropdown
|
||||||
|
$("#quick-upload-dropdown.ui.dropdown").dropdown({
|
||||||
|
showOnFocus: false,
|
||||||
|
selectOnKeydown: false,
|
||||||
|
action: (text, value, element) => {
|
||||||
|
// needed to trigger navigation on keyboard interaction
|
||||||
|
let path = element.attr("href");
|
||||||
|
window.location.pathname = path;
|
||||||
|
},
|
||||||
|
onShow: () => {
|
||||||
|
$("#quick-upload-dropdown-btn").attr("aria-expanded", true);
|
||||||
|
},
|
||||||
|
onHide: () => {
|
||||||
|
$("#quick-upload-dropdown-btn").attr("aria-expanded", false);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// Synchronises the hover states of the subcomponents of the logo
|
// Synchronises the hover states of the subcomponents of the logo
|
||||||
export function syncLogoHover() {
|
export function syncLogoHover() {
|
||||||
const logoGrad = document.getElementById("int-header-logo-grad");
|
const logoGrad = document.getElementById("int-header-logo-grad");
|
||||||
@@ -77,10 +83,16 @@ export function syncLogoHover() {
|
|||||||
|
|
||||||
window.syncLogoHover = syncLogoHover;
|
window.syncLogoHover = syncLogoHover;
|
||||||
|
|
||||||
|
const HeaderSearchBar = () => {
|
||||||
|
return (
|
||||||
|
<MultipleOptionsSearchBar
|
||||||
|
options={searchBarOptions}
|
||||||
|
placeholder={i18next.t("Search records...")}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<MultipleOptionsSearchBar
|
<HeaderSearchBar />,
|
||||||
options={searchBarOptions}
|
|
||||||
placeholder={i18next.t("Search records...")}
|
|
||||||
/>,
|
|
||||||
headerSearchbar,
|
headerSearchbar,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2024 Graz University of Technology.
|
// Copyright (C) 2025-2026 Cian-H/iform-invenio (I-Form).
|
||||||
//
|
//
|
||||||
// invenio-theme-iform is free software; you can redistribute it and/or modify it
|
// invenio-theme-iform is free software; you can redistribute it and/or modify it
|
||||||
// under the terms of the MIT License; see LICENSE file for more details.
|
// under the terms of the MIT License; see LICENSE file for more details.
|
||||||
@@ -14,23 +14,13 @@ async function generateForm() {
|
|||||||
email = json?.email || "???";
|
email = json?.email || "???";
|
||||||
}
|
}
|
||||||
|
|
||||||
// show form
|
// show message
|
||||||
$.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => {
|
$("#anchor-unlock-form").html(
|
||||||
$("#anchor-unlock-form").ZammadForm({
|
`<div class="ui warning message">
|
||||||
attributes: [
|
<div class="header">Account Unlocking</div>
|
||||||
{},
|
<p>Please contact an administrator to request unlocking for your account (${email}).</p>
|
||||||
{ defaultValue: email },
|
</div>`
|
||||||
{
|
);
|
||||||
defaultValue: `Could you unlock my account (${email}) for research-uploads?`,
|
|
||||||
// TODO: add to defaultValue once policy on how to get accepted is decided...
|
|
||||||
},
|
|
||||||
],
|
|
||||||
modal: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
// focus first entry of now-shown form
|
|
||||||
document.getElementById("zammad-form-name-inline").focus();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|||||||
@@ -96,6 +96,34 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.short-menu-left-lang {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 10px;
|
||||||
|
font-size: 17px !important;
|
||||||
|
font-weight: 300;
|
||||||
|
|
||||||
|
& a {
|
||||||
|
padding: 5px 8px;
|
||||||
|
background-color: transparent;
|
||||||
|
color: #000 !important;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
transition: background-color 0.2s ease, color 0.2s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #000 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: #e0e1e2 !important;
|
||||||
|
color: #000 !important;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.search-icon-header {
|
.search-icon-header {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
||||||
@@ -130,7 +158,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.short-menu-left-search {
|
.short-menu-left-search {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
vertical-align: middle;
|
||||||
margin: 12px 9px 6px 0;
|
margin: 12px 9px 6px 0;
|
||||||
color: @primaryLinkInverted;
|
color: @primaryLinkInverted;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,14 @@
|
|||||||
|
|
||||||
"""invenio module for I-Form theme."""
|
"""invenio module for I-Form theme."""
|
||||||
|
|
||||||
INVENIO_THEME_IFORM_DEFAULT_VALUE = "I-Form Repository"
|
from flask_babel import lazy_gettext as _
|
||||||
|
I18N_LANGUAGES = [
|
||||||
|
("en", _("English")),
|
||||||
|
("ga", _("Irish")),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
INVENIO_THEME_IFORM_DEFAULT_VALUE = _("I-Form Repository")
|
||||||
"""Default value for the application."""
|
"""Default value for the application."""
|
||||||
|
|
||||||
INVENIO_THEME_IFORM_BASE_TEMPLATE = "invenio_theme_iform/base.html"
|
INVENIO_THEME_IFORM_BASE_TEMPLATE = "invenio_theme_iform/base.html"
|
||||||
@@ -55,16 +62,19 @@ THEME_HEADER_TEMPLATE = "invenio_theme_iform/header.html"
|
|||||||
THEME_FRONTPAGE = False
|
THEME_FRONTPAGE = False
|
||||||
"""Use default frontpage."""
|
"""Use default frontpage."""
|
||||||
|
|
||||||
|
THEME_HEADER_RECORDS_TEMPLATE = "invenio_theme_iform/accounts/header_records.html"
|
||||||
|
"""Records management page header"""
|
||||||
|
|
||||||
THEME_HEADER_LOGIN_TEMPLATE = "invenio_theme_iform/accounts/header_login.html"
|
THEME_HEADER_LOGIN_TEMPLATE = "invenio_theme_iform/accounts/header_login.html"
|
||||||
"""login page header"""
|
"""login page header"""
|
||||||
|
|
||||||
THEME_FOOTER_TEMPLATE = "invenio_theme_iform/footer.html"
|
THEME_FOOTER_TEMPLATE = "invenio_theme_iform/footer.html"
|
||||||
"""footer template"""
|
"""footer template"""
|
||||||
|
|
||||||
THEME_FRONTPAGE_TITLE = "I-Form Repository"
|
THEME_FRONTPAGE_TITLE = _("I-Form Repository")
|
||||||
"""Frontpage title."""
|
"""Frontpage title."""
|
||||||
|
|
||||||
THEME_SITENAME = "Repository"
|
THEME_SITENAME = _("Repository")
|
||||||
"""Site name."""
|
"""Site name."""
|
||||||
|
|
||||||
# Invenio-accounts
|
# Invenio-accounts
|
||||||
@@ -106,7 +116,9 @@ DEPOSITS_HEADER_TEMPLATE = "invenio_theme_iform/header.html"
|
|||||||
# SEARCH_UI_SEARCH_TEMPLATE = "invenio_theme_iform/search.html"
|
# SEARCH_UI_SEARCH_TEMPLATE = "invenio_theme_iform/search.html"
|
||||||
# """override the default search page"""
|
# """override the default search page"""
|
||||||
|
|
||||||
IFORM_ROUTES = {
|
THEME_IFORM_ROUTES = {
|
||||||
"index": "/",
|
"index": "/",
|
||||||
"comingsoon": "/comingsoon",
|
"comingsoon": "/comingsoon",
|
||||||
|
"records-search": "/records/search",
|
||||||
|
"overview": "/me/overview",
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-14
@@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
from flask import g, has_request_context
|
from flask import g, has_request_context
|
||||||
from flask_login import login_required
|
from flask_login import login_required
|
||||||
from invenio_records_marc21.ui.theme import current_identity_can_view
|
|
||||||
|
|
||||||
from . import config
|
from . import config
|
||||||
from .views import index, locked, require_iform_authenticated
|
from .views import index, locked, require_iform_authenticated
|
||||||
@@ -33,19 +32,6 @@ class InvenioThemeIform(object):
|
|||||||
|
|
||||||
app.register_error_handler(423, locked)
|
app.register_error_handler(423, locked)
|
||||||
|
|
||||||
@app.context_processor
|
|
||||||
def inject_visibility():
|
|
||||||
def can_view_marc21():
|
|
||||||
try:
|
|
||||||
# Only check if we're in a request context and identity exists
|
|
||||||
if has_request_context() and hasattr(g, "identity") and g.identity:
|
|
||||||
return current_identity_can_view()
|
|
||||||
return False
|
|
||||||
except (AttributeError, RuntimeError):
|
|
||||||
return False
|
|
||||||
|
|
||||||
return {"can_view_marc21": can_view_marc21()}
|
|
||||||
|
|
||||||
app.extensions["invenio-theme-iform"] = self
|
app.extensions["invenio-theme-iform"] = self
|
||||||
|
|
||||||
def init_config(self, app):
|
def init_config(self, app):
|
||||||
@@ -61,6 +47,16 @@ def finalize_app(app):
|
|||||||
guard_view_functions(app)
|
guard_view_functions(app)
|
||||||
|
|
||||||
|
|
||||||
|
def create_quick_upload_submenu(app):
|
||||||
|
"""Create a submenu for the quick-upload menu."""
|
||||||
|
root_menu = app.extensions["menu"].root_node
|
||||||
|
|
||||||
|
quick_upload_submenu = root_menu.submenu("quick_upload")
|
||||||
|
quick_upload_submenu._text = "Quick upload"
|
||||||
|
quick_upload_submenu._order = 1
|
||||||
|
quick_upload_submenu.register("records.upload", "Upload Research Data")
|
||||||
|
|
||||||
|
|
||||||
def modify_user_dashboard(app):
|
def modify_user_dashboard(app):
|
||||||
"""Modify user dashboard."""
|
"""Modify user dashboard."""
|
||||||
root_menu = app.extensions["menu"].root_node
|
root_menu = app.extensions["menu"].root_node
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright (C) 2020-2023 Graz University of Technology.
|
|
||||||
#
|
|
||||||
# invenio-theme-iform is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
||||||
# details.
|
|
||||||
|
|
||||||
"""Frontpage records."""
|
|
||||||
|
|
||||||
from invenio_search.api import RecordsSearch
|
|
||||||
|
|
||||||
|
|
||||||
class FrontpageRecordsSearch(RecordsSearch):
|
|
||||||
"""Search class for records that goes on the frontpage."""
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
"""Default index and filter for frontpage search."""
|
|
||||||
|
|
||||||
index = "global-search"
|
|
||||||
@@ -8,6 +8,6 @@
|
|||||||
{% extends config.THEME_ERROR_TEMPLATE %}
|
{% extends config.THEME_ERROR_TEMPLATE %}
|
||||||
|
|
||||||
{% block message %}
|
{% block message %}
|
||||||
<h1><i class="bolt icon"></i> Locked</h1>
|
<h1><i class="bolt icon"></i> {{ _("Locked") }}</h1>
|
||||||
<p>The resource that is being accessed is locked.</p>
|
<p>{{ _("The resource that is being accessed is locked.") }}</p>
|
||||||
{% endblock message %}
|
{% endblock message %}
|
||||||
|
|||||||
@@ -88,8 +88,8 @@
|
|||||||
>
|
>
|
||||||
{% if not config.THEME_IFORM_PRODUCTION %}
|
{% if not config.THEME_IFORM_PRODUCTION %}
|
||||||
<div class="ui sticky test-instance">
|
<div class="ui sticky test-instance">
|
||||||
<h4>"Test Instance"</h4>
|
<h4>{{ _("Test Instance") }}</h4>
|
||||||
<p>"This is the test instance of the I-Form Repository."</p>
|
<p>{{ _("This is the test instance of the I-Form Repository.") }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- block body %}
|
{%- block body %}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<div class="short-menu-right-button">
|
<div class="short-menu-right-button">
|
||||||
<a href="{{ url_for_security('login', next=request.path) }}" class="no-decoration">
|
<a href="{{ url_for_security('login', next=request.path) }}" class="no-decoration">
|
||||||
{{ _ ("Log in") }}
|
{{ _("Log in") }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{%- else %}
|
{%- else %}
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="short-menu-right-button">
|
<div class="short-menu-right-button">
|
||||||
<a class="dropdown-item no-decoration" href="{{ url_for_security('logout') }}"
|
<a class="dropdown-item no-decoration" href="{{ url_for_security('logout') }}"
|
||||||
>Sign out</a
|
>{{ _("Sign out") }}</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="ui login segment padded">
|
<div class="ui login segment padded">
|
||||||
<div class="divider hidden"></div>
|
<div class="divider hidden"></div>
|
||||||
{%- block form_header %}
|
{%- block form_header %}
|
||||||
<h3 class="ui login header">Log in to Repository</h3>
|
<h3 class="ui login header">{{ _("Log in to Repository") }}</h3>
|
||||||
{%- endblock form_header %}
|
{%- endblock form_header %}
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<!--Log in with SSO-->
|
<!--Log in with SSO-->
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
class="login-page-button ui fluid large button"
|
class="login-page-button ui fluid large button"
|
||||||
href="{{ url_for('sso_saml.sso', idp=name) }}"
|
href="{{ url_for('sso_saml.sso', idp=name) }}"
|
||||||
>
|
>
|
||||||
Log in with
|
{{ _("Log in with") }}
|
||||||
{{ config.SSO_SAML_IDPS[name]['title']|default("SAML", true) }}
|
{{ config.SSO_SAML_IDPS[name]['title']|default("SAML", true) }}
|
||||||
<img
|
<img
|
||||||
src="{{ url_for('static', filename=config.INVENIO_THEME_IFORM_ICON) }}"
|
src="{{ url_for('static', filename=config.INVENIO_THEME_IFORM_ICON) }}"
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{%- if config.ACCOUNTS_LOCAL_LOGIN_ENABLED %}
|
{%- if config.ACCOUNTS_LOCAL_LOGIN_ENABLED %}
|
||||||
<div class="ui horizontal divider">Or</div>
|
<div class="ui horizontal divider">{{ _("Or") }}</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
{%- set accordion_active = "active" if form.errors else "" %}
|
{%- set accordion_active = "active" if form.errors else "" %}
|
||||||
<div class="ui styled accordion">
|
<div class="ui styled accordion">
|
||||||
<div class="title trigger {{ accordion_active }}">
|
<div class="title trigger {{ accordion_active }}">
|
||||||
Log in with repository credentials
|
{{ _("Log in with repository credentials") }}
|
||||||
<i class="user icon button"></i>
|
<i class="user icon button"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="content {{ accordion_active }}">
|
<div class="content {{ accordion_active }}">
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
type="submit"
|
type="submit"
|
||||||
class="ui fluid large submit button"
|
class="ui fluid large submit button"
|
||||||
>
|
>
|
||||||
<i class="ui sign-in icon"></i>Log In
|
<i class="ui sign-in icon"></i>{{ _("Log In") }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
{% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %}
|
{% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %}
|
||||||
<a
|
<a
|
||||||
href="{{ url_for_security('register', next=request.args.get('next')) }}"
|
href="{{ url_for_security('register', next=request.args.get('next')) }}"
|
||||||
>Sign up</a
|
>{{ _("Sign up") }}</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<a
|
<a
|
||||||
class="ui inverted header tiny"
|
class="ui inverted header tiny"
|
||||||
href="{{ url_for_security('forgot_password') }}"
|
href="{{ url_for_security('forgot_password') }}"
|
||||||
>Forgot password?</a
|
>{{ _("Forgot password?") }}</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@@ -14,25 +14,23 @@
|
|||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui stackable two column grid">
|
<div class="ui stackable two column grid">
|
||||||
<div class="centered row">
|
<div class="centered row">
|
||||||
<h1 class="ui header">Create an Account</h1>
|
<h1 class="ui header">{{ _("Create an Account") }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column" id="switch_left">
|
<div class="column" id="switch_left">
|
||||||
<div class="ui basic segment">
|
<div class="ui basic segment">
|
||||||
<h4 class="ui header">Citeable. Discoverable.</h4>
|
<h4 class="ui header">{{ _("Citeable. Discoverable.") }}</h4>
|
||||||
<p class="bodytext">
|
<p class="bodytext">
|
||||||
Uploads get a Digital Object Identifier (DOI) to make them easily and
|
{{ _("Uploads get a Digital Object Identifier (DOI) to make them easily and uniquely citeable.") }}
|
||||||
uniquely citeable.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h4 class="ui header">Communities.</h4>
|
<h4 class="ui header">{{ _("Communities.") }}</h4>
|
||||||
<p class="bodytext">
|
<p class="bodytext">
|
||||||
Accept or reject uploads to your own community (e.g workshops, EU projects,
|
{{ _("Accept or reject uploads to your own community (e.g workshops, EU projects, institutions or entire disciplines).") }}
|
||||||
institutions or entire disciplines).
|
|
||||||
</p>
|
</p>
|
||||||
<h4 class="ui header">Trusted Research Data Management</h4>
|
<h4 class="ui header">{{ _("Trusted Research Data Management") }}</h4>
|
||||||
<p class="bodytext">
|
<p class="bodytext">
|
||||||
Built on top of I-Form expertise in the managing of research data.
|
{{ _("Built on top of I-Form expertise in the managing of research data.") }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,12 +40,12 @@
|
|||||||
{%- if config.INVENIO_CONFIG_IFORM_SHIBBOLETH %}
|
{%- if config.INVENIO_CONFIG_IFORM_SHIBBOLETH %}
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<a
|
<a
|
||||||
href="{{ url_for("sso_saml.sso", idp="idp") }}"
|
href="{{ url_for('sso_saml.sso', idp='idp') }}"
|
||||||
class="login-page-button ui fluid large button"
|
class="login-page-button ui fluid large button"
|
||||||
>
|
>
|
||||||
<span style="font-size: 18px;">Sign up with I-Form</span>
|
<span style="font-size: 18px;">{{ _("Sign up with I-Form") }}</span>
|
||||||
<img
|
<img
|
||||||
src="{{ url_for("static", filename=config.INVENIO_THEME_IFORM_ICON) }}"
|
src="{{ url_for('static', filename=config.INVENIO_THEME_IFORM_ICON) }}"
|
||||||
height="20px"
|
height="20px"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
@@ -67,13 +65,13 @@
|
|||||||
<div class="ui padded centered large form">
|
<div class="ui padded centered large form">
|
||||||
<div class="ui styled accordion">
|
<div class="ui styled accordion">
|
||||||
<div class="title trigger {{ accordion_active }}">
|
<div class="title trigger {{ accordion_active }}">
|
||||||
Sign up with repository credentials
|
{{ _("Sign up with repository credentials") }}
|
||||||
<i class="user icon button"></i>
|
<i class="user icon button"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="content {{ accordion_active }}">
|
<div class="content {{ accordion_active }}">
|
||||||
<form
|
<form
|
||||||
class="ui large form"
|
class="ui large form"
|
||||||
action="{{ url_for_security("register") }}"
|
action="{{ url_for_security('register') }}"
|
||||||
method="POST"
|
method="POST"
|
||||||
name="register_user_form"
|
name="register_user_form"
|
||||||
>
|
>
|
||||||
@@ -93,7 +91,7 @@
|
|||||||
|
|
||||||
<div class="centered row">
|
<div class="centered row">
|
||||||
<button type="submit" class="ui fluid large submit button">
|
<button type="submit" class="ui fluid large submit button">
|
||||||
<i class="ui edit outline icon"></i>Sign up
|
<i class="ui edit outline icon"></i>{{ _("Sign up") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
{%- endblock head_title %}
|
{%- endblock head_title %}
|
||||||
|
|
||||||
{%- block head_links %}
|
{%- block head_links %}
|
||||||
<link rel="shortcut icon" href="{{ url_for("static", filename="favicon.ico") }}" />
|
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" />
|
||||||
|
|
||||||
{%- if keywords %}
|
{%- if keywords %}
|
||||||
<link rel="canonical" href="{{ canonical_url }}" />
|
<link rel="canonical" href="{{ canonical_url }}" />
|
||||||
|
|||||||
@@ -8,33 +8,27 @@
|
|||||||
#}
|
#}
|
||||||
|
|
||||||
<div class="ui segment" style="padding-bottom: 10px;">
|
<div class="ui segment" style="padding-bottom: 10px;">
|
||||||
<h4>Good reasons to use the I-Form Repository</h4>
|
<h4>{{ _("Good reasons to use the I-Form Repository") }}</h4>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>Safe</strong> — Your research results are permanently available.</li>
|
<li><strong>{{ _("Safe") }}</strong> — {{ _("Your research results are permanently available.") }}</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>Trusted</strong> — A service from I-Form, based on software developed by
|
<strong>{{ _("Trusted") }}</strong> — {{ _("A service from I-Form, based on software developed by CERN.") }}
|
||||||
CERN.
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>Citeable</strong> — Every upload is assigned a Digital Object Identifier
|
<strong>{{ _("Citeable") }}</strong> — {{ _("Every upload is assigned a Digital Object Identifier (DOI).") }}
|
||||||
(DOI).
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>No waiting time</strong> — Uploads are made available online as soon as
|
<strong>{{ _("No waiting time") }}</strong> — {{ _("Uploads are made available online as soon as you hit publish. Your DOI is registered within seconds.") }}
|
||||||
you hit publish. Your DOI is registered within seconds.
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>Open or closed</strong> — You determine the visibility of your uploads. A
|
<strong>{{ _("Open or closed") }}</strong> — {{ _("You determine the visibility of your uploads. A restricted access mode is possible.") }}
|
||||||
restricted access mode is possible.
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>Versioning</strong> — Easily update your dataset with the versioning
|
<strong>{{ _("Versioning") }}</strong> — {{ _("Easily update your dataset with the versioning feature.") }}
|
||||||
feature.
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>Usage statistics</strong> — All uploads display standards compliant usage
|
<strong>{{ _("Usage statistics") }}</strong> — {{ _("All uploads display standards compliant usage statistics.") }} <a href="help/statistics">({{ _("More") }})</a>
|
||||||
statistics. <a href="help/statistics">(More)</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,19 +7,19 @@
|
|||||||
#}
|
#}
|
||||||
|
|
||||||
<div class="ui segment">
|
<div class="ui segment">
|
||||||
<h4>Need help?</h4>
|
<h4>{{ _("Need help?") }}</h4>
|
||||||
|
|
||||||
{%- if config.THEME_IFORM_CONTACT_FORM %}
|
{%- if config.THEME_IFORM_CONTACT_FORM %}
|
||||||
<div style="padding-bottom: 10px;">
|
<div style="padding-bottom: 10px;">
|
||||||
<a id="feedback-form" class="fluid ui button">Contact us</a>
|
<a id="feedback-form" class="fluid ui button">{{ _("Contact us") }}</a>
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<p>We can help with:</p>
|
<p>{{ _("We can help with:") }}</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Uploading your research results, software, preprints, etc.</li>
|
<li>{{ _("Uploading your research results, software, preprints, etc.") }}</li>
|
||||||
<li>Increasing upload limit beyond our default policy of 10GB.</li>
|
<li>{{ _("Increasing upload limit beyond our default policy of 10GB.") }}</li>
|
||||||
<li>Establishing contact with data stewards.</li>
|
<li>{{ _("Establishing contact with data stewards.") }}</li>
|
||||||
<li>Finding individual solutions.</li>
|
<li>{{ _("Finding individual solutions.") }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,10 +8,12 @@
|
|||||||
{% extends config.THEME_ERROR_TEMPLATE %}
|
{% extends config.THEME_ERROR_TEMPLATE %}
|
||||||
|
|
||||||
{% block message %}
|
{% block message %}
|
||||||
<h1>Internal server error</h1>
|
<h1>{{ _("Internal server error") }}</h1>
|
||||||
<p>
|
<p>
|
||||||
Please contact <a href="mailto:{{ config.THEME_IFORM_SUPPORT_EMAIL }}">our support</a> to
|
{{ _(
|
||||||
let us know about this error.
|
'Please contact <a href="mailto:{support_email}">our support</a>\n to let us know about this error.'
|
||||||
|
).format(support_email=config.THEME_IFORM_SUPPORT_EMAIL)|safe
|
||||||
|
}}
|
||||||
</p>
|
</p>
|
||||||
{# TODO: provide g.sentry_event_id here once sentry is configured, cf. invenio_theme/500.html #}
|
{# TODO: provide g.sentry_event_id here once sentry is configured, cf. invenio_theme/500.html #}
|
||||||
{% endblock message %}
|
{% endblock message %}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="doubling three column row">
|
<div class="doubling three column row">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2>Repository</h2>
|
<h2>{{ _("Repository") }}</h2>
|
||||||
<div class="ui list">
|
<div class="ui list">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<a
|
<a
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
title="Repository documentation"
|
title="Repository documentation"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
Documentation <i class="external alternate icon"></i>
|
{{ _("Documentation") }} <i class="external alternate icon"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
title="Quick guide"
|
title="Quick guide"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
Reference Guide <i class="download icon"></i>
|
{{ _("Reference Guide") }} <i class="download icon"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
href="{{ url_for('invenio_app_rdm.help_search') }}"
|
href="{{ url_for('invenio_app_rdm.help_search') }}"
|
||||||
title="Search guide"
|
title="Search guide"
|
||||||
>
|
>
|
||||||
Search Guide<i class="angle right icon"></i>
|
{{ _("Search Guide") }}<i class="angle right icon"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
title="General Data Protection Rights"
|
title="General Data Protection Rights"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
Data Protection <i class="download icon"></i>
|
{{ _("Data Protection") }} <i class="download icon"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -69,53 +69,32 @@
|
|||||||
title="Terms and Conditions"
|
title="Terms and Conditions"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
Terms and Conditions <i class="download icon"></i>
|
{{ _("Terms and Conditions") }} <i class="download icon"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2>Features</h2>
|
<h2>{{ _("Features") }}</h2>
|
||||||
|
|
||||||
<div class="ui list">
|
<div class="ui list">
|
||||||
<div class="item">Scalability</div>
|
<div class="item">{{ _("Scalability") }}</div>
|
||||||
<div class="item">Institutional integration</div>
|
<div class="item">{{ _("Institutional integration") }}</div>
|
||||||
<div class="item">Next Generation Repository</div>
|
<div class="item">{{ _("Next Generation Repository") }}</div>
|
||||||
<div class="item">Repository Profiles</div>
|
<div class="item">{{ _("Repository Profiles") }}</div>
|
||||||
<div class="item">Resilient</div>
|
<div class="item">{{ _("Resilient") }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="column">
|
|
||||||
<h2>Connected Services</h2>
|
|
||||||
<div class="ui list">
|
|
||||||
<div class="item">
|
|
||||||
<a href="https://pure.tugraz.at" title="PURE" target="_blank">
|
|
||||||
PURE <i class="external alternate icon"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="item">
|
|
||||||
<a href="http://campusonline.tugraz.at" title="CAMPUS online" target="_blank">
|
|
||||||
CampusOnline <i class="external alternate icon"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="item">
|
|
||||||
<a href="https://rdm.i-form.ie" title="Research Data Management" target="_blank">
|
|
||||||
Research Data Management <i class="external alternate icon"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2>Accessibility</h2>
|
<h2>{{ _("Accessibility") }}</h2>
|
||||||
<div class="ui list">
|
<div class="ui list">
|
||||||
<div class="item">Tip:</div>
|
<div class="item">{{ _("Tip:") }}</div>
|
||||||
<div class="item">Use Ctrl + and Crtl -</div>
|
<div class="item">{{ _("Use Ctrl + and Crtl -") }}</div>
|
||||||
<div class="item">to change the font size.</div>
|
<div class="item">{{ _("to change the font size.") }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,14 +104,14 @@
|
|||||||
<div class="doubling two column row">
|
<div class="doubling two column row">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="logos">
|
<div class="logos">
|
||||||
<strong>Powered by</strong>
|
<strong>{{ _("Powered by") }}</strong>
|
||||||
<a
|
<a
|
||||||
href="http://inveniosoftware.org/products/rdm"
|
href="http://inveniosoftware.org/products/rdm"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
title="invenioRDM"
|
title="invenioRDM"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src="{{ url_for("static", filename="images/inveniordm-tail.svg") }}"
|
src="{{ url_for('static', filename='images/inveniordm-tail.svg') }}"
|
||||||
alt="InvenioRDM logo"
|
alt="InvenioRDM logo"
|
||||||
style="display: block; height: 90px; margin-top: 8px;"
|
style="display: block; height: 90px; margin-top: 8px;"
|
||||||
/>
|
/>
|
||||||
@@ -141,14 +120,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="logos">
|
<div class="logos">
|
||||||
<strong>Funded by</strong>
|
<strong>{{ _("Funded by") }}</strong>
|
||||||
<a
|
<a
|
||||||
href="https://www.sfi.ie"
|
href="https://www.sfi.ie"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
title="Science Foundation Ireland"
|
title="Science Foundation Ireland"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src="{{ url_for("static", filename="images/SFI_logo.png") }}"
|
src="{{ url_for('static', filename='images/SFI_logo.png') }}"
|
||||||
alt="Science Foundation Ireland"
|
alt="Science Foundation Ireland"
|
||||||
style="display: block; height: auto; margin-top: 15px; width: 230px;"
|
style="display: block; height: auto; margin-top: 15px; width: 230px;"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
<div class="center aligned ui equal height grid">
|
<div class="center aligned ui equal height grid">
|
||||||
<div class="left aligned column">
|
<div class="left aligned column">
|
||||||
<div class="ui segment image">
|
<div class="ui segment image">
|
||||||
<h2>Research Results</h2>
|
<h2>{{ _("Research Results") }}</h2>
|
||||||
|
|
||||||
<div>Frontpage: Description for research results</div>
|
<div>{{ _("Research results is the collective term for all the results of a research project. They describe the data, source code and all digital objects on which publication results are based. These include the tools used to collect and process the research data. The following links offer the possibility to add research results to the repository, but also to search for the results of other people.") }}</div>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{#
|
{#
|
||||||
@@ -21,19 +21,19 @@
|
|||||||
</li>
|
</li>
|
||||||
#}
|
#}
|
||||||
<li>
|
<li>
|
||||||
<a href="records/search">Search for research results</a>
|
<a href="records/search">{{ _("Search for research results") }}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="me/uploads">Upload research results</a>
|
<a href="me/uploads">{{ _("Upload research results") }}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="left aligned column">
|
<div class="left aligned column">
|
||||||
<div class="ui segment image">
|
<div class="ui segment image">
|
||||||
<h2>Publications</h2>
|
<h2>{{ _("Publications") }}</h2>
|
||||||
|
|
||||||
<div>Frontpage: Description for publications</div>
|
<div>{{ _("The section of publications covers citations from several areas. Open Access papers are imported from Pure. Publications from Open Access publishers are shared. Digital copies are offered. University publications are made available to a wide range of people. The following link offers the possibility to search among publications.") }}</div>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{#
|
{#
|
||||||
@@ -42,28 +42,23 @@
|
|||||||
</li>
|
</li>
|
||||||
#}
|
#}
|
||||||
<li>
|
<li>
|
||||||
<a href="publications/search">Search for publications</a>
|
<a href="publications/search">{{ _("Search for publications") }}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="left aligned column">
|
<div class="left aligned column">
|
||||||
<div class="ui segment image">
|
<div class="ui segment image">
|
||||||
<h2>Educational Resources</h2>
|
<h2>{{ _("Digital Tools & Software") }}</h2>
|
||||||
|
|
||||||
<div>Frontpage: Description for open educational resources</div>
|
<div>{{ _("Frontpage: Description for digital tools and software") }}</div>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{#
|
|
||||||
<li>
|
|
||||||
<a href="oer/browse">Browse</a>
|
|
||||||
</li>
|
|
||||||
#}
|
|
||||||
<li>
|
<li>
|
||||||
<a href="oer/search">Search for educational resourses</a>
|
<a href="records/search?q=metadata.resource_type.id:software">{{ _("Search for digital tools & software") }}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="oer/uploads">Upload educational resources</a>
|
<a href="me/uploads">{{ _("Upload digital tools & software") }}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
{% if not config.THEME_IFORM_PRODUCTION %}
|
{% if not config.THEME_IFORM_PRODUCTION %}
|
||||||
<div class="ui sticky test-instance">
|
<div class="ui sticky test-instance">
|
||||||
<h4>Test Instance</h4>
|
<h4>{{ _("Test Instance") }}</h4>
|
||||||
<p>This is the test instance of the I-Form Repository.</p>
|
<p>{{ _("This is the test instance of the I-Form Repository.") }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@@ -33,25 +33,25 @@
|
|||||||
<div class="two wide column main-menu-entry">
|
<div class="two wide column main-menu-entry">
|
||||||
<a
|
<a
|
||||||
href="{{ url_for('invenio_theme_iform.index') }}"
|
href="{{ url_for('invenio_theme_iform.index') }}"
|
||||||
title="Home"
|
title="{{ _('Home') }}"
|
||||||
class="no-decoration"
|
class="no-decoration"
|
||||||
>
|
>
|
||||||
<span class="home-inline">
|
<span class="home-inline">
|
||||||
{%- include "invenio_theme_iform/home_icon.svg" %} Home
|
{%- include "invenio_theme_iform/home_icon.svg" %} {{ _("Home") }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="two wide column main-menu-entry">
|
<div class="two wide column main-menu-entry">
|
||||||
<a role="menuitem" href="/communities" class="no-decoration"
|
<a role="menuitem" href="/communities" class="no-decoration"
|
||||||
>Communities</a
|
>{{ _("Communities") }}</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="two wide column main-menu-entry">
|
<div class="two wide column main-menu-entry">
|
||||||
<a role="menuitem" href="/me/overview" class="no-decoration"
|
<a role="menuitem" href="/me/overview" class="no-decoration"
|
||||||
>Dashboard</a
|
>{{ _("Dashboard") }}</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="margin-divider" class="ui divider main-menu-underline-line"></div>
|
<div id="margin-divider" class="ui divider main-menu-underline-line"></div>
|
||||||
|
|||||||
@@ -1,98 +1,88 @@
|
|||||||
{#
|
{#
|
||||||
Copyright (C) 2020-2023 Graz University of Technology.
|
Copyright (C) 2020-2023 Graz University of Technology.
|
||||||
|
|
||||||
invenio-theme-iform is free software; you can redistribute it and/or
|
invenio-theme-iform is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the MIT License; see LICENSE file for more
|
modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
details.
|
details.
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{%
|
{%
|
||||||
set options = [
|
set options = [
|
||||||
{
|
{
|
||||||
"key": "records",
|
"key": "records",
|
||||||
"text": "All",
|
"text": "All",
|
||||||
"value": url_for("invenio_search_ui.search"),
|
"value": url_for("invenio_search_ui.search"),
|
||||||
"title": "repo",
|
"title": "repo",
|
||||||
},{
|
},{
|
||||||
"key": "rdm",
|
"key": "rdm",
|
||||||
"text": "Research Results",
|
"text": "Research Results",
|
||||||
"value": "/records/search",
|
"value": "/records/search",
|
||||||
"title": "Research Data",
|
"title": "Research Data",
|
||||||
},{
|
}
|
||||||
"key": "marc21",
|
]
|
||||||
"text": "Publications",
|
|
||||||
"value": url_for("invenio_records_marc21.search"),
|
|
||||||
"title": "publication",
|
|
||||||
},{
|
|
||||||
"key": "lom",
|
|
||||||
"text": "Educational Resources",
|
|
||||||
"value": url_for("invenio_records_lom.search"),
|
|
||||||
"title": "oer",
|
|
||||||
}
|
|
||||||
]
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="short-menu" id="all-menu-top-table">
|
<div class="short-menu" id="all-menu-top-table">
|
||||||
<div class="short-menu-left">
|
<div class="short-menu-left">
|
||||||
<div id="all-menu-top-left-item">
|
<div id="all-menu-top-left-item">
|
||||||
<div class="short-menu-left-search">
|
<div class="short-menu-left-search">
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<div class="item p-0 search-bar rel-mr-1">
|
<div class="item p-0 search-bar rel-mr-1">
|
||||||
<!-- prettier-ignore-attribute data-options -->
|
<!-- prettier-ignore-attribute data-options -->
|
||||||
<div id="header-search-bar" data-options='{{ options | tojson }}'></div>
|
<div id="header-search-bar" data-options='{{ options | tojson }}'></div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="short-menu-right">
|
<div class="short-menu-left-lang">
|
||||||
{%- block navbar_right %}
|
{%- for l in current_i18n.get_locales() %}
|
||||||
{%- include config.THEME_HEADER_LOGIN_TEMPLATE %}
|
<a href="{{ url_for('invenio_i18n.set_lang', lang_code=l.language) }}"
|
||||||
{%- endblock navbar_right %}
|
class="no-decoration {% if current_i18n.language == l.language %}active{% endif %}">
|
||||||
|
{{ l.get_display_name().upper()[0:2] }}
|
||||||
|
</a>
|
||||||
|
{%- endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!----END MENU------------------------------------------------------------->
|
<div class="short-menu-right">
|
||||||
|
{%- block navbar_right %}
|
||||||
<div class="ui grid" id="main-logo">
|
{%- include config.THEME_HEADER_LOGIN_TEMPLATE %}
|
||||||
<!-- Left -->
|
{%- endblock navbar_right %}
|
||||||
<div class="left floated left aligned six wide column" id="repo-logo">
|
|
||||||
<div class="inline-elements">
|
|
||||||
<div class="repo-img">{%- include "invenio_theme_iform/repository_logo.svg" %}</div>
|
|
||||||
<div class="affiliation-text">
|
|
||||||
<a
|
|
||||||
title="Home"
|
|
||||||
href="{{ url_for("invenio_theme_iform.index") }}"
|
|
||||||
class="no-decoration"
|
|
||||||
>
|
|
||||||
I-FORM
|
|
||||||
<br />
|
|
||||||
RESEARCH DATA
|
|
||||||
<br />
|
|
||||||
REPOSITORY
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Right -->
|
|
||||||
<div class="right floated right aligned six wide column">
|
|
||||||
<div class="affiliation-logo" id="int-header-logo">
|
|
||||||
<div class="affiliation-logo-claim">
|
|
||||||
<div class="affiliation-logo-claim-single">Excellence</div>
|
|
||||||
<div class="affiliation-logo-claim-single">Through</div>
|
|
||||||
<div class="affiliation-logo-claim-single">Expertise</div>
|
|
||||||
</div>
|
|
||||||
<a
|
|
||||||
href="https://www.i-form.ie"
|
|
||||||
title="I-Form Home"
|
|
||||||
target="_blank"
|
|
||||||
class="no-decoration"
|
|
||||||
>
|
|
||||||
{%- include "invenio_theme_iform/iform_logo.svg" %}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!----END MENU------------------------------------------------------------->
|
||||||
|
|
||||||
|
<div class="ui grid" id="main-logo">
|
||||||
|
<!-- Left -->
|
||||||
|
<div class="left floated left aligned six wide column" id="repo-logo">
|
||||||
|
<div class="inline-elements">
|
||||||
|
<div class="repo-img">{%- include "invenio_theme_iform/repository_logo.svg" %}</div>
|
||||||
|
<div class="affiliation-text">
|
||||||
|
<a title="Home" href="{{ url_for('invenio_theme_iform.index') }}" class="no-decoration">
|
||||||
|
{{ _("I-FORM") }}
|
||||||
|
<br />
|
||||||
|
{{ _("RESEARCH DATA") }}
|
||||||
|
<br />
|
||||||
|
{{ _("REPOSITORY") }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Right -->
|
||||||
|
<div class="right floated right aligned six wide column">
|
||||||
|
<div class="affiliation-logo" id="int-header-logo">
|
||||||
|
<div class="affiliation-logo-claim">
|
||||||
|
<div class="affiliation-logo-claim-single">{{ _("Excellence") }}</div>
|
||||||
|
<div class="affiliation-logo-claim-single">{{ _("Through") }}</div>
|
||||||
|
<div class="affiliation-logo-claim-single">{{ _("Expertise") }}</div>
|
||||||
|
</div>
|
||||||
|
<a href="https://www.i-form.ie" title="I-Form Home" target="_blank" class="no-decoration">
|
||||||
|
{%- include "invenio_theme_iform/iform_logo.svg" %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
{# 3 columns: Research-Uploads, Communities, and Requests #}
|
{# 3 columns: Research-Uploads, Communities, and Requests #}
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="ui segment" style="height: 480px">
|
<div class="ui segment" style="height: 480px">
|
||||||
<h2>Research Results</h2>
|
<h2>{{ _("Research Results") }}</h2>
|
||||||
<a class="ui left floated image" href="/me/uploads">
|
<a class="ui left floated image" href="/me/uploads">
|
||||||
<img
|
<img
|
||||||
width="400px"
|
width="400px"
|
||||||
@@ -36,14 +36,12 @@
|
|||||||
src="{{ url_for('static', filename='images/diamond.svg') }}"
|
src="{{ url_for('static', filename='images/diamond.svg') }}"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
<div class="ui right floated text">
|
{{ _("Research results gives the base on which publications are built.") }}
|
||||||
Overview: Description for research results
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="ui segment" style="height: 480px">
|
<div class="ui segment" style="height: 480px">
|
||||||
<h2>Communities</h2>
|
<h2>{{ _("Communities") }}</h2>
|
||||||
<a class="ui left floated image" href="/me/communities">
|
<a class="ui left floated image" href="/me/communities">
|
||||||
<img
|
<img
|
||||||
width="400px"
|
width="400px"
|
||||||
@@ -51,12 +49,12 @@
|
|||||||
src="{{ url_for('static', filename='images/group-discussion.svg') }}"
|
src="{{ url_for('static', filename='images/group-discussion.svg') }}"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
<div>Overview: Description of Communities</div>
|
<div>{{ _("Grow a community of individuals to sustain the platform going forward and thereby organize, curate and collaborate on records for your institution, project, topic or event.") }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="ui segment" style="height: 480px">
|
<div class="ui segment" style="height: 480px">
|
||||||
<h2>Requests</h2>
|
<h2>{{ _("Requests") }}</h2>
|
||||||
<a class="ui left floated image" href="/me/requests">
|
<a class="ui left floated image" href="/me/requests">
|
||||||
<img
|
<img
|
||||||
width="400px"
|
width="400px"
|
||||||
@@ -64,7 +62,7 @@
|
|||||||
src="{{ url_for('static', filename='images/umbrella.svg') }}"
|
src="{{ url_for('static', filename='images/umbrella.svg') }}"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
<div>Overview: Description of Requests</div>
|
<div>{{ _("Check for incoming notifications and community assignments or inquiries.") }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -73,15 +71,11 @@
|
|||||||
<div class="column">
|
<div class="column">
|
||||||
{# a modal's HTML can be placed anywhere, so I placed it here, right before it's used #}
|
{# a modal's HTML can be placed anywhere, so I placed it here, right before it's used #}
|
||||||
<div class="ui small modal" id="iform-unlock-modal">
|
<div class="ui small modal" id="iform-unlock-modal">
|
||||||
<div class="header">On unlocking research uploads</div>
|
<div class="header">{{ _("On unlocking research uploads") }}</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>
|
{{ _("To ensure a well-curated repository, new users need to get unlocked
|
||||||
To ensure a well-curated repository, new users need to get unlocked
|
before being allowed to upload. Once unlocked, you can upload your research,
|
||||||
before being allowed to upload. Once unlocked, you can upload your
|
request its inclusion in a community, generate a DOI for it, and publish it.") }}
|
||||||
research, request its inclusion in a community, generate a DOI for
|
|
||||||
it, and publish it.
|
|
||||||
{# TODO: extra lines on policy about who gets accepted how for Research-Uploads #}
|
|
||||||
</p>
|
|
||||||
<div id="anchor-unlock-form">
|
<div id="anchor-unlock-form">
|
||||||
{# will be replaced with ZammadForm when generating it #}
|
{# will be replaced with ZammadForm when generating it #}
|
||||||
<button
|
<button
|
||||||
@@ -93,7 +87,7 @@
|
|||||||
Got it!
|
Got it!
|
||||||
</button>
|
</button>
|
||||||
<button id="generate-unlock-form" class="ui fluid button">
|
<button id="generate-unlock-form" class="ui fluid button">
|
||||||
Request unlocking
|
{{ _("Request unlocking") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,7 +95,7 @@
|
|||||||
|
|
||||||
{# actual column contents start here #}
|
{# actual column contents start here #}
|
||||||
<div class="ui disabled segment" style="height: 480px">
|
<div class="ui disabled segment" style="height: 480px">
|
||||||
<h2>Research Results</h2>
|
<h2>{{ _("Research Results") }}</h2>
|
||||||
<div
|
<div
|
||||||
class="ui left floated image"
|
class="ui left floated image"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
@@ -115,40 +109,10 @@
|
|||||||
src="{{ url_for('static', filename='images/diamond.svg') }}"
|
src="{{ url_for('static', filename='images/diamond.svg') }}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui right floated text">
|
{{ _("Research results gives the base on which publications are built.") }}
|
||||||
Overview: Description for research results
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if can_view_marc21 %}
|
|
||||||
<div class="column">
|
|
||||||
<div class="ui segment" style="height: 480px">
|
|
||||||
<h2>Publications</h2>
|
|
||||||
<a class="ui left floated image" href="/publications/uploads">
|
|
||||||
<img
|
|
||||||
width="400px"
|
|
||||||
alt="Publications"
|
|
||||||
src="{{ url_for('static', filename='images/library-book-svgrepo-com.svg') }}"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
<div>Overview: Description for publications</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="column">
|
|
||||||
<div class="ui segment" style="height: 480px">
|
|
||||||
<h2>Educational Resources</h2>
|
|
||||||
<a class="ui left floated image" href="/oer/uploads">
|
|
||||||
<img
|
|
||||||
width="400px"
|
|
||||||
alt="Open Educational Resources"
|
|
||||||
src="{{ url_for('static', filename='images/play.svg') }}"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
<div>Overview: Description for open educational resources</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
|
|||||||
@@ -8,65 +8,61 @@
|
|||||||
|
|
||||||
<!---Recent uploads-->
|
<!---Recent uploads-->
|
||||||
<div class="ten wide column random-records-frontpage">
|
<div class="ten wide column random-records-frontpage">
|
||||||
<h2>Recent uploads</h2>
|
<h2>{{ _("Recent uploads") }}</h2>
|
||||||
|
|
||||||
{% if not records %}
|
{% if not records %}
|
||||||
<div class="ui centered grid">
|
<div class="ui centered grid">
|
||||||
<p style="font-size: medium;">There are no public records to show.</p>
|
<p style="font-size: medium;">{{ _("There are no public records to show.") }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{%- for r in records %}
|
{%- for r in records %}
|
||||||
{%- set creation_date = r.created | from_isodatetime -%}
|
{%- set creation_date = r.created | from_isodatetime -%}
|
||||||
{%- set record_url = r.original.view %}
|
{%- set record_url = r.links.self_html %}
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<div class="badges">
|
<div class="badges">
|
||||||
{# Publication date/Version badge #}
|
{# Publication date/Version badge #}
|
||||||
<span class="ui label blue" data-tooltip="Publication date" data-inverted="">
|
<span class="ui label blue" data-tooltip="Publication date" data-inverted="">
|
||||||
{{ r.created_date_l10n_long }}
|
{{ r.ui.created_date_l10n_long }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{# Resource type badge #}
|
{# Resource type badge #}
|
||||||
{% if r.metadata.types | length > 0 %}
|
{% if r.ui.resource_type %}
|
||||||
<span class="ui label grey" data-tooltip="Resource type" data-inverted="">
|
<span class="ui label grey" data-tooltip="Resource type" data-inverted="">
|
||||||
{{ r.metadata.types[0] }}
|
{{ r.ui.resource_type.title_l10n }}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<span
|
<span
|
||||||
class="ui label access-status {{ r.access_status.id }}"
|
class="ui label access-status {{ r.ui.access_status.id }}"
|
||||||
data-tooltip="{{ r.access_status.description_l10n }}"
|
data-tooltip="{{ r.ui.access_status.description_l10n }}"
|
||||||
data-inverted=""
|
data-inverted=""
|
||||||
>
|
>
|
||||||
<i class="icon {{ r.access_status.icon }}"></i>
|
<i class="icon {{ r.ui.access_status.icon }}"></i>
|
||||||
{{ r.access_status.title_l10n }}
|
{{ r.ui.access_status.title_l10n }}
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="ui label schema" data-tooltip="Schema Type" data-inverted="">
|
|
||||||
{{ r.original.schema_l10n }}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>
|
<h4>
|
||||||
<a href="{{ record_url }}" class="no-decoration"> {{ r.metadata.titles[0] }} </a>
|
<a href="{{ record_url }}" class="no-decoration"> {{ r.metadata.title }} </a>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{%- for creator in r.metadata.creators %}
|
{%- for creator in r.metadata.creators %}
|
||||||
<span>{{ creator }}</span>
|
<span>{{ creator.person_or_org.name }}</span>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="hidden-xs">
|
<p class="hidden-xs">
|
||||||
<a href="{{ record_url }}" class="no-decoration">
|
<a href="{{ record_url }}" class="no-decoration">
|
||||||
{{ r.metadata.descriptions | join(" ") | striptags | truncate(300) }}
|
{{ r.metadata.description | striptags | truncate(300) }}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="ui">
|
<div class="ui">
|
||||||
{%- for subject in r.metadata.subjects %}
|
{%- for subject in r.metadata.subjects %}
|
||||||
<span class="ui tiny label">{{ subject }}</span>
|
<span class="ui tiny label">{{ subject.subject }}</span>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
<div>
|
<div>
|
||||||
<small>
|
<small>
|
||||||
@@ -83,7 +79,7 @@
|
|||||||
|
|
||||||
{% if records %}
|
{% if records %}
|
||||||
<div class="ui centered grid">
|
<div class="ui centered grid">
|
||||||
<a class="ui button more" href="{{ url_for('invenio_search_ui.search') }}">More</a>
|
<a class="ui button more" href="{{ url_for('invenio_search_ui.search') }}">{{ _("More") }}</a>
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -8,29 +8,40 @@
|
|||||||
|
|
||||||
"""invenio module for I-Form theme."""
|
"""invenio module for I-Form theme."""
|
||||||
|
|
||||||
|
import traceback
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from flask import Blueprint, current_app, g, redirect, render_template, url_for
|
from flask import Blueprint, Flask, current_app, g, redirect, render_template, url_for
|
||||||
from flask_login import current_user, login_required
|
from flask_login import current_user, login_required
|
||||||
from invenio_rdm_records.proxies import current_rdm_records
|
from invenio_rdm_records.proxies import current_rdm_records
|
||||||
from invenio_records_global_search.resources.serializers import (
|
|
||||||
GlobalSearchJSONSerializer,
|
|
||||||
)
|
|
||||||
from invenio_users_resources.proxies import current_user_resources
|
from invenio_users_resources.proxies import current_user_resources
|
||||||
from opensearch_dsl.utils import AttrDict
|
from opensearch_dsl.utils import AttrDict
|
||||||
|
|
||||||
from .search import FrontpageRecordsSearch
|
|
||||||
|
|
||||||
blueprint = Blueprint(
|
def create_blueprint(app: Flask) -> Blueprint:
|
||||||
"invenio_theme_iform",
|
"""Create blueprint."""
|
||||||
__name__,
|
blueprint = Blueprint(
|
||||||
template_folder="templates",
|
"invenio_theme_iform",
|
||||||
static_folder="static",
|
__name__,
|
||||||
)
|
template_folder="templates",
|
||||||
|
static_folder="static",
|
||||||
|
)
|
||||||
|
routes = app.config.get("THEME_IFORM_ROUTES")
|
||||||
|
|
||||||
|
blueprint.add_url_rule(routes["records-search"], view_func=records_search)
|
||||||
|
blueprint.add_url_rule(routes["index"], view_func=index)
|
||||||
|
blueprint.add_url_rule(routes["overview"], view_func=overview)
|
||||||
|
|
||||||
|
# base case for any otherwise unhandled exception
|
||||||
|
app.register_error_handler(Exception, default_error_handler)
|
||||||
|
|
||||||
|
blueprint.add_app_template_filter(make_dict_like)
|
||||||
|
blueprint.add_app_template_filter(cast_to_dict)
|
||||||
|
|
||||||
|
return blueprint
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route("/records/search")
|
|
||||||
def records_search():
|
def records_search():
|
||||||
"""Search page ui.
|
"""Search page ui.
|
||||||
|
|
||||||
@@ -70,7 +81,6 @@ def require_iform_authenticated(view_func):
|
|||||||
return decorated_view
|
return decorated_view
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route("/me/overview")
|
|
||||||
@login_required
|
@login_required
|
||||||
def overview():
|
def overview():
|
||||||
"""Overview."""
|
"""Overview."""
|
||||||
@@ -85,7 +95,6 @@ def overview():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@blueprint.app_template_filter("make_dict_like")
|
|
||||||
def make_dict_like(value: str, key: str) -> Dict[str, str]:
|
def make_dict_like(value: str, key: str) -> Dict[str, str]:
|
||||||
"""Convert the value to a dict like structure.
|
"""Convert the value to a dict like structure.
|
||||||
|
|
||||||
@@ -94,7 +103,6 @@ def make_dict_like(value: str, key: str) -> Dict[str, str]:
|
|||||||
return {key: value}
|
return {key: value}
|
||||||
|
|
||||||
|
|
||||||
@blueprint.app_template_filter("cast_to_dict")
|
|
||||||
def cast_to_dict(attr_dict):
|
def cast_to_dict(attr_dict):
|
||||||
"""Return the dict structure of AttrDict variable."""
|
"""Return the dict structure of AttrDict variable."""
|
||||||
return AttrDict.to_dict(attr_dict)
|
return AttrDict.to_dict(attr_dict)
|
||||||
@@ -109,32 +117,18 @@ def default_error_handler(e: Exception):
|
|||||||
# - `e`, the passed-in exception
|
# - `e`, the passed-in exception
|
||||||
# to get proxied-to objects: `flask.request._get_current_object()`
|
# to get proxied-to objects: `flask.request._get_current_object()`
|
||||||
|
|
||||||
|
msg = f"default_error_handler of invenio-theme-iform captured following error type: {
|
||||||
|
type(e)
|
||||||
|
} with message {e} and stack trace {traceback.format_exc()}"
|
||||||
|
current_app.logger.error(msg)
|
||||||
return render_template(current_app.config["THEME_500_TEMPLATE"]), 500
|
return render_template(current_app.config["THEME_500_TEMPLATE"]), 500
|
||||||
|
|
||||||
|
|
||||||
def ui_blueprint(app):
|
|
||||||
"""Blueprint for the routes and resources provided by invenio-theme-iform."""
|
|
||||||
routes = app.config.get("IFORM_ROUTES")
|
|
||||||
|
|
||||||
blueprint.add_url_rule(routes["index"], view_func=index)
|
|
||||||
|
|
||||||
# base case for any otherwise unhandled exception
|
|
||||||
app.register_error_handler(Exception, default_error_handler)
|
|
||||||
|
|
||||||
return blueprint
|
|
||||||
|
|
||||||
|
|
||||||
def records_serializer(records=None):
|
|
||||||
"""Serialize list of records."""
|
|
||||||
serializer = GlobalSearchJSONSerializer()
|
|
||||||
return [serializer.dump_obj(r.to_dict()) for r in records]
|
|
||||||
|
|
||||||
|
|
||||||
def index():
|
def index():
|
||||||
"""Frontpage."""
|
"""Frontpage."""
|
||||||
records = FrontpageRecordsSearch()[:5].sort("-created").execute()
|
records = current_rdm_records.records_service.search(g.identity, size=5, sort="newest")
|
||||||
|
|
||||||
return render_template("invenio_theme_iform/index.html", records=records_serializer(records))
|
return render_template("invenio_theme_iform/index.html", records=list(records.hits))
|
||||||
|
|
||||||
|
|
||||||
def locked(e):
|
def locked(e):
|
||||||
|
|||||||
+3
-5
@@ -24,11 +24,8 @@ classifiers = [
|
|||||||
requires-python = ">=3.10,<3.14"
|
requires-python = ">=3.10,<3.14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"invenio-assets>=2.0.0",
|
"invenio-assets>=2.0.0",
|
||||||
"invenio-i18n>=1.3.1",
|
|
||||||
"invenio-config-iform>=2025.5.20.1",
|
"invenio-config-iform>=2025.5.20.1",
|
||||||
"invenio_records_global_search>=0.0.1",
|
"invenio-i18n>=2.0.0",
|
||||||
"invenio_records_marc21>=0.21.0",
|
|
||||||
"invenio-records-lom>=0.16.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
@@ -44,7 +41,7 @@ test = "scripts.test:main"
|
|||||||
invenio_theme_iform = "invenio_theme_iform:InvenioThemeIform"
|
invenio_theme_iform = "invenio_theme_iform:InvenioThemeIform"
|
||||||
|
|
||||||
[project.entry-points."invenio_base.blueprints"]
|
[project.entry-points."invenio_base.blueprints"]
|
||||||
invenio_theme_iform = "invenio_theme_iform.views:ui_blueprint"
|
invenio_theme_iform = "invenio_theme_iform.views:create_blueprint"
|
||||||
|
|
||||||
[project.entry-points."invenio_i18n.translations"]
|
[project.entry-points."invenio_i18n.translations"]
|
||||||
messages = "invenio_theme_iform"
|
messages = "invenio_theme_iform"
|
||||||
@@ -93,6 +90,7 @@ path = "invenio_theme_iform/__about__.py"
|
|||||||
[tool.hatch.build]
|
[tool.hatch.build]
|
||||||
include = ["invenio_theme_iform"]
|
include = ["invenio_theme_iform"]
|
||||||
exclude = [".venv", "tests/*", "*/tests/*", "*.rst", "run-tests.sh"]
|
exclude = [".venv", "tests/*", "*/tests/*", "*.rst", "run-tests.sh"]
|
||||||
|
ignore-vcs = true
|
||||||
|
|
||||||
# Testing configuration
|
# Testing configuration
|
||||||
[tool.pytest]
|
[tool.pytest]
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ def app(request):
|
|||||||
"""Basic Flask application."""
|
"""Basic Flask application."""
|
||||||
app = Flask("testapp")
|
app = Flask("testapp")
|
||||||
app.config.update(
|
app.config.update(
|
||||||
I18N_LANGUAGES=[("en", "English"), ("de", "German")],
|
I18N_LANGUAGES=[("en", "English"), ("ga", "Irish")],
|
||||||
)
|
)
|
||||||
InvenioThemeIform(app)
|
InvenioThemeIform(app)
|
||||||
InvenioI18N(app)
|
InvenioI18N(app)
|
||||||
|
|||||||
Reference in New Issue
Block a user