diff --git a/dejacode/static/css/dejacode_bootstrap.css b/dejacode/static/css/dejacode_bootstrap.css index fe4f7f88..f67badbb 100644 --- a/dejacode/static/css/dejacode_bootstrap.css +++ b/dejacode/static/css/dejacode_bootstrap.css @@ -546,6 +546,9 @@ table.purldb-table .column-license_expression { color: white; vertical-align: middle; } +.text-request { + color: var(--bs-djc-request-bg); +} /* -- Requests form -- */ #workflow-request-form fieldset.right-side label { diff --git a/dejacode/static/js/dejacode_main.js b/dejacode/static/js/dejacode_main.js index 428dd899..c7713eaa 100644 --- a/dejacode/static/js/dejacode_main.js +++ b/dejacode/static/js/dejacode_main.js @@ -135,13 +135,24 @@ function setupSearchModal() { if (!searchModal) return; + // Apply a scope button as the active one and sync the form action + const applyScope = (button) => { + document.querySelectorAll('.search-scope-btn').forEach(b => b.classList.remove('active')); + button.classList.add('active'); + searchForm.setAttribute('action', button.dataset.scopeAction); + }; + + // Sync form action with the currently active scope button on page load + const activeButton = document.querySelector('.search-scope-btn.active'); + if (searchForm && activeButton) { + searchForm.setAttribute('action', activeButton.dataset.scopeAction); + } + // Scope selector buttons if (searchForm) { document.querySelectorAll('.search-scope-btn').forEach(button => { button.addEventListener('click', () => { - document.querySelectorAll('.search-scope-btn').forEach(b => b.classList.remove('active')); - button.classList.add('active'); - searchForm.setAttribute('action', button.dataset.scopeAction); + applyScope(button); searchInput.focus(); }); }); diff --git a/dje/templates/dataspace_home.html b/dje/templates/dataspace_home.html index 1a25d168..a295177a 100644 --- a/dje/templates/dataspace_home.html +++ b/dje/templates/dataspace_home.html @@ -6,10 +6,8 @@ {% block page_title %}DejaCode for {{ user.dataspace }}{% endblock %} {% block content %} -

- DejaCode for {{ user.dataspace }} -

+ {# Announcements #} + {# Dataspace name and links #} +
+
+
+
+ + {{ user.dataspace }} + +
+ Dashboard +
+
+ {% for header, urls in sections.items %} + {% for value, url in urls.items %} + {% if not forloop.parentloop.first or not forloop.first %} + | + {% endif %} + {{ value }} + {% endfor %} + {% endfor %} +
+
+
+
+ +
+ {# Compliance #} +
+
+
+ +
+
+
+ {# Requests #} + {% if request_assigned_to_me or request_followed_by_me %} +
+ {% include 'workflow/includes/request_home_dashboard.html' with request_qs=request_assigned_to_me header_title='Assigned to me' header_icon='fa-user-check' filter_name='assignee' %} +
+
+ {% include 'workflow/includes/request_home_dashboard.html' with request_qs=request_followed_by_me header_title='Following' header_icon='fa-eye' filter_name='following' %} +
+ {% endif %} +
+ + {# Custom reporting cards #} {% if cards %} -
+
{% for card in cards %} -
-
-
{{ card.title }}
+
+
+

{{ card.title }}

{% for obj in card.object_list %} {% if forloop.first %} @@ -42,8 +86,8 @@

{% if card.display_changelist_link and request.user.is_staff %} {% with changelist_url=card.query.get_changelist_url_with_filters %} {% if changelist_url %} - {% endif %} - -
-
-
-
- {% for header, urls in sections.items %} -

{{ header }}:

-
    - {% for value, url in urls.items %} -
  • {{ value }}
  • - {% endfor %} -
- {% endfor %} -
-
-
- - {% if request_assigned_to_me or request_followed_by_me %} -
- {% include 'workflow/includes/request_home_dashboard.html' with request_qs=request_assigned_to_me header_title='Requests assigned to me' filter_name='assignee' %} -
-
- {% include 'workflow/includes/request_home_dashboard.html' with request_qs=request_followed_by_me header_title='Requests I am following' filter_name='following' %} -
- {% endif %} -
{% endblock %} \ No newline at end of file diff --git a/dje/templates/modals/search_modal.html b/dje/templates/modals/search_modal.html index e3c2c4c5..fad2fb4f 100644 --- a/dje/templates/modals/search_modal.html +++ b/dje/templates/modals/search_modal.html @@ -2,7 +2,7 @@