Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thomasDOTwtf
hub
Commits
4a164e62
Commit
4a164e62
authored
Aug 16, 2023
by
grollicus
Browse files
Options
Downloads
Patches
Plain Diff
cleaned up first_now_done
parent
e971eb26
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plainui/jinja2/plainui/components/list_events.html
+4
-4
4 additions, 4 deletions
src/plainui/jinja2/plainui/components/list_events.html
with
4 additions
and
4 deletions
src/plainui/jinja2/plainui/components/list_events.html
+
4
−
4
View file @
4a164e62
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
{% if events %}
{% if events %}
<ul
class=
"list-unstyled d-flex flex-column gap-3 mb-0"
>
<ul
class=
"list-unstyled d-flex flex-column gap-3 mb-0"
>
{# using a list here to be able to set a value in the nested block #}
{# using a list here to be able to set a value in the nested block #}
{% set first_now_done
= []
%}
{% set
ns = namespace(
first_now_done
=false)
%}
{% for event in events %}
{% for event in events %}
{% if event.schedule_end
<
now
%}
{% if event.schedule_end
<
now
%}
...
@@ -28,11 +28,11 @@
...
@@ -28,11 +28,11 @@
scheduled=true if event.id | safe in my_scheduled_events,
scheduled=true if event.id | safe in my_scheduled_events,
first=loop.first,
first=loop.first,
event_when=event_when,
event_when=event_when,
first_now=true if event_when == 'now' and not first_now_done
[0]
first_now=true if event_when == 'now' and not
ns.
first_now_done
) }}
) }}
{% if when == 'now'
and not first_now_done[0]
%}
{% if
event_
when == 'now' %}
{% set
ignore =
first_now_done
.append(T
rue
)
%}
{% set
ns.
first_now_done
= t
rue %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</ul>
</ul>
...
...
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