mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-23 05:01:58 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a500543c6 | ||
|
|
e310a4ca38 | ||
|
|
c3f55030dc | ||
|
|
95d27fdd8c | ||
|
|
28b956cfaa | ||
|
|
5ac2a68848 | ||
|
|
0399814fe0 | ||
|
|
f11facc9d6 | ||
|
|
c9bc56e168 | ||
|
|
cb9b80668c | ||
|
|
5bf5ce4268 |
14
CHANGES.rst
14
CHANGES.rst
@@ -7,6 +7,20 @@
|
|||||||
|
|
||||||
Changes
|
Changes
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
Version v4.0.0 (release 2022-07-29)
|
||||||
|
|
||||||
|
- remove unnecessary html code for header-search-bar
|
||||||
|
- fix warning from semantic-ui-react Search component
|
||||||
|
- add marc21 and lom to the searchbar
|
||||||
|
- change searchbar layout and use invenio-app-rdm searchbar
|
||||||
|
- remove grey color of community block and reduce size
|
||||||
|
- migrate js to use prettier
|
||||||
|
|
||||||
|
Version 3.9.2 (released 2022-06-28)
|
||||||
|
|
||||||
|
- fix: adopt renaming of serialize function (#269)
|
||||||
|
|
||||||
Version 3.9.1 (released 2022-06-02)
|
Version 3.9.1 (released 2022-06-02)
|
||||||
|
|
||||||
- fix: add trigger to accordion (#265)
|
- fix: add trigger to accordion (#265)
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
from .ext import InvenioThemeTugraz
|
from .ext import InvenioThemeTugraz
|
||||||
|
|
||||||
__version__ = "3.9.1"
|
__version__ = "4.0.0"
|
||||||
|
|
||||||
__all__ = ("__version__", "InvenioThemeTugraz")
|
__all__ = ("__version__", "InvenioThemeTugraz")
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
import $ from 'jquery';
|
import $ from "jquery";
|
||||||
import 'semantic-ui-css';
|
import "semantic-ui-css";
|
||||||
|
import { MultipleOptionsSearchBar } from "@js/invenio_search_ui/components";
|
||||||
|
import { i18next } from "@translations/invenio_app_rdm/i18next";
|
||||||
|
import ReactDOM from "react-dom";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
// called on document ready
|
// called on document ready
|
||||||
$(function() {
|
$(function () {
|
||||||
importZammadScript();
|
importZammadScript();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -13,29 +17,38 @@ function importZammadScript() {
|
|||||||
document.head.appendChild(scriptNode);
|
document.head.appendChild(scriptNode);
|
||||||
|
|
||||||
$.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => {
|
$.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => {
|
||||||
$('#feedback-form').ZammadForm({
|
$("#feedback-form").ZammadForm({
|
||||||
messageTitle: 'Contact us',
|
messageTitle: "Contact us",
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
messageSubmit: 'Submit',
|
messageSubmit: "Submit",
|
||||||
messageThankYou: 'Thank you for your message, (#%s). We will get back to you as quickly as possible!',
|
messageThankYou:
|
||||||
modal: true
|
"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')
|
$(".ui.sticky.test-instance").sticky({
|
||||||
.sticky({
|
context: "body",
|
||||||
context: 'body'
|
});
|
||||||
})
|
|
||||||
;
|
|
||||||
|
|
||||||
export function toggleVisibility(id) {
|
export function toggleVisibility(id) {
|
||||||
var element = document.getElementById(id);
|
var element = document.getElementById(id);
|
||||||
var isHided = element.style.display === "none";
|
var isHided = element.style.display === "none";
|
||||||
|
|
||||||
element.style.display = isHided ? "block" : "none";
|
element.style.display = isHided ? "block" : "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
window.toggleVisibility = toggleVisibility;
|
window.toggleVisibility = toggleVisibility;
|
||||||
|
|
||||||
|
const headerSearchbar = document.getElementById("header-search-bar");
|
||||||
|
const searchBarOptions = JSON.parse(headerSearchbar.dataset.options);
|
||||||
|
|
||||||
|
ReactDOM.render(
|
||||||
|
<MultipleOptionsSearchBar
|
||||||
|
options={searchBarOptions}
|
||||||
|
placeholder={i18next.t("Search records...")}
|
||||||
|
/>,
|
||||||
|
headerSearchbar
|
||||||
|
);
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022 Graz University of Technology.
|
||||||
|
*
|
||||||
|
* invenio-theme-tugraz is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the MIT License; see LICENSE file for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.ui.container.page-subheader-outer {
|
||||||
|
background-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.fluid.container {
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2021 Graz University of Technology.
|
* Copyright (C) 2020-2022 Graz University of Technology.
|
||||||
*
|
*
|
||||||
* invenio-theme-tugraz is free software; you can redistribute it and/or modify it
|
* invenio-theme-tugraz 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.
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
@import "macros";
|
@import "macros";
|
||||||
@import "login";
|
@import "login";
|
||||||
@import "deposit";
|
@import "deposit";
|
||||||
|
@import "communities";
|
||||||
|
|
||||||
/***
|
/***
|
||||||
**TODO:
|
**TODO:
|
||||||
|
|||||||
@@ -17,25 +17,8 @@
|
|||||||
{%- block page_body %}
|
{%- block page_body %}
|
||||||
|
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
{%- block frontpage_search %}
|
|
||||||
|
|
||||||
{%- block frontpage_form %}
|
|
||||||
<div class="ui center aligned grid">
|
|
||||||
<div class="sixteen wide column">
|
|
||||||
<form action="{{config.THEME_SEARCH_ENDPOINT}}" class="ui form" role="search">
|
|
||||||
<div class="ui fluid big action icon input">
|
|
||||||
<input type="text" name="q" autofocus="autofocus" placeholder="{{ _("Type and press enter to search") }}">
|
|
||||||
<button type="submit" class="ui icon search button">
|
|
||||||
<i class="icon search"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui divider hidden"></div>
|
<div class="ui divider hidden"></div>
|
||||||
{%- endblock frontpage_form %}
|
|
||||||
|
|
||||||
{%- endblock frontpage_search %}
|
|
||||||
<div class="ui stackable grid">
|
<div class="ui stackable grid">
|
||||||
|
|
||||||
<!---Recent uploads-->
|
<!---Recent uploads-->
|
||||||
|
|||||||
@@ -1,18 +1,43 @@
|
|||||||
{#
|
{#
|
||||||
Copyright (C) 2020-2021 Graz University of Technology.
|
Copyright (C) 2020-2022 Graz University of Technology.
|
||||||
|
|
||||||
invenio-theme-tugraz is free software; you can redistribute it and/or
|
invenio-theme-tugraz 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 = [
|
||||||
|
{
|
||||||
|
"key": "records",
|
||||||
|
"text": _("All") + " " + config.THEME_SITENAME,
|
||||||
|
"value": url_for("invenio_search_ui.search"),
|
||||||
|
"title": "repo",
|
||||||
|
},{
|
||||||
|
"key": "marc21",
|
||||||
|
"text": _("search publications (thesis, books, papers, etc)"),
|
||||||
|
"value": url_for("invenio_records_marc21.search"),
|
||||||
|
"title": "publication",
|
||||||
|
},{
|
||||||
|
"key": "lom",
|
||||||
|
"text": _("search open 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">
|
||||||
{%- if config.I18N_LANGUAGES %}
|
<div style="display: inline-block;">
|
||||||
<div class="short-menu-left-lang" style="margin-right:10px; font-size:18px;">
|
<div class="item p-0 search-bar rel-mr-1">
|
||||||
|
<div id="header-search-bar" data-options='{{ options | tojson }}'></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="short-menu-left-lang">
|
||||||
{%- for l in current_i18n.get_locales() %}
|
{%- for l in current_i18n.get_locales() %}
|
||||||
{%- if current_i18n.language != l.language %}
|
{%- if current_i18n.language != l.language %}
|
||||||
<a
|
<a
|
||||||
@@ -20,21 +45,6 @@
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
|
||||||
<div class="search-icon-header">
|
|
||||||
<a href="{{url_for('invenio_search_ui.search')}}" class="no-decoration">
|
|
||||||
<svg class="short-menu-icon" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns="http://www.w3.org/2000/svg" height="26.015" width="26.015" version="1.1"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
viewBox="0 0 26.01515 26.01515">
|
|
||||||
<g stroke-miterlimit="10" transform="translate(1,1)">
|
|
||||||
<circle cy="8.5" cx="8.5" r="8" style="stroke-miterlimit:10;stroke-width:2"></circle>
|
|
||||||
<path style="stroke-width:2;stroke-miterlimit:10;stroke-linecap:round" d="m14.156 14.156 9.344 9.344">
|
|
||||||
</path>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,9 +53,7 @@ def records_serializer(records=None):
|
|||||||
"""Serialize list of records."""
|
"""Serialize list of records."""
|
||||||
record_list = []
|
record_list = []
|
||||||
for record in records:
|
for record in records:
|
||||||
record_list.append(
|
record_list.append(UIJSONSerializer().dump_obj(record.to_dict()))
|
||||||
UIJSONSerializer().serialize_object_to_dict(record.to_dict())
|
|
||||||
)
|
|
||||||
return record_list
|
return record_list
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user