Sha256: 776c85bfbf0ac6f2206b95eb7aa151a6ba49b186d9fdb30b7a0356894e929008

Contents?: true

Size: 1.69 KB

Versions: 4

Compression:

Stored size: 1.69 KB

Contents

<% title_tag @post.title %>

<div id="post-detail" class="panel panel-default">
  <div class="panel-body">
    <div class="post-opts clearfix">
      <div class="pull-left">
        <a href="<%= posts_path %>" class="btn btn-default"><i class="fa fa-chevron-left"></i> 返回文章列表</a>
      </div>

      <div class="pull-right">
        <% if can?(:update, @post) %>
        <%= link_to '编辑', edit_post_path, class: 'btn btn-sm btn-default' %>
        <% end %>

        <% if can?(:publish, @post) && @post.upcoming? %>
        <%= link_to '审核通过', publish_post_path, method: 'put', class: 'btn btn-sm btn-success' %>
        <% end %>

        <% if can?(:destroy, @post) && @post.upcoming? %>
        <%= link_to '删除', @post, method: 'delete', class: 'btn btn-sm btn-danger', data: { confirm: "确定要删除么?" } %>
        <% end %>
      </div>
    </div>
    <h1><%= @post.title %></h1>
    <div class="post-info">
      <%= press_user_name_tag(@post.user) %> ·
      <span class="time" title="发布时间"><i class="fa fa-clock-o"></i> <%= timeago @post.created_at %></span> ·
      <%= @post.hits %> 次阅读 ·
      <a href="#comments"><i class="fa fa-comments-o"></i> <%= @post.comments_count %> 条评论</a>
    </div>
    <div class="post-body markdown">
      <%= markdown @post.body %>
    </div>
    <%= social_share_button_tag @post.title %>
    <div class="post-actions">
      <%= likeable_tag(@post, class: 'btn btn-lg btn-default') %>

      <% unless @post.user&.admin? %>
        <%= reward_user_tag(@post.user, class: 'btn btn-lg btn-default') %>
      <% end %>
    </div>
  </div>
</div>

<div id="comments">
  <%= render "/shared/comments", commentable: @post %>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
homeland-press-0.3.4 app/views/homeland/press/posts/show.html.erb
homeland-press-0.3.3 app/views/homeland/press/posts/show.html.erb
homeland-press-0.3.2 app/views/homeland/press/posts/show.html.erb
homeland-press-0.3.1 app/views/homeland/press/posts/show.html.erb