From a06de830c7b21f2b95941d552a3fa8c02d4750b7 Mon Sep 17 00:00:00 2001 From: Mirek Simek Date: Wed, 11 Dec 2024 20:01:06 +0100 Subject: [PATCH 1/3] Added all requests - needs oarepo-requests changes to work --- .../semantic-ui/js/dashboard_requests/search/index.js | 1 + setup.cfg | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/oarepo_dashboard/ui/dashboard_requests/semantic-ui/js/dashboard_requests/search/index.js b/oarepo_dashboard/ui/dashboard_requests/semantic-ui/js/dashboard_requests/search/index.js index 827d981..6ce18dd 100644 --- a/oarepo_dashboard/ui/dashboard_requests/semantic-ui/js/dashboard_requests/search/index.js +++ b/oarepo_dashboard/ui/dashboard_requests/semantic-ui/js/dashboard_requests/search/index.js @@ -56,6 +56,7 @@ export const FacetButtons = () => ( readme = README.md From c3e043e23f3d21989c4e03aa07fe004cd843d07d Mon Sep 17 00:00:00 2001 From: Mirek Simek Date: Wed, 11 Dec 2024 20:03:40 +0100 Subject: [PATCH 2/3] translations --- .../messages/cs/LC_MESSAGES/translations.json | 2 +- .../messages/en/LC_MESSAGES/translations.json | 2 +- .../translations/cs/LC_MESSAGES/messages.mo | Bin 2266 -> 2304 bytes .../translations/cs/LC_MESSAGES/messages.po | 6 ++++ .../translations/en/LC_MESSAGES/messages.mo | Bin 486 -> 519 bytes .../translations/en/LC_MESSAGES/messages.po | 6 ++++ .../i18n/translations/messages.mo | Bin 395 -> 395 bytes .../i18n/translations/messages.pot | 27 ++++++++++++------ 8 files changed, 32 insertions(+), 11 deletions(-) diff --git a/oarepo_dashboard/i18n/semantic-ui/translations/oarepo_dashboard/messages/cs/LC_MESSAGES/translations.json b/oarepo_dashboard/i18n/semantic-ui/translations/oarepo_dashboard/messages/cs/LC_MESSAGES/translations.json index 652bdc6..1c25ec0 100644 --- a/oarepo_dashboard/i18n/semantic-ui/translations/oarepo_dashboard/messages/cs/LC_MESSAGES/translations.json +++ b/oarepo_dashboard/i18n/semantic-ui/translations/oarepo_dashboard/messages/cs/LC_MESSAGES/translations.json @@ -1 +1 @@ -{"By Title":"Podle názvu","Best match":"Nejlepší shoda","Newest":"Nejnovější","Oldest":"Nejstarší","Records":"Nahráno","Communities":"Komunity","Requests":"Žádosti","profile":"profil","Search in my communities...":"Hledat v mých komunitách...","Restricted":"Omezený","Filter results":"Filtrovat výsledky","Edit":"Upravit","Uploaded on {{uploadDate}}":"Nahráno dne {{uploadDate}}","No creation date found.":"Nebylo nalezeno žádné datum vytvoření","No description":"Bez popisu","No title":"Bez názvu","Create new...":"Vytvořit nový...","Search in my uploads...":"Hledat v mých záznamech...","Expires at: {{- expiringDate}}":"Vyprší v: {{- expiringDate}}","Opened {{relativeTime}} by":"Otevřeno {{relativeTime}} uživatelem","Open":"Otevřeno","Closed":"Zavřeno","New request":"Nová žádost","My":"Moje","Others":"Ostatní","Search in my requests...":"Hledat v mých žádostech...","Opened by":"Otevřeno {{relativeTime}} uživatelem","Create new draft":"Vytvořit nový koncept","Edit record":"Úprava záznamu","Delete record":"Smazání záznamu","Publish record":"Vypublikování záznamů","Opened by {{creatorName}} on {{created}}.":"Otevřeno uživatelem {{creatorName}} na {{created}}.","Recepient: {{receiver}}.":"Příjemce: {{receiver}}","User Dashboard":"Nástěnka","Create new version of record":"Vytvořit novou verzi záznamu"} \ No newline at end of file +{"By Title":"Podle názvu","Best match":"Nejlepší shoda","Newest":"Nejnovější","Oldest":"Nejstarší","Records":"Nahráno","Communities":"Komunity","Requests":"Žádosti","profile":"profil","Search in my communities...":"Hledat v mých komunitách...","Restricted":"Omezený","Filter results":"Filtrovat výsledky","Edit":"Upravit","Uploaded on {{uploadDate}}":"Nahráno dne {{uploadDate}}","No creation date found.":"Nebylo nalezeno žádné datum vytvoření","No description":"Bez popisu","No title":"Bez názvu","Create new...":"Vytvořit nový...","Search in my uploads...":"Hledat v mých záznamech...","Expires at: {{- expiringDate}}":"Vyprší v: {{- expiringDate}}","Opened {{relativeTime}} by":"Otevřeno {{relativeTime}} uživatelem","Open":"Otevřeno","Closed":"Zavřeno","New request":"Nová žádost","My":"Moje","Others":"Ostatní","Search in my requests...":"Hledat v mých žádostech...","Opened by":"Otevřeno {{relativeTime}} uživatelem","Create new draft":"Vytvořit nový koncept","Edit record":"Úprava záznamu","Delete record":"Smazání záznamu","Publish record":"Vypublikování záznamů","Opened by {{creatorName}} on {{created}}.":"Otevřeno uživatelem {{creatorName}} na {{created}}.","Recepient: {{receiver}}.":"Příjemce: {{receiver}}","User Dashboard":"Nástěnka","Create new version of record":"Vytvořit novou verzi záznamu","All requests":"Všechny"} \ No newline at end of file diff --git a/oarepo_dashboard/i18n/semantic-ui/translations/oarepo_dashboard/messages/en/LC_MESSAGES/translations.json b/oarepo_dashboard/i18n/semantic-ui/translations/oarepo_dashboard/messages/en/LC_MESSAGES/translations.json index 547d55f..f8763f3 100644 --- a/oarepo_dashboard/i18n/semantic-ui/translations/oarepo_dashboard/messages/en/LC_MESSAGES/translations.json +++ b/oarepo_dashboard/i18n/semantic-ui/translations/oarepo_dashboard/messages/en/LC_MESSAGES/translations.json @@ -1 +1 @@ -{"User Dashboard":"Dashboard"} \ No newline at end of file +{"User Dashboard":"Dashboard","All requests":"All"} \ No newline at end of file diff --git a/oarepo_dashboard/i18n/translations/cs/LC_MESSAGES/messages.mo b/oarepo_dashboard/i18n/translations/cs/LC_MESSAGES/messages.mo index 249f940fd937352d163ff0a31d38a21bef46406f..51e4bb19a571ea5fd737e9485700b51b6ecff18c 100644 GIT binary patch delta 688 zcmYMx&nv@m9LMpuuVsF&nev;cQKo5|RyeWb;w}eVG(T!I8)?W~aN?rn{;!l{R?Tz? zD{%wMaTm+*5Ua3&emq6xTwo2}xjvzX`8#U=C$^jA?U#X%g_cq?h899?2%`=d#0DHj z?VCguFz>!kqk`A50=KXS_plkyQ8~A$-``^+zM_}&?T3K^9a8j#RoH^{sEsjH0pqB^ zSya$Adhr0y=vo1lli)OUVjR`EDb)I+YX+6KiS3+kM+^dZ;d+A#en17iAg!`5tV2I9 zIm?2mLV8fG9>5Tep+02Abqm$eeN=~zup3V>A7^mwF8rV>?c~vfAyfxOQR~w@6foz` z)7Zv5=X#9#?=Mjuyhj!Cfz)o_Xd|gqM<%(lmdvhZEm53tHXL6x7LG&?tk>_+rvBJ=_k$+f7+8iJs~+N6dk%FPBLrwjrc8iR&#t$#oo zlp2~E8iJt3rl6Wy8rma}zCXIq#p~xe*K^Nvp5w9e(pi3U?26$U=8kbM`V{?NTb3~) z!fgy<9s^j!b}V5OPf+hyFpM?NJG6J|^t{ONgR2h+z*7A&F)I z)j-DkJ&P*5iEX%pW4MR?c#f)bg?j%Qd+{Dy@fCyYZ$4P)gkLy-->AfHs;hw{s^AK$ zP!3gKAFE8OgqpwzyLI3!s?lZ7HB_B-)X59z;HhMPbIC#lYp6oEsKiI?!cSxm(?m7k zCs`wQa2yk;1FU*(phlfTO{RdOcz`o_;l)-UjKHnac$ diff --git a/oarepo_dashboard/i18n/translations/cs/LC_MESSAGES/messages.po b/oarepo_dashboard/i18n/translations/cs/LC_MESSAGES/messages.po index 3dc8e7c..454547a 100644 --- a/oarepo_dashboard/i18n/translations/cs/LC_MESSAGES/messages.po +++ b/oarepo_dashboard/i18n/translations/cs/LC_MESSAGES/messages.po @@ -136,3 +136,9 @@ msgstr "Nástěnka" msgid "Create new version of record" msgstr "Vytvořit novou verzi záznamu" + +msgid "All requests" +msgstr "Všechny" + +msgid "Assign DOI" +msgstr "" diff --git a/oarepo_dashboard/i18n/translations/en/LC_MESSAGES/messages.mo b/oarepo_dashboard/i18n/translations/en/LC_MESSAGES/messages.mo index 3bd5d2042dee5604793629d6fe92267853a46d7b..da336bdeff6bc75ea84184609098146a3588253c 100644 GIT binary patch delta 136 zcmaFH+|CktPl#nI0}wC+u?!HKfH+9N2gv3DVqYNU1L7zk?q_6R$OO_LJwJhLP9Xgk zNHaL*\n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.3\n" +"Generated-By: Babel 2.15.0\n" -#: /home/dusanst/Projects/oarepo-dashboard/oarepo_dashboard/ui/dashboard_communities/__init__.py:46 +#: /Users/m/w/cesnet/oarepo-dashboard/oarepo_dashboard/ui/dashboard_communities/__init__.py:46 msgid "Communities" msgstr "" -#: /home/dusanst/Projects/oarepo-dashboard/oarepo_dashboard/ui/dashboard_records/__init__.py:52 +#: /Users/m/w/cesnet/oarepo-dashboard/oarepo_dashboard/ui/dashboard_records/__init__.py:54 msgid "Records" msgstr "" -#: /home/dusanst/Projects/oarepo-dashboard/oarepo_dashboard/ui/dashboard_records/__init__.py:61 +#: /Users/m/w/cesnet/oarepo-dashboard/oarepo_dashboard/ui/dashboard_records/__init__.py:63 msgid "User Dashboard" msgstr "" -#: /home/dusanst/Projects/oarepo-dashboard/oarepo_dashboard/ui/dashboard_requests/__init__.py:50 +#: /Users/m/w/cesnet/oarepo-dashboard/oarepo_dashboard/ui/dashboard_requests/__init__.py:51 msgid "Requests" msgstr "" @@ -42,9 +42,6 @@ msgstr "" msgid "Restricted" msgstr "" -msgid "Filter results" -msgstr "" - msgid "Create new draft" msgstr "" @@ -63,6 +60,15 @@ msgstr "" msgid "Expires at: {{- expiringDate}}" msgstr "" +msgid "Open" +msgstr "" + +msgid "Closed" +msgstr "" + +msgid "All requests" +msgstr "" + msgid "My" msgstr "" @@ -83,3 +89,6 @@ msgstr "" msgid "Create new version of record" msgstr "" + +msgid "Assign DOI" +msgstr "" From 764fd6485c694fb6120116083dbd3de6477a0a69 Mon Sep 17 00:00:00 2001 From: Mirek Simek Date: Wed, 11 Dec 2024 20:57:59 +0100 Subject: [PATCH 3/3] feat: "filter" for "all" requests, made default --- oarepo_dashboard/ui/dashboard_components/search.py | 4 ++-- .../semantic-ui/js/dashboard_requests/search/index.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/oarepo_dashboard/ui/dashboard_components/search.py b/oarepo_dashboard/ui/dashboard_components/search.py index d90d32e..7024a58 100644 --- a/oarepo_dashboard/ui/dashboard_components/search.py +++ b/oarepo_dashboard/ui/dashboard_components/search.py @@ -1,5 +1,5 @@ -from oarepo_ui.resources.components import UIResourceComponent from flask import current_app +from oarepo_ui.resources.components import UIResourceComponent from oarepo_ui.utils import can_view_deposit_page @@ -15,4 +15,4 @@ def before_ui_search(self, *, search_options, view_args, extra_context, **kwargs class DashboardRequestsSearchComponent(UIResourceComponent): def before_ui_search(self, *, search_options, view_args, **kwargs): - search_options["initial_filters"] = [["is_open", "true"], ["mine", "true"]] + search_options["initial_filters"] = [["is_open", "true"], ["all", "true"]] diff --git a/oarepo_dashboard/ui/dashboard_requests/semantic-ui/js/dashboard_requests/search/index.js b/oarepo_dashboard/ui/dashboard_requests/semantic-ui/js/dashboard_requests/search/index.js index 6ce18dd..0a1e05d 100644 --- a/oarepo_dashboard/ui/dashboard_requests/semantic-ui/js/dashboard_requests/search/index.js +++ b/oarepo_dashboard/ui/dashboard_requests/semantic-ui/js/dashboard_requests/search/index.js @@ -75,6 +75,7 @@ export const FacetButtons = () => (