You've already forked baupm-core
wrapped comments
This commit is contained in:
@@ -33,39 +33,41 @@
|
||||
<%= link_to_attachments @news %>
|
||||
</div>
|
||||
|
||||
<div id="comments" style="margin-bottom:16px;" class="flex-box">
|
||||
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
|
||||
<% if @news.commentable? && @comments.size >= 3 %>
|
||||
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments", :scroll => "comment_comments" %></p>
|
||||
<% end %>
|
||||
<% @comments.each do |comment| %>
|
||||
<% next if comment.new_record? %>
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,
|
||||
:title => l(:button_delete),
|
||||
:class => 'icon-only icon-del' %>
|
||||
</div>
|
||||
<h4><%= avatar(comment.author) %><%= authoring comment.created_on, comment.author %></h4>
|
||||
<div class="wiki">
|
||||
<%= textilizable(comment.comments) %>
|
||||
</div>
|
||||
<% end if @comments.any? %>
|
||||
</div>
|
||||
<div class="news-content flex-box">
|
||||
<div id="comments" style="margin-bottom:16px;">
|
||||
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
|
||||
<% if @news.commentable? && @comments.size >= 3 %>
|
||||
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments", :scroll => "comment_comments" %></p>
|
||||
<% end %>
|
||||
<% @comments.each do |comment| %>
|
||||
<% next if comment.new_record? %>
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,
|
||||
:title => l(:button_delete),
|
||||
:class => 'icon-only icon-del' %>
|
||||
</div>
|
||||
<h4><%= avatar(comment.author) %><%= authoring comment.created_on, comment.author %></h4>
|
||||
<div class="wiki">
|
||||
<%= textilizable(comment.comments) %>
|
||||
</div>
|
||||
<% end if @comments.any? %>
|
||||
</div>
|
||||
|
||||
<% if @news.commentable? %>
|
||||
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
|
||||
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
|
||||
<div class="box">
|
||||
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit',
|
||||
:data => {
|
||||
:auto_complete => true
|
||||
}
|
||||
%>
|
||||
<%= wikitoolbar_for 'comment_comments', preview_news_path(:project_id => @project, :id => @news) %>
|
||||
<% if @news.commentable? %>
|
||||
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
|
||||
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
|
||||
<div class="box">
|
||||
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit',
|
||||
:data => {
|
||||
:auto_complete => true
|
||||
}
|
||||
%>
|
||||
<%= wikitoolbar_for 'comment_comments', preview_news_path(:project_id => @project, :id => @news) %>
|
||||
</div>
|
||||
<p><%= submit_tag l(:button_add) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<p><%= submit_tag l(:button_add) %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user