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) %>">
|
|
|
|
<span class="date-text" data-editable="<%= due_date_editable %>"
|
|
|
|
data-toggle="tooltip" data-placement="top" title="<%= due_status %>" data-due-status="<%= due_status %>">
|
|
|
|
<span id="dueDateLabelContainer" class="view-block" >
|
|
|
|
<%= render partial: "experiments/table_due_date_label.html.erb" ,
|
|
|
|
locals: { my_module: my_module, user: user } %>
|
|
|
|
</span>
|
|
|
|
<% if due_date_editable %>
|
|
|
|
<div class="datetime-picker-container" id="due-date">
|
|
|
|
<input id="calendarDueDate<%= my_module.id %>"
|
|
|
|
type="datetime"
|
|
|
|
data-toggle='date-time-picker'
|
|
|
|
class="form-control calendar-input calendar-due-date"
|
|
|
|
readonly
|
|
|
|
placeholder="<%= t('my_modules.details.no_due_date_placeholder') %>"
|
|
|
|
data-date-format="<%= datetime_picker_format_full %>"
|
|
|
|
data-date-locale="<%= I18n.locale %>"
|
|
|
|
data-date-use-current="false"
|
|
|
|
data-date-orientation="left"
|
2023-01-05 18:14:34 +08:00
|
|
|
data-positioning-vertical="bottom"
|
2022-12-02 18:01:40 +08:00
|
|
|
value="<%= my_module.due_date ? l(my_module.due_date, format: :full) : '' %>"/>
|
|
|
|
</div>
|
|
|
|
<div class="fas fa-times-circle clear-date"
|
|
|
|
data-toggle='clear-date-time-picker'
|
|
|
|
data-target='calendarDueDate<%= my_module.id %>'>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
</div>
|