Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard
Commits
1f8bf739
Commit
1f8bf739
authored
Nov 29, 2017
by
Andrea Ida Malkah Klaura
Browse files
ShowManager: layout & nice bootstrap show switcher
parent
606b50b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/ShowManager.vue
View file @
1f8bf739
<
template
>
<b-container>
<div>
<h1>
Sendereihen
&
Sendungen
</h1>
<div
class=
"row"
>
<div
class=
"col"
>
Aktuelle Sendereihe:
<select
v-model=
"currentShow"
v-on:change=
"switchShow"
>
<option
v-for=
"(show, index) in this.shows"
v-bind:value=
"index"
>
{{
show
.
name
}}
</option>
</select>
<hr
/>
</div>
</div>
<b-row
v-if=
"showsLoaded"
>
<b-col>
Aktuell ausgewählt:
<b-button
disabled
variant=
"outline-secondary"
><b>
{{
shows
[
currentShow
].
name
}}
</b></b-button>
</b-col>
<b-col
align=
"right"
>
<b-dropdown
id=
"ddshows"
text=
"Sendereihe auswählen"
variant=
"info"
>
<b-dropdown-item
v-for=
"(show, index) in this.shows"
v-on:click=
"switchShow(index)"
>
{{
show
.
name
}}
</b-dropdown-item>
</b-dropdown>
</b-col>
</b-row>
<div
v-else
style=
"text-align: center;"
><img
src=
"../assets/radio.gif"
alt=
"loading data"
/><br
/></div>
<hr
/>
<p
align=
"left"
>
Die nächsten
<select
v-model=
"numUpcoming"
>
<option>
8
</option>
...
...
@@ -142,8 +145,9 @@ export default {
}
},
methods
:
{
switchShow
:
function
()
{
switchShow
:
function
(
index
)
{
this
.
episodesLoaded
=
false
this
.
currentShow
=
index
this
.
currentShowID
=
this
.
shows
[
this
.
currentShow
].
id
// fetch single episodes for a given show from PV backend
this
.
$http
.
post
(
process
.
env
.
API_STEERING
,
{
...
...
@@ -203,7 +207,7 @@ export default {
this
.
currentShowID
=
this
.
shows
[
0
].
id
this
.
currentShow
=
0
this
.
showsLoaded
=
true
this
.
switchShow
()
this
.
switchShow
(
this
.
currentShow
)
}
},
response
=>
{
alert
(
'
There was an error fetching the data from the server
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment