Skip to content

Commit

Permalink
Merge pull request #1743 from CristinaRO/issue-3994-email-visible
Browse files Browse the repository at this point in the history
Issue 3994 email visible on assignment page to a non-mod user
  • Loading branch information
sarken committed Jul 7, 2014
2 parents a901342 + 3dcd5c8 commit 8e23777
Show file tree
Hide file tree
Showing 4 changed files with 380 additions and 360 deletions.
12 changes: 8 additions & 4 deletions app/views/challenge_signups/_show_offers.html.erb
@@ -1,20 +1,24 @@
<% unless challenge_signup.offers.empty? %>
<% unless challenge_signup.offers.empty? %>

<!-- expects local variable "challenge_signup" -->
<div class="offers listbox group">
<h3 class="heading">
<%= ts("Offers") %>
<% if @challenge_assignment %>
<%= ts("by %{offerer}", :offerer => @challenge_assignment.offer_byline) %>
<% user = @challenge_assignment.try(:offer_signup).try(:pseud).try(:user) %>
<% if user %><%= mailto_link user, :subject => "[#{h(@collection.title)}] Message from Collection Maintainer" %><% end %>
<% if user && @challenge.user_allowed_to_see_assignments?(current_user) %>
<%= mailto_link user, :subject => "[#{h(@collection.title)}] Message from Collection Maintainer" %>
<% end %>
<% end %>
</h3>

<ol class="index group">
<% challenge_signup.offers.each_with_index do |offer, index| %>
<%= render "prompts/prompt_blurb", :prompt => offer, :index => index %>
<% end %>
</ol>
</div>
<% end %>

<% end %>
10 changes: 7 additions & 3 deletions app/views/challenge_signups/_show_requests.html.erb
@@ -1,20 +1,24 @@
<% unless challenge_signup.requests.empty? %>
<% unless challenge_signup.requests.empty? %>

<!-- expects local variable "challenge_signup" -->
<div class="requests listbox group">
<h3 class="heading">
<%= ts("Requests") %>
<% if @challenge_assignment %>
<%= ts("by %{requester}", :requester => @challenge_assignment.request_byline) %>
<% user = @challenge_assignment.try(:request_signup).try(:pseud).try(:user) %>
<% if user %><%= mailto_link user, :subject => "[#{h(@collection.title)}] Message from Collection Maintainer" %><% end %>
<% if user && @challenge.user_allowed_to_see_assignments?(current_user) %>
<%= mailto_link user, :subject => "[#{h(@collection.title)}] Message from Collection Maintainer" %>
<% end %>
<% end %>
</h3>

<ol class="index group">
<% challenge_signup.requests.each_with_index do |request, index| %>
<%= render "prompts/prompt_blurb", :prompt => request, :index => index %>
<% end %>
</ol>
</div>

<% end %>
<% end %>

0 comments on commit 8e23777

Please sign in to comment.