mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-03 20:40:43 -04:00
Refactor calendar to have the date placed on the left and the total estimated hours placed on the right
This commit is contained in:
1 parent
97d2fbf5bc
commit
631afa5a6d
1 file changed
+12
-9
@@ -133,14 +133,13 @@
|
|||||||
<li class="<%= calendar.day_css_classes(day) %> calbody">
|
<li class="<%= calendar.day_css_classes(day) %> calbody">
|
||||||
|
|
||||||
<p class="day-num" style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 4px;">
|
<p class="day-num" style="display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 4px;">
|
||||||
<span class="day-num-left" style="display: inline-flex; align-items: center; justify-self: start;">
|
<!-- Left: Day number and abbreviated weekday -->
|
||||||
<% if total_hours > 0 %>
|
<span class="day-num-left" style="display: inline-flex; align-items: center; justify-self: start; gap: 3px;">
|
||||||
<span class="hours-total" style="font-weight: bold; color: #555;" title="<%= l(:label_estimated_hours, default: 'Estimated hours') %>">
|
<span class="day-value" style="font-weight: bold;"><%= day.day %></span>
|
||||||
<%= total_hours.round(1) %>h
|
<span class="abbr-day" style="font-size: 0.85em; color: #777;">(<%= abbr_day_name(day.cwday) %>)</span>
|
||||||
</span>
|
|
||||||
<% end %>
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<!-- Center: New Appointment Action -->
|
||||||
<span class="day-num-center" style="display: inline-flex; align-items: center; justify-self: center;">
|
<span class="day-num-center" style="display: inline-flex; align-items: center; justify-self: center;">
|
||||||
<% if day >= User.current.today && !non_working_days.include?(day.cwday.to_s) %>
|
<% if day >= User.current.today && !non_working_days.include?(day.cwday.to_s) %>
|
||||||
<%= link_to sprite_icon('add'),
|
<%= link_to sprite_icon('add'),
|
||||||
@@ -150,9 +149,13 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="day-num-right" style="display: inline-flex; align-items: center; justify-self: end; gap: 3px;">
|
<!-- Right: Total Hours -->
|
||||||
<span class="abbr-day" style="font-size: 0.85em; color: #777;">(<%= abbr_day_name(day.cwday) %>)</span>
|
<span class="day-num-right" style="display: inline-flex; align-items: center; justify-self: end;">
|
||||||
<span class="day-value" style="font-weight: bold;"><%= day.day %></span>
|
<% if total_hours > 0 %>
|
||||||
|
<span class="hours-total" style="font-weight: bold; color: #555;" title="<%= l(:label_estimated_hours, default: 'Estimated hours') %>">
|
||||||
|
<%= total_hours.round(1) %>h
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user