forked from bofh/fetsite
AutoCommit Son Aug 2 16:03:01 CEST 2015
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
<b><%= (!comment.anonym) ? comment.user.try(:email) : "Anonym" %>
|
<b><%= (!comment.anonym) ? comment.user.try(:email) : "Anonym" %>
|
||||||
</b> (<%= I18n.l(comment.created_at) %>)
|
</b> (<%= I18n.l(comment.created_at) %>)
|
||||||
|
|
||||||
<%= link_to ffi1_icon("remove9"), comment, method: :delete, data: { confirm: 'Are you sure?' }, remote: true %>:
|
<%= link_to ffi1_icon("remove9"), comment_path(comment), method: :delete, data: { confirm: 'Are you sure?' }, remote: true %>:
|
||||||
<p>
|
<p>
|
||||||
<%= comment.text %>
|
<%= comment.text %>
|
||||||
<% if can?(:comment, comment.commentable) %>
|
<% if can?(:comment, comment.commentable) %>
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<div id="<%= divid_for(comments_block,"newform") %>">
|
<div id="<%= divid_for(comments_block,"newform") %>">
|
||||||
</div>
|
</div>
|
||||||
<% unless comments_block.comments.roots.empty? %>
|
<% unless comments_block.comments.roots.empty? %>
|
||||||
|
|
||||||
<div id="<%= Comment.wrapid_for( comments_block)%>">
|
<div id="<%= Comment.wrapid_for( comments_block)%>">
|
||||||
<%= render partial:"comments/comments", object: comments_block.comments.order(:created_at).roots.reverse_order if params[:show_comments] %><%# can? fehlt!%>
|
<%= render partial:"comments/comments", object: comments_block.comments.order(:created_at).roots.reverse_order if params[:show_comments] %><%# can? fehlt!%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
$("#<%= Comment.wrapid_for(@commentable) %>").html("<%= escape_javascript "" %>")
|
$("#<%= Comment.wrapid_for(@commentable) %>").html("<%= escape_javascript "" %>")
|
||||||
|
|
||||||
$("#<%= Comment.switchshowid_for(@commentable) %>").replaceWith("<%= escape_javascript link_to "Comments...", comments_path(commentable_type: @commentable.class.to_s, commentable_id: @commentable.id) %>")
|
$("#<%= Comment.switchshowid_for(@commentable) %>").replaceWith("<%= escape_javascript link_to "Comments...", comments_path(commentable_type: @commentable.class.to_s.gsub("::","_"), commentable_id: @commentable.id), remote: true, id: Comment.switchshowid_for( @commentable) %>")
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
$("#<%= Comment.wrapid_for(@commentable) %>").html("<%= escape_javascript render partial:"comments/comments", object: @comments %>")
|
$("#<%= Comment.wrapid_for(@commentable) %>").html("<%= escape_javascript render partial:"comments/comments", object: @comments %>")
|
||||||
$("#<%= Comment.switchshowid_for(@commentable) %>").attr("href","<%= escape_javascript hide_comments_path(commentable_type: @commentable.class.to_s, commentable_id: @commentable.id) %>")
|
$("#<%= Comment.switchshowid_for(@commentable) %>").replaceWith("<%= escape_javascript link_to "Ausblenden", hide_comments_path(params: {commentable_type: @commentable.class.to_s.gsub("::","_"), commentable_id: @commentable.id}), remote: true , id: Comment.switchshowid_for( @commentable) %>")
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
Fetsite::Application.routes.draw do
|
Fetsite::Application.routes.draw do
|
||||||
resources :comments
|
resources :comments, except: [:show] do
|
||||||
|
collection do
|
||||||
|
get 'hide'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
resources :comments, contstraints: {id: /[0-9]+/}, only: :show
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace :survey do
|
namespace :survey do
|
||||||
resources :questions do
|
resources :questions do
|
||||||
@@ -161,11 +170,6 @@
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
resources :comments do
|
|
||||||
collection do
|
|
||||||
get 'hide'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
resources :home, :only=>[:index] do
|
resources :home, :only=>[:index] do
|
||||||
get :search, :on => :collection
|
get :search, :on => :collection
|
||||||
collection do
|
collection do
|
||||||
|
|||||||
Reference in New Issue
Block a user