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:
@@ -66,6 +66,11 @@
|
||||
<span class="ui label teal" title="{{_('Resource type')}}">
|
||||
{{r.metadata.resource_type | cast_to_dict | vocabulary_title('resource_type') }}
|
||||
</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">
|
||||
<!--TODO: add subtype--->
|
||||
|
||||
@@ -63,9 +63,13 @@ def ui_blueprint(app):
|
||||
|
||||
def index():
|
||||
"""Frontpage."""
|
||||
records = FrontpageRecordsSearch()[:5].sort("-created").execute()
|
||||
for r in records:
|
||||
r = UIJSONSerializer().serialize_object_to_dict(r.to_dict())
|
||||
|
||||
return render_template(
|
||||
"invenio_theme_tugraz/index.html",
|
||||
records=FrontpageRecordsSearch()[:5].sort("-created").execute(),
|
||||
records=records
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user