mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-22 20:51:58 +00:00
ui: display access badge
index: UIJSONSerializer is used in order to serialize the elasticsearch results
This commit is contained in:
@@ -67,6 +67,11 @@
|
|||||||
{{r.metadata.resource_type | cast_to_dict | vocabulary_title('resource_type') }}
|
{{r.metadata.resource_type | cast_to_dict | vocabulary_title('resource_type') }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<span class="ui label small access-status {{ r.ui.access_status.id }}" data-tooltip="{{ r.ui.access_status.description_l10n }}" data-inverted="">
|
||||||
|
{% if r.ui.access_status.icon %}<i class="icon {{ r.ui.access_status.icon }}"></i>{% endif %}
|
||||||
|
{{ r.ui.access_status.title_l10n }}
|
||||||
|
</span>
|
||||||
|
|
||||||
<span class="label record-version">
|
<span class="label record-version">
|
||||||
<!--TODO: add subtype--->
|
<!--TODO: add subtype--->
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -63,9 +63,13 @@ def ui_blueprint(app):
|
|||||||
|
|
||||||
def index():
|
def index():
|
||||||
"""Frontpage."""
|
"""Frontpage."""
|
||||||
|
records = FrontpageRecordsSearch()[:5].sort("-created").execute()
|
||||||
|
for r in records:
|
||||||
|
r = UIJSONSerializer().serialize_object_to_dict(r.to_dict())
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"invenio_theme_tugraz/index.html",
|
"invenio_theme_tugraz/index.html",
|
||||||
records=FrontpageRecordsSearch()[:5].sort("-created").execute(),
|
records=records
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user