aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/request/_hidden_correspondence.rhtml37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/views/request/_hidden_correspondence.rhtml b/app/views/request/_hidden_correspondence.rhtml
new file mode 100644
index 000000000..2c168c3fb
--- /dev/null
+++ b/app/views/request/_hidden_correspondence.rhtml
@@ -0,0 +1,37 @@
+<% if info_request_event.prominence == 'requester_only' %>
+ <%
+ if !info_request_event.nil? && info_request_event.event_type == 'response'
+ incoming_message = info_request_event.incoming_message
+ end
+ if not incoming_message.nil?
+ %>
+ <div class="correspondence" id="incoming-<%=incoming_message.id.to_s%>">
+ <p>This response has been hidden. See annotations to find out why.
+ If you are the requester, then you may
+ <%= link_to "sign in", signin_url(:r => request.request_uri) %>
+ to view the response.
+ </p>
+ </div>
+ <% elsif [ 'sent', 'followup_sent', 'resent', 'followup_resent' ].include?(info_request_event.event_type) %>
+ <div class="correspondence" id="outgoing-<%=outgoing_message.id.to_s%>">
+ <p>This outgoing message has been hidden. See annotations to
+ find out why. If you are the requester, then you may <%= link_to
+ "sign in", signin_url(:r => request.request_uri) %> to view the
+ response.
+ </p>
+ </div>
+ <% elsif info_request_event.event_type == 'comment' %>
+ <div class="comment_in_request" id="comment-<%=comment.id.to_s%>">
+ <p>This comment has been hidden. See annotations to
+ find out why. If you are the requester, then you may <%= link_to
+ "sign in", signin_url(:r => request.request_uri) %> to view the
+ response.
+ </p>
+ </div>
+ <% end %>
+
+<% elsif info_request_event.prominence == 'hidden' %>
+ <% # show nothing when hidden %>
+<% else %>
+ <% raise "unexpected prominence on request event" %>
+<% end %>