diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin_request/edit_comment.rhtml | 5 | ||||
-rw-r--r-- | app/views/admin_request/show.rhtml | 8 | ||||
-rw-r--r-- | app/views/request/show.rhtml | 4 | ||||
-rw-r--r-- | app/views/user/_user_listing_single.rhtml | 2 | ||||
-rw-r--r-- | app/views/user/show.rhtml | 4 |
5 files changed, 17 insertions, 6 deletions
diff --git a/app/views/admin_request/edit_comment.rhtml b/app/views/admin_request/edit_comment.rhtml index d8d7de276..ee43e849a 100644 --- a/app/views/admin_request/edit_comment.rhtml +++ b/app/views/admin_request/edit_comment.rhtml @@ -7,6 +7,11 @@ <p><label for="comment_body">Body of annotation</label><br/> <%= text_area 'comment', 'body', :rows => 10, :cols => 60 %></p> + <p><label for="comment_visible">Visible</label> + <%= select('comment', "visible", [["Yes - show comment",true],["No - hide comment",false]]) %> + </p> + + <p><%= submit_tag 'Save', :accesskey => 's' %></p> <% end %> diff --git a/app/views/admin_request/show.rhtml b/app/views/admin_request/show.rhtml index 54b307cf9..7a5deb7d7 100644 --- a/app/views/admin_request/show.rhtml +++ b/app/views/admin_request/show.rhtml @@ -110,12 +110,16 @@ <th>Actions</th> </tr> -<% for comment in @info_request.comments.find(:all, :order => 'created_at') %> +<% for comment in @info_request.comments %> <tr class="<%= cycle('odd', 'even') %>"> <td><%=h comment.id %></td> <td><%= user_both_links(comment.user) %></td> <% for column in Comment.content_columns.map { |c| c.name } %> - <td><%=h comment.send(column) %></td> + <% if column == 'body' && !comment.visible %> + <td><s><%=h comment.send(column) %></s></td> + <% else %> + <td><%=h comment.send(column) %></td> + <% end %> <% end %> <td> <%= link_to "Edit", '../edit_comment/' + comment.id.to_s %> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml index b77e3c464..a806434c4 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.rhtml @@ -98,7 +98,9 @@ </p> <% for info_request_event in @info_request_events %> - <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %> + <% if info_request_event.visible %> + <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %> + <% end %> <% end %> <% if @info_request.awaiting_description %> diff --git a/app/views/user/_user_listing_single.rhtml b/app/views/user/_user_listing_single.rhtml index 1362dc780..cd2328418 100644 --- a/app/views/user/_user_listing_single.rhtml +++ b/app/views/user/_user_listing_single.rhtml @@ -8,7 +8,7 @@ end %> <span class="bottomline"> <%= pluralize(display_user.info_requests.size, "request") %> made. - <%= pluralize(display_user.comments.size, "annotation") %> made. + <%= pluralize(display_user.visible_comments.size, "annotation") %> made. Joined on <%= simple_date(display_user.created_at) %>. </span> diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml index d2966fcfe..7e85faabe 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.rhtml @@ -111,7 +111,7 @@ <% else %> <h2> <%= @is_you ? 'Your ' : "This person's " %> - <%=pluralize(@display_user.comments.size, "annotation") %> + <%=pluralize(@display_user.visible_comments.size, "annotation") %> <!-- matches_estimated <%=@xapian_comments.matches_estimated%> --> <%= @page_desc %> </h2> @@ -120,7 +120,7 @@ <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> <% end %> - <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.comments.size) %> + <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.visible_comments.size) %> <% end %> </div> |