Skip to content

Commit 39a1739

Browse files
committed
Close #196
1 parent b9a4156 commit 39a1739

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

app/views/names/_metadata.html.erb

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,34 @@
241241

242242
<% if @name.valid? && @name.priority_date %>
243243
<dt><%= fa_icon('calendar-check') %> Date of priority</dt>
244-
<dd><%= @name.priority_date.strftime('%F %I:%M %p (%Z)') %></dd>
244+
<dd>
245+
<%= @name.priority_date.strftime('%F %I:%M %p (%Z)') %>
246+
<% if @name.affected_by_23d_amendment? %>
247+
<% id = modal('Priority date notice') do %>
248+
<% amendment = Publication.by_doi('10.1038/s43705-023-00303-y') %>
249+
This name falls under the protection of
250+
<%= amendment ? display_link(amendment) : 'Whitman et al 2023' %>,
251+
which pushes the priority date back to<br/>
252+
<b><%= @name.priority_date.strftime('%F %I:%M %p (%Z)') %></b>.
253+
<br/><br/>
254+
255+
Without this protection, the priority date would have been determined
256+
<% if @name.genus_affected_by_23d_amendment? %>
257+
by the validation date of the name:<br/>
258+
<b><%= @name.register.priority_date
259+
.strftime('%F %I:%M %p (%Z)') %></b>.
260+
<% elsif @name.type_name&.register&.priority_date.present? %>
261+
by the validation date of the type genus:<br/>
262+
<b><%= @name.type_name.register.priority_date
263+
.strftime('%F %I:%M %p (%Z)') %></b>.
264+
<% else %>
265+
by the validation date of the type genus.
266+
<% end %>
267+
<% end %>
268+
<%= modal_button(id, class: 'badge badge-pill badge-info') do %>
269+
<%= fa_icon('info-circle') %>&nbsp; Important note
270+
<% end %>
271+
<% end %>
272+
</dd>
245273
<% end %>
246274
</dl>

0 commit comments

Comments
 (0)