Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fsarbeit.imt
dashboard
Commits
036c6873
There was an error fetching the commit references. Please try again later.
Commit
036c6873
authored
May 9, 2022
by
Björn Beckendorf
Browse files
Options
Downloads
Patches
Plain Diff
added legend for mensa and vegan leaf
parent
f53ba3ff
No related branches found
No related tags found
1 merge request
!1
added legend for mensa and vegan leaf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/mensa.js
+4
-3
4 additions, 3 deletions
modules/mensa.js
with
4 additions
and
3 deletions
modules/mensa.js
+
4
−
3
View file @
036c6873
...
@@ -40,7 +40,7 @@ function opening_hours(data, mensa, now){
...
@@ -40,7 +40,7 @@ function opening_hours(data, mensa, now){
function
mensa_item_html
(
item
){
function
mensa_item_html
(
item
){
return
'
<tr>
'
+
return
'
<tr>
'
+
'
<td class="
'
+
(
item
.
is_vegan
?
"
fw-bold
"
:
""
)
+
'
'
+
((
item
.
is_vegan
||
item
.
is_vegan
)
?
"
text-success
"
:
""
)
+
'
">
'
+
item
.
name
+
'
<span class="text-muted fw-normal">
'
+
item
.
allergens
.
join
(
'
,
'
)
+
'
</span></td>
'
+
'
<td class="
'
+
(
item
.
is_vegan
?
"
fw-bold
"
:
""
)
+
'
'
+
((
item
.
is_vegan
||
item
.
is_vegan
)
?
"
text-success
"
:
""
)
+
'
">
'
+
item
.
name
+
'
<span class="text-muted fw-normal">
'
+
item
.
allergens
.
join
(
'
,
'
)
+
(
item
.
is_vegan
?
"
🥬
"
:
""
)
+
'
</span></td>
'
+
'
<td>
'
+
(
new
Intl
.
NumberFormat
(
'
de-DE
'
,
{
style
:
'
currency
'
,
currency
:
'
EUR
'
}).
format
(
item
.
price
))
+
'
</td>
'
+
'
<td>
'
+
(
new
Intl
.
NumberFormat
(
'
de-DE
'
,
{
style
:
'
currency
'
,
currency
:
'
EUR
'
}).
format
(
item
.
price
))
+
'
</td>
'
+
'
</tr>
'
;
'
</tr>
'
;
}
}
...
@@ -157,7 +157,8 @@ function display_mensa(plan){
...
@@ -157,7 +157,8 @@ function display_mensa(plan){
mensa
.
dessert
.
forEach
(
function
(
item
){
mensa
.
dessert
.
forEach
(
function
(
item
){
desserts
.
find
(
"
.mensa-section-dishes
"
).
append
(
mensa_item_html
(
item
));
desserts
.
find
(
"
.mensa-section-dishes
"
).
append
(
mensa_item_html
(
item
));
});
});
card
.
find
(
"
.card-body
"
).
append
(
main_dishes
,
side_dishes
,
desserts
);
let
legend
=
$
(
'
<div class="fw-bold text-success"> Vegan 🥬</div>
'
);
card
.
find
(
"
.card-body
"
).
append
(
main_dishes
,
side_dishes
,
desserts
,
legend
);
}
else
{
}
else
{
card
.
find
(
"
.card-header
"
).
append
(
'
<span class="badge bg-danger mensa-closed">Geschlossen</span>
'
);
card
.
find
(
"
.card-header
"
).
append
(
'
<span class="badge bg-danger mensa-closed">Geschlossen</span>
'
);
}
}
...
...
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