diff --git a/hypha/apply/funds/templates/funds/includes/round-block.html b/hypha/apply/funds/templates/funds/includes/round-block.html index 3066e659a219759add1e6ab8021c9926bd785b67..318e7d2bbbdc64d6706738a9fba63003074dae1e 100644 --- a/hypha/apply/funds/templates/funds/includes/round-block.html +++ b/hypha/apply/funds/templates/funds/includes/round-block.html @@ -1,7 +1,7 @@ {% load i18n %} <div class="wrapper wrapper--bottom-space" - x-data="{ activeTab: 'closed-rounds' }" - x-init="activeTab = window.location.hash && ['#open-rounds', '#closed-rounds'].includes(window.location.hash) ? window.location.hash.substring(1) : 'closed-rounds'" + x-data="{ activeTab: 'open-rounds' }" + x-init="activeTab = window.location.hash && ['#open-rounds', '#closed-rounds'].includes(window.location.hash) ? window.location.hash.substring(1) : activeTab" > <section class="section section--with-options"> <h4 class="heading heading--normal heading--no-margin">{{ title }}</a></h4> diff --git a/hypha/apply/funds/templates/submissions/submenu/rounds.html b/hypha/apply/funds/templates/submissions/submenu/rounds.html index 0f63fdcb69d12df585a57ec4b86ca4600ce7abdc..22924b8e4dc7f512fe15626de19c03f43144abfc 100644 --- a/hypha/apply/funds/templates/submissions/submenu/rounds.html +++ b/hypha/apply/funds/templates/submissions/submenu/rounds.html @@ -17,23 +17,27 @@ <div role="tablist" - x-data="{tab: 'closed_rounds'}" + {% if open_rounds %} + x-data="{tab: 'open_rounds'}" + {% else %} + x-data="{tab: 'closed_rounds'}" + {% endif %} > <nav class="flex px-3 pt-2" style="box-shadow: inset 0 -1px 0 #e5e7eb"> - {% if closed_rounds %} - <span @click="tab = 'closed_rounds'" - role="tab" - :class="{ 'border-x border-t border-b-transparent': tab === 'closed_rounds' }" - class="text-center bg-white inline-block px-4 py-2 border-b rounded-t-lg cursor-pointer hover:text-gray-900">{% trans "Closed" %}</span> - {% endif %} - {% if open_rounds %} <span @click="tab = 'open_rounds'" role="tab" :class="{ 'border-x border-t border-b-transparent': tab === 'open_rounds' }" class="text-center bg-white inline-block px-4 py-2 border-b rounded-t-lg round cursor-pointer hover:text-gray-900">{% trans "Open" %}</span> {% endif %} + + {% if closed_rounds %} + <span @click="tab = 'closed_rounds'" + role="tab" + :class="{ 'border-x border-t border-b-transparent': tab === 'closed_rounds' }" + class="text-center bg-white inline-block px-4 py-2 border-b rounded-t-lg cursor-pointer hover:text-gray-900">{% trans "Closed" %}</span> + {% endif %} </nav> <div data-filter-list>