2022-12-02 18:01:40 +08:00
|
|
|
<% due_date_editable = can_update_my_module_due_date?(user, my_module)%>
|
|
|
|
<% due_status = my_module_due_status(my_module) %>
|
|
|
|
|
|
|
|
<div id="dueDateContainer" class="datetime-container"
|
|
|
|
data-update-url="<%= my_module_path(my_module, user, format: :json) %>">
|
2023-11-02 20:11:06 +08:00
|
|
|
<span class="date-text relative flex items-center" data-editable="<%= due_date_editable %>"
|
2022-12-02 18:01:40 +08:00
|
|
|
data-toggle="tooltip" data-placement="top" title="<%= due_status %>" data-due-status="<%= due_status %>">
|
|
|
|
<span id="dueDateLabelContainer" class="view-block" >
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: "experiments/table_due_date_label" ,
|
2022-12-02 18:01:40 +08:00
|
|
|
locals: { my_module: my_module, user: user } %>
|
|
|
|
</span>
|
|
|
|
<% if due_date_editable %>
|
2023-11-02 20:11:06 +08:00
|
|
|
<div class="datetime-picker-container vue-date-time-picker h-full" id="calendarDueDateContainer<%= my_module.id %>">
|
2023-11-15 22:28:25 +08:00
|
|
|
<input ref="input" type="hidden" data-simple-format="true" v-model="date" id="calendarDueDate<%= my_module.id %>" data-default="<%= l(my_module.due_date, format: :default) if my_module.due_date %>" />
|
2023-11-14 17:58:38 +08:00
|
|
|
<date-time-picker class="opacity-0" ref="vueDateTime" @change="updateDate" mode="datetime" placeholder="<%= t('my_modules.details.no_due_date_placeholder') %>"></date-time-picker>
|
2022-12-02 18:01:40 +08:00
|
|
|
</div>
|
2023-11-02 20:11:06 +08:00
|
|
|
<div class="sn-icon sn-icon-close clear-date <%= 'tw-hidden' if !my_module.due_date %>"
|
2022-12-02 18:01:40 +08:00
|
|
|
data-toggle='clear-date-time-picker'
|
|
|
|
data-target='calendarDueDate<%= my_module.id %>'>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
</div>
|