<div class="sectionHeading">Feedback</div> | |
<div class="sectionContent"> | |
<% if @feedbacks %> | |
<table cellpadding="0" cellspacing="0" border="0" class="sectionTable"> | |
<tr> | |
<td class="sectionTableCell"> | |
<table width="100%"> | |
<tr> | |
<th>ID</th> | |
<th>Done</th> | |
<th width="20%">Text</th> | |
<th>Created</th> | |
<th>Created By</th> | |
<th>Reviewer</th> | |
<th width="20%">Review Note</th> | |
<th>Actions</th> | |
</tr> | |
<% for feedback in @feedbacks %> | |
<% feedback.review_note = 'Click to add...' if feedback.review_note.blank? %> | |
<tr> | |
<td><%= feedback.id %></td> | |
<td><%= link_to_done_toggle(feedback) %></td> | |
<td><%= truncate(strip_tags(feedback.text)) %></td> | |
<td><%= feedback.created_on.localtime.strftime(TIME_FORMAT) %></td> | |
<td><%= link_to_user feedback.user unless feedback.user.nil? %></td> | |
<td><%= link_to_reviewer feedback %></td> | |
<td> | |
<% if admin? %> | |
<%= editable_content(:content => {:element => 'span', | |
:text => feedback.review_note, | |
:options => {:id => "feedback_note_#{feedback.id}", | |
:class => 'editable-content'}}, | |
:url => { :controller => 'review', | |
:action => 'note', | |
:id => feedback.id, | |
}, | |
:ajax => {:okText => "'Ok'",:cancelText => "'Cancel'" }) %> | |
<% else %> | |
<%= feedback.review_note %> | |
<% end %> | |
</td> | |
<td><%= link_to 'Edit', :controller => 'feedbacks', :action => 'edit', :id => feedback.id %> | |
| <%= link_to 'Destroy', {:controller => 'feedbacks', :action => 'destroy', :id => feedback.id}, :confirm => 'Are you sure?', :method => :post %></td> | |
</tr> | |
<% end %> | |
</table> | |
<% else %> | |
No feedback found! | |
<% end %> | |
</td> | |
</tr> | |
</table> | |
</div> |