Commit d642d8e2 authored by Richard Blechinger's avatar Richard Blechinger
Browse files

Fix button ordering, show showAdder even with compact show selector

parent fc3e6a0b
......@@ -24,8 +24,11 @@ VUE_APP_API_STEERING_OIDC_REDIRECT_URI_POSTLOGOUT = http://localhost:8080
# =====================
VUE_APP_TIMESLOT_FILTER_DEFAULT_NUMSLOTS = 10
VUE_APP_TIMESLOT_FILTER_DEFAULT_DAYS = 60
VUE_APP_SHOW_THRESHOLD = 10
# Dashboard logging & debugging
# =============================
# use one of: debug, info, warn, error, fatal
VUE_APP_LOGLEVEL = warn
......@@ -39,5 +39,8 @@ VUE_APP_API_STEERING_OIDC_REDIRECT_URI_POSTLOGOUT = http://FINAL.DASHBOARD.DOMAI
# How many timeslots should be shown by default? (has to be a string)
VUE_APP_TIMESLOT_FILTER_DEFAULT_NUMSLOTS = 10
# After how many shows to switch to the compact show selector vs the dropdown
VUE_APP_SHOW_THRESHOLD = 10
# For how many days from now should timeslots be fetched by default? (has to be an int)
VUE_APP_TIMESLOT_FILTER_DEFAULT_DAYS = 60
......@@ -4,10 +4,10 @@
<h3>{{ title }}</h3>
</b-col>
<b-col
v-if="shows.length > 10"
align="right"
v-if="shows.length > this.showThreshold"
>
<b-input-group :prepend="$t('showSelector.selectShowMany')">
<div class="tw-flex tw-w-full tw-space-x-2">
<b-input-group :prepend="$t('showSelector.selectShowMany')" class="tw-w-full">
<b-form-input
v-model="inputSelector"
list="list-of-shows"
......@@ -20,14 +20,14 @@
:disabled="disabledOk"
@click="confirmSelector"
>
<b-icon-check />
<b-icon-check/>
</b-button>
<b-button
variant="danger"
:disabled="disabledReset"
@click="resetSelector"
>
<b-icon-x />
<b-icon-x/>
</b-button>
</b-input-group-append>
</b-input-group>
......@@ -39,11 +39,22 @@
{{ show.name }} (ID: {{ show.id }})
</option>
</datalist>
<b-button
v-if="isSuperuser"
v-b-popover.hover.top="$t('showCreator.title')"
variant="primary"
@click="$refs.addShowModal.openModal()"
>
+
</b-button>
</div>
</b-col>
<b-col
v-else
align="right"
>
<div class="tw-flex tw-justify-end tw-w-full tw-space-x-2">
<b-dropdown
id="ddshows"
:text="$t('showSelector.selectShow')"
......@@ -58,7 +69,7 @@
{{ show.name }}
</b-dropdown-item>
</b-dropdown>
&nbsp;
<b-button
v-if="isSuperuser"
v-b-popover.hover.top="$t('showCreator.title')"
......@@ -67,11 +78,13 @@
>
+
</b-button>
</div>
</b-col>
<addShowModal
ref="addShowModal"
:callback="newShowAdded"
/>
</b-col>
</b-row>
</template>
......@@ -88,13 +101,14 @@
},
props: {
title: {type: String, default: 'Unbetitelt' },
title: {type: String, default: 'Unbetitelt'},
callback: {type: Function, default: null}
},
data() {
return {
inputSelector: '',
showThreshold: process.env.VUE_APP_SHOW_THRESHOLD
}
},
......
......@@ -7,14 +7,14 @@
<b-card>
<b-row>
<b-col>
<b-btn v-b-toggle.timeslotFilterCollapse>
<b-btn variant="primary" v-b-toggle.timeslotFilterCollapse>
{{ $t('showTimeslots.toggleFilters') }}
</b-btn>
</b-col>
<b-col align="right">
<b-button
v-if="user.steeringUser.is_superuser"
variant="primary"
variant="outline-secondary"
@click="$router.push({path: 'emissions', query: { show: selectedShow.slug }})"
>
{{ $t('showTimeslots.switchToEmissions') }}
......@@ -76,7 +76,7 @@
{{ $t('showTimeslots.resetFilters') }}
</b-btn> &nbsp;
<b-btn
variant="outline-success"
variant="success"
@click="applyFilter()"
>
{{ $t('showTimeslots.applyFilters') }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment