- <%= t('my_modules.module_header.details_popover.modified_label') %>
+ <%= t('my_modules.details.info_popover.modified_label') %>
<% if @my_module.last_modified_by.present? %>
- <%= t('my_modules.module_header.details_popover.modified_value',
+ <%= t('my_modules.details.info_popover.modified_value',
date: l(@my_module.updated_at, format: :full_date),
full_name: @my_module.last_modified_by.full_name.truncate(Constants::MAX_NAME_TRUNCATION)) %>
<% else %>
- <%= t('my_modules.module_header.details_popover.modified_value_without_user',
+ <%= t('my_modules.details.info_popover.modified_value_without_user',
date: l(@my_module.updated_at, format: :full_date)) %>
<% end %>
diff --git a/app/views/my_modules/_module_header_due_date.html.erb b/app/views/my_modules/_module_header_due_date.html.erb
index 67668171d..326e1cf0d 100644
--- a/app/views/my_modules/_module_header_due_date.html.erb
+++ b/app/views/my_modules/_module_header_due_date.html.erb
@@ -12,7 +12,7 @@
data-toggle='date-time-picker'
class="form-control calendar-input"
readonly
- placeholder="<%= t('experiments.canvas.full_zoom.no_due_date') %>"
+ 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"
diff --git a/app/views/my_modules/_module_header_start_date.html.erb b/app/views/my_modules/_module_header_start_date.html.erb
index 943b1bb46..6c5653c08 100644
--- a/app/views/my_modules/_module_header_start_date.html.erb
+++ b/app/views/my_modules/_module_header_start_date.html.erb
@@ -12,7 +12,7 @@
data-toggle='date-time-picker'
class="form-control calendar-input"
readonly
- placeholder="<%= t('my_modules.module_header.no_start_date_placeholder') %>"
+ placeholder="<%= t('my_modules.details.no_start_date_placeholder') %>"
data-date-format="<%= datetime_picker_format_full %>"
data-date-locale="<%= I18n.locale %>"
data-date-use-current="false"
diff --git a/app/views/my_modules/_my_module_details.html.erb b/app/views/my_modules/_my_module_details.html.erb
index 025ae5046..e6d6b57aa 100644
--- a/app/views/my_modules/_my_module_details.html.erb
+++ b/app/views/my_modules/_my_module_details.html.erb
@@ -1,16 +1,20 @@
<% my_module_editable = can_manage_module?(@my_module) %>
-
-
<%= t('my_modules.module_header.due_date') %>
+
+
+ <%= t('my_modules.details.due_date') %>
+
<%= render partial: "module_header_due_date.html.erb", locals: { my_module: @my_module } %>
@@ -30,7 +34,7 @@
- <%= t('my_modules.details.assigned_users') %>
+ <%= t('my_modules.details.assigned_users') %>
<%= render partial: "user_my_modules/index" %>
@@ -38,7 +42,7 @@
diff --git a/app/views/my_modules/_recent_protocol_dropdown.html.erb b/app/views/my_modules/_recent_protocol_dropdown.html.erb
new file mode 100644
index 000000000..302bce80e
--- /dev/null
+++ b/app/views/my_modules/_recent_protocol_dropdown.html.erb
@@ -0,0 +1,21 @@
+<% display_status = protocol.description.blank? && protocol.steps.count.zero? %>
+<% if @recent_protcols_positive %>
+
+
+
<%= t('my_modules.details.recent_protocols_from_repository') %>
+
+
+
+
+
+
+<% end %>
diff --git a/app/views/my_modules/_start_date_label.html.erb b/app/views/my_modules/_start_date_label.html.erb
index 3b24433ae..f4e48c0fa 100644
--- a/app/views/my_modules/_start_date_label.html.erb
+++ b/app/views/my_modules/_start_date_label.html.erb
@@ -2,6 +2,8 @@
<% if my_module.started_on.present? %>
<%= l(my_module.started_on, format: :full) %>
<% else %>
- <%= t('my_modules.module_header.no_start_date') %>
+
+ <%= t('my_modules.details.no_start_date_placeholder') %>
+
<% end %>
diff --git a/app/views/my_modules/_tags.html.erb b/app/views/my_modules/_tags.html.erb
index 9417a2f35..158f26f17 100644
--- a/app/views/my_modules/_tags.html.erb
+++ b/app/views/my_modules/_tags.html.erb
@@ -2,7 +2,7 @@
<%= select_tag "activity",
@@ -17,7 +17,7 @@
id: 'module-tags-selector',
'data-module-id': my_module.id,
'data-project-id': my_module.experiment.project_id,
- 'data-placeholder': t("my_modules.module_header.no_tags"),
+ 'data-placeholder': t("my_modules.details.no_tags"),
'data-tags-create-url': project_tags_path(project_id: my_module.experiment.project_id),
'data-ajax-url': search_tags_my_module_my_module_tags_path(@my_module),
'data-update-module-tags-url': my_module_my_module_tags_path(@my_module),
diff --git a/app/views/user_my_modules/_index.html.erb b/app/views/user_my_modules/_index.html.erb
index f34069125..d6afe3888 100644
--- a/app/views/user_my_modules/_index.html.erb
+++ b/app/views/user_my_modules/_index.html.erb
@@ -1,19 +1,25 @@
<% user_my_modules = @my_module.user_my_modules %>
<% if can_manage_users_in_module?(@my_module) %>
-
- <% user_my_modules.each do |user_my_module| %>
- <% user = user_my_module.user %>
-
- <%= image_tag avatar_path(user, :icon_small) %>
-
- <% end %>
- <% if @my_module.unassigned_users.any? %>
-
-
+ <% if user_my_modules.present? %>
+ <% user_my_modules.each do |user_my_module| %>
+ <% user = user_my_module.user %>
+
+ <%= image_tag avatar_path(user, :icon_small) %>
+
+ <% end %>
+ <% if @my_module.unassigned_users.any? %>
+
+
+
+ <% end %>
+ <% else %>
+
+ <%= t('my_modules.details.no_assigned_users') %>
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index ac4247fcc..78b5d07e6 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -606,7 +606,26 @@ en:
my_modules:
details:
title: "Details"
+ info_popover:
+ project_label: "Project"
+ experiment_label: "Experiment"
+ creator_label: "Creator"
+ creator_same_user_label: "(you)"
+ created_label: "Created"
+ modified_label: "Modified"
+ modified_value: "%{date} by %{full_name}"
+ modified_value_without_user: "%{date}"
+ start_date: "Start date:"
+ no_start_date_placeholder: "+ Add starting date"
+ due_date: "Due date:"
+ no_due_date_placeholder: "+ Add due date"
assigned_users: "Assigned users:"
+ no_assigned_users: "+ Assign user to task"
+ tags: "Tags:"
+ no_tags: "+ Add tags"
+ manage_tags: "Manage tags"
+ create_new_tag: "create new"
+ recent_protocols_from_repository: "Recent protocols from the Repository"
notes:
title: "Notes"
no_description: "No task description"
@@ -654,26 +673,6 @@ en:
no_archived_results: "No archived results!"
archive_timelabel: "archived on %{date}"
restored_flash: "Task %{module} restored successfully!"
- module_header:
- details_label: "Details"
- details_popover:
- project_label: "Project"
- experiment_label: "Experiment"
- creator_label: "Creator"
- creator_same_user_label: "(you)"
- created_label: "Created"
- modified_label: "Modified"
- modified_value: "%{date} by %{full_name}"
- modified_value_without_user: "%{date}"
- start_date: "Start date:"
- no_start_date: "not set"
- no_start_date_placeholder: "+ Add starting date"
- due_date: "Due date:"
- tags: "Tags:"
- no_tags: "Add new Task Tags (optional)"
- manage_tags: "Manage tags"
- create_new_tag: "create new"
- recent_protocols_from_repository: "Recent protocols from the Repository"
protocols:
head_title: "%{project} | %{module} | Protocols"
protocol_status_bar: