invenio-app-ils 5.0.2__py2.py3-none-any.whl → 5.1.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,6 @@
7
7
 
8
8
  """invenio-app-ils."""
9
9
 
10
- __version__ = "5.0.2"
10
+ __version__ = "5.1.0"
11
11
 
12
12
  __all__ = ("__version__",)
invenio_app_ils/config.py CHANGED
@@ -1083,3 +1083,6 @@ THEME_FRONTPAGE = False
1083
1083
  PAGES_DEFAULT_TEMPLATE = "invenio_pages/default.html"
1084
1084
  # default app theme
1085
1085
  APP_THEME = ["semantic-ui"]
1086
+
1087
+ # Site name.
1088
+ THEME_SITENAME = _("InvenioILS")
@@ -119,3 +119,35 @@ def eitem_event_builder(event, sender_app, obj=None, **kwargs):
119
119
  record = kwargs["record"]
120
120
  event.update(dict(eitem_pid=record["pid"], document_pid=record.get("document_pid")))
121
121
  return event
122
+
123
+
124
+ def get_eitems_for_document_by_creator(document_pid, creator, case_insensitive=False):
125
+ """Find eitems by document pid and creator.
126
+
127
+ :param document_pid: The PID of the document of the eitems to search for.
128
+ :param creator: The creator to filter eitems by.
129
+ :param case_insensitive: Whether the creator match should be case insensitive.
130
+ """
131
+ eitem_search = current_app_ils.eitem_search_cls()
132
+ creator_match = eitem_search.search_by_document_pid(
133
+ document_pid=document_pid
134
+ ).filter(
135
+ "term",
136
+ created_by__value={"term": creator, "case_insensitive": case_insensitive},
137
+ )
138
+
139
+ return creator_match
140
+
141
+
142
+ def get_eitems_for_document_by_source(document_pid, source, case_insensitive=False):
143
+ """Find eitems by document pid and source.
144
+
145
+ :param document_pid: The PID of the document of the eitems to search for.
146
+ :param source: The source to filter eitems by.
147
+ :param case_insensitive: Whether the source match should be case insensitive.
148
+ """
149
+ eitem_search = current_app_ils.eitem_search_cls()
150
+ source_match = eitem_search.search_by_document_pid(
151
+ document_pid=document_pid
152
+ ).filter("term", source={"value": source, "case_insensitive": case_insensitive})
153
+ return source_match
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invenio-app-ils
3
- Version: 5.0.2
3
+ Version: 5.1.0
4
4
  Summary: Invenio Integrated Library System.
5
5
  Home-page: https://github.com/inveniosoftware/invenio-app-ils
6
6
  Author: CERN
@@ -103,6 +103,10 @@ https://invenioils.docs.cern.ch
103
103
  Changes
104
104
  =======
105
105
 
106
+ Version 5.1.0 (released 2025-09-24)
107
+
108
+ - eitem: add api methods to get eitems by `created_by` and `source` fields
109
+
106
110
  Version 5.0.2 (released 2025-08-20)
107
111
 
108
112
  - fix: ensure the invenio_app_ils configuration is loaded before cds_ils
@@ -1,6 +1,6 @@
1
- invenio_app_ils/__init__.py,sha256=6gHFRMur9nfCL7guxf7nC4dMyfL6iLl_ebLPXhOoL1A,285
1
+ invenio_app_ils/__init__.py,sha256=5FZTirJlycOoKumvPxSASNQVnBaLvQn0L4JjEXIHxh4,285
2
2
  invenio_app_ils/cli.py,sha256=onpLy_J9KcHSf4M8M3uQRsoizEX-3Qdt7a5TFjxGUjU,58166
3
- invenio_app_ils/config.py,sha256=eegvumgMz68WIiiPpmftC3Wq5zvNou5dL3Wqf8i84GY,41035
3
+ invenio_app_ils/config.py,sha256=KCIIyok9nAJLqWwEBaeJMkTKpxJ91dPve6_bPzoMrP8,41082
4
4
  invenio_app_ils/errors.py,sha256=HB_iWj-aYxzTzzO6hWb66mUPZdqpWYHgmr2H2t3j3wU,13293
5
5
  invenio_app_ils/ext.py,sha256=SULPfx1FxBLaOaKcyNKAAIyvZAuvTH3AcH_a8aXTSYo,11522
6
6
  invenio_app_ils/facets.py,sha256=x-ID7vL34zqbxJi7VC3EJSee13l_Jk0CfPZN3RHZrM8,4207
@@ -150,7 +150,7 @@ invenio_app_ils/documents/schemas/__init__.py,sha256=ngcwrP0RQpnFmW2WG5ZANoPw3A1
150
150
  invenio_app_ils/documents/schemas/documents/document-v1.0.0.json,sha256=uhtuj4PxrM4AkZUv-2_8CsXUYd8MMY_Cizbov1QZCp4,18138
151
151
  invenio_app_ils/documents/schemas/documents/document-v2.0.0.json,sha256=uhtuj4PxrM4AkZUv-2_8CsXUYd8MMY_Cizbov1QZCp4,18138
152
152
  invenio_app_ils/eitems/__init__.py,sha256=QAjmRFG-mc0z4BRiBKF_oQtmoc5Lma00n32HU5rw3Xo,227
153
- invenio_app_ils/eitems/api.py,sha256=4TRmDhy7hiWwT3Ije1vKZGLXF3rmBTd9VoVv2HCEymA,3899
153
+ invenio_app_ils/eitems/api.py,sha256=VThP-l4who7n95KiorXX6-Kvm3iuXXq4m2szYDjWxo8,5156
154
154
  invenio_app_ils/eitems/indexer.py,sha256=T9TjHHIEKWOQKJf3MIKHRJhLVjnJhUxwCwJKvzET63U,1800
155
155
  invenio_app_ils/eitems/search.py,sha256=7OAC-HBVkubEsONFdlPgy7FfWxkI-_Wa586PKuHOH1A,1796
156
156
  invenio_app_ils/eitems/jsonresolvers/__init__.py,sha256=eJEOVjrdQ2npcBT30Sf_xEq01jds8N8lnexskEGZR8o,245
@@ -445,10 +445,10 @@ invenio_app_ils/vocabularies/sources/__init__.py,sha256=EMLoLQGiq9_qoZ4lKqO_J0u2
445
445
  invenio_app_ils/vocabularies/sources/base.py,sha256=kmNg85cjrxqc8VErFP2SUtlyo1PnmzOBQgfoSpfTPh4,1418
446
446
  invenio_app_ils/vocabularies/sources/json.py,sha256=KGLTJ4AX8zEDdkpi3v92oHGs-h2dUzHbNPSg99-j8o0,1021
447
447
  invenio_app_ils/vocabularies/sources/opendefinition.py,sha256=9zbRXuTr0i5lVLt596oUhsLQPiJVf9jiM9-C7T6zbXA,2151
448
- invenio_app_ils-5.0.2.dist-info/licenses/AUTHORS.rst,sha256=BaXCGzdHCmiMOl4qtVlh1qrfy2ROMVOQp6ylzy1m0ww,212
449
- invenio_app_ils-5.0.2.dist-info/licenses/LICENSE,sha256=9OdaPOAO1ZOJcRQ8BrGj7QAdaJc8SRSUgBtdom49MrI,1062
450
- invenio_app_ils-5.0.2.dist-info/METADATA,sha256=T9X4-nlye-b23WGkY3cPaZgkSW0JXl6Vt6i59UmOYuQ,17415
451
- invenio_app_ils-5.0.2.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
452
- invenio_app_ils-5.0.2.dist-info/entry_points.txt,sha256=ofIQjvD7FcEFQxrLa-o8sxNxciRO5iEuSqGbZ8D0JyY,7650
453
- invenio_app_ils-5.0.2.dist-info/top_level.txt,sha256=p-lnzfSHaDER0BHbQvDV6dvUW7_Q0prMDFaqPhBSK50,16
454
- invenio_app_ils-5.0.2.dist-info/RECORD,,
448
+ invenio_app_ils-5.1.0.dist-info/licenses/AUTHORS.rst,sha256=BaXCGzdHCmiMOl4qtVlh1qrfy2ROMVOQp6ylzy1m0ww,212
449
+ invenio_app_ils-5.1.0.dist-info/licenses/LICENSE,sha256=9OdaPOAO1ZOJcRQ8BrGj7QAdaJc8SRSUgBtdom49MrI,1062
450
+ invenio_app_ils-5.1.0.dist-info/METADATA,sha256=Dn4OLK7Tdp9NQg8fihSxKjcIm16cA4ep_-B6b_coNKI,17528
451
+ invenio_app_ils-5.1.0.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
452
+ invenio_app_ils-5.1.0.dist-info/entry_points.txt,sha256=ofIQjvD7FcEFQxrLa-o8sxNxciRO5iEuSqGbZ8D0JyY,7650
453
+ invenio_app_ils-5.1.0.dist-info/top_level.txt,sha256=p-lnzfSHaDER0BHbQvDV6dvUW7_Q0prMDFaqPhBSK50,16
454
+ invenio_app_ils-5.1.0.dist-info/RECORD,,