Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rescheduled 🗓️
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
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
c3lingo
rescheduled 🗓️
Commits
1c54dcf5
Commit
1c54dcf5
authored
May 28, 2024
by
Teal
Browse files
Options
Downloads
Patches
Plain Diff
fix past logic
parent
51f34dfb
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
app/views/assignments/by_user.html.erb
+2
-2
2 additions, 2 deletions
app/views/assignments/by_user.html.erb
app/views/assignments/index.html.erb
+1
-1
1 addition, 1 deletion
app/views/assignments/index.html.erb
app/views/sessions/_session.html.erb
+1
-1
1 addition, 1 deletion
app/views/sessions/_session.html.erb
with
4 additions
and
4 deletions
app/views/assignments/by_user.html.erb
+
2
−
2
View file @
1c54dcf5
...
...
@@ -8,7 +8,7 @@
<div>
<h2
class=
"text-lg my-4"
>
List View
</h2>
<%
@user
.
assignments
.
includes
(
:session
,
session: :conference
).
order
(
'sessions.starts_at'
).
group_by
{
|
a
|
a
.
session
.
starts_at
.
strftime
(
'%Y-%m-%d'
)
}.
each
do
|
date
,
assignments_on_date
|
%>
<h5
class=
"text-base mt-2
<%=
date
<
now
?
"past"
:
"future"
%>
"
>
<%=
date
%>
</h5>
<h5
class=
"text-base mt-2
<%=
Time
.
parse
(
date
).
end_of_day
<
now
?
"past"
:
"future"
%>
"
>
<%=
date
%>
</h5>
<ol
class=
"list-inside"
>
<%
assignments_on_date
.
each
do
|
assignment
|
%>
<li
class=
"
<%=
assignment
.
session
.
starts_at
<
now
?
"past"
:
"future"
%>
"
>
...
...
@@ -38,7 +38,7 @@
</thead>
<tbody>
<%
@user
.
assignments
.
includes
(
:session
,
session: :conference
).
order
(
'sessions.starts_at'
).
each
do
|
assignment
|
%>
<tr
class=
"*:border *:p-1
<%=
assignment
.
session
.
start
s_at
<
Time
.
now
?
"past"
:
"future"
%>
"
>
<tr
class=
"*:border *:p-1
<%=
assignment
.
session
.
end
s_at
<
Time
.
now
?
"past"
:
"future"
%>
"
>
<td>
<%=
assignment
.
session
.
starts_at
.
strftime
(
'%Y-%m-%d'
)
%>
</td>
<td>
<%=
assignment
.
session
.
starts_at
.
strftime
(
'%H:%M'
)
%>
</td>
<td>
<%=
assignment
.
session
.
ends_at
.
strftime
(
'%H:%M'
)
%>
</td>
...
...
...
...
This diff is collapsed.
Click to expand it.
app/views/assignments/index.html.erb
+
1
−
1
View file @
1c54dcf5
...
...
@@ -4,7 +4,7 @@
<div
class=
"my-8"
>
<h4
class=
"text-xl my-2"
>
<%=
link_to
user
.
name
,
user_assignments_path
(
user
)
%>
<span
class=
"font-normal"
>
<%=
link_to
user_assignments_path
(
user
,
format:
'ics'
)
do
%>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 20 20"
fill=
"currentColor"
aria-hidden=
"true"
class=
"ml-2 mb-1 size-4 inline-block stroke-slate-400 fill-slate-400"
><path
fill-rule=
"evenodd"
d=
"M5.75 2a.75.75 0 01.75.75V4h7V2.75a.75.75 0 011.5 0V4h.25A2.75 2.75 0 0118 6.75v8.5A2.75 2.75 0 0115.25 18H4.75A2.75 2.75 0 012 15.25v-8.5A2.75 2.75 0 014.75 4H5V2.75A.75.75 0 015.75 2zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75z"
clip-rule=
"evenodd"
></path></svg>
<%
end
%>
</span></h4>
<%
assignments
.
group_by
{
|
a
|
a
.
session
.
starts_at
.
strftime
(
'%Y-%m-%d'
)
}.
each
do
|
date
,
assignments_on_date
|
%>
<h5
class=
"text-base mt-2
<%=
date
<
now
?
"past"
:
"future"
%>
"
>
<%=
date
%>
</h5>
<h5
class=
"text-base mt-2
<%=
Time
.
parse
(
date
).
end_of_day
<
now
?
"past"
:
"future"
%>
"
>
<%=
date
%>
</h5>
<ol
class=
"list-inside"
>
<%
assignments_on_date
.
each
do
|
assignment
|
%>
<li
class=
"
<%=
assignment
.
session
.
starts_at
<
now
?
"past"
:
"future"
%>
"
>
...
...
...
...
This diff is collapsed.
Click to expand it.
app/views/sessions/_session.html.erb
+
1
−
1
View file @
1c54dcf5
<%
unassigned_users
=
User
.
all
-
session
.
assignments
.
collect
(
&
:user
)
%>
<%=
turbo_frame_tag
dom_id
(
session
)
do
%>
<div
class=
"session shadow hover:shadow-lg overflow-scroll text-sm w-full !h-full min-h-full hover:!min-h-max
<%=
session
.
translators_needed?
?
"translators-needed"
:
"no-translators-needed"
%>
<%=
session
.
backup_needed?
?
"backup-needed"
:
"no-backup-needed"
%>
<%=
session
.
assignees?
?
"has-assignees"
:
"no-assignees"
%>
<%=
(
session
.
start
s_at
<
Time
.
now
?
"past"
:
""
)
%>
"
>
<div
class=
"session shadow hover:shadow-lg overflow-scroll text-sm w-full !h-full min-h-full hover:!min-h-max
<%=
session
.
translators_needed?
?
"translators-needed"
:
"no-translators-needed"
%>
<%=
session
.
backup_needed?
?
"backup-needed"
:
"no-backup-needed"
%>
<%=
session
.
assignees?
?
"has-assignees"
:
"no-assignees"
%>
<%=
(
session
.
end
s_at
<
Time
.
now
?
"past"
:
""
)
%>
"
>
<h4>
<small
class=
"text-2xs uppercase font-light bg-black/10 rounded-sm p-1 mr-1 lang-
<%=
session
.
language
%>
"
>
<%=
session
.
language
%>
</small>
<%=
link_to
session
.
title
,
session
.
url
,
target:
"_top"
%>
...
...
...
...
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
sign in
to comment