Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
ToolAssistant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Plugins
ToolAssistant
Commits
7a86e87a
Commit
7a86e87a
authored
Jul 9, 2020
by
Ron Lucke
Browse files
Options
Downloads
Patches
Plain Diff
add course type selection
parent
af5c81f4
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
assets/assistant.css
+15
-1
15 additions, 1 deletion
assets/assistant.css
controllers/assistant.php
+21
-0
21 additions, 0 deletions
controllers/assistant.php
views/de/assistant/index.php
+70
-3
70 additions, 3 deletions
views/de/assistant/index.php
with
106 additions
and
4 deletions
assets/assistant.css
+
15
−
1
View file @
7a86e87a
...
@@ -7,13 +7,17 @@
...
@@ -7,13 +7,17 @@
}
}
.assistant-section
{
.assistant-section
{
margin
:
0
1em
2
.5
em
1em
;
margin
:
0
1em
2em
1em
;
width
:
440px
;
width
:
440px
;
}
}
.assistant-section-big
{
width
:
908px
;
}
.assistant-section
h1
{
.assistant-section
h1
{
border-bottom
:
0
;
border-bottom
:
0
;
font-size
:
1.2em
;
font-size
:
1.2em
;
line-height
:
1.5em
;
}
}
.accordion
{
.accordion
{
...
@@ -52,6 +56,16 @@
...
@@ -52,6 +56,16 @@
.assistant-infobox
{
.assistant-infobox
{
border
:
solid
thin
#ccc
;
border
:
solid
thin
#ccc
;
padding
:
1em
;
padding
:
1em
;
min-height
:
186px
;
}
.assistant-infobox
header
{
font-weight
:
600
;
}
@media
only
screen
and
(
max-width
:
1717px
)
{
.assistant-section-big
{
width
:
440px
;
}
}
}
@media
only
screen
and
(
max-width
:
768px
)
{
@media
only
screen
and
(
max-width
:
768px
)
{
...
...
This diff is collapsed.
Click to expand it.
controllers/assistant.php
+
21
−
0
View file @
7a86e87a
...
@@ -50,9 +50,30 @@ class AssistantController extends ToolAssistantBaseController
...
@@ -50,9 +50,30 @@ class AssistantController extends ToolAssistantBaseController
}
}
Sidebar
::
get
()
->
addWidget
(
$widget
);
Sidebar
::
get
()
->
addWidget
(
$widget
);
$this
->
datafields
=
DataFieldEntry
::
getDataFieldEntries
(
$this
->
course_id
,
'sem'
);
$this
->
folder_id
=
Folder
::
findTopFolder
(
$this
->
course_id
)
->
id
;
$this
->
folder_id
=
Folder
::
findTopFolder
(
$this
->
course_id
)
->
id
;
}
}
public
function
set_type_action
()
{
CSRFProtection
::
verifyUnsafeRequest
();
$df
=
Request
::
getArray
(
'df'
);
$ids
=
[
'aee5626da96ab9c37976b2fc454d88b4'
,
'a8af8d7ef4a67cc38d7ca6a21fe1bc73'
];
$datafields
=
DataFieldEntry
::
getDataFieldEntries
(
$this
->
course_id
,
'sem'
);
foreach
(
$ids
as
$id
)
{
$datafields
[
$id
]
->
setValueFromSubmit
(
$df
[
$id
]);
if
(
$datafields
[
$id
]
->
isValid
())
{
$datafields
[
$id
]
->
store
();
}
}
PageLayout
::
postSuccess
(
'Die Einstellungen für die Veranstaltungsform wurden gespeichert'
);
$this
->
redirect
(
'assistant'
);
}
public
function
track_action
(
$action
)
public
function
track_action
(
$action
)
{
{
$this
->
trackVisit
(
join
(
"."
,
func_get_args
()));
$this
->
trackVisit
(
join
(
"."
,
func_get_args
()));
...
...
This diff is collapsed.
Click to expand it.
views/de/assistant/index.php
+
70
−
3
View file @
7a86e87a
<div
class=
"assistant-container"
>
<div
class=
"assistant-container"
>
<section
class=
"assistant-section"
>
<h1>
Einstellungen für die Veranstaltungsform
</h1>
<form
class=
"default assistant-form"
action=
"
<?=
$controller
->
link_for
(
'assistant/set_type'
)
?>
"
method=
"POST"
>
<?=
CSRFProtection
::
tokenTag
()
?>
<div
class=
"assistant-infobox"
>
<?=
$datafields
[
'aee5626da96ab9c37976b2fc454d88b4'
]
->
getHTML
(
'df'
)
?>
<?=
$datafields
[
'a8af8d7ef4a67cc38d7ca6a21fe1bc73'
]
->
getHTML
(
'df'
)
?>
</div>
<?=
Studip\Button
::
createAccept
(
_vips
(
'Speichern'
),
'save'
)
?>
</form>
</section>
<section
class=
"assistant-section assistant-section-big"
>
<h1>
Information zur Veranstaltungsform
</h1>
<div
class=
"assistant-infobox"
>
<div
class=
"course-type-info course-type-info-digital"
>
<header>
Digitale Veranstaltung
</header>
<p>
lorem ipsum dolor
</p>
</div>
<div
class=
"course-type-info course-type-info-hybrid"
>
<header>
Hybrideveranstaltung
</header>
<p>
lorem ipsum dolor
</header>
</div>
<div
class=
"course-type-info course-type-info-presence"
>
<header>
Präsenzveranstaltung
</header>
<p>
lorem ipsum dolor
</p>
</div>
</div>
</section>
</div>
<div
class=
"assistant-container"
>
<section
class=
"assistant-section"
>
<section
class=
"assistant-section"
>
<h1>
<h1>
Zum Einstieg
Zum Einstieg
...
@@ -361,11 +411,11 @@ Telefonnummer für Rückfragen:
...
@@ -361,11 +411,11 @@ Telefonnummer für Rückfragen:
</a><br>
</a><br>
<a
href=
"https://www.rz.uni-osnabrueck.de/homeoffice/homeoffice.html"
class=
"link-extern"
target=
"_blank"
>
Homeoffice-Dienste des Rechenzentrums
</a>
<a
href=
"https://www.rz.uni-osnabrueck.de/homeoffice/homeoffice.html"
class=
"link-extern"
target=
"_blank"
>
Homeoffice-Dienste des Rechenzentrums
</a>
</p>
</p>
</div>
<?=
Studip\LinkButton
::
create
(
_
(
'Anfrage stellen'
),
<?=
Studip\LinkButton
::
create
(
_
(
'Anfrage stellen'
),
URLHelper
::
getURL
(
'dispatch.php/messages/write'
,
[
'rec_uname'
=>
'virtuos@studip'
]),
[
'data-dialog'
=>
''
,
'data-action'
=>
'messages/write'
])
?>
URLHelper
::
getURL
(
'dispatch.php/messages/write'
,
[
'rec_uname'
=>
'virtuos@studip'
]),
[
'data-dialog'
=>
''
,
'data-action'
=>
'messages/write'
])
?>
</div>
</section>
</section>
</div>
</div>
<script>
<script>
...
@@ -373,4 +423,21 @@ Telefonnummer für Rückfragen:
...
@@ -373,4 +423,21 @@ Telefonnummer für Rückfragen:
collapsible
:
true
,
collapsible
:
true
,
active
:
false
active
:
false
});
});
$
(
"
input[name='df[aee5626da96ab9c37976b2fc454d88b4]']
"
).
on
(
'
change
'
,(
event
)
=>
{
$
(
'
.course-type-info
'
).
hide
();
switch
(
$
(
event
.
currentTarget
).
val
())
{
case
'
Hybridveranstaltung
'
:
$
(
'
.course-type-info-hybrid
'
).
show
();
break
;
case
'
Digitale Veranstaltung
'
:
$
(
'
.course-type-info-digital
'
).
show
();
break
;
case
'
Präsenzveranstaltung
'
:
$
(
'
.course-type-info-presence
'
).
show
();
break
;
}
});
$
(
"
input[name='df[aee5626da96ab9c37976b2fc454d88b4]']:checked
"
).
trigger
(
'
change
'
);
</script>
</script>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment