Skip to content

Commit

Permalink
Add templated genera titles in wiki source
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Oct 10, 2024
1 parent 4a62c56 commit 33dba3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/models/name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,13 @@ def name_wiki(opts = {})
y = "''Candidatus'' #{y}" if !opts[:no_candidatus] && candidatus?
return "\"#{y}\"" unless validated?

return "{{gbr|#{y}}}" if opts[:eol] && rank == 'genus'

y = "''#{y}''"
if rank == 'species' && parent&.type_accession&.==(id.to_s)
y += " (T#{'s' unless icnp? || icn?})"
end
y
opts[:eol] ? "#{y} <br/>" : y
end

def abbr_corr_name
Expand Down
5 changes: 3 additions & 2 deletions app/views/names/wiki/_wikispecies_template.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
<%= Name.rank_variant(@name.rank_above, latin: true, title: true) %>: - &lt;br/&gt;
<% end %>
<% end %>
<%= Name.rank_variant(@name.inferred_rank, latin: true, title: true)
%>: <%= @name.name_wiki(link: true) %> &lt;br/&gt;
<%=
Name.rank_variant(@name.inferred_rank, latin: true, title: true)
%>: <%= @name.name_wiki(link: true, eol: true) %>

&lt;noinclude&gt;[[Category:Taxonavigation templates]]&lt;/noinclude&gt;
&lt;includeonly&gt;[[Category:Pages with taxonavigation templates]]&lt;/includeonly&gt;

0 comments on commit 33dba3f

Please sign in to comment.