Changeset 1164
- Timestamp:
- 06/10/08 15:48:27 (7 months ago)
- Files:
-
- trunk/app/controllers/comment_controller.rb (modified) (1 diff)
- trunk/app/views/comment/_comment.html.erb (modified) (2 diffs)
- trunk/app/views/comment/_comment_item.html.erb (modified) (1 diff)
- trunk/app/views/comment/_comment_list.html.erb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/controllers/comment_controller.rb
r1033 r1164 21 21 :conditions => ['user_id = ?', @owner.id], 22 22 :order => 'created_at DESC') 23 @make_link = false 24 23 25 respond_to do |format| 24 26 format.html { render :partial => 'comment_list', :layout => true } trunk/app/views/comment/_comment.html.erb
r1163 r1164 5 5 <%= link_to post.blog.title, blog_blog_url(:address => post.blog.address) %> 6 6 » 7 <%= link_to post.title, blog_post_view_url(:address => post.blog.address, :id => post.id) + "#" + comment.id.to_s%>7 <%= link_to post.title, blog_post_view_url(:address => post.blog.address, :id => post.id) %> 8 8 <% elsif !(upload = comment.upload_parent).nil? -%> 9 9 <%= user_picture(upload.user, 10) %> 10 10 <%= link_to upload.user.preferred_name, profile_user_url(:username => upload.user.username) %> 11 11 » 12 <%= link_to upload.filename, file_view_url(:username => upload.user.username, :id => upload.id) + "#" + comment.id.to_s%>12 <%= link_to upload.filename, file_view_url(:username => upload.user.username, :id => upload.id) %> 13 13 <% elsif !(question = comment.question_parent).nil? -%> 14 14 <%= user_picture(question.questioner, 10) %> … … 22 22 <%= link_to question.user.preferred_name, profile_user_url(:username => question.user.username) %> 23 23 :: 24 <%= link_to question.subject, ask_view_url(:username => question.user.username, :id => question.id) + "#" + comment.id.to_s%>24 <%= link_to question.subject, ask_view_url(:username => question.user.username, :id => question.id) %> 25 25 <% end -%> 26 26 </div> 27 <%= render :partial => "comment/comment_item", :locals => {:comment => comment, :show_delete => false, :highlight => false} %> 27 <%= render :partial => "comment/comment_item", 28 :locals => {:comment => comment, :show_delete => false, :highlight => false, :make_link => @make_link} %> 28 29 </div> trunk/app/views/comment/_comment_item.html.erb
r1163 r1164 26 26 <br /> 27 27 28 <%= "#%s" % comment.id %> 28 <% if defined?(make_link) && make_link == false %> 29 <%= "#%s" % comment.id %> 30 <% else %> 31 <%= link_to comment.id, "##{comment.id}" %> 32 <% end %> 29 33 30 34 <% if defined?(show_delete) && show_delete -%> trunk/app/views/comment/_comment_list.html.erb
r1131 r1164 7 7 <% else -%> 8 8 <% @comments.each do |comment| -%> 9 <%= render :partial => "comment/comment", : object => comment%>9 <%= render :partial => "comment/comment", :locals => { :comment => comment, :make_link => @make_link } %> 10 10 <% end -%> 11 11 <%= render :partial => "shared/pagination_links", :object => @comments %>
