Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
ac6ddd39
Commit
ac6ddd39
authored
2 years ago
by
Jan-Hendrik Willms
Committed by
Elmar Ludwig
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
allow changing of many options for consultation blocks, fixes #1707
Closes #1707 Merge request
studip/studip!1113
parent
0d525938
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/controllers/consultation/admin.php
+5
-0
5 additions, 0 deletions
app/controllers/consultation/admin.php
app/views/consultation/admin/edit.php
+57
-0
57 additions, 0 deletions
app/views/consultation/admin/edit.php
lib/models/ConsultationBlock.php
+22
-16
22 additions, 16 deletions
lib/models/ConsultationBlock.php
with
84 additions
and
16 deletions
app/controllers/consultation/admin.php
+
5
−
0
View file @
ac6ddd39
...
@@ -372,6 +372,11 @@ class Consultation_AdminController extends ConsultationController
...
@@ -372,6 +372,11 @@ class Consultation_AdminController extends ConsultationController
$this
->
block
=
$this
->
loadBlock
(
$block_id
);
$this
->
block
=
$this
->
loadBlock
(
$block_id
);
$this
->
block
->
room
=
trim
(
Request
::
get
(
'room'
));
$this
->
block
->
room
=
trim
(
Request
::
get
(
'room'
));
$this
->
block
->
note
=
trim
(
Request
::
get
(
'note'
));
$this
->
block
->
note
=
trim
(
Request
::
get
(
'note'
));
$this
->
block
->
size
=
Request
::
int
(
'size'
);
$this
->
block
->
calendar_events
=
Request
::
bool
(
'calender-events'
,
false
);
$this
->
block
->
show_participants
=
Request
::
bool
(
'show-participants'
,
false
);
$this
->
block
->
require_reason
=
Request
::
option
(
'require-reason'
);
$this
->
block
->
confirmation_text
=
trim
(
Request
::
get
(
'confirmation-text'
));
foreach
(
$this
->
block
->
slots
as
$slot
)
{
foreach
(
$this
->
block
->
slots
as
$slot
)
{
$slot
->
note
=
''
;
$slot
->
note
=
''
;
...
...
This diff is collapsed.
Click to expand it.
app/views/consultation/admin/edit.php
+
57
−
0
View file @
ac6ddd39
<?php
/**
* @var Consultation_AdminController $controller
* @var ConsultationBlock $block
* @var int $page
* @var array|null $responsible
*/
?>
<form
action=
"
<?=
$controller
->
store_edited
(
$block
,
$page
)
?>
"
method=
"post"
class=
"default"
>
<form
action=
"
<?=
$controller
->
store_edited
(
$block
,
$page
)
?>
"
method=
"post"
class=
"default"
>
<?=
CSRFProtection
::
tokenTag
()
?>
<?=
CSRFProtection
::
tokenTag
()
?>
...
@@ -22,6 +30,55 @@
...
@@ -22,6 +30,55 @@
<?
if
(
$responsible
)
:
?>
<?
if
(
$responsible
)
:
?>
<?=
$this
->
render_partial
(
'consultation/admin/block-responsibilities.php'
,
compact
(
'responsible'
,
'block'
))
?>
<?=
$this
->
render_partial
(
'consultation/admin/block-responsibilities.php'
,
compact
(
'responsible'
,
'block'
))
?>
<?
endif
;
?>
<?
endif
;
?>
<label>
<?=
_
(
'Maximale Teilnehmerzahl'
)
?>
<?=
tooltipIcon
(
_
(
'Falls Sie mehrere Personen zulassen wollen (wie z.B. zu einer Klausureinsicht), so geben Sie hier die maximale Anzahl an Personen an, die sich anmelden dürfen.'
))
?>
<input
required
type=
"text"
name=
"size"
id=
"size"
min=
"1"
max=
"50"
value=
"
<?=
$block
->
size
?>
"
>
</label>
<label>
<input
type=
"checkbox"
name=
"calender-events"
value=
"1"
<?
if
(
$block
->
calendar_events
)
echo
'checked'
;
?>
>
<?=
_
(
'Die freien Termine auch im Kalender markieren'
)
?>
</label>
<label>
<input
type=
"checkbox"
name=
"show-participants"
value=
"1"
<?
if
(
$block
->
show_participants
)
echo
'checked'
;
?>
>
<?=
_
(
'Namen der buchenden Personen sind öffentlich sichtbar'
)
?>
</label>
<label>
<?=
_
(
'Grund der Buchung abfragen'
)
?>
</label>
<div
class=
"hgroup"
>
<label>
<input
type=
"radio"
name=
"require-reason"
value=
"yes"
<?
if
(
$block
->
require_reason
===
'yes'
)
echo
'checked'
;
?>
>
<?=
_
(
'Ja, zwingend erforderlich'
)
?>
</label>
<label>
<input
type=
"radio"
name=
"require-reason"
value=
"optional"
<?
if
(
$block
->
require_reason
===
'optional'
)
echo
'checked'
;
?>
>
<?=
_
(
'Ja, optional'
)
?>
</label>
<label>
<input
type=
"radio"
name=
"require-reason"
value=
"no"
<?
if
(
$block
->
require_reason
===
'no'
)
echo
'checked'
;
?>
>
<?=
_
(
'Nein'
)
?>
</label>
</div>
<label>
<?=
_
(
'Bestätigung für folgenden Text einholen'
)
?>
(
<?=
_
(
'optional'
)
?>
)
<?=
tooltipIcon
(
_
(
'Wird hier ein Text eingegeben, so müssen Buchende bestätigen, dass sie diesen Text gelesen haben.'
))
?>
<textarea
name=
"confirmation-text"
>
<?=
htmlReady
(
$block
->
confirmation_text
)
?>
</textarea>
</label>
</fieldset>
</fieldset>
<footer
data-dialog-button
>
<footer
data-dialog-button
>
...
...
This diff is collapsed.
Click to expand it.
lib/models/ConsultationBlock.php
+
22
−
16
View file @
ac6ddd39
...
@@ -10,22 +10,28 @@
...
@@ -10,22 +10,28 @@
* method when the dev board finally fully supports PHP7 since that
* method when the dev board finally fully supports PHP7 since that
* required "yield from".
* required "yield from".
*
*
* @property string block_id database column
* @property string $id alias column for block_id
* @property string id alias column for block_id
* @property string $block_id database column
* @property string range_id database column
* @property string $range_id database column
* @property string range_type database column
* @property string $range_type database column
* @property string teacher_id database column
* @property string $teacher_id database column
* @property string start database column
* @property int $start database column
* @property string end database column
* @property int $end database column
* @property string room database column
* @property string $room database column
* @property string calendar_events database column
* @property bool $calendar_events database column
* @property string note database column
* @property bool $show_participants database column
* @property string size database column
* @property bool $require_reason database column
* @property bool has_bookings computed column
* @property string $confirmation_text database column
* @property Range range computed column
* @property string $note database column
* @property SimpleORMapCollection slots has_many ConsultationSlot
* @property string $size database column
* @property ConsultationResponsibility[]|SimpleCollection responsibilities has_many ConsultationResponsibility
* @property int $mkdate database column
* @property User[] responsible_persons
* @property int $chdate database column
*
* @property bool $has_bookings computed column
* @property Range $range computed column
* @property ConsultationSlot[]|SimpleORMapCollection $slots has_many ConsultationSlot
* @property ConsultationResponsibility[]|SimpleCollection $responsibilities has_many ConsultationResponsibility
* @property User[] $responsible_persons
*/
*/
class
ConsultationBlock
extends
SimpleORMap
implements
PrivacyObject
class
ConsultationBlock
extends
SimpleORMap
implements
PrivacyObject
{
{
...
...
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