Skip to content

Commit 34b752a

Browse files
committed
Transfer list stub
1 parent 550e7db commit 34b752a

4 files changed

Lines changed: 35 additions & 6 deletions

File tree

app/controllers/registers_controller.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class RegistersController < ApplicationController
77
notify notify_commit validate coauthors coauthors_commit
88
editorial_checks publish publish_commit new_correspondence
99
internal_notes nomenclature_review genomics_review snooze_curation
10-
recheck_pdf_files curation_genomics
10+
recheck_pdf_files curation_genomics transfer_user transfer_user_commit
1111
observe unobserve merge merge_commit sample_map
1212
reviewer_token reviewer_token_create reviewer_token_delete
1313
]
@@ -22,7 +22,7 @@ class RegistersController < ApplicationController
2222
only: %i[
2323
return return_commit endorse validate
2424
internal_notes nomenclature_review genomics_review snooze_curation
25-
recheck_pdf_files curation_genomics
25+
recheck_pdf_files curation_genomics transfer_user transfer_user_commit
2626
]
2727
)
2828
before_action(
@@ -495,6 +495,14 @@ def recheck_pdf_files
495495
redirect_back(fallback_location: @register)
496496
end
497497

498+
# GET /register/r:abc/transfer_user
499+
def transfer_user
500+
end
501+
502+
# POST /register/r:abc/transfer_user
503+
def transfer_user_commit
504+
end
505+
498506
# GET /registers/r:abc/merge
499507
def merge
500508
@crumbs = [
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<% provide(:title, @register.title) if @register.title? %>
2+
<%= render(partial: 'title') %>
3+
4+
<h2>Transfer user</h2>
5+
<p class="lead">
6+
Use this option with reserve. Consider contacting the current submitter
7+
before you proceed, and make sure you give them at least one month to
8+
respond before transfering the list.
9+
</p>
10+
<%= simple_form_for(
11+
@register, url: transfer_user_register_url(@register),
12+
method: :post) do |f| %>
13+
<div>
14+
The current submitter is: <%= display_link(@register.user) %>
15+
</div>
16+
<%= f.input(:user) %>
17+
<br/>
18+
<%= f.button(:submit, 'Transfer register list') %>
19+
<%= link_to('Cancel', @register, class: 'btn btn-secondary') %>
20+
<br/><br/>
21+
<% end %>
22+

app/views/registers/tree.html.erb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
<% if @register.title? %>
2-
<% provide(:title, @register.title) %>
3-
<% end %>
4-
1+
<% provide(:title, @register.title) if @register.title? %>
52
<%= render(partial: 'title') %>
63

74
<% def render_tree_node(n, contents) %>

config/routes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@
173173
post :merge, action: :merge_commit
174174
get :coauthors
175175
post :coauthors, action: :coauthors_commit
176+
get :transfer_user
177+
post :transfer_user, action: :transfer_user_commit
176178
# --> Special curation pages
177179
get :curation_genomics
178180
post :snooze_curation

0 commit comments

Comments
 (0)