Skip to content

Commit

Permalink
remove old code of reviews feature
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jan 3, 2024
1 parent 49f9885 commit 9b5dd85
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 415 deletions.
90 changes: 0 additions & 90 deletions app/controllers/reviews_controller.rb

This file was deleted.

63 changes: 0 additions & 63 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,69 +102,6 @@ def current_user_admin?
session[:user] && session[:user].admin?
end

def draw_note_tree(notes,key)
output = ""
draw_note_tree_leaves(notes,0,output,key)
return output
end

def draw_note_tree_leaves(notes,level,output,key)
for note in notes
name="Anonymous"
unless note.user.nil?
name=note.user.username
end
headertext=""
notetext=""
if note.note_type.eql?(5)
headertext<< "<div class=\"header\" onclick=\"toggleHide('note_body#{note.id}','');compare('#{note.id}')\">"
notetext << " <input type=\"hidden\" id=\"note_value#{note.id}\" value=\"#{note.comment}\">
<span class=\"message\" id=\"note_text#{note.id}\">#{note.comment}</span>"
else
headertext<< "<div onclick=\"toggleHide('note_body#{note.id}','')\">"

notetext<< "<span class=\"message\" id=\"note_text#{note.id}\">#{simple_format(note.comment)}</span>"
end


output << "
<div style=\"clear:both;margin-left:#{level*20}px;\">
<div style=\"float:left;width:100%\">
#{headertext}
<div>
<span class=\"sender\" style=\"float:right\">#{name} at #{note.created_at.strftime('%m/%d/%y %H:%M')}</span>
<div class=\"header\"><span class=\"notetype\">#{note.type_label.titleize}:</span> #{note.subject}</div>
<div style=\"clear:both\"></div>
</div>
</div>
<div name=\"hiddenNote\" id=\"note_body#{note.id}\" >
<div class=\"messages\">
<div>
<div>
#{notetext}"
if session[:user].nil?
output << "<div id=\"insert\"><a href=\"\/login?redirect=/visualize/#{@ontology.to_param}/?conceptid=#{@concept.id}#notes\">Reply</a></div>"
else
if @modal
output << "<div id=\"insert\"><a href=\"#\" onclick =\"document.getElementById('m_noteParent').value='#{note.id}';document.getElementById('m_note_subject#{key}').value='RE:#{note.subject}';jQuery('#modal_form').html(jQuery('#modal_comment').html());return false;\">Reply</a></div>"
else
output << "<div id=\"insert\"><a href=\"#TB_inline?height=400&width=600&inlineId=commentForm\" class=\"thickbox\" onclick =\"document.getElementById('noteParent').value='#{note.id}';document.getElementById('note_subject#{key}').value='RE:#{note.subject}';\">Reply</a></div>"
end
end
output << "</div>
</div>
</div>
</div>
</div>
</div>"
if(!note.children.nil? && note.children.size>0)
draw_note_tree_leaves(note.children,level+1,output,key)
end
end
end

def child_id(child)
child.id.to_s.split('/').last
Expand Down
46 changes: 0 additions & 46 deletions app/helpers/ontology_metrics_helper.rb

This file was deleted.

12 changes: 0 additions & 12 deletions app/helpers/reviews_helper.rb

This file was deleted.

30 changes: 0 additions & 30 deletions app/views/reviews/_review.html.haml

This file was deleted.

56 changes: 0 additions & 56 deletions app/views/reviews/edit.html.erb

This file was deleted.

56 changes: 0 additions & 56 deletions app/views/reviews/index.html.erb

This file was deleted.

24 changes: 0 additions & 24 deletions app/views/reviews/new.html.haml

This file was deleted.

Loading

0 comments on commit 9b5dd85

Please sign in to comment.