42 lines
1.9 KiB
Plaintext
42 lines
1.9 KiB
Plaintext
<div class="comment-block" <%= "data-id=#{form_comment.id}" unless form_comment.new_record? %>>
|
|
<% unless form_comment.new_record? %>
|
|
<div>
|
|
<span class="user_name"><%= form_comment.uploader.name rescue "" %></span>
|
|
<span class="update_time"><%= form_comment.display_updated_at rescue "" %></span>
|
|
<p class="content_text markdown_text"><%= form_comment.content %></p>
|
|
<%= f.text_area :content, :class => "hide content_textarea", :placeholder => t("ruling_timer.comments"), :title => t("ruling_timer.comments") %>
|
|
</div>
|
|
<% end %>
|
|
<div class="input-block">
|
|
<% if form_comment.new_record? %>
|
|
<div>
|
|
<span class="user_name"><%= @current_user.name rescue "" %></span>
|
|
<%= f.text_area :content, :class => "content_textarea", :placeholder => t("ruling_timer.comments"), :title => t("ruling_timer.comments") %>
|
|
</div>
|
|
<% end %>
|
|
<% if form_comment.new_record? %>
|
|
<span class="delete_comment add-on btn" title="<%= t(:delete_) %>">
|
|
<a class="icon-trash"></a>
|
|
</span>
|
|
<% else %>
|
|
<% if @current_user.id == form_comment.uploader.id %>
|
|
<span class="add-on btn edit_comment"><a class="icon-edit" title="<%= t(:edit) %>"></a></span>
|
|
<% unless @no_comment_save_btn %>
|
|
<span class="cancel_edit_comment add-on btn hide" title="<%= t("ruling_timer.cancel_edit") %>">
|
|
<a class="icon-remove"></a>
|
|
</span>
|
|
<% end %>
|
|
<span class="remove_existing_record add-on btn" title="<%= t(:remove) %>">
|
|
<%= f.hidden_field :id %>
|
|
<a class="icon-remove"></a>
|
|
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
|
|
</span>
|
|
<% end %>
|
|
<% end %>
|
|
<% unless @no_comment_save_btn %>
|
|
<span class="save_comment btn <%= 'hide' if !form_comment.new_record? %>" title="<%= t("ruling_timer.save") %>">
|
|
<a class="icon-save"></a>
|
|
</span>
|
|
<% end %>
|
|
</div>
|
|
</div> |