devblog/app/views/comments/show.html.erb

30 lines
1.4 KiB
Plaintext

<%- model_class = Comment -%>
<div class="page-header">
<h1><%=t '.title', :default => model_class.model_name.human.titleize %></h1>
</div>
<dl class="dl-horizontal">
<dt><strong><%= model_class.human_attribute_name(:article_id) %>:</strong></dt>
<dd><%= @comment.article_id %></dd>
<dt><strong><%= model_class.human_attribute_name(:title) %>:</strong></dt>
<dd><%= @comment.title %></dd>
<dt><strong><%= model_class.human_attribute_name(:content) %>:</strong></dt>
<dd><%= @comment.content %></dd>
<dt><strong><%= model_class.human_attribute_name(:rate) %>:</strong></dt>
<dd><%= @comment.rate %></dd>
<dt><strong><%= model_class.human_attribute_name(:created_by) %>:</strong></dt>
<dd><%= @comment.created_by %></dd>
<dt><strong><%= model_class.human_attribute_name(:updated_by) %>:</strong></dt>
<dd><%= @comment.updated_by %></dd>
</dl>
<%= link_to t('.back', :default => t("helpers.links.back")),
comments_path, :class => 'btn btn-default' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
edit_comment_path(@comment), :class => 'btn btn-default' %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
comment_path(@comment),
:method => 'delete',
:data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
:class => 'btn btn-danger' %>