| <div class="sectionHeading">Comments</div> |
| <div class="sectionContent"> |
| <% if @comments %> |
| <table cellpadding="0" cellspacing="0" border="0" class="sectionTable"> |
| <tr> |
| <td class="sectionTableCell"> |
| <table width="100%"> |
| <tr> |
| <th>ID</th> |
| <th>Title</th> |
| <th>Created</th> |
| <th>Created By</th> |
| <th>Page</th> |
| <th>Review<br>Complete<br>(Harvested)</th> |
| <th>Reviewer</th> |
| <th>Review Note</th> |
| <th>Review Note<br>Send On</th> |
| <% if @site.nil? %><th>Site</th><% end %> |
| <<th>Actions</th> |
| </tr> |
| |
| <% for comment in @comments %> |
| <% comment.review_note = 'Click to add...' if comment.review_note.blank? %> |
| <tr> |
| <td><%= comment.id %></td> |
| <td><%= link_to_comment comment %></td> |
| <td><%= comment.created_on.strftime("%I:%M %p %d-%b-%y") %></td> |
| <td><%= link_to_user comment.user %></td> |
| <td><%= link_to_page comment.page %></td> |
| <td><%= link_to_done_toggle comment %></td> |
| <td><%= link_to_reviewer comment %></td> |
| <td> |
| <% if admin? %> |
| <%= editable_content(:content => {:element => 'span', |
| :text => comment.review_note, |
| :options => {:id => "review_note_#{comment.id}", |
| :class => 'editable-content'}}, |
| :url => { :controller => 'review', |
| :action => 'note', |
| :id => comment.id |
| }, |
| :ajax => {:okText => "'Ok'",:cancelText => "'Cancel'" }) %> |
| <% else %> |
| <%= comment.review_note %> |
| <% end %> |
| </td> |
| <td><%= comment.review_note_send_on.localtime.strftime(TIME_FORMAT) unless comment.review_note_send_on.nil? %></td> |
| <% if @site.nil? %><td><%= link_to_site comment.site %></td><% end %> |
| <td>[<%= link_to 'Edit', :controller => 'comments', :action => 'edit', :id => comment.id %>] |
| [<%= link_to 'Destroy', {:controller => 'comments', :action => 'destroy', :id => comment.id}, :confirm => 'Are you sure?', :method => :post %>]</td> |
| </tr> |
| <% end %> |
| </table> |
| <% else %> |
| No comments found! |
| <% end %> |
| </td> |
| </tr> |
| </table> |
| </div> |