Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Vips
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Plugins
Vips
Commits
19061a11
Commit
19061a11
authored
3 months ago
by
Elmar Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
avoid displaying 01.01.1970 for `null` values, fixes
#267
parent
48436e6b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controllers/api.php
+2
-2
2 additions, 2 deletions
controllers/api.php
js/test-block.js
+5
-5
5 additions, 5 deletions
js/test-block.js
with
7 additions
and
7 deletions
controllers/api.php
+
2
−
2
View file @
19061a11
...
...
@@ -29,7 +29,7 @@ class ApiController extends StudipController
'type'
=>
$assignment
->
type
,
'icon'
=>
$assignment
->
getTypeIcon
()
->
getShape
(),
'start'
=>
date
(
'd.m.Y, H:i'
,
strtotime
(
$assignment
->
start
)),
'end'
=>
date
(
'd.m.Y, H:i'
,
strtotime
(
$assignment
->
end
)),
'end'
=>
$assignment
->
end
?
date
(
'd.m.Y, H:i'
,
strtotime
(
$assignment
->
end
))
:
null
,
'active'
=>
$assignment
->
active
,
'block'
=>
$assignment
->
block_id
?
$assignment
->
block
->
name
:
null
];
...
...
@@ -67,7 +67,7 @@ class ApiController extends StudipController
'type'
=>
$assignment
->
type
,
'icon'
=>
$assignment
->
getTypeIcon
()
->
getShape
(),
'start'
=>
date
(
'd.m.Y, H:i'
,
strtotime
(
$assignment
->
start
)),
'end'
=>
date
(
'd.m.Y, H:i'
,
strtotime
(
$assignment
->
end
)),
'end'
=>
$assignment
->
end
?
date
(
'd.m.Y, H:i'
,
strtotime
(
$assignment
->
end
))
:
null
,
'active'
=>
$assignment
->
active
,
'block'
=>
$assignment
->
block_id
?
$assignment
->
block
->
name
:
null
,
'reset_allowed'
=>
$assignment
->
isRunning
(
$user_id
)
&&
$assignment
->
isResetAllowed
(),
...
...
This diff is collapsed.
Click to expand it.
js/test-block.js
+
5
−
5
View file @
19061a11
...
...
@@ -77,19 +77,19 @@ const CoursewareTestBlock = {
class="cw-vs-select"
>
<template #open-indicator="selectAttributes">
<studip-icon shape="arr_1down" size="1
0
"/>
<studip-icon shape="arr_1down" size="1
6
"/>
</template>
<template #no-options="{}">
<translate>Es steht keine Auswahl zur Verfügung</translate>
</template>
<template #selected-option="{title, icon, start, end}">
<studip-icon :shape="icon" role="info"/>
{{title}} ({{start}}
- {{end
}})
<studip-icon
v-if="icon"
:shape="icon" role="info"/>
{{title}} ({{start}}
{{ end ? ' - ' + end : ''
}})
</template>
<template #option="{title, icon, start, end, block}">
<studip-icon :shape="icon" role="info"/>
<studip-icon
v-if="icon"
:shape="icon" role="info"/>
{{ block ? block + ' / ' + title : title }}<br>
<small>{{start}}
- {{end
}}</small>
<small>{{start}}
{{ end ? ' - ' + end : ''
}}</small>
</template>
</studip-select>
</label>
...
...
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