File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,4 +61,15 @@ def update_status_with_alert(par)
6161 @status_alert = 'An unexpected error occurred'
6262 false
6363 end
64+
65+ ## ============ --- HELPER FUNCTIONS FOR CURATION --- ============
66+
67+ def observing_curators
68+ @observing_curators ||=
69+ observers . where ( curator : true ) . where . not ( id : created_by_id )
70+ end
71+
72+ def observing_curators?
73+ observing_curators . any?
74+ end
6475end
Original file line number Diff line number Diff line change @@ -852,6 +852,10 @@ def can_view_correspondence?(user)
852852 can_edit? ( user ) || user? ( user )
853853 end
854854
855+ def correspondence_monitored?
856+ in_curation? || observing_curators?
857+ end
858+
855859 def can_claim? ( user )
856860 return false unless user . try ( :contributor? )
857861 return true if auto?
Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ def can_view_correspondence?(user)
175175 user . curator? || user? ( user ) || coauthor? ( user )
176176 end
177177
178+ def correspondence_monitored?
179+ in_curation? || observing_curators?
180+ end
181+
178182 def display ( _html = true )
179183 'Register List %s' % accession
180184 end
Original file line number Diff line number Diff line change 2929
3030 < dt > New message</ dt >
3131 < dd class ="pt-2 ">
32+ <% unless object . correspondence_monitored? %>
33+ < div class ="alert alert-warning ">
34+ The correspondence here is unmonitored and won't be seen by the
35+ curators. To ensure that your correspondence is monitored, please
36+ submit your list. Once you submit the list, all correspondence here
37+ will become visible to the curation team.
38+ </ div >
39+ <% end %>
3240 <%
3341 fpar =
3442 if object . is_a? Register
You can’t perform that action at this time.
0 commit comments