blob: 298204e7dd3f2b4a7296c63dca5699f9f74e6d2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
<template>
<div class="controls" v-if="isVisible">
<div>
<label>
<input type="checkbox" :checked="module.active" @click="toggleModuleActivation(module)" :ref="'checkbox_' + module.id">
{{ module.active ? $gettext('Werkzeug ist aktiv') : $gettext('Werkzeug ist inaktiv') }}
</label>
</div>
<div>
<a href="#"
class="toggle_visibility"
role="checkbox"
v-if="module.active"
:aria-checked="module.visibility !== 'tutor' ? 'true' : 'false'"
@click.prevent="toggleModuleVisibility(module)">
<studip-icon :shape="module.visibility !== 'tutor' ? 'visibility-visible' : 'visibility-invisible'"
class="text-bottom"
:title="$gettext('Inhaltsmodul %{ name } für Teilnehmende unsichtbar bzw. sichtbar schalten', { name: module.displayname}, true)"></studip-icon>
</a>
</div>
</div>
</template>
<script>
import ContentModulesMixin from '@/vue/mixins/ContentModulesMixin.js';
export default {
name: 'ContentModulesControl',
props: {
module_id: {
type: String,
required: true
}
},
mixins: [ContentModulesMixin],
computed: {
isVisible() {
return !this.module.mandatory;
},
module () {
return this.modules.find(m => m.id === this.module_id) ?? null;
}
}
};
</script>
<style lang="scss">
.contentmodule_info {
display: flex;
.main_part {
flex-grow: 1;
.header {
display: flex;
align-items: center;
.image {
width: 200px;
height: 150px;
display: flex;
justify-content: center;
align-items: center;
}
.text {
display: flex;
flex-direction: column;
}
}
[data-vue-app] {
min-height: unset;
}
.controls {
background-color: var(--color--fieldset-header);
padding: 5px;
display: flex;
justify-content: space-between;
}
.keywords {
margin-top: 10px;
margin-bottom: 10px;
padding-left: 25px;
}
.description {
margin-top: 10px;
padding: 0 1em;
}
}
.screenshots {
margin-left: 10px;
max-width: 270px;
li {
margin-top: 20px;
margin-bottom: 20px;
img {
display: block;
width: 100%;
border: solid thin var(--color--tile-border);
}
}
}
}
</style>
|