mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 03:46:39 +08:00
Handle situation when task creator or modifier is not present [SCI-4503]
This commit is contained in:
parent
608ee23ec4
commit
06b6907d13
2 changed files with 10 additions and 4 deletions
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-9">
|
<div class="col-xs-9">
|
||||||
<strong>
|
<strong>
|
||||||
<%= @my_module.created_by.full_name.truncate(Constants::MAX_NAME_TRUNCATION) %>
|
<%= @my_module.created_by&.full_name&.truncate(Constants::MAX_NAME_TRUNCATION) %>
|
||||||
</strong>
|
</strong>
|
||||||
<%= t('my_modules.module_header.details_popover.creator_same_user_label') if current_user == @my_module.created_by %>
|
<%= t('my_modules.module_header.details_popover.creator_same_user_label') if current_user == @my_module.created_by %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,9 +46,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-9">
|
<div class="col-xs-9">
|
||||||
<strong>
|
<strong>
|
||||||
|
<% if @my_module.last_modified_by.present? %>
|
||||||
<%= t('my_modules.module_header.details_popover.modified_value',
|
<%= t('my_modules.module_header.details_popover.modified_value',
|
||||||
date: l(@my_module.updated_at, format: :full_date),
|
date: l(@my_module.updated_at, format: :full_date),
|
||||||
full_name: @my_module.last_modified_by.full_name.truncate(Constants::MAX_NAME_TRUNCATION)) %>
|
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',
|
||||||
|
date: l(@my_module.updated_at, format: :full_date)) %>
|
||||||
|
<% end %>
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -649,6 +649,7 @@ en:
|
||||||
created_label: "Created"
|
created_label: "Created"
|
||||||
modified_label: "Modified"
|
modified_label: "Modified"
|
||||||
modified_value: "%{date} by %{full_name}"
|
modified_value: "%{date} by %{full_name}"
|
||||||
|
modified_value_without_user: "%{date}"
|
||||||
start_date: "Start date:"
|
start_date: "Start date:"
|
||||||
no_start_date: "not set"
|
no_start_date: "not set"
|
||||||
no_start_date_placeholder: "+ Add starting date"
|
no_start_date_placeholder: "+ Add starting date"
|
||||||
|
|
Loading…
Add table
Reference in a new issue