2016-02-12 23:52:43 +08:00
|
|
|
<% if my_module.blank? and @my_module.present? then my_module = @my_module end %>
|
|
|
|
<% timestamp = my_module.created_at %>
|
|
|
|
<% name = my_module.name %>
|
2019-12-05 20:27:17 +08:00
|
|
|
<% for_export_all = defined?(export_all) && export_all %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<div class="report-element report-module-element" data-ts="<%= timestamp.to_i %>" data-type="my_module" data-id='{ "my_module_id": <%= my_module.id %> }' data-scroll-id="<%= my_module.id %>" data-modal-title="<%=t "projects.reports.elements.modals.module_contents.head_title", module: my_module.name %>" data-name="<%= name %>" data-icon-class="fas fa-credit-card">
|
2016-02-12 23:52:43 +08:00
|
|
|
<div class="report-element-header">
|
|
|
|
<div class="row">
|
|
|
|
<div class="pull-left user-time">
|
2020-07-28 15:53:35 +08:00
|
|
|
<%= t("projects.reports.elements.module.user_time", timestamp: l(timestamp, format: :full)) %>
|
2020-11-17 20:54:13 +08:00
|
|
|
<b><%= link_to t('projects.reports.elements.all.scinote_link'), protocols_my_module_url(my_module), target: :_blank %></b>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
<div class="pull-right controls">
|
2016-07-29 16:42:29 +08:00
|
|
|
<%= render partial: "reports/elements/element_controls.html.erb", locals: { show_sort: true } %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="report-element-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="pull-left module-name">
|
|
|
|
<h4>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-credit-card"></span>
|
2018-11-12 08:34:00 +08:00
|
|
|
<%= name %>
|
|
|
|
<% if my_module.archived? %>
|
|
|
|
<span class="label label-warning"><%=t 'search.index.archived' %></span>
|
|
|
|
<% end %>
|
|
|
|
</h4>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-23 20:24:30 +08:00
|
|
|
<p class="module-start-date">
|
|
|
|
<% if my_module.started_on.present? %>
|
|
|
|
<%= t('projects.reports.elements.module.started_on', started_on: l(my_module.started_on, format: :full)) %>
|
|
|
|
<% else %>
|
2020-07-28 15:53:35 +08:00
|
|
|
<em><%= t("projects.reports.elements.module.no_start_date") %></em>
|
2020-07-23 20:24:30 +08:00
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<p class="module-due-date">
|
|
|
|
<% if my_module.due_date.present? %>
|
2020-07-28 15:53:35 +08:00
|
|
|
<%= t("projects.reports.elements.module.due_date", due_date: l(my_module.due_date, format: :full)) %>
|
2020-07-23 20:24:30 +08:00
|
|
|
<% else %>
|
2020-07-28 15:53:35 +08:00
|
|
|
<em><%= t("projects.reports.elements.module.no_due_date") %></em>
|
2020-07-23 20:24:30 +08:00
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<p class="module-status">
|
|
|
|
<% status = my_module.my_module_status %>
|
2020-07-28 15:54:47 +08:00
|
|
|
<%= t("projects.reports.elements.module.status") %>
|
2020-07-23 20:24:30 +08:00
|
|
|
<span class="status-block" style="background: <%= status.color %>"><%= status.name %></span>
|
2020-09-09 16:46:21 +08:00
|
|
|
<% if my_module.completed? %>
|
|
|
|
<span style="margin-left: 10px;">
|
|
|
|
<%= t("my_modules.states.completed") %>
|
|
|
|
<%= l(my_module.completed_on, format: :full) %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
2020-07-23 20:24:30 +08:00
|
|
|
</p>
|
2016-02-12 23:52:43 +08:00
|
|
|
<div class="row module-tags">
|
|
|
|
<div class="pull-left">
|
2020-07-28 15:53:35 +08:00
|
|
|
<%= t("projects.reports.elements.module.tags_header") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
2019-10-17 19:30:14 +08:00
|
|
|
<% if my_module.tags.any? %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% my_module.tags.each do |tag| %>
|
|
|
|
<div class="pull-left module-tag" style="background-color: <%= tag.color %>;">
|
|
|
|
<%= tag.name %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<div class="pull-left module-no-tag">
|
2020-07-28 15:53:35 +08:00
|
|
|
<em><%= t("projects.reports.elements.module.no_tags") %></em>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2020-07-23 20:24:30 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<% if my_module.description.present? %>
|
|
|
|
<%= custom_auto_link(my_module.prepare_for_report(:description, for_export_all),
|
|
|
|
team: current_team,
|
2020-09-08 22:10:24 +08:00
|
|
|
simple_format: false,
|
2020-07-23 20:24:30 +08:00
|
|
|
base64_encoded_imgs: for_export_all) %>
|
|
|
|
<% else %>
|
2020-09-08 22:10:24 +08:00
|
|
|
<em><%= t("projects.reports.elements.module.no_description") %></em>
|
2020-07-23 20:24:30 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
<div class="report-element-children">
|
|
|
|
<%= children if (defined? children and children.present?) %>
|
|
|
|
</div>
|
2016-07-29 16:42:29 +08:00
|
|
|
</div>
|