|
| 1 | +<%# |
| 2 | +<div class="alert alert-info"> |
| 3 | + <h3>Maintenance 02/Dec/2025</h3> |
| 4 | + The SeqCode Registry will undergo a service window on Tuesday, the 2nd |
| 5 | + December, 2025 the entire day (CET). We apologize for any issues this may |
| 6 | + cause. |
| 7 | +</div> |
| 8 | +%> |
| 9 | + |
| 10 | +<% if user_signed_in? %> |
| 11 | + <div id="notification-permission" class="text-center" style="display: none;"> |
| 12 | + <%= button_tag(class: 'btn btn-primary', id: 'enable') do %> |
| 13 | + <%= fa_icon('bell') %> |
| 14 | + Enable notifications |
| 15 | + <% end %> |
| 16 | + </div> |
| 17 | +<% end %> |
| 18 | + |
| 19 | +<div class="main-page-box text-center bg-light rounded-lg border my-5 mx-3 p-5"> |
| 20 | + <h1>SeqCode Registry</h1> |
| 21 | + <p class="lead"> |
| 22 | + Part of the |
| 23 | + <a href="https://isme-microbes.org/seqcode-initiative" |
| 24 | + target=_blank>SeqCode initiative</a>, a path forward for naming |
| 25 | + the uncultivated |
| 26 | + </p> |
| 27 | + <hr/> |
| 28 | + <div class="container p-0"> |
| 29 | + <ul class="row nav nav-pills" role="tablist" id="lead-tab"> |
| 30 | + <% |
| 31 | + tabs = { |
| 32 | + register: ['pen-fancy', 'Register New Entries', false], |
| 33 | + search: [ |
| 34 | + 'search', |
| 35 | + 'Search and Explore', |
| 36 | + true |
| 37 | + ], |
| 38 | + read: ['book-reader', 'Read and Learn More', false] |
| 39 | + } |
| 40 | + %> |
| 41 | + <% tabs.each do |k, v| %> |
| 42 | + <li class="col-md-4 px-3 nav-item" role="presentation"> |
| 43 | + <%= link_to( |
| 44 | + "##{k}-content", id: "#{k}-tab", |
| 45 | + data: { toggle: 'pill' }, # role: 'tab', |
| 46 | + aria: { controls: "#{k}-content", selected: v[2] }, |
| 47 | + class: 'p-3 w-100 h-100 rounded border w-100 text-primary ' \ |
| 48 | + 'border-primary nav-link main-tab-button ' \ |
| 49 | + '' + (v[2] ? 'active' : '') |
| 50 | + ) do %> |
| 51 | + <%= fa_icon(v[0], style: 'font-size: 300%;', class: 'mb-3') %><br/> |
| 52 | + <b><%= v[1] %></b> |
| 53 | + <% end %> |
| 54 | + </li> |
| 55 | + <% end %> |
| 56 | + </ul> |
| 57 | + </div> |
| 58 | + |
| 59 | + <!-- Dynamic content --> |
| 60 | + <div class="tab-content mt-0" style="font-size: 150%;" id="lead-tabContent"> |
| 61 | + <div class="tab-pane fade jumbotron p-5" |
| 62 | + id="register-content" role="tabpanel" aria-labelledby="register-tab"> |
| 63 | + <%= fa_icon('caret-down', class: 'text-primary mb-4 d-md-none d-block') %> |
| 64 | + <% if !user_signed_in? %> |
| 65 | + In order to contribute to SeqCode Registry, |
| 66 | + <%= link_to('Create a User', new_user_registration_path) %> or |
| 67 | + <%= link_to('Login', new_user_session_path) %> |
| 68 | + <% elsif !current_contributor? %> |
| 69 | + You are currently not registered as a contributor, please |
| 70 | + <%= link_to('Request contributor status', |
| 71 | + contributor_request_path) %> |
| 72 | + <% else %> |
| 73 | + <%= link_to(new_name_url) do %> |
| 74 | + <%= fa_icon('plus-circle', class: 'mr-2') %> |
| 75 | + Register individual new names in our standard mode |
| 76 | + <% end %> |
| 77 | + or <br/> |
| 78 | + <%= link_to(tutorials_url) do %> |
| 79 | + <%= fa_icon('shoe-prints', class: 'mr-2') %> |
| 80 | + Follow a guided registration for multiple novel names |
| 81 | + <% end %> |
| 82 | + <% end %> |
| 83 | + </div> |
| 84 | + <div class="tab-pane fade show active jumbotron p-5" |
| 85 | + id="search-content" role="tabpanel" aria-labelledby="search-tab"> |
| 86 | + <%= fa_icon('caret-down', class: 'text-primary mb-4 d-md-none d-block') %> |
| 87 | + <div class='mx-2'> |
| 88 | + <%= render(partial: 'shared/search_bar') %> |
| 89 | + </div> |
| 90 | + <p class="small mt-4"> |
| 91 | + We have identified <%= |
| 92 | + link_to(pluralize(@entries[:names].count, 'name'), names_path) |
| 93 | + %>, including <%= |
| 94 | + link_to( |
| 95 | + pluralize(@entries[:validly_published].count, 'name'), |
| 96 | + names_path(status: 'SeqCode') |
| 97 | + ) |
| 98 | + %> validly published under the SeqCode in <%= |
| 99 | + link_to( |
| 100 | + pluralize(@entries[:register_lists].count, 'register list'), |
| 101 | + registers_path(status: 'validated') |
| 102 | + ) |
| 103 | + %>. |
| 104 | + </p> |
| 105 | + </div> |
| 106 | + <div class="tab-pane fade jumbotron p-5" |
| 107 | + id="read-content" role="tabpanel" aria-labelledby="read-tab"> |
| 108 | + <%= fa_icon('caret-down', class: 'text-primary mb-4 d-md-none d-block') %> |
| 109 | + Interested in learning more about the SeqCode? |
| 110 | + <br/> |
| 111 | + <%= link_to(page_about_url) do %> |
| 112 | + <%= fa_icon('question-circle') %> |
| 113 | + Visit the <i>About</i> page of the SeqCode Registry<% end %>, |
| 114 | + <br/> |
| 115 | + <%= link_to(page_seqcode_url) do %> |
| 116 | + <%= fa_icon('book') %> |
| 117 | + Read the current version of the SeqCode<% end %> or |
| 118 | + <br/> |
| 119 | + <%= link_to(page_publications_url) do %> |
| 120 | + <%= fa_icon('newspaper') %> |
| 121 | + Check-out the SeqCode publications<% end %> |
| 122 | + </div> |
| 123 | + </div> |
| 124 | +</div> |
| 125 | + |
| 126 | +<%= render(partial: 'user_actions') %> |
| 127 | +<%= render(partial: 'news') %> |
| 128 | + |
| 129 | +<div class="container"> |
| 130 | + <div class="row"> |
| 131 | + <div class="col-lg-12 text-center mt-5"> |
| 132 | + <h2>Recent entries</h1> |
| 133 | + <hr/> |
| 134 | + </div> |
| 135 | + <% @entries.each do |k, v| %> |
| 136 | + <div class="col-lg-4 pb-2"> |
| 137 | + <div class="text-center bg-light rounded-lg border p-5 h-100 |
| 138 | + recent-entries-list"> |
| 139 | + <h3><%= k.to_s.capitalize %></h3> |
| 140 | + <% v.first(5).each do |i| %> |
| 141 | + <%= link_to(i) do %> |
| 142 | + <div><%= i.send(@display[k][0]) %></div> |
| 143 | + <% end %> |
| 144 | + <% end %> |
| 145 | + <%= link_to(@display[k][1], class: 'btn btn-primary mt-2') do %> |
| 146 | + See all |
| 147 | + <% end %> |
| 148 | + </div> |
| 149 | + </div> |
| 150 | + <% end %> |
| 151 | + </div> |
| 152 | +</div> |
| 153 | + |
| 154 | +<br/> |
| 155 | +<%= render(partial: 'shared/cc') %> |
0 commit comments